finance-shared 0.0.18 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17749,12 +17749,6 @@ function formatDate(dateString, outputFormat = "DD/MMM/YYYY", inputFormat) {
|
|
|
17749
17749
|
}
|
|
17750
17750
|
return date2.format(outputFormat);
|
|
17751
17751
|
}
|
|
17752
|
-
function setLocalStorageItem(key, value) {
|
|
17753
|
-
localStorage.setItem(key, value);
|
|
17754
|
-
}
|
|
17755
|
-
function removeLocalStorageItem(key) {
|
|
17756
|
-
localStorage.removeItem(key);
|
|
17757
|
-
}
|
|
17758
17752
|
function formatAmount(num, showCurrency = true) {
|
|
17759
17753
|
if (num === null || num === void 0 || typeof num !== "number" && isNaN(Number(num))) {
|
|
17760
17754
|
return showCurrency ? "RM 00.00" : "00.00";
|
|
@@ -25372,7 +25366,8 @@ function RemarksDialog({
|
|
|
25372
25366
|
staffRoleIds = [],
|
|
25373
25367
|
dataTestId = "",
|
|
25374
25368
|
themesConfig = {},
|
|
25375
|
-
remarksCount = 0
|
|
25369
|
+
remarksCount = 0,
|
|
25370
|
+
closeOnSave = false
|
|
25376
25371
|
}) {
|
|
25377
25372
|
const {
|
|
25378
25373
|
canViewRemarks = true,
|
|
@@ -25435,6 +25430,12 @@ function RemarksDialog({
|
|
|
25435
25430
|
control,
|
|
25436
25431
|
name: "remarkType"
|
|
25437
25432
|
});
|
|
25433
|
+
useEffect(() => {
|
|
25434
|
+
if (variant === "full") {
|
|
25435
|
+
dispatch(setRemarkList([]));
|
|
25436
|
+
setLocalPendingCount(null);
|
|
25437
|
+
}
|
|
25438
|
+
}, [financeApplicationId, variant, dispatch]);
|
|
25438
25439
|
useEffect(() => {
|
|
25439
25440
|
if (variant === "full" && open && financeApplicationId) {
|
|
25440
25441
|
dispatch(getRemarkListByFinanceApplicationId({
|
|
@@ -25478,6 +25479,7 @@ function RemarksDialog({
|
|
|
25478
25479
|
const res = await dispatch(addSectionWiseRemark(requestData));
|
|
25479
25480
|
if (res.status === "success") {
|
|
25480
25481
|
reset(defaultValues$1);
|
|
25482
|
+
if (closeOnSave) handleClose();
|
|
25481
25483
|
}
|
|
25482
25484
|
} catch (error) {
|
|
25483
25485
|
console.error(error);
|
|
@@ -26049,7 +26051,8 @@ function DocumentSigningDialog({
|
|
|
26049
26051
|
digitalSignatureRole,
|
|
26050
26052
|
ColoredSubmitButton,
|
|
26051
26053
|
financeCalculation,
|
|
26052
|
-
showConfirmCheckbox = false
|
|
26054
|
+
showConfirmCheckbox = false,
|
|
26055
|
+
showTitle = true
|
|
26053
26056
|
}) {
|
|
26054
26057
|
const { t: t2 } = useTranslation("Dialog");
|
|
26055
26058
|
const open = useSelector(getIsDocumentSignatureDialogOpen);
|
|
@@ -26078,14 +26081,6 @@ function DocumentSigningDialog({
|
|
|
26078
26081
|
if (reason && reason === "backdropClick") return;
|
|
26079
26082
|
onClose();
|
|
26080
26083
|
};
|
|
26081
|
-
const handleCheckboxChange = (event) => {
|
|
26082
|
-
if (event) {
|
|
26083
|
-
const today = (/* @__PURE__ */ new Date()).toLocaleDateString();
|
|
26084
|
-
setLocalStorageItem("pendingKYCDialogDate", today);
|
|
26085
|
-
} else {
|
|
26086
|
-
removeLocalStorageItem("pendingKYCDialogDate");
|
|
26087
|
-
}
|
|
26088
|
-
};
|
|
26089
26084
|
const handleDocumentSignJPDFGenerate = () => {
|
|
26090
26085
|
var _a, _b;
|
|
26091
26086
|
if (!lodashExports.isEmpty(financeDetail == null ? void 0 : financeDetail.digitalSignatureDetails) && ((_a = financeDetail == null ? void 0 : financeDetail.digitalSignatureDetails) == null ? void 0 : _a.formJPdfPath)) {
|
|
@@ -26145,16 +26140,9 @@ function DocumentSigningDialog({
|
|
|
26145
26140
|
"DD/MMM/YYYY HH:mm:ss"
|
|
26146
26141
|
)
|
|
26147
26142
|
] }) })
|
|
26148
|
-
] })
|
|
26149
|
-
/* @__PURE__ */ jsx("div", { className: "flex justify-start items-center", children: /* @__PURE__ */ jsx(
|
|
26150
|
-
CustomCheckbox,
|
|
26151
|
-
{
|
|
26152
|
-
label: t2("DONT_SHOW_AGAIN"),
|
|
26153
|
-
onChange: handleCheckboxChange
|
|
26154
|
-
}
|
|
26155
|
-
) })
|
|
26143
|
+
] })
|
|
26156
26144
|
] }),
|
|
26157
|
-
/* @__PURE__ */ jsxs("div", { className: "flex justify-end items-center gap-10", children: [
|
|
26145
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-end items-center gap-10 pt-20", children: [
|
|
26158
26146
|
/* @__PURE__ */ jsx(
|
|
26159
26147
|
ColoredSubmitButton,
|
|
26160
26148
|
{
|
|
@@ -26188,7 +26176,7 @@ function DocumentSigningDialog({
|
|
|
26188
26176
|
ColoredSubmitButton,
|
|
26189
26177
|
financeCalculation,
|
|
26190
26178
|
t: t2,
|
|
26191
|
-
dialogTitle: t2("PDF_PREVIEW_TITLE"),
|
|
26179
|
+
dialogTitle: showTitle ? t2("PDF_PREVIEW_TITLE") : void 0,
|
|
26192
26180
|
showConfirmCheckbox,
|
|
26193
26181
|
pdfOnly: !!signedDocumentJPDF
|
|
26194
26182
|
}
|