Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion micro-ui/web/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@egovernments/digit-ui-components":"0.2.0",
"@egovernments/digit-ui-libraries": "1.8.18",
"@egovernments/digit-ui-module-core": "1.8.42",
"@egovernments/digit-ui-module-workbench": "1.0.26",
"@egovernments/digit-ui-module-workbench": "1.0.28",
"@egovernments/digit-ui-module-utilities": "1.0.15",
"@egovernments/digit-ui-module-open-payment":"0.0.2",
"@egovernments/digit-ui-module-hrms": "1.8.11",
Expand Down
4 changes: 2 additions & 2 deletions micro-ui/web/micro-ui-internals/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
},
"devDependencies": {
"@egovernments/digit-ui-libraries": "1.8.18",
"@egovernments/digit-ui-module-workbench": "1.0.26",
"@egovernments/digit-ui-module-workbench": "1.0.28",
"@egovernments/digit-ui-module-pgr": "1.8.12",
"@egovernments/digit-ui-module-dss": "1.8.12",
"@egovernments/digit-ui-module-core": "1.8.44",
"@egovernments/digit-ui-module-common": "1.8.10",
"@egovernments/digit-ui-module-hrms": "1.8.15",
"@egovernments/digit-ui-module-hrms": "1.8.16",
"@egovernments/digit-ui-module-utilities": "1.0.15",
"@egovernments/digit-ui-module-open-payment": "0.0.2",
"@egovernments/digit-ui-module-engagement": "1.5.20",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-css",
"version": "1.8.34",
"version": "1.8.35",
"license": "MIT",
"main": "dist/index.css",
"author": "Jagankumar <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -773,14 +773,27 @@ button:hover {
width: calc(100% - 32px);
background-color: initial;
position: relative !important;
z-index: 10;
z-index: 8 !important;
width: 100%;
height: 100%;
outline: 2px solid transparent;
outline-offset: 2px;
padding-left: 8px;
}

.digit-dropdown-employee-select-wrap .digit-dropdown-select input[type=text], .digit-dropdown-employee-select-wrap .digit-dropdown-select .digit-checkbox-container .input-emp[type=text], .digit-checkbox-container .digit-dropdown-employee-select-wrap .digit-dropdown-select .input-emp[type=text] {
position: absolute;
z-index: 8 !important;
height: 100%;
outline: 2px solid transparent;
outline-offset: 2px;
width: calc(100% - 1.75rem);
background-color: initial;
padding-top: .5rem;
padding-bottom: .5rem;
padding-left: .75rem;
color: #363636; }

.modal-content .employee-select-wrap .select-active {
position: absolute;
display: block;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

## [1.8.16] [25-July-2025]
- DatePicker HRMS - Maxwidth Added for 2 more fields

Comment on lines +1 to +4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Changelog entry formatting breaks Markdown conventions

Current problems:

  1. File starts with a level-2 heading – MD041 recommends starting with a single #.
  2. Headings need blank lines before/after (MD022).
  3. Trailing spaces on Line 2.
  4. List item on Line 3 should be preceded by a blank line (MD032).

Suggested quick fix:

-## [1.8.16] [25-July-2025] 
-- DatePicker HRMS - Maxwidth Added for 2 more fields
+# HRMS Module Changelog
+
+## [1.8.16] – 25-Jul-2025
+
+### Added
+* DatePicker – max-width applied to two additional fields.

Applying this keeps the file markdown-lint clean and improves readability.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## [1.8.16] [25-July-2025]
- DatePicker HRMS - Maxwidth Added for 2 more fields
# HRMS Module Changelog
## [1.8.16] – 25-Jul-2025
### Added
* DatePicker – max-width applied to two additional fields.
🧰 Tools
🪛 LanguageTool

[grammar] ~1-~1: Use correct spacing
Context: ## [1.8.16] [25-July-2025] - DatePicker HRMS - Max...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~3-~3: Use correct spacing
Context: ...icker HRMS - Maxwidth Added for 2 more fields ## [1.8.15] [25-July-2025] - DatePicker HR...

(QB_NEW_EN_OTHER_ERROR_IDS_5)

🪛 markdownlint-cli2 (0.17.2)

2-2: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


2-2: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


2-2: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)


3-3: Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

🤖 Prompt for AI Agents
In micro-ui/web/micro-ui-internals/packages/modules/hrms/CHANGELOG.md lines 1 to
4, fix markdown formatting by changing the initial heading from level-2 (##) to
level-1 (#), add blank lines before and after headings, remove trailing spaces
on line 2, and insert a blank line before the list item on line 3 to comply with
markdown lint rules and improve readability.

## [1.8.15] [25-July-2025]
- DatePicker HRMS Maxwidth Added

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-module-hrms",
"version": "1.8.15",
"version": "1.8.16",
"description": "HRMS",
"license": "MIT",
"main": "dist/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ const SelectDateofEmployment = ({ t, config, onSelect, formData = {}, userType,
onSelect(config.key, { ...formData[config.key], [input]: value });
}


const fieldStyle = {
maxWidth: "36.25rem",
paddingRight: "2.5rem",
};

return (
<div>
{inputs?.map((input, index) => (
Expand All @@ -32,7 +38,7 @@ const SelectDateofEmployment = ({ t, config, onSelect, formData = {}, userType,
{t(input.label)}
{input.isMandatory ? " * " : null}
</CardLabel>
<div className="field">
<div className="field" style={fieldStyle}>
<DatePicker
key={input.name}
min={formData?.SelectDateofBirthEmployment?.dob}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ function Assignment({
const ValidateDatePickers = (value) => {
assignments;
};
const fieldStyle = {
maxWidth: "36.25rem",
paddingRight: "2.5rem",
};


return (
<div key={index + 1} style={{ marginBottom: "16px" }}>
<div style={{ border: "1px solid #E3E3E3", padding: "16px", marginTop: "8px" }}>
Expand All @@ -224,7 +230,7 @@ function Assignment({

<LabelFieldPair>
<CardLabel className={assignment?.id ? "card-label-smaller" : "card-label-smaller"}> {`${t("HR_ASMT_FROM_DATE_LABEL")} * `} </CardLabel>
<div className="field">
<div className="field" style={fieldStyle}>
<DatePicker
type="date"
name="fromDate"
Expand All @@ -245,7 +251,7 @@ function Assignment({
{t("HR_ASMT_TO_DATE_LABEL")}
{assignment?.isCurrentAssignment ? "" : " * "}{" "}
</CardLabel>
<div className="field">
<div className="field" style={fieldStyle}>
<DatePicker
type="date"
name="toDate"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## [1.0.28] [30-July-2025]
- Workbench View and edit state issues

## [1.0.26] [18-Jun-2025]
- Provided schema download & upload
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-module-workbench",
"version": "1.0.26",
"version": "1.0.28",
"description": "Workbench",
"main": "dist/index.js",
"module": "dist/index.modern.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ const MDMSEdit = ({ ...props }) => {
const closeToast = () => {
setTimeout(() => setShowToast(null), 5000);
};


const gotoView = () => {
setRenderLoader(true);
history.push(
`/${window?.contextPath}/employee/workbench/mdms-view?moduleName=${moduleName}&masterName=${masterName}&uniqueIdentifier=${uniqueIdentifier}${
from ? `&from=${from}` : ""
}`
);
// history.push(
// `/${window?.contextPath}/employee/workbench/mdms-view?moduleName=${moduleName}&masterName=${masterName}&uniqueIdentifier=${uniqueIdentifier}${
// from ? `&from=${from}` : ""
// }`
// );
window.location.href = `/${window?.contextPath}/employee/workbench/mdms-view?moduleName=${moduleName}&masterName=${masterName}&uniqueIdentifier=${uniqueIdentifier}${from ? `&from=${from}` : ""}`;
};

// Fetch MDMS Data
Expand Down Expand Up @@ -103,18 +105,20 @@ const MDMSEdit = ({ ...props }) => {

const { data: localizationMap, isLoading: isLocalizationLoading } = Digit.Hooks.useCustomAPIHook(localizationReqCriteria);

// Replace values with localized messages
let finalData = data;
if (data?.data && localizationMap) {
const updatedData = _.cloneDeep(data);
Object.keys(updatedData.data).forEach((field) => {
const localizationKey = tranformLocModuleName(`${data.schemaCode}_${field}_${updatedData.data[field]}`);
if (localizationMap[localizationKey]) {
updatedData.data[field] = localizationMap[localizationKey];
}
});
finalData = updatedData;
}
const [initialFormData, setInitialFormData] = useState(null);

React.useEffect(() => {
if (data?.data && localizationMap && !initialFormData) {
const updatedData = _.cloneDeep(data);
Object.keys(updatedData.data).forEach((field) => {
const localizationKey = tranformLocModuleName(`${data.schemaCode}_${field}_${updatedData.data[field]}`);
if (localizationMap[localizationKey]) {
updatedData.data[field] = localizationMap[localizationKey];
}
});
setInitialFormData(updatedData.data);
}
}, [data, localizationMap, initialFormData]);

const localizationUpsertMutation = Digit.Hooks.useCustomAPIMutationHook({
url: `/localization/messages/v1/_upsert`,
Expand Down Expand Up @@ -178,7 +182,9 @@ const MDMSEdit = ({ ...props }) => {
},
onSuccess: () => {
setShowToast({ label: t("WBH_SUCCESS_UPD_MDMS_MSG") });
gotoView();
setTimeout(() => {
window.location.href = `/${window?.contextPath}/employee/workbench/mdms-view?moduleName=${moduleName}&masterName=${masterName}&uniqueIdentifier=${uniqueIdentifier}${from ? `&from=${from}` : ""}`;
}, 1000);
},
}
);
Expand All @@ -190,7 +196,7 @@ const MDMSEdit = ({ ...props }) => {
return (
<React.Fragment>
<MDMSAdd
defaultFormData={finalData?.data}
defaultFormData={initialFormData}
screenType={"edit"}
onSubmitEditAction={handleUpdate}
updatesToUISchema={schemaData?.updatesToUiSchema}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Button } from '@egovernments/digit-ui-components';
import _ from "lodash";
import { Loader } from "@egovernments/digit-ui-components";


const MDMSView = ({ ...props }) => {
const history = useHistory()
const { t } = useTranslation()
Expand Down Expand Up @@ -39,7 +38,6 @@ const MDMSView = ({ ...props }) => {

const fetchActionItems = (data) => Digit?.Customizations?.["commonUiConfig"]?.["ViewMdmsConfig"]?.fetchActionItems(data, propsToSendButtons);


const reqCriteria = {
url: `/${Digit.Hooks.workbench.getMDMSContextPath()}/v2/_search`,
params: {},
Expand Down Expand Up @@ -85,7 +83,7 @@ const MDMSView = ({ ...props }) => {
const onError = (resp) => {
setShowToast({
label: `${t("WBH_ERROR_MDMS_DATA")} ${t(resp?.response?.data?.Errors?.[0]?.code)}`,
type:"error"
type: "error"
});
closeToast()
refetch()
Expand Down Expand Up @@ -132,8 +130,9 @@ const MDMSView = ({ ...props }) => {

const tranformLocModuleName = (localModuleName) => {
if (!localModuleName) return null;
return localModuleName.replace(/[^a-zA-Z0-9]/g, "-").toUpperCase();
return localModuleName.replace(/[^a-zA-Z0-9]/g, "-").toUpperCase();
};

const localizationModule = tranformLocModuleName(`DIGIT-MDMS-${rawSchemaCode}`).toLowerCase();

const createLocalizationCode = (fieldName, fieldValue) => {
Expand All @@ -146,12 +145,12 @@ const MDMSView = ({ ...props }) => {
if (data?.data && localisableFields?.length > 0) {
localizationCodes = localisableFields.map(field => createLocalizationCode(field.fieldPath, data.data[field.fieldPath]));
}
const locale=Digit.StoreData.getCurrentLanguage();

const locale = Digit.StoreData.getCurrentLanguage();
const localizationReqCriteria = {
url: `/localization/messages/v1/_search?locale=${locale}&tenantId=${tenantId}&module=${localizationModule}`,
params: {},
body: {
},
body: {},
config: {
enabled: !!data && !!MdmsRes && !!data?.schemaCode && !!tenantId && localizationCodes.length > 0,
select: (respData) => {
Expand All @@ -168,7 +167,6 @@ const MDMSView = ({ ...props }) => {

const { data: localizationMap, isLoading: isLocalizationLoading } = Digit.Hooks.useCustomAPIHook(localizationReqCriteria);

// Transform data if localizationMap is available
let finalData = data;
if (data && data.data && localizationMap && localisableFields?.length > 0) {
const updatedData = _.cloneDeep(data);
Expand All @@ -181,7 +179,29 @@ const MDMSView = ({ ...props }) => {
finalData = updatedData;
}

if (isLoading || isFetching || isLocalizationLoading) return <Loader page={true} variant={"PageLoader"} />;
if (isLoading || isFetching || isLocalizationLoading) return <Loader page={true} variant={"PageLoader"} />;

// ✅ Function to render toast cleanly
const renderToast = () => {
if (!showToast) return null;
return (
<Toast
label={showToast?.label}
type={showToast?.type}
isDleteBtn={true}
onClose={() => setShowToast(null)}
style={{
position: "fixed",
bottom: "5rem",
left: "50%",
transform: "translateX(-50%)",
zIndex: 999999,
width: "max-content",
maxWidth: "90%",
}}
/>
);
};

return (
<React.Fragment>
Expand All @@ -201,9 +221,9 @@ const MDMSView = ({ ...props }) => {
history.push(`../utilities/audit-log?id=${finalData?.id}&tenantId=${tenantId}`);
}}
/>
{showToast && <Toast label={showToast?.label} type={showToast?.type} isDleteBtn={true} onClose={()=> setShowToast(null)}></Toast>}
{renderToast()}
</React.Fragment>
)
}
};

export default MDMSView
export default MDMSView;
4 changes: 2 additions & 2 deletions micro-ui/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"homepage": "/digit-ui",
"dependencies": {
"@egovernments/digit-ui-libraries": "1.8.18",
"@egovernments/digit-ui-module-workbench": "1.0.26",
"@egovernments/digit-ui-module-workbench": "1.0.28",
"@egovernments/digit-ui-module-pgr": "1.8.12",
"@egovernments/digit-ui-module-dss": "1.8.12",
"@egovernments/digit-ui-module-core": "1.8.44",
"@egovernments/digit-ui-module-common": "1.8.10",
"@egovernments/digit-ui-module-hrms": "1.8.15",
"@egovernments/digit-ui-module-hrms": "1.8.16",
"@egovernments/digit-ui-module-utilities": "1.0.15",
"@egovernments/digit-ui-module-open-payment": "0.0.2",
"@egovernments/digit-ui-module-engagement": "1.5.20",
Expand Down
2 changes: 1 addition & 1 deletion micro-ui/web/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link
href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;500;700&family=Roboto:wght@400;500;700&display=swap"
rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected].34/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected].35/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#00bcd1" />
Expand Down
4 changes: 2 additions & 2 deletions micro-ui/web/sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"homepage": "/sandbox-ui",
"dependencies": {
"@egovernments/digit-ui-libraries": "1.8.14",
"@egovernments/digit-ui-module-workbench": "1.0.26",
"@egovernments/digit-ui-module-workbench": "1.0.28",
"@egovernments/digit-ui-module-pgr": "1.8.12",
"@egovernments/digit-ui-module-dss": "1.8.12",
"@egovernments/digit-ui-module-core": "1.8.44",
"@egovernments/digit-ui-module-common": "1.8.10",
"@egovernments/digit-ui-module-hrms": "1.8.15",
"@egovernments/digit-ui-module-hrms": "1.8.16",
"@egovernments/digit-ui-module-utilities": "1.0.15",
"@egovernments/digit-ui-module-open-payment": "0.0.2",
"@egovernments/digit-ui-module-engagement": "1.5.20",
Expand Down
2 changes: 1 addition & 1 deletion micro-ui/web/workbench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"homepage": "/workbench-ui",
"dependencies": {
"@egovernments/digit-ui-libraries": "1.8.14",
"@egovernments/digit-ui-module-workbench": "1.0.26",
"@egovernments/digit-ui-module-workbench": "1.0.28",
"@egovernments/digit-ui-components":"0.2.0",
"@egovernments/digit-ui-module-core": "1.8.42",
"@egovernments/digit-ui-module-utilities": "1.0.15",
Expand Down