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