@erpsquad/common 1.10.13 → 1.10.15
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.
- package/dist/chunks/{actionCreator-wLPS1L4r.esm.js → actionCreator-Bm5Z7JNA.esm.js} +2 -2
- package/dist/chunks/{actionCreator-wLPS1L4r.esm.js.map → actionCreator-Bm5Z7JNA.esm.js.map} +1 -1
- package/dist/chunks/{actionCreator-DfoWAHND.js → actionCreator-CAzJUIbI.js} +2 -2
- package/dist/chunks/{actionCreator-DfoWAHND.js.map → actionCreator-CAzJUIbI.js.map} +1 -1
- package/dist/chunks/{android-12-switch-DhBR2E6R.esm.js → android-12-switch-B93Ol4Bg.esm.js} +11 -11
- package/dist/chunks/{android-12-switch-DhBR2E6R.esm.js.map → android-12-switch-B93Ol4Bg.esm.js.map} +1 -1
- package/dist/chunks/{android-12-switch-DvuYyJVA.js → android-12-switch-CWPFBfKL.js} +11 -11
- package/dist/chunks/{android-12-switch-DvuYyJVA.js.map → android-12-switch-CWPFBfKL.js.map} +1 -1
- package/dist/chunks/{apiHelper-xDWohh3M.js → apiHelper-CFq96NOb.js} +8 -8
- package/dist/chunks/apiHelper-CFq96NOb.js.map +1 -0
- package/dist/chunks/{apiHelper-Jpafa_JZ.esm.js → apiHelper-Dzagdi_A.esm.js} +8 -8
- package/dist/chunks/apiHelper-Dzagdi_A.esm.js.map +1 -0
- package/dist/chunks/{appbar-DyD5mmWK.esm.js → appbar-BgZzhjCS.esm.js} +4 -4
- package/dist/chunks/{appbar-DyD5mmWK.esm.js.map → appbar-BgZzhjCS.esm.js.map} +1 -1
- package/dist/chunks/{appbar-D5u8rgOE.js → appbar-CdXzNh8I.js} +4 -4
- package/dist/chunks/{appbar-D5u8rgOE.js.map → appbar-CdXzNh8I.js.map} +1 -1
- package/dist/chunks/{common-B2d6aBap.js → common-CsInqdHr.js} +43 -22
- package/dist/chunks/{common-B2d6aBap.js.map → common-CsInqdHr.js.map} +1 -1
- package/dist/chunks/{common-CFOdrxGp.esm.js → common-DIzRxFqY.esm.js} +99 -78
- package/dist/chunks/{common-CFOdrxGp.esm.js.map → common-DIzRxFqY.esm.js.map} +1 -1
- package/dist/chunks/{custom-editor-5c9aykO1.esm.js → custom-editor-C4Jq5T4R.esm.js} +2 -2
- package/dist/chunks/{custom-editor-5c9aykO1.esm.js.map → custom-editor-C4Jq5T4R.esm.js.map} +1 -1
- package/dist/chunks/{custom-editor-C1KaEDrG.js → custom-editor-Pww_Urox.js} +2 -2
- package/dist/chunks/{custom-editor-C1KaEDrG.js.map → custom-editor-Pww_Urox.js.map} +1 -1
- package/dist/chunks/{default-data-DoKULVXg.esm.js → default-data-A38oYEkw.esm.js} +12 -12
- package/dist/chunks/{default-data-DoKULVXg.esm.js.map → default-data-A38oYEkw.esm.js.map} +1 -1
- package/dist/chunks/{default-data-Dzkk4uas.js → default-data-DWT8-Z2A.js} +12 -12
- package/dist/chunks/{default-data-Dzkk4uas.js.map → default-data-DWT8-Z2A.js.map} +1 -1
- package/dist/chunks/{form-builder-conversion-D9e3zpA1.esm.js → form-builder-conversion-DG5R2GHa.esm.js} +2 -2
- package/dist/chunks/{form-builder-conversion-D9e3zpA1.esm.js.map → form-builder-conversion-DG5R2GHa.esm.js.map} +1 -1
- package/dist/chunks/{form-builder-conversion-BwteCHVR.js → form-builder-conversion-DgKro_00.js} +2 -2
- package/dist/chunks/{form-builder-conversion-BwteCHVR.js.map → form-builder-conversion-DgKro_00.js.map} +1 -1
- package/dist/chunks/{form-builder-deconversion-Xk6yu3De.esm.js → form-builder-deconversion-BEXolKwg.esm.js} +7 -6
- package/dist/chunks/form-builder-deconversion-BEXolKwg.esm.js.map +1 -0
- package/dist/chunks/{form-builder-deconversion-CO59U4ww.js → form-builder-deconversion-BmD2cK-D.js} +7 -6
- package/dist/chunks/form-builder-deconversion-BmD2cK-D.js.map +1 -0
- package/dist/chunks/{fullScreen-JU0VMLaz.js → fullScreen-BAF5Ivkm.js} +2 -2
- package/dist/chunks/{fullScreen-JU0VMLaz.js.map → fullScreen-BAF5Ivkm.js.map} +1 -1
- package/dist/chunks/{fullScreen-CuNxcBCj.esm.js → fullScreen-iLnMPT2w.esm.js} +2 -2
- package/dist/chunks/{fullScreen-CuNxcBCj.esm.js.map → fullScreen-iLnMPT2w.esm.js.map} +1 -1
- package/dist/chunks/{languageContext-OrRFQDHd.esm.js → languageContext-CVElvSkU.esm.js} +3 -3
- package/dist/chunks/{languageContext-OrRFQDHd.esm.js.map → languageContext-CVElvSkU.esm.js.map} +1 -1
- package/dist/chunks/{languageContext-BpwmUDYR.js → languageContext-tYiy1fHW.js} +3 -3
- package/dist/chunks/{languageContext-BpwmUDYR.js.map → languageContext-tYiy1fHW.js.map} +1 -1
- package/dist/chunks/{migration-utils-DNqXzp5a.js → migration-utils-DE6OhrZJ.js} +2 -2
- package/dist/chunks/{migration-utils-DNqXzp5a.js.map → migration-utils-DE6OhrZJ.js.map} +1 -1
- package/dist/chunks/{migration-utils-CKH20lju.esm.js → migration-utils-pOWRPPYY.esm.js} +2 -2
- package/dist/chunks/{migration-utils-CKH20lju.esm.js.map → migration-utils-pOWRPPYY.esm.js.map} +1 -1
- package/dist/chunks/{page-context-CEL5twLl.js → page-context-BNWLDtGJ.js} +3 -3
- package/dist/chunks/{page-context-CEL5twLl.js.map → page-context-BNWLDtGJ.js.map} +1 -1
- package/dist/chunks/{page-context-BWGW9o99.esm.js → page-context-DYdt1aSA.esm.js} +3 -3
- package/dist/chunks/{page-context-BWGW9o99.esm.js.map → page-context-DYdt1aSA.esm.js.map} +1 -1
- package/dist/chunks/{pathname.quotes-8fDcaeay.esm.js → pathname.quotes-BjXXxpE5.esm.js} +17 -2
- package/dist/chunks/pathname.quotes-BjXXxpE5.esm.js.map +1 -0
- package/dist/chunks/{pathname.quotes-Db7RqRXA.js → pathname.quotes-n5Riceoz.js} +17 -2
- package/dist/chunks/pathname.quotes-n5Riceoz.js.map +1 -0
- package/dist/chunks/{reducer-BdM0KAS7.esm.js → reducer-B9OdoP2Q.esm.js} +2 -2
- package/dist/chunks/{reducer-BdM0KAS7.esm.js.map → reducer-B9OdoP2Q.esm.js.map} +1 -1
- package/dist/chunks/{reducer-Xe9fz1Ri.js → reducer-BEIewojl.js} +2 -2
- package/dist/chunks/{reducer-Xe9fz1Ri.js.map → reducer-BEIewojl.js.map} +1 -1
- package/dist/chunks/{shareSlice-DypX5NrR.js → shareSlice-BpWlAxHC.js} +2 -2
- package/dist/chunks/{shareSlice-DypX5NrR.js.map → shareSlice-BpWlAxHC.js.map} +1 -1
- package/dist/chunks/{shareSlice-BXbQtArP.esm.js → shareSlice-Cj5ABjUz.esm.js} +2 -2
- package/dist/chunks/{shareSlice-BXbQtArP.esm.js.map → shareSlice-Cj5ABjUz.esm.js.map} +1 -1
- package/dist/chunks/{sidebar-BhQfV42E.esm.js → sidebar-Cq65cdpI.esm.js} +4 -4
- package/dist/chunks/{sidebar-BhQfV42E.esm.js.map → sidebar-Cq65cdpI.esm.js.map} +1 -1
- package/dist/chunks/{sidebar-BsAEf8hQ.js → sidebar-DPII0vKr.js} +4 -4
- package/dist/chunks/{sidebar-BsAEf8hQ.js.map → sidebar-DPII0vKr.js.map} +1 -1
- package/dist/chunks/{sidebarScreen-M7KOyvgb.esm.js → sidebarScreen-C4Fs-HoS.esm.js} +5 -5
- package/dist/chunks/{sidebarScreen-M7KOyvgb.esm.js.map → sidebarScreen-C4Fs-HoS.esm.js.map} +1 -1
- package/dist/chunks/{sidebarScreen-D5QznPYz.js → sidebarScreen-U0gXtEWi.js} +5 -5
- package/dist/chunks/{sidebarScreen-D5QznPYz.js.map → sidebarScreen-U0gXtEWi.js.map} +1 -1
- package/dist/chunks/{store-CAn4frEa.esm.js → store-BOeF6T1u.esm.js} +3 -3
- package/dist/chunks/{store-CAn4frEa.esm.js.map → store-BOeF6T1u.esm.js.map} +1 -1
- package/dist/chunks/{store-fFrvVVmd.js → store-BRFg_0zG.js} +3 -3
- package/dist/chunks/{store-fFrvVVmd.js.map → store-BRFg_0zG.js.map} +1 -1
- package/dist/chunks/{translations-CYJNrF1X.js → translations-C0b9EQE6.js} +2 -2
- package/dist/chunks/{translations-CYJNrF1X.js.map → translations-C0b9EQE6.js.map} +1 -1
- package/dist/chunks/{translations-CKuQj_34.esm.js → translations-OUQouZfe.esm.js} +2 -2
- package/dist/chunks/{translations-CKuQj_34.esm.js.map → translations-OUQouZfe.esm.js.map} +1 -1
- package/dist/chunks/{uom-field-wrapper-T9-HbUmQ.js → uom-field-wrapper-C93vgg-u.js} +13 -13
- package/dist/chunks/{uom-field-wrapper-T9-HbUmQ.js.map → uom-field-wrapper-C93vgg-u.js.map} +1 -1
- package/dist/chunks/{uom-field-wrapper-M8gDlNVA.esm.js → uom-field-wrapper-Q6fMj2wr.esm.js} +13 -13
- package/dist/chunks/{uom-field-wrapper-M8gDlNVA.esm.js.map → uom-field-wrapper-Q6fMj2wr.esm.js.map} +1 -1
- package/dist/chunks/{useAccountSetting-Crm7aLUS.esm.js → useAccountSetting-DCcp1paz.esm.js} +3 -3
- package/dist/chunks/{useAccountSetting-Crm7aLUS.esm.js.map → useAccountSetting-DCcp1paz.esm.js.map} +1 -1
- package/dist/chunks/{useAccountSetting-CC-D9-ay.js → useAccountSetting-Dg5ZSKDq.js} +3 -3
- package/dist/chunks/{useAccountSetting-CC-D9-ay.js.map → useAccountSetting-Dg5ZSKDq.js.map} +1 -1
- package/dist/chunks/{useAuth-BgLRSfLQ.esm.js → useAuth-BCbocYle.esm.js} +2 -2
- package/dist/chunks/{useAuth-BgLRSfLQ.esm.js.map → useAuth-BCbocYle.esm.js.map} +1 -1
- package/dist/chunks/{useAuth-D2vRvoAH.js → useAuth-xa_Kof3L.js} +2 -2
- package/dist/chunks/{useAuth-D2vRvoAH.js.map → useAuth-xa_Kof3L.js.map} +1 -1
- package/dist/chunks/{useLangauge-C0b2vY_V.esm.js → useLangauge-BMK0MgIF.esm.js} +2 -2
- package/dist/chunks/{useLangauge-C0b2vY_V.esm.js.map → useLangauge-BMK0MgIF.esm.js.map} +1 -1
- package/dist/chunks/{useLangauge-BqzZoUJb.js → useLangauge-DQ5KTFK5.js} +2 -2
- package/dist/chunks/{useLangauge-BqzZoUJb.js.map → useLangauge-DQ5KTFK5.js.map} +1 -1
- package/dist/chunks/{useReduxIntegration-fS2xvU8e.js → useReduxIntegration-BvPNIpL8.js} +4 -4
- package/dist/chunks/{useReduxIntegration-fS2xvU8e.js.map → useReduxIntegration-BvPNIpL8.js.map} +1 -1
- package/dist/chunks/{useReduxIntegration-C8wACPoZ.esm.js → useReduxIntegration-CUy8fuG5.esm.js} +4 -4
- package/dist/chunks/{useReduxIntegration-C8wACPoZ.esm.js.map → useReduxIntegration-CUy8fuG5.esm.js.map} +1 -1
- package/dist/components/index.esm.js +9 -9
- package/dist/components/index.js +9 -9
- package/dist/constants/index.esm.js +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/constants/lang/en.d.ts +15 -0
- package/dist/constants/resource-lang.d.ts +15 -0
- package/dist/contexts/index.esm.js +3 -3
- package/dist/contexts/index.js +3 -3
- package/dist/hooks/index.esm.js +5 -5
- package/dist/hooks/index.js +5 -5
- package/dist/index.esm.js +74 -72
- package/dist/index.js +27 -25
- package/dist/index.js.map +1 -1
- package/dist/layout/index.esm.js +2 -2
- package/dist/layout/index.js +2 -2
- package/dist/redux/index.esm.js +4 -4
- package/dist/redux/index.js +4 -4
- package/dist/src/constants/lang/en.d.ts +15 -0
- package/dist/src/constants/resource-lang.d.ts +15 -0
- package/dist/src/utils/common-utility.d.ts +2 -1
- package/dist/src/utils/common.d.ts +4 -2
- package/dist/utils/common-utility.d.ts +2 -1
- package/dist/utils/common.d.ts +4 -2
- package/dist/utils/index.esm.js +61 -59
- package/dist/utils/index.js +8 -6
- package/dist/utils/index.js.map +1 -1
- package/dist/views/index.esm.js +8 -8
- package/dist/views/index.js +7 -7
- package/package.json +1 -1
- package/dist/chunks/apiHelper-Jpafa_JZ.esm.js.map +0 -1
- package/dist/chunks/apiHelper-xDWohh3M.js.map +0 -1
- package/dist/chunks/form-builder-deconversion-CO59U4ww.js.map +0 -1
- package/dist/chunks/form-builder-deconversion-Xk6yu3De.esm.js.map +0 -1
- package/dist/chunks/pathname.quotes-8fDcaeay.esm.js.map +0 -1
- package/dist/chunks/pathname.quotes-Db7RqRXA.js.map +0 -1
|
@@ -1970,8 +1970,8 @@ const apiConfigurations = {
|
|
|
1970
1970
|
name: "hire_requests/fetch",
|
|
1971
1971
|
apiFunc: getV1HireRequests,
|
|
1972
1972
|
dataKey: "hire_requests",
|
|
1973
|
-
labelKey: "
|
|
1974
|
-
defaultColumn: ["id", "position_name"],
|
|
1973
|
+
labelKey: "series_number",
|
|
1974
|
+
defaultColumn: ["id", "series_number", "position_name"],
|
|
1975
1975
|
defaultFilter: { "status.eq": "Accepted" }
|
|
1976
1976
|
},
|
|
1977
1977
|
job_posts: {
|
|
@@ -2692,7 +2692,7 @@ const getOperatorLabel = (rule, filterFields) => {
|
|
|
2692
2692
|
}
|
|
2693
2693
|
return operatorLable;
|
|
2694
2694
|
};
|
|
2695
|
-
const formatAmount = (amount = "", format = "", position = "before", symbol) => {
|
|
2695
|
+
const formatAmount = (amount = "", format = "", position = "before", symbol, fraction) => {
|
|
2696
2696
|
if (amount === "" || amount === null || amount === void 0) {
|
|
2697
2697
|
amount = 0;
|
|
2698
2698
|
}
|
|
@@ -2700,49 +2700,52 @@ const formatAmount = (amount = "", format = "", position = "before", symbol) =>
|
|
|
2700
2700
|
amount = parseFloat(amount.replace(/[^\d.-]/g, ""));
|
|
2701
2701
|
if (isNaN(amount)) return "";
|
|
2702
2702
|
}
|
|
2703
|
-
const
|
|
2703
|
+
const f = fraction ?? getDefaultFraction();
|
|
2704
|
+
console.log("🚀 ~ formatAmount ~ getDefaultFraction():", getDefaultFraction());
|
|
2705
|
+
console.log("🚀 ~ formatAmount ~ f :", f);
|
|
2706
|
+
const num = parseFloat(amount.toFixed(f));
|
|
2704
2707
|
let formatter;
|
|
2705
2708
|
switch (format) {
|
|
2706
2709
|
case "#,###.##":
|
|
2707
2710
|
formatter = new Intl.NumberFormat("en-US", {
|
|
2708
|
-
minimumFractionDigits:
|
|
2709
|
-
maximumFractionDigits:
|
|
2711
|
+
minimumFractionDigits: f,
|
|
2712
|
+
maximumFractionDigits: f
|
|
2710
2713
|
});
|
|
2711
2714
|
break;
|
|
2712
2715
|
case "#.###,##":
|
|
2713
2716
|
formatter = new Intl.NumberFormat("de-DE", {
|
|
2714
|
-
minimumFractionDigits:
|
|
2715
|
-
maximumFractionDigits:
|
|
2717
|
+
minimumFractionDigits: f,
|
|
2718
|
+
maximumFractionDigits: f
|
|
2716
2719
|
});
|
|
2717
2720
|
break;
|
|
2718
2721
|
case "# ###.##":
|
|
2719
2722
|
formatter = new Intl.NumberFormat("fr-FR", {
|
|
2720
|
-
minimumFractionDigits:
|
|
2721
|
-
maximumFractionDigits:
|
|
2723
|
+
minimumFractionDigits: f,
|
|
2724
|
+
maximumFractionDigits: f
|
|
2722
2725
|
});
|
|
2723
2726
|
break;
|
|
2724
2727
|
case "# ###,##":
|
|
2725
2728
|
formatter = new Intl.NumberFormat("es-ES", {
|
|
2726
|
-
minimumFractionDigits:
|
|
2727
|
-
maximumFractionDigits:
|
|
2729
|
+
minimumFractionDigits: f,
|
|
2730
|
+
maximumFractionDigits: f
|
|
2728
2731
|
});
|
|
2729
2732
|
break;
|
|
2730
2733
|
case "#’ ###. ##":
|
|
2731
2734
|
formatter = new Intl.NumberFormat("de-CH", {
|
|
2732
|
-
minimumFractionDigits:
|
|
2733
|
-
maximumFractionDigits:
|
|
2735
|
+
minimumFractionDigits: f,
|
|
2736
|
+
maximumFractionDigits: f
|
|
2734
2737
|
});
|
|
2735
2738
|
break;
|
|
2736
2739
|
case "#, ###.##":
|
|
2737
2740
|
formatter = new Intl.NumberFormat("en-GB", {
|
|
2738
|
-
minimumFractionDigits:
|
|
2739
|
-
maximumFractionDigits:
|
|
2741
|
+
minimumFractionDigits: f,
|
|
2742
|
+
maximumFractionDigits: f
|
|
2740
2743
|
});
|
|
2741
2744
|
break;
|
|
2742
2745
|
default:
|
|
2743
2746
|
formatter = new Intl.NumberFormat("en-US", {
|
|
2744
|
-
minimumFractionDigits:
|
|
2745
|
-
maximumFractionDigits:
|
|
2747
|
+
minimumFractionDigits: f,
|
|
2748
|
+
maximumFractionDigits: f
|
|
2746
2749
|
});
|
|
2747
2750
|
}
|
|
2748
2751
|
let formattedAmount = formatter.format(num);
|
|
@@ -3751,9 +3754,13 @@ function formatResponseDatesToDayJS(obj) {
|
|
|
3751
3754
|
}
|
|
3752
3755
|
return obj;
|
|
3753
3756
|
}
|
|
3754
|
-
const toFixedWithNumbers = (num) => {
|
|
3757
|
+
const toFixedWithNumbers = (num, fraction) => {
|
|
3755
3758
|
var _a;
|
|
3756
|
-
|
|
3759
|
+
let f = fraction ?? getDefaultFraction();
|
|
3760
|
+
console.log("🚀 ~ toFixedWithNumbers ~ getDefaultFraction():", getDefaultFraction());
|
|
3761
|
+
console.log("🚀 ~ toFixedWithNumbers ~ f :", f);
|
|
3762
|
+
let a = num || num === 0 ? (_a = Number(num)) == null ? void 0 : _a.toFixed(f) : num;
|
|
3763
|
+
return a;
|
|
3757
3764
|
};
|
|
3758
3765
|
const findById = (arr, id) => arr.find((a) => a.id == id);
|
|
3759
3766
|
const getTaxAmountFromMultipleTaxCodes = (amount, taxCodes = [], detail = false) => {
|
|
@@ -4202,9 +4209,21 @@ const addOrEditArray = (array = [], data) => {
|
|
|
4202
4209
|
}
|
|
4203
4210
|
return [...newArray, updatedData];
|
|
4204
4211
|
};
|
|
4205
|
-
const
|
|
4212
|
+
const getDefaultUserData = () => {
|
|
4206
4213
|
const uData = localStorage.getItem("_u_data");
|
|
4207
4214
|
const userData = uData ? JSON.parse(uData) : {};
|
|
4215
|
+
return userData;
|
|
4216
|
+
};
|
|
4217
|
+
const getDefaultFraction = () => {
|
|
4218
|
+
var _a, _b;
|
|
4219
|
+
const userData = getDefaultUserData();
|
|
4220
|
+
const fractionUnit = (_a = userData == null ? void 0 : userData.currency_data) == null ? void 0 : _a.fraction_unit;
|
|
4221
|
+
console.log("🚀 ~ getDefaultFraction ~ userData?.currency_data:", userData == null ? void 0 : userData.currency_data);
|
|
4222
|
+
console.log("🚀 ~ getDefaultFraction ~ userData?.currency_data?.fraction_unit:", (_b = userData == null ? void 0 : userData.currency_data) == null ? void 0 : _b.fraction_unit);
|
|
4223
|
+
return Number(fractionUnit ?? 2);
|
|
4224
|
+
};
|
|
4225
|
+
const getAccessibleModules = (moduleNames = []) => {
|
|
4226
|
+
const userData = getDefaultUserData();
|
|
4208
4227
|
const accessModules = (userData == null ? void 0 : userData.module_access) || [];
|
|
4209
4228
|
const findSubModules = accessModules.filter((module2) => moduleNames.includes(module2.module_name)).map((module2) => ({
|
|
4210
4229
|
...module2,
|
|
@@ -4632,6 +4651,8 @@ exports.getCountryIdByName = getCountryIdByName;
|
|
|
4632
4651
|
exports.getCurrency = getCurrency;
|
|
4633
4652
|
exports.getCurrencyFormat = getCurrencyFormat;
|
|
4634
4653
|
exports.getCurrencySymbol = getCurrencySymbol;
|
|
4654
|
+
exports.getDefaultFraction = getDefaultFraction;
|
|
4655
|
+
exports.getDefaultUserData = getDefaultUserData;
|
|
4635
4656
|
exports.getErrorMessage = getErrorMessage;
|
|
4636
4657
|
exports.getExcelExportTemplate = getExcelExportTemplate;
|
|
4637
4658
|
exports.getExcelTemplateGenerateTemplate = getExcelTemplateGenerateTemplate;
|
|
@@ -4685,4 +4706,4 @@ exports.updateFieldsDisabledState = updateFieldsDisabledState;
|
|
|
4685
4706
|
exports.uploadAttachments = uploadAttachments;
|
|
4686
4707
|
exports.uploadFiles = uploadFiles;
|
|
4687
4708
|
exports.validateDiscountValidity = validateDiscountValidity;
|
|
4688
|
-
//# sourceMappingURL=common-
|
|
4709
|
+
//# sourceMappingURL=common-CsInqdHr.js.map
|