@djb25/digit-ui-module-wt 1.0.73 → 1.0.74
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/index.js +121 -26
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +121 -26
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1799,7 +1799,7 @@ const App = () => {
|
|
|
1799
1799
|
parentRoute: path
|
|
1800
1800
|
})
|
|
1801
1801
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
1802
|
-
path: path + "/
|
|
1802
|
+
path: path + "/wt-Vendor",
|
|
1803
1803
|
component: () => Digit.UserService.hasAccess(["WT_VENDOR"]) ? /*#__PURE__*/React__default.createElement("div", {
|
|
1804
1804
|
style: {
|
|
1805
1805
|
display: "flex",
|
|
@@ -3523,6 +3523,9 @@ const WTDesktopInbox = _ref => {
|
|
|
3523
3523
|
const _useState3 = React.useState(false),
|
|
3524
3524
|
clearSearchCalled = _useState3[0],
|
|
3525
3525
|
setClearSearchCalled = _useState3[1];
|
|
3526
|
+
const _useState4 = React.useState(false),
|
|
3527
|
+
isSidebarCollapsed = _useState4[0],
|
|
3528
|
+
setIsSidebarCollapsed = _useState4[1];
|
|
3526
3529
|
const columns = React__default.useMemo(() => props.isSearch ? tableConfig.searchColumns(props) : tableConfig.inboxColumns(props) || [], []);
|
|
3527
3530
|
const inboxCsvColumns = React__default.useMemo(() => {
|
|
3528
3531
|
var _columns$, _columns$2, _columns$3, _columns$4, _columns$find3;
|
|
@@ -3688,14 +3691,88 @@ const WTDesktopInbox = _ref => {
|
|
|
3688
3691
|
});
|
|
3689
3692
|
}
|
|
3690
3693
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
3691
|
-
className: "inbox-container"
|
|
3694
|
+
className: "inbox-container",
|
|
3695
|
+
style: {
|
|
3696
|
+
display: "flex",
|
|
3697
|
+
flexDirection: "row",
|
|
3698
|
+
gap: "12px",
|
|
3699
|
+
alignItems: "flex-start",
|
|
3700
|
+
width: "100%",
|
|
3701
|
+
minHeight: 0,
|
|
3702
|
+
overflow: "visible"
|
|
3703
|
+
}
|
|
3692
3704
|
}, !props.isSearch && /*#__PURE__*/React__default.createElement("div", {
|
|
3693
|
-
className: "
|
|
3705
|
+
className: "wt-sidebar-panel",
|
|
3706
|
+
style: {
|
|
3707
|
+
width: isSidebarCollapsed ? "40px" : "240px",
|
|
3708
|
+
minWidth: isSidebarCollapsed ? "40px" : "240px",
|
|
3709
|
+
flexShrink: 0,
|
|
3710
|
+
transition: "width 0.25s ease, min-width 0.25s ease",
|
|
3711
|
+
overflow: "hidden",
|
|
3712
|
+
display: "flex",
|
|
3713
|
+
flexDirection: "column",
|
|
3714
|
+
gap: "8px"
|
|
3715
|
+
}
|
|
3716
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
3717
|
+
onClick: () => setIsSidebarCollapsed(prev => !prev),
|
|
3718
|
+
title: isSidebarCollapsed ? "Expand Filters" : "Collapse Filters",
|
|
3719
|
+
style: {
|
|
3720
|
+
alignSelf: "flex-end",
|
|
3721
|
+
background: "#0B2559",
|
|
3722
|
+
border: "none",
|
|
3723
|
+
borderRadius: "6px",
|
|
3724
|
+
width: "32px",
|
|
3725
|
+
height: "32px",
|
|
3726
|
+
cursor: "pointer",
|
|
3727
|
+
display: "flex",
|
|
3728
|
+
alignItems: "center",
|
|
3729
|
+
justifyContent: "center",
|
|
3730
|
+
flexShrink: 0,
|
|
3731
|
+
boxShadow: "0 2px 6px rgba(0,0,0,0.15)",
|
|
3732
|
+
transition: "background 0.2s ease",
|
|
3733
|
+
marginBottom: "4px"
|
|
3734
|
+
},
|
|
3735
|
+
onMouseEnter: e => e.currentTarget.style.background = "#1a3a7a",
|
|
3736
|
+
onMouseLeave: e => e.currentTarget.style.background = "#0B2559"
|
|
3737
|
+
}, isSidebarCollapsed ? /*#__PURE__*/React__default.createElement("svg", {
|
|
3738
|
+
width: "16",
|
|
3739
|
+
height: "16",
|
|
3740
|
+
viewBox: "0 0 24 24",
|
|
3741
|
+
fill: "none",
|
|
3742
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
3743
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
3744
|
+
d: "M9 18l6-6-6-6",
|
|
3745
|
+
stroke: "#fff",
|
|
3746
|
+
strokeWidth: "2.5",
|
|
3747
|
+
strokeLinecap: "round",
|
|
3748
|
+
strokeLinejoin: "round"
|
|
3749
|
+
})) : /*#__PURE__*/React__default.createElement("svg", {
|
|
3750
|
+
width: "16",
|
|
3751
|
+
height: "16",
|
|
3752
|
+
viewBox: "0 0 24 24",
|
|
3753
|
+
fill: "none",
|
|
3754
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
3755
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
3756
|
+
d: "M15 18l-6-6 6-6",
|
|
3757
|
+
stroke: "#fff",
|
|
3758
|
+
strokeWidth: "2.5",
|
|
3759
|
+
strokeLinecap: "round",
|
|
3760
|
+
strokeLinejoin: "round"
|
|
3761
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
3762
|
+
style: {
|
|
3763
|
+
opacity: isSidebarCollapsed ? 0 : 1,
|
|
3764
|
+
visibility: isSidebarCollapsed ? "hidden" : "visible",
|
|
3765
|
+
transition: "opacity 0.2s ease, visibility 0.2s ease",
|
|
3766
|
+
display: "flex",
|
|
3767
|
+
flexDirection: "column",
|
|
3768
|
+
gap: "8px",
|
|
3769
|
+
overflow: "hidden"
|
|
3770
|
+
}
|
|
3694
3771
|
}, /*#__PURE__*/React__default.createElement(InboxLinks, {
|
|
3695
3772
|
parentRoute: props.parentRoute,
|
|
3696
3773
|
businessService: props.moduleCode
|
|
3697
3774
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
3698
|
-
className: "filter-form
|
|
3775
|
+
className: "filter-form"
|
|
3699
3776
|
}, /*#__PURE__*/React__default.createElement(FilterComponent, {
|
|
3700
3777
|
defaultSearchParams: props.defaultSearchParams,
|
|
3701
3778
|
onFilterChange: props.onFilterChange,
|
|
@@ -3704,14 +3781,24 @@ const WTDesktopInbox = _ref => {
|
|
|
3704
3781
|
useNewInboxAPI: useNewInboxAPI,
|
|
3705
3782
|
statusMap: useNewInboxAPI ? data === null || data === void 0 ? void 0 : data[0].statusMap : null,
|
|
3706
3783
|
moduleCode: props.moduleCode
|
|
3707
|
-
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
3708
|
-
className: "employee-form-content",
|
|
3784
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
|
3709
3785
|
style: {
|
|
3710
|
-
flex: 1
|
|
3786
|
+
flex: 1,
|
|
3787
|
+
display: "flex",
|
|
3788
|
+
flexDirection: "column",
|
|
3789
|
+
gap: "12px",
|
|
3790
|
+
minWidth: 0,
|
|
3791
|
+
overflow: "hidden"
|
|
3711
3792
|
}
|
|
3712
3793
|
}, !props.isSearch && /*#__PURE__*/React__default.createElement("div", {
|
|
3713
|
-
className: "summary-cards-container"
|
|
3714
|
-
|
|
3794
|
+
className: "summary-cards-container",
|
|
3795
|
+
style: {
|
|
3796
|
+
display: "flex",
|
|
3797
|
+
gap: "10px",
|
|
3798
|
+
flexWrap: "wrap",
|
|
3799
|
+
width: "100%"
|
|
3800
|
+
}
|
|
3801
|
+
}, ((_data$4, _props$searchParams) => {
|
|
3715
3802
|
const getCount = statusList => {
|
|
3716
3803
|
var _data$3;
|
|
3717
3804
|
return ((data === null || data === void 0 ? void 0 : (_data$3 = data[0]) === null || _data$3 === void 0 ? void 0 : _data$3.statusMap) || []).filter(s => {
|
|
@@ -3719,13 +3806,12 @@ const WTDesktopInbox = _ref => {
|
|
|
3719
3806
|
return statusList.includes(st);
|
|
3720
3807
|
}).reduce((acc, curr) => acc + curr.count, 0);
|
|
3721
3808
|
};
|
|
3722
|
-
const isFixedPoint = props.businessService === "watertanker-fixedpoint" || ((_props$searchParams = props.searchParams) === null || _props$searchParams === void 0 ? void 0 : (_props$searchParams$s = _props$searchParams.services) === null || _props$searchParams$s === void 0 ? void 0 : _props$searchParams$s.includes("watertanker-fixedpoint"));
|
|
3723
3809
|
const cards = [{
|
|
3724
3810
|
label: "WT_TOTAL_BOOKINGS",
|
|
3725
3811
|
count: (data === null || data === void 0 ? void 0 : (_data$4 = data[0]) === null || _data$4 === void 0 ? void 0 : _data$4.totalCount) || 0,
|
|
3726
3812
|
color: "#0B2559",
|
|
3727
3813
|
filter: null,
|
|
3728
|
-
active: !((_props$
|
|
3814
|
+
active: !((_props$searchParams = props.searchParams) !== null && _props$searchParams !== void 0 && _props$searchParams.status)
|
|
3729
3815
|
}, {
|
|
3730
3816
|
label: "WT_SCHEDULED",
|
|
3731
3817
|
count: getCount(["SCHEDULED", "VENDOR_ASSIGNED"]),
|
|
@@ -3736,8 +3822,7 @@ const WTDesktopInbox = _ref => {
|
|
|
3736
3822
|
count: getCount(["TANKER_DELIVERED", "DELIVERED"]),
|
|
3737
3823
|
color: "#10B981",
|
|
3738
3824
|
filter: ["TANKER_DELIVERED"]
|
|
3739
|
-
}
|
|
3740
|
-
cards.push({
|
|
3825
|
+
}, {
|
|
3741
3826
|
label: "IN_TRANSIT",
|
|
3742
3827
|
count: getCount(["IN_TRANSIT", "DELIVERY_PENDING"]),
|
|
3743
3828
|
color: "#A855F7",
|
|
@@ -3752,21 +3837,21 @@ const WTDesktopInbox = _ref => {
|
|
|
3752
3837
|
count: getCount(["CANCELLED", "REJECTED", "REQUEST_REJECTED"]),
|
|
3753
3838
|
color: "#64748B",
|
|
3754
3839
|
filter: ["CANCELLED"]
|
|
3755
|
-
}
|
|
3840
|
+
}];
|
|
3756
3841
|
return cards;
|
|
3757
3842
|
})().map((card, idx) => {
|
|
3758
|
-
var _props$
|
|
3759
|
-
const isActive = (_props$
|
|
3843
|
+
var _props$searchParams2, _props$searchParams2$, _card$filter, _props$searchParams3, _props$searchParams3$;
|
|
3844
|
+
const isActive = (_props$searchParams2 = props.searchParams) !== null && _props$searchParams2 !== void 0 && (_props$searchParams2$ = _props$searchParams2.status) !== null && _props$searchParams2$ !== void 0 && _props$searchParams2$.code ? (_card$filter = card.filter) === null || _card$filter === void 0 ? void 0 : _card$filter.includes((_props$searchParams3 = props.searchParams) === null || _props$searchParams3 === void 0 ? void 0 : (_props$searchParams3$ = _props$searchParams3.status) === null || _props$searchParams3$ === void 0 ? void 0 : _props$searchParams3$.code) : card.active;
|
|
3760
3845
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
3761
3846
|
key: idx,
|
|
3762
3847
|
className: "summary-card",
|
|
3763
3848
|
style: {
|
|
3764
3849
|
backgroundColor: "#fff",
|
|
3765
3850
|
borderRadius: "6px",
|
|
3766
|
-
padding: "
|
|
3851
|
+
padding: "12px 14px",
|
|
3767
3852
|
boxShadow: "0 2px 8px rgba(0,0,0,0.05)",
|
|
3768
|
-
flex: "1 1
|
|
3769
|
-
minWidth: "
|
|
3853
|
+
flex: "1 1 110px",
|
|
3854
|
+
minWidth: "100px",
|
|
3770
3855
|
border: isActive ? "2px solid " + card.color : "1px solid #E2E8F0",
|
|
3771
3856
|
cursor: "pointer",
|
|
3772
3857
|
display: "flex",
|
|
@@ -3776,7 +3861,7 @@ const WTDesktopInbox = _ref => {
|
|
|
3776
3861
|
}
|
|
3777
3862
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3778
3863
|
style: {
|
|
3779
|
-
fontSize: "
|
|
3864
|
+
fontSize: "10px",
|
|
3780
3865
|
color: "#64748B",
|
|
3781
3866
|
fontWeight: "600",
|
|
3782
3867
|
textTransform: "uppercase",
|
|
@@ -3787,10 +3872,10 @@ const WTDesktopInbox = _ref => {
|
|
|
3787
3872
|
}
|
|
3788
3873
|
}, t(card.label)), /*#__PURE__*/React__default.createElement("div", {
|
|
3789
3874
|
style: {
|
|
3790
|
-
fontSize: "
|
|
3875
|
+
fontSize: "24px",
|
|
3791
3876
|
fontWeight: "700",
|
|
3792
3877
|
color: card.color,
|
|
3793
|
-
marginTop: "
|
|
3878
|
+
marginTop: "8px"
|
|
3794
3879
|
}
|
|
3795
3880
|
}, String(card.count).padStart(2, "0")));
|
|
3796
3881
|
})), /*#__PURE__*/React__default.createElement(SearchApplication, {
|
|
@@ -3807,7 +3892,9 @@ const WTDesktopInbox = _ref => {
|
|
|
3807
3892
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
3808
3893
|
className: "result",
|
|
3809
3894
|
style: {
|
|
3810
|
-
flex: 1
|
|
3895
|
+
flex: 1,
|
|
3896
|
+
minWidth: 0,
|
|
3897
|
+
overflowX: "auto"
|
|
3811
3898
|
}
|
|
3812
3899
|
}, result)));
|
|
3813
3900
|
};
|
|
@@ -17830,7 +17917,7 @@ const TableConfig = t => ({
|
|
|
17830
17917
|
}] : [])],
|
|
17831
17918
|
serviceRequestIdKey: original => {
|
|
17832
17919
|
var _original$t, _original$t$props;
|
|
17833
|
-
return original === null || original === void 0 ? void 0 : (_original$t = original[t("
|
|
17920
|
+
return original === null || original === void 0 ? void 0 : (_original$t = original[t("WT_BOOKING_NO")]) === null || _original$t === void 0 ? void 0 : (_original$t$props = _original$t.props) === null || _original$t$props === void 0 ? void 0 : _original$t$props.children;
|
|
17834
17921
|
}
|
|
17835
17922
|
},
|
|
17836
17923
|
MT: {
|
|
@@ -17919,7 +18006,7 @@ const TableConfig = t => ({
|
|
|
17919
18006
|
}],
|
|
17920
18007
|
serviceRequestIdKey: original => {
|
|
17921
18008
|
var _original$t2, _original$t2$props;
|
|
17922
|
-
return original === null || original === void 0 ? void 0 : (_original$t2 = original[t("
|
|
18009
|
+
return original === null || original === void 0 ? void 0 : (_original$t2 = original[t("MT_BOOKING_NO")]) === null || _original$t2 === void 0 ? void 0 : (_original$t2$props = _original$t2.props) === null || _original$t2$props === void 0 ? void 0 : _original$t2$props.children;
|
|
17923
18010
|
}
|
|
17924
18011
|
},
|
|
17925
18012
|
TP: {
|
|
@@ -18008,7 +18095,7 @@ const TableConfig = t => ({
|
|
|
18008
18095
|
}],
|
|
18009
18096
|
serviceRequestIdKey: original => {
|
|
18010
18097
|
var _original$t3, _original$t3$props;
|
|
18011
|
-
return original === null || original === void 0 ? void 0 : (_original$t3 = original[t("
|
|
18098
|
+
return original === null || original === void 0 ? void 0 : (_original$t3 = original[t("MT_BOOKING_NO")]) === null || _original$t3 === void 0 ? void 0 : (_original$t3$props = _original$t3.props) === null || _original$t3$props === void 0 ? void 0 : _original$t3$props.children;
|
|
18012
18099
|
}
|
|
18013
18100
|
}
|
|
18014
18101
|
});
|
|
@@ -27264,6 +27351,14 @@ const ApplicationDetails = props => {
|
|
|
27264
27351
|
function onActionSelect(action) {
|
|
27265
27352
|
sessionStorage.setItem("SELECTED_ACTION", action === null || action === void 0 ? void 0 : action.action);
|
|
27266
27353
|
if (action) {
|
|
27354
|
+
if ((action === null || action === void 0 ? void 0 : action.action) === "PAY" && !(action !== null && action !== void 0 && action.redirectionUrl) && !(action !== null && action !== void 0 && action.redirectionUrll)) {
|
|
27355
|
+
if (window.location.href.includes("/employee")) {
|
|
27356
|
+
history.push("/digit-ui/employee/payment/collect/" + businessService + "/" + applicationNumber + "?tenantId=" + tenantId);
|
|
27357
|
+
} else {
|
|
27358
|
+
history.push("/digit-ui/citizen/payment/my-bills/" + businessService + "/" + applicationNumber + "?tenantId=" + tenantId);
|
|
27359
|
+
}
|
|
27360
|
+
return;
|
|
27361
|
+
}
|
|
27267
27362
|
if (action !== null && action !== void 0 && action.isToast) {
|
|
27268
27363
|
setShowToast({
|
|
27269
27364
|
key: "error",
|