Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #961

Merged
merged 4 commits into from
Sep 23, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ const Details = () => {
const [successData, setsuccessData, clearSuccessData] = Digit.Hooks.useSessionStorage("EMPLOYEE_HRMS_MUTATION_SUCCESS_DATA", false);
const isMobile = window.Digit.Utils.browser.isMobile();
const STATE_ADMIN = Digit.UserService.hasAccess(["STATE_ADMIN"]);
const DIVISION_ADMIN = Digit.UserService.hasAccess(["DIV_ADMIN"]);

const { data: mdmsData = {} } = Digit.Hooks.hrms.useHrmsMDMS(tenantId, "egov-hrms", "HRMSRolesandDesignation") || {};

mdmsData?.MdmsRes?.["tenant"]["tenants"]?.map((items) => {
Expand All @@ -42,7 +44,6 @@ const Details = () => {
}
});
});
// console.log(data, "data");

useEffect(() => {
setMutationHappened(false);
Expand All @@ -65,7 +66,7 @@ const Details = () => {
window.open(documentLink, "_blank");
};

const submitAction = (data) => { };
const submitAction = (data) => {};

useEffect(() => {
switch (selectedAction) {
Expand Down Expand Up @@ -117,14 +118,9 @@ const Details = () => {
<Row label={t("HR_MOB_NO_LABEL")} text={data?.Employees?.[0]?.user?.mobileNumber || "NA"} textStyle={{ whiteSpace: "pre" }} />
<Row label={t("HR_GENDER_LABEL")} text={t(data?.Employees?.[0]?.user?.gender) || "NA"} />
<Row label={t("HR_EMAIL_LABEL")} text={data?.Employees?.[0]?.user?.emailId || "NA"} />
<Row label={t("HR_COMMON_DEPARTMENT")} text={

t(data?.Employees?.[0]?.assignments[0]?.department)
|| "NA"} />
<Row label={t("HR_COMMON_USER_DESIGNATION")} text={
t(data?.Employees?.[0]?.assignments[0]?.designation)

|| "NA"} />
<Row label={t("HR_COMMON_DEPARTMENT")} text={t(data?.Employees?.[0]?.assignments[0]?.department) || "NA"} />
<Row label={t("HR_COMMON_USER_DESIGNATION")} text={t(data?.Employees?.[0]?.assignments[0]?.designation) || "NA"} />
{DIVISION_ADMIN === 1 && <Row label={t("HR_COMMON_USER_PRIMARY_VILLAGE")} text={t(data?.Employees?.[0]?.tenantId) || "NA"} />}
</StatusTable>
{data?.Employees?.[0]?.isActive == false ? (
<StatusTable>
Expand All @@ -139,8 +135,8 @@ const Details = () => {
text={
t(
"EGOV_HRMS_DEACTIVATIONREASON_" +
data?.Employees?.[0]?.deactivationDetails?.sort((a, b) => new Date(a.effectiveFrom) - new Date(b.effectiveFrom))[0]
.reasonForDeactivation
data?.Employees?.[0]?.deactivationDetails?.sort((a, b) => new Date(a.effectiveFrom) - new Date(b.effectiveFrom))[0]
.reasonForDeactivation
) || "NA"
}
/>
Expand Down Expand Up @@ -183,41 +179,41 @@ const Details = () => {

{data?.Employees?.[0]?.jurisdictions?.length > 0
? data?.Employees?.[0]?.jurisdictions?.map((element, index) => {
return (
<StatusTable
key={index}
style={{
maxWidth: "640px",
border: "1px solid rgb(214, 213, 212)",
inset: "0px",
width: "auto",
padding: ".2rem",
marginBottom: "2rem",
}}
>
<div style={{ paddingBottom: "2rem" }}>
{" "}
{t("HR_JURISDICTION")} {index + 1}
</div>
{STATE_ADMIN ? (
<Row
label={t("HR_DIVISIONS_LABEL")}
text={t(Digit.Utils.locale.convertToLocale(element?.division, "EGOV_LOCATION_BOUNDARYTYPE"))}
textStyle={{ whiteSpace: "pre" }}
/>
) : null}
<Row label={t("HR_BOUNDARY_LABEL")} text={t(element?.boundary)} />
{!STATE_ADMIN ? (
<Row
label={t("HR_ROLE_LABEL")}
text={data?.Employees?.[0]?.user.roles
.filter((ele) => ele.tenantId == element?.boundary)
?.map((ele) => t(`ACCESSCONTROL_ROLES_ROLES_` + ele?.code))}
/>
) : null}
</StatusTable>
);
})
return (
<StatusTable
key={index}
style={{
maxWidth: "640px",
border: "1px solid rgb(214, 213, 212)",
inset: "0px",
width: "auto",
padding: ".2rem",
marginBottom: "2rem",
}}
>
<div style={{ paddingBottom: "2rem" }}>
{" "}
{t("HR_JURISDICTION")} {index + 1}
</div>
{STATE_ADMIN ? (
<Row
label={t("HR_DIVISIONS_LABEL")}
text={t(Digit.Utils.locale.convertToLocale(element?.division, "EGOV_LOCATION_BOUNDARYTYPE"))}
textStyle={{ whiteSpace: "pre" }}
/>
) : null}
<Row label={t("HR_BOUNDARY_LABEL")} text={t(element?.boundary)} />
{!STATE_ADMIN ? (
<Row
label={t("HR_ROLE_LABEL")}
text={data?.Employees?.[0]?.user.roles
.filter((ele) => ele.tenantId == element?.boundary)
?.map((ele) => t(`ACCESSCONTROL_ROLES_ROLES_` + ele?.code))}
/>
) : null}
</StatusTable>
);
})
: null}
</Card>
</div>
Expand All @@ -240,4 +236,4 @@ const Details = () => {
);
};

export default Details;
export default Details;
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ public BigDecimal getWaterEstimationCharge(WaterConnection waterConnection, Calc

// WaterCharge Calculation
Double totalUOM = getUnitOfMeasurement(waterConnection, calculationAttribute, criteria);
if (totalUOM == 0.0)
return waterCharge;
/*if (totalUOM == 0.0)
return waterCharge;*/
BillingSlab billSlab = billingSlabs.get(0);
// IF calculation type is flat then take flat rate else take slab and calculate the charge
//For metered connection calculation on graded fee slab
Expand Down
Loading