From bd55a382f7c759874a49c70a25b9d5f9b7412b2f Mon Sep 17 00:00:00 2001 From: rakesh-wt-egov <73687298+rakesh-wt-egov@users.noreply.github.com> Date: Wed, 11 Oct 2023 13:11:39 +0530 Subject: [PATCH] Fixed PFM-4894 --- .../src/components/Modal/EmployeeActivation.js | 18 +++++++++++++++--- .../components/pageComponents/assignment.js | 3 +-- .../hrms/src/pages/EditEmployee/EditForm.js | 16 ++++++++++++++++ frontend/micro-ui/web/public/index.html | 2 +- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/Modal/EmployeeActivation.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/Modal/EmployeeActivation.js index 68bd29f57..9a90aaccd 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/Modal/EmployeeActivation.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/Modal/EmployeeActivation.js @@ -2,7 +2,17 @@ import { Dropdown, UploadFile } from "@egovernments/digit-ui-react-components"; import React from "react"; import { convertEpochToDate } from "../Utils/index"; -export const configEmployeeActiveApplication = ({ t, action, selectFile, uploadedFile, setUploadedFile, selectedReason, Reasons, selectReason, employees = { } }) => { +export const configEmployeeActiveApplication = ({ + t, + action, + selectFile, + uploadedFile, + setUploadedFile, + selectedReason, + Reasons, + selectReason, + employees = {}, +}) => { employees.deactivationDetails = employees?.deactivationDetails?.sort((y, x) => x?.auditDetails?.createdDate - y?.auditDetails?.createdDate); return { label: { @@ -31,7 +41,7 @@ export const configEmployeeActiveApplication = ({ t, action, selectFile, uploade label: t("HR_EFFECTIVE_DATE"), type: "date", isMandatory: true, - disable: true, /* Disabled date and set defaultvalue */ + disable: true /* Disabled date and set defaultvalue */, populators: { error: t("HR_EFFECTIVE_DATE_INVALID"), name: "effectiveFrom", @@ -52,6 +62,8 @@ export const configEmployeeActiveApplication = ({ t, action, selectFile, uploade onDelete={() => { setUploadedFile(null); }} + enableButton={true} + uploadedFiles={[]} message={uploadedFile ? `1 ${t(`HR_ACTION_FILEUPLOADED`)}` : t(`HR_ACTION_NO_FILEUPLOADED`)} /> @@ -69,4 +81,4 @@ export const configEmployeeActiveApplication = ({ t, action, selectFile, uploade }, ], }; -}; +}; \ No newline at end of file diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/assignment.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/assignment.js index 5e5633328..12557fb2e 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/assignment.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/assignment.js @@ -98,11 +98,10 @@ const Assignments = ({ t, config, onSelect, userType, formData }) => { toDate: assignment?.toDate ? new Date(assignment?.toDate).getTime() : undefined, isCurrentAssignment: assignment?.isCurrentAssignment, department: assignment?.department?.code, - designation: assignment?.designation?.code, + designation: STATE_ADMIN ? getdesignationdata()?.length > 0 && getdesignationdata()[0]?.code : assignment?.designation?.code, }) : []; }); - Promise.all(promises).then(function (results) { onSelect( config.key, diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js index 4bf2198e3..427175e9c 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js @@ -228,6 +228,22 @@ const EditForm = ({ tenantId, data }) => { }); jurisdictions = mappedData; } else { + input.Jurisdictions.map((items) => { + let obj = { + hierarchy: items?.hierarchy, + boundaryType: items?.boundaryType, + boundary: items?.boundary, + tenantId: items?.tenantId, + roles: items?.roles, + }; + data?.jurisdictions?.map((jurisdition) => { + if (jurisdition?.boundary === items?.boundary) { + obj["id"] = jurisdition.id; + obj["auditDetails"] = jurisdition.auditDetails; + } + }); + jurisdictions.push(obj); + }); roles = input?.Jurisdictions?.map((ele) => { return ele.roles?.map((item) => { item["tenantId"] = ele.boundary; diff --git a/frontend/micro-ui/web/public/index.html b/frontend/micro-ui/web/public/index.html index d8dd89801..226b247ef 100644 --- a/frontend/micro-ui/web/public/index.html +++ b/frontend/micro-ui/web/public/index.html @@ -7,7 +7,7 @@ - + mSeva