@mseva/digit-ui-module-garbagecollection 1.0.30 → 1.0.31
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +620 -287
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CardHeader, Toast, CardLabel, TextInput, Dropdown, ActionBar, SubmitBar, MobileNumber, TextArea, FormComposer, Loader as Loader$1, CardSubHeader, StatusTable, Card, CardSectionHeader, Menu, LabelFieldPair, UploadFile, SearchField, FilterFormField, RadioButtons, CheckBox, ComplaintIcon, Header, InboxComposer, AppContainer, BackButton, PrivateRoute, KeyNote,
|
|
1
|
+
import { CardHeader, Toast, CardLabel, TextInput, Dropdown, ActionBar, SubmitBar, MobileNumber, TextArea, FormComposer, Loader as Loader$1, CardSubHeader, StatusTable, Card, CardSectionHeader, Menu, LabelFieldPair, UploadFile, SearchField, FilterFormField, RadioButtons, CheckBox, ComplaintIcon, Header, InboxComposer, AppContainer, BackButton, PrivateRoute, KeyNote, MultiLink, Row, Banner, Modal, CitizenHomeCard, PTIcon } from '@mseva/digit-ui-react-components';
|
|
2
2
|
import React, { useState, useEffect, useRef, Fragment as Fragment$1, useMemo, useReducer, useCallback } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useHistory, Link, useLocation, Switch, useRouteMatch, useParams } from 'react-router-dom';
|
|
@@ -20,109 +20,147 @@ const StepWrapper = ({
|
|
|
20
20
|
const {
|
|
21
21
|
t
|
|
22
22
|
} = useTranslation();
|
|
23
|
-
const stepStyle = isActive => ({
|
|
23
|
+
const stepStyle = (isActive, isLast) => ({
|
|
24
24
|
display: "flex",
|
|
25
25
|
alignItems: "center",
|
|
26
|
-
justifyContent: "flex-
|
|
27
|
-
flex:
|
|
28
|
-
color: isActive ? "#
|
|
29
|
-
padding: "
|
|
30
|
-
width: "260px"
|
|
26
|
+
justifyContent: "flex-start",
|
|
27
|
+
flex: "0 0 auto",
|
|
28
|
+
color: isActive ? "#0D43A7" : "#9CA3AF",
|
|
29
|
+
padding: "14px 12px",
|
|
30
|
+
width: "260px",
|
|
31
|
+
marginBottom: isLast ? "6px" : "18px"
|
|
31
32
|
});
|
|
32
33
|
const circleStyle = stepNumber => {
|
|
33
|
-
|
|
34
|
-
if (stepNumber <= _currentStep) {
|
|
35
|
-
backgroundColor = "#0D43A7";
|
|
36
|
-
} else {
|
|
37
|
-
backgroundColor = "#FFFFFF";
|
|
38
|
-
}
|
|
34
|
+
const completed = stepNumber <= _currentStep;
|
|
39
35
|
return {
|
|
40
|
-
width: "
|
|
41
|
-
height: "
|
|
36
|
+
width: "56px",
|
|
37
|
+
height: "56px",
|
|
42
38
|
borderRadius: "50%",
|
|
43
|
-
|
|
44
|
-
color:
|
|
39
|
+
background: completed ? "linear-gradient(135deg,#2563eb,#7c3aed)" : "#ffffff",
|
|
40
|
+
color: completed ? "#ffffff" : "#0f172a",
|
|
45
41
|
display: "flex",
|
|
46
42
|
alignItems: "center",
|
|
47
43
|
justifyContent: "center",
|
|
48
|
-
marginBottom: "
|
|
49
|
-
fontWeight:
|
|
44
|
+
marginBottom: "8px",
|
|
45
|
+
fontWeight: 600,
|
|
50
46
|
fontSize: "18px",
|
|
51
|
-
border:
|
|
47
|
+
border: completed ? "none" : "1px solid rgba(15,23,42,0.08)",
|
|
48
|
+
boxShadow: completed ? "0 6px 18px rgba(37,99,235,0.18)" : "0 2px 6px rgba(2,6,23,0.04)",
|
|
52
49
|
position: "relative"
|
|
53
50
|
};
|
|
54
51
|
};
|
|
55
52
|
const labelStyle = {
|
|
56
|
-
fontSize: "
|
|
57
|
-
color: "#
|
|
58
|
-
fontWeight:
|
|
59
|
-
fontFamily: "Noto Sans,sans-serif",
|
|
60
|
-
marginRight: "
|
|
53
|
+
fontSize: "16px",
|
|
54
|
+
color: "#0f172a",
|
|
55
|
+
fontWeight: 600,
|
|
56
|
+
fontFamily: "Noto Sans, sans-serif",
|
|
57
|
+
marginRight: "8px",
|
|
58
|
+
textAlign: "right"
|
|
61
59
|
};
|
|
62
60
|
const stepNumberStyle = {
|
|
63
|
-
fontSize: "
|
|
64
|
-
color: "#
|
|
65
|
-
fontWeight:
|
|
66
|
-
fontFamily: "Noto Sans,sans-serif",
|
|
67
|
-
margin: "
|
|
61
|
+
fontSize: "14px",
|
|
62
|
+
color: "#6b7280",
|
|
63
|
+
fontWeight: 500,
|
|
64
|
+
fontFamily: "Noto Sans, sans-serif",
|
|
65
|
+
margin: "0 6px 0 0"
|
|
68
66
|
};
|
|
69
67
|
const lineStyle = {
|
|
70
68
|
position: "absolute",
|
|
71
|
-
width: "
|
|
72
|
-
height: "
|
|
73
|
-
backgroundColor: "
|
|
69
|
+
width: "3px",
|
|
70
|
+
height: "56px",
|
|
71
|
+
backgroundColor: "rgba(15,23,42,0.06)",
|
|
74
72
|
left: "50%",
|
|
75
73
|
top: "100%",
|
|
76
|
-
transform: "translateX(-50%)"
|
|
74
|
+
transform: "translateX(-50%)",
|
|
75
|
+
borderRadius: "2px"
|
|
77
76
|
};
|
|
78
77
|
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
79
78
|
const totalSteps = _stepsList.length;
|
|
79
|
+
const mobileNavBarStyle = isMobile ? {
|
|
80
|
+
flexDirection: "row",
|
|
81
|
+
overflowX: "auto",
|
|
82
|
+
whiteSpace: "nowrap",
|
|
83
|
+
minWidth: "100%",
|
|
84
|
+
maxWidth: "100%",
|
|
85
|
+
gap: "8px",
|
|
86
|
+
padding: "10px"
|
|
87
|
+
} : {};
|
|
88
|
+
const mobileCircleStyle = isMobile ? {
|
|
89
|
+
width: "32px",
|
|
90
|
+
height: "32px",
|
|
91
|
+
fontSize: "12px"
|
|
92
|
+
} : {};
|
|
93
|
+
const mobileLabelStyle = isMobile ? {
|
|
94
|
+
fontSize: "10px"
|
|
95
|
+
} : {};
|
|
96
|
+
const mobileStepStyle = isMobile ? {
|
|
97
|
+
width: "auto",
|
|
98
|
+
padding: "6px",
|
|
99
|
+
marginBottom: "0",
|
|
100
|
+
flexDirection: "column",
|
|
101
|
+
alignItems: "center"
|
|
102
|
+
} : {};
|
|
80
103
|
return /*#__PURE__*/React.createElement("div", {
|
|
81
104
|
className: "stepper",
|
|
82
105
|
style: {
|
|
83
106
|
width: "100%",
|
|
84
107
|
display: "flex",
|
|
85
|
-
flexDirection: "row",
|
|
86
|
-
|
|
87
|
-
justifyContent: "flex-start"
|
|
108
|
+
flexDirection: isMobile ? "column" : "row",
|
|
109
|
+
gap: "24px"
|
|
88
110
|
}
|
|
89
111
|
}, /*#__PURE__*/React.createElement("div", {
|
|
90
112
|
className: "stepper-navigation-bar",
|
|
91
113
|
style: {
|
|
92
114
|
display: "flex",
|
|
93
115
|
flexDirection: "column",
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
116
|
+
alignItems: "center",
|
|
117
|
+
padding: "18px",
|
|
118
|
+
minWidth: "120px",
|
|
119
|
+
maxWidth: "320px",
|
|
120
|
+
marginBottom: "20px",
|
|
121
|
+
marginTop: isMobile ? "20px" : "0",
|
|
122
|
+
height: isMobile ? "106px" : "",
|
|
123
|
+
...mobileNavBarStyle
|
|
97
124
|
}
|
|
98
125
|
}, [...Array(totalSteps)].map((_, index) => /*#__PURE__*/React.createElement("div", {
|
|
99
126
|
className: "step-content",
|
|
100
127
|
key: index,
|
|
101
|
-
style:
|
|
128
|
+
style: {
|
|
129
|
+
...stepStyle(index + 1 <= _currentStep, index === totalSteps - 1),
|
|
130
|
+
...mobileStepStyle
|
|
131
|
+
}
|
|
102
132
|
}, /*#__PURE__*/React.createElement("div", {
|
|
133
|
+
className: "step-circle",
|
|
134
|
+
style: {
|
|
135
|
+
...circleStyle(index + 1),
|
|
136
|
+
...mobileCircleStyle
|
|
137
|
+
}
|
|
138
|
+
}, index + 1, index < totalSteps - 1 && !isMobile && /*#__PURE__*/React.createElement("div", {
|
|
139
|
+
style: lineStyle
|
|
140
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
103
141
|
className: "step-sub-content",
|
|
104
142
|
style: {
|
|
105
143
|
display: "flex",
|
|
106
144
|
flexDirection: "column",
|
|
107
|
-
alignItems: "flex-end",
|
|
108
|
-
margin: "10px"
|
|
145
|
+
alignItems: isMobile ? "center" : "flex-end",
|
|
146
|
+
margin: isMobile ? "4px" : "10px"
|
|
109
147
|
}
|
|
110
148
|
}, index + 1 === totalSteps ? null : /*#__PURE__*/React.createElement("div", {
|
|
111
149
|
className: "step-number",
|
|
112
150
|
style: stepNumberStyle
|
|
113
151
|
}), /*#__PURE__*/React.createElement("div", {
|
|
114
152
|
className: "step-label",
|
|
115
|
-
style:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}))))), /*#__PURE__*/React.createElement("div", {
|
|
153
|
+
style: {
|
|
154
|
+
...labelStyle,
|
|
155
|
+
...mobileLabelStyle,
|
|
156
|
+
textAlign: isMobile ? "center" : "right"
|
|
157
|
+
}
|
|
158
|
+
}, t(_stepsList[index].stepLabel)))))), /*#__PURE__*/React.createElement("div", {
|
|
122
159
|
className: "stepper-body",
|
|
123
160
|
style: {
|
|
124
161
|
width: "100%",
|
|
125
|
-
marginBottom: "20px"
|
|
162
|
+
marginBottom: "20px",
|
|
163
|
+
background: "transparent"
|
|
126
164
|
}
|
|
127
165
|
}, children));
|
|
128
166
|
};
|
|
@@ -326,7 +364,7 @@ const NewADSStepperForm = () => {
|
|
|
326
364
|
console.log("dataGet===", dataGet);
|
|
327
365
|
};
|
|
328
366
|
return /*#__PURE__*/React.createElement("div", {
|
|
329
|
-
className: "
|
|
367
|
+
className: "card"
|
|
330
368
|
}, /*#__PURE__*/React.createElement(CardHeader, {
|
|
331
369
|
styles: {
|
|
332
370
|
fontSize: "28px",
|
|
@@ -9228,7 +9266,7 @@ const CHBCitizenDetailsNew = ({
|
|
|
9228
9266
|
onSubmit: handleSubmit(onSubmit)
|
|
9229
9267
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9230
9268
|
style: {
|
|
9231
|
-
width: "
|
|
9269
|
+
width: "100%"
|
|
9232
9270
|
}
|
|
9233
9271
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9234
9272
|
style: {
|
|
@@ -9249,9 +9287,6 @@ const CHBCitizenDetailsNew = ({
|
|
|
9249
9287
|
}
|
|
9250
9288
|
},
|
|
9251
9289
|
render: props => /*#__PURE__*/React.createElement(MobileNumber, {
|
|
9252
|
-
style: {
|
|
9253
|
-
marginBottom: 0
|
|
9254
|
-
},
|
|
9255
9290
|
value: props.value,
|
|
9256
9291
|
onChange: e => {
|
|
9257
9292
|
console.log("eee", e);
|
|
@@ -9289,9 +9324,6 @@ const CHBCitizenDetailsNew = ({
|
|
|
9289
9324
|
render: props => {
|
|
9290
9325
|
var _errors$name;
|
|
9291
9326
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
9292
|
-
style: {
|
|
9293
|
-
marginBottom: 0
|
|
9294
|
-
},
|
|
9295
9327
|
value: props.value,
|
|
9296
9328
|
error: errors === null || errors === void 0 ? void 0 : (_errors$name = errors.name) === null || _errors$name === void 0 ? void 0 : _errors$name.message,
|
|
9297
9329
|
onChange: e => {
|
|
@@ -9326,9 +9358,6 @@ const CHBCitizenDetailsNew = ({
|
|
|
9326
9358
|
}
|
|
9327
9359
|
},
|
|
9328
9360
|
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
9329
|
-
style: {
|
|
9330
|
-
marginBottom: 0
|
|
9331
|
-
},
|
|
9332
9361
|
value: props.value,
|
|
9333
9362
|
onChange: e => {
|
|
9334
9363
|
props.onChange(e.target.value);
|
|
@@ -9361,9 +9390,6 @@ const CHBCitizenDetailsNew = ({
|
|
|
9361
9390
|
}
|
|
9362
9391
|
},
|
|
9363
9392
|
render: props => /*#__PURE__*/React.createElement(TextArea, {
|
|
9364
|
-
style: {
|
|
9365
|
-
marginBottom: 0
|
|
9366
|
-
},
|
|
9367
9393
|
name: "address",
|
|
9368
9394
|
value: props.value,
|
|
9369
9395
|
onChange: e => {
|
|
@@ -9840,12 +9866,7 @@ function CHBSummary({
|
|
|
9840
9866
|
fontSize: "15px"
|
|
9841
9867
|
}
|
|
9842
9868
|
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
9843
|
-
|
|
9844
|
-
background: " white",
|
|
9845
|
-
color: "black",
|
|
9846
|
-
border: "1px solid",
|
|
9847
|
-
marginRight: "10px"
|
|
9848
|
-
},
|
|
9869
|
+
className: "submit-bar-back",
|
|
9849
9870
|
label: "Back",
|
|
9850
9871
|
onSubmit: onGoBack
|
|
9851
9872
|
}), displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data6 = workflowDetails.data) !== null && _workflowDetails$data6 !== void 0 && (_workflowDetails$data7 = _workflowDetails$data6.actionState) !== null && _workflowDetails$data7 !== void 0 && _workflowDetails$data7.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data8 = workflowDetails.data) !== null && _workflowDetails$data8 !== void 0 && _workflowDetails$data8.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
|
|
@@ -10402,7 +10423,7 @@ const useInboxMobileCardsData = ({
|
|
|
10402
10423
|
return {
|
|
10403
10424
|
[t("NOC_HOME_SEARCH_RESULTS_APP_NO_LABEL")]: value === null || value === void 0 ? void 0 : value.applicationId,
|
|
10404
10425
|
[t("TL_COMMON_TABLE_COL_APP_DATE")]: format(new Date(value === null || value === void 0 ? void 0 : value.date), "dd/MM/yyyy"),
|
|
10405
|
-
[t("PT_COMMON_TABLE_COL_STATUS_LABEL")]: value === null || value === void 0 ? void 0 : value.status
|
|
10426
|
+
[t("PT_COMMON_TABLE_COL_STATUS_LABEL")]: t(value === null || value === void 0 ? void 0 : value.status)
|
|
10406
10427
|
};
|
|
10407
10428
|
});
|
|
10408
10429
|
const MobileSortFormValues = () => {
|
|
@@ -10435,7 +10456,7 @@ const useInboxMobileCardsData = ({
|
|
|
10435
10456
|
};
|
|
10436
10457
|
return {
|
|
10437
10458
|
data: dataForMobileInboxCards,
|
|
10438
|
-
linkPrefix: `${parentRoute}/
|
|
10459
|
+
linkPrefix: `${parentRoute}/applicationsearch/application-details/`,
|
|
10439
10460
|
serviceRequestIdKey: t("NOC_HOME_SEARCH_RESULTS_APP_NO_LABEL"),
|
|
10440
10461
|
MobileSortFormValues
|
|
10441
10462
|
};
|
|
@@ -10650,6 +10671,7 @@ const Inbox = ({
|
|
|
10650
10671
|
});
|
|
10651
10672
|
};
|
|
10652
10673
|
const onFilterFormSubmit = data => {
|
|
10674
|
+
console.log("here", data);
|
|
10653
10675
|
if (data !== null && data !== void 0 && data.hasOwnProperty("")) delete data[""];
|
|
10654
10676
|
dispatch({
|
|
10655
10677
|
action: "mutateTableForm",
|
|
@@ -10713,7 +10735,7 @@ const EmployeeApp = ({
|
|
|
10713
10735
|
url,
|
|
10714
10736
|
userType
|
|
10715
10737
|
}) => {
|
|
10716
|
-
var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi, _Digit3, _Digit3$ComponentRegi;
|
|
10738
|
+
var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi, _Digit3, _Digit3$ComponentRegi, _Digit4, _Digit4$ComponentRegi, _Digit5, _Digit5$ComponentRegi;
|
|
10717
10739
|
const {
|
|
10718
10740
|
t
|
|
10719
10741
|
} = useTranslation();
|
|
@@ -10735,8 +10757,10 @@ const EmployeeApp = ({
|
|
|
10735
10757
|
const CHBResponseCitizen = Digit.ComponentRegistryService.getComponent("CHBResponseCitizen");
|
|
10736
10758
|
const CHBCreate = (_Digit2 = Digit) === null || _Digit2 === void 0 ? void 0 : (_Digit2$ComponentRegi = _Digit2.ComponentRegistryService) === null || _Digit2$ComponentRegi === void 0 ? void 0 : _Digit2$ComponentRegi.getComponent("CHBStepperForm");
|
|
10737
10759
|
const GCResponseCitizen = (_Digit3 = Digit) === null || _Digit3 === void 0 ? void 0 : (_Digit3$ComponentRegi = _Digit3.ComponentRegistryService) === null || _Digit3$ComponentRegi === void 0 ? void 0 : _Digit3$ComponentRegi.getComponent("GCResponseCitizen");
|
|
10738
|
-
const
|
|
10739
|
-
const
|
|
10760
|
+
const GenerateBill = (_Digit4 = Digit) === null || _Digit4 === void 0 ? void 0 : (_Digit4$ComponentRegi = _Digit4.ComponentRegistryService) === null || _Digit4$ComponentRegi === void 0 ? void 0 : _Digit4$ComponentRegi.getComponent("GenerateBill");
|
|
10761
|
+
const BillGenie = (_Digit5 = Digit) === null || _Digit5 === void 0 ? void 0 : (_Digit5$ComponentRegi = _Digit5.ComponentRegistryService) === null || _Digit5$ComponentRegi === void 0 ? void 0 : _Digit5$ComponentRegi.getComponent("BillGenie");
|
|
10762
|
+
const isRes = window.location.href.includes("garbagecollection/response");
|
|
10763
|
+
const isNewRegistration = window.location.href.includes("searchhall") || window.location.href.includes("modify-application") || window.location.href.includes("garbagecollection/application-details");
|
|
10740
10764
|
return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
10741
10765
|
className: "ground-container"
|
|
10742
10766
|
}, !isRes ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -10769,6 +10793,12 @@ const EmployeeApp = ({
|
|
|
10769
10793
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
10770
10794
|
path: `${path}/create-application`,
|
|
10771
10795
|
component: CHBCreate
|
|
10796
|
+
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
10797
|
+
path: `${path}/generate-bill`,
|
|
10798
|
+
component: GenerateBill
|
|
10799
|
+
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
10800
|
+
path: `${path}/bill-genie`,
|
|
10801
|
+
component: BillGenie
|
|
10772
10802
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
10773
10803
|
path: `${path}/response/:id`,
|
|
10774
10804
|
component: GCResponseCitizen
|
|
@@ -11448,93 +11478,9 @@ var stringToPath = _memoizeCapped(function (string) {
|
|
|
11448
11478
|
return result;
|
|
11449
11479
|
});
|
|
11450
11480
|
|
|
11451
|
-
const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, t) => {
|
|
11452
|
-
var _workflowDetails$data, _workflowDetails$data2, _processInstances$, _processInstances$2, _processInstances$3, _timeline$, _timeline$2, _timeline$3, _timeline$4;
|
|
11453
|
-
const timeline = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.timeline) || [];
|
|
11454
|
-
const processInstances = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.processInstances) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.processInstances) || [];
|
|
11455
|
-
const businessId = (processInstances === null || processInstances === void 0 ? void 0 : (_processInstances$ = processInstances[0]) === null || _processInstances$ === void 0 ? void 0 : _processInstances$.businessId) || "N/A";
|
|
11456
|
-
const businessService = (processInstances === null || processInstances === void 0 ? void 0 : (_processInstances$2 = processInstances[0]) === null || _processInstances$2 === void 0 ? void 0 : _processInstances$2.businessService) || "N/A";
|
|
11457
|
-
const moduleName = (processInstances === null || processInstances === void 0 ? void 0 : (_processInstances$3 = processInstances[0]) === null || _processInstances$3 === void 0 ? void 0 : _processInstances$3.moduleName) || "N/A";
|
|
11458
|
-
const timelineRows = timeline.map((item, index) => {
|
|
11459
|
-
var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$assigner2, _item$assigner3, _item$wfComment;
|
|
11460
|
-
const createdDate = (item === null || item === void 0 ? void 0 : (_item$auditDetails = item.auditDetails) === null || _item$auditDetails === void 0 ? void 0 : _item$auditDetails.created) || "N/A";
|
|
11461
|
-
const timing = (item === null || item === void 0 ? void 0 : (_item$auditDetails2 = item.auditDetails) === null || _item$auditDetails2 === void 0 ? void 0 : _item$auditDetails2.timing) || "N/A";
|
|
11462
|
-
const assignerName = (item === null || item === void 0 ? void 0 : (_item$assigner = item.assigner) === null || _item$assigner === void 0 ? void 0 : _item$assigner.name) || "N/A";
|
|
11463
|
-
const assignerType = (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.type) || "N/A";
|
|
11464
|
-
const mobileNumber = (item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.mobileNumber) || "N/A";
|
|
11465
|
-
const action = (item === null || item === void 0 ? void 0 : item.performedAction) || "N/A";
|
|
11466
|
-
const status = (item === null || item === void 0 ? void 0 : item.status) || (item === null || item === void 0 ? void 0 : item.state) || "N/A";
|
|
11467
|
-
const comment = (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "-";
|
|
11468
|
-
const documents = (item === null || item === void 0 ? void 0 : item.wfDocuments) || [];
|
|
11469
|
-
return {
|
|
11470
|
-
sNo: index + 1,
|
|
11471
|
-
action: t ? t(action) : action,
|
|
11472
|
-
status: t ? t(status) : status,
|
|
11473
|
-
assignerName,
|
|
11474
|
-
assignerType,
|
|
11475
|
-
mobileNumber,
|
|
11476
|
-
designation: assignerType,
|
|
11477
|
-
date: createdDate,
|
|
11478
|
-
time: timing,
|
|
11479
|
-
dateTime: `${createdDate} ${timing !== "N/A" ? timing : ""}`.trim(),
|
|
11480
|
-
comment,
|
|
11481
|
-
documents: documents.map(doc => ({
|
|
11482
|
-
name: (doc === null || doc === void 0 ? void 0 : doc.fileName) || (doc === null || doc === void 0 ? void 0 : doc.documentType) || "Document",
|
|
11483
|
-
type: (doc === null || doc === void 0 ? void 0 : doc.documentType) || "Document",
|
|
11484
|
-
fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId
|
|
11485
|
-
})),
|
|
11486
|
-
hasDocuments: documents.length > 0
|
|
11487
|
-
};
|
|
11488
|
-
});
|
|
11489
|
-
return {
|
|
11490
|
-
t,
|
|
11491
|
-
tenantId: (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code) || "",
|
|
11492
|
-
tenantName: (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.name) || (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.i18nKey) || "Government Department",
|
|
11493
|
-
name: t ? t("TIMELINE_PDF_TITLE") : "Application Timeline",
|
|
11494
|
-
heading: t ? t("TIMELINE_PDF_HEADING") : "File Movement Report",
|
|
11495
|
-
businessId,
|
|
11496
|
-
businessService: t ? t(`CS_COMMON_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}`) : businessService,
|
|
11497
|
-
moduleName,
|
|
11498
|
-
currentStatus: t ? t((timeline === null || timeline === void 0 ? void 0 : (_timeline$ = timeline[0]) === null || _timeline$ === void 0 ? void 0 : _timeline$.status) || (timeline === null || timeline === void 0 ? void 0 : (_timeline$2 = timeline[0]) === null || _timeline$2 === void 0 ? void 0 : _timeline$2.state) || "N/A") : (timeline === null || timeline === void 0 ? void 0 : (_timeline$3 = timeline[0]) === null || _timeline$3 === void 0 ? void 0 : _timeline$3.status) || (timeline === null || timeline === void 0 ? void 0 : (_timeline$4 = timeline[0]) === null || _timeline$4 === void 0 ? void 0 : _timeline$4.state) || "N/A",
|
|
11499
|
-
generatedDate: new Date().toLocaleDateString("en-IN", {
|
|
11500
|
-
day: "2-digit",
|
|
11501
|
-
month: "long",
|
|
11502
|
-
year: "numeric"
|
|
11503
|
-
}),
|
|
11504
|
-
generatedDateTime: new Date().toLocaleString("en-IN", {
|
|
11505
|
-
day: "2-digit",
|
|
11506
|
-
month: "2-digit",
|
|
11507
|
-
year: "numeric",
|
|
11508
|
-
hour: "2-digit",
|
|
11509
|
-
minute: "2-digit",
|
|
11510
|
-
hour12: true
|
|
11511
|
-
}),
|
|
11512
|
-
timelineRows,
|
|
11513
|
-
totalSteps: timelineRows.length
|
|
11514
|
-
};
|
|
11515
|
-
};
|
|
11516
|
-
|
|
11517
|
-
const parseDate = dateStr => {
|
|
11518
|
-
if (!dateStr || dateStr === "N/A") return null;
|
|
11519
|
-
if (typeof dateStr === "string" && dateStr !== null && dateStr !== void 0 && dateStr.includes("/")) {
|
|
11520
|
-
const [day, month, year] = dateStr === null || dateStr === void 0 ? void 0 : dateStr.split("/");
|
|
11521
|
-
return new Date(year, month - 1, day);
|
|
11522
|
-
}
|
|
11523
|
-
return new Date(dateStr);
|
|
11524
|
-
};
|
|
11525
|
-
const calculateDays = (start, end) => {
|
|
11526
|
-
if (!start || !end) return "N/A";
|
|
11527
|
-
const startDate = parseDate(start);
|
|
11528
|
-
const endDate = parseDate(end);
|
|
11529
|
-
if (!startDate || !endDate || isNaN(startDate === null || startDate === void 0 ? void 0 : startDate.getTime()) || isNaN(endDate === null || endDate === void 0 ? void 0 : endDate.getTime())) {
|
|
11530
|
-
return "N/A";
|
|
11531
|
-
}
|
|
11532
|
-
const diffDays = Math.floor((endDate - startDate) / 86400000);
|
|
11533
|
-
return diffDays < 0 ? "N/A" : diffDays === 0 ? "0 Days" : `${diffDays} Days`;
|
|
11534
|
-
};
|
|
11535
11481
|
const PDFSvg$1 = React.memo(({
|
|
11536
|
-
width: _width =
|
|
11537
|
-
height: _height =
|
|
11482
|
+
width: _width = 20,
|
|
11483
|
+
height: _height = 20,
|
|
11538
11484
|
style
|
|
11539
11485
|
}) => /*#__PURE__*/React.createElement("svg", {
|
|
11540
11486
|
style: style,
|
|
@@ -11572,7 +11518,7 @@ const TimelineDocument = React.memo(({
|
|
|
11572
11518
|
}, [value, Code]);
|
|
11573
11519
|
if (isLoading) return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
11574
11520
|
return /*#__PURE__*/React.createElement("div", {
|
|
11575
|
-
className: "
|
|
11521
|
+
className: "custom-doc-container"
|
|
11576
11522
|
}, documents === null || documents === void 0 ? void 0 : documents.map((document, idx) => {
|
|
11577
11523
|
const documentLink = pdfDownloadLink$1(data === null || data === void 0 ? void 0 : data.pdfFiles, document === null || document === void 0 ? void 0 : document.fileStoreId);
|
|
11578
11524
|
if (!documentLink) return null;
|
|
@@ -11581,134 +11527,161 @@ const TimelineDocument = React.memo(({
|
|
|
11581
11527
|
target: "_blank",
|
|
11582
11528
|
rel: "noopener noreferrer",
|
|
11583
11529
|
href: documentLink,
|
|
11584
|
-
className: "
|
|
11585
|
-
}, /*#__PURE__*/React.createElement(PDFSvg$1,
|
|
11586
|
-
className: "timeline-doc-icon"
|
|
11587
|
-
}));
|
|
11530
|
+
className: "custom-doc-link"
|
|
11531
|
+
}, /*#__PURE__*/React.createElement(PDFSvg$1, null), /*#__PURE__*/React.createElement("span", null, (document === null || document === void 0 ? void 0 : document.fileName) || "Document"));
|
|
11588
11532
|
}));
|
|
11589
11533
|
});
|
|
11590
|
-
|
|
11591
|
-
var _workflowDetails$data;
|
|
11592
|
-
const rawTimeline = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline;
|
|
11593
|
-
if (!rawTimeline || !Array.isArray(rawTimeline)) return [];
|
|
11594
|
-
return rawTimeline === null || rawTimeline === void 0 ? void 0 : rawTimeline.map((item, index) => {
|
|
11595
|
-
var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$wfComment;
|
|
11596
|
-
const createdDate = (item === null || item === void 0 ? void 0 : (_item$auditDetails = item.auditDetails) === null || _item$auditDetails === void 0 ? void 0 : _item$auditDetails.created) || "N/A";
|
|
11597
|
-
const lastModified = (item === null || item === void 0 ? void 0 : (_item$auditDetails2 = item.auditDetails) === null || _item$auditDetails2 === void 0 ? void 0 : _item$auditDetails2.lastModified) || "N/A";
|
|
11598
|
-
return {
|
|
11599
|
-
id: index,
|
|
11600
|
-
state: item === null || item === void 0 ? void 0 : item.state,
|
|
11601
|
-
assignerName: (item === null || item === void 0 ? void 0 : (_item$assigner = item.assigner) === null || _item$assigner === void 0 ? void 0 : _item$assigner.name) || "N/A",
|
|
11602
|
-
performedAction: item === null || item === void 0 ? void 0 : item.performedAction,
|
|
11603
|
-
comment: (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "",
|
|
11604
|
-
documents: (item === null || item === void 0 ? void 0 : item.wfDocuments) || [],
|
|
11605
|
-
createdDate,
|
|
11606
|
-
lastModified,
|
|
11607
|
-
noOfDays: calculateDays(createdDate, lastModified)
|
|
11608
|
-
};
|
|
11609
|
-
});
|
|
11610
|
-
};
|
|
11611
|
-
const HEADER_FIELDS = [{
|
|
11612
|
-
label: "CM_TIMELINE_NAME",
|
|
11613
|
-
key: "assignerName"
|
|
11614
|
-
}, {
|
|
11615
|
-
label: "CM_TIMELINE_ACTION_TAKEN",
|
|
11616
|
-
key: "performedAction"
|
|
11617
|
-
}, {
|
|
11618
|
-
label: "CM_TIMELINE_ACTION_TAKEN_ON",
|
|
11619
|
-
key: "lastModified"
|
|
11620
|
-
}, {
|
|
11621
|
-
label: "CM_TIMELINE_DATE_RECEIVED",
|
|
11622
|
-
key: "createdDate"
|
|
11623
|
-
}, {
|
|
11624
|
-
label: "CM_TIMELINE_NO_OF_DAYS",
|
|
11625
|
-
key: "noOfDays"
|
|
11626
|
-
}];
|
|
11627
|
-
const TimelineCaption = React.memo(({
|
|
11628
|
-
checkpoint,
|
|
11629
|
-
t,
|
|
11630
|
-
onDownloadPDF
|
|
11631
|
-
}) => {
|
|
11632
|
-
var _checkpoint$documents, _checkpoint$documents2;
|
|
11633
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
11634
|
-
className: "timeline-card"
|
|
11635
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
11636
|
-
className: "timeline-header"
|
|
11637
|
-
}, HEADER_FIELDS === null || HEADER_FIELDS === void 0 ? void 0 : HEADER_FIELDS.map(({
|
|
11638
|
-
label,
|
|
11639
|
-
key
|
|
11640
|
-
}) => /*#__PURE__*/React.createElement("div", {
|
|
11641
|
-
key: key,
|
|
11642
|
-
className: "timeline-header-item"
|
|
11643
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
11644
|
-
className: "timeline-label"
|
|
11645
|
-
}, t(label), ":"), /*#__PURE__*/React.createElement("span", {
|
|
11646
|
-
className: "timeline-value"
|
|
11647
|
-
}, t(checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint[key]) || "N/A")))), /*#__PURE__*/React.createElement("div", {
|
|
11648
|
-
className: "timeline-note"
|
|
11649
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
11650
|
-
className: "timeline-label"
|
|
11651
|
-
}, t("CM_TIMELINE_NOTE"), ":"), /*#__PURE__*/React.createElement("div", {
|
|
11652
|
-
className: "note-box"
|
|
11653
|
-
}, (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.comment) || t("CM_TIMELINE_NO_COMMENTS"))), (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$documents = checkpoint.documents) === null || _checkpoint$documents === void 0 ? void 0 : _checkpoint$documents.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
11654
|
-
className: "timeline-docs"
|
|
11655
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
11656
|
-
className: "timeline-label"
|
|
11657
|
-
}, t("CM_TIMELINE_DOCUMENT_ATTACHED"), ":"), checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$documents2 = checkpoint.documents) === null || _checkpoint$documents2 === void 0 ? void 0 : _checkpoint$documents2.map((doc, index) => /*#__PURE__*/React.createElement(TimelineDocument, {
|
|
11658
|
-
key: `${doc === null || doc === void 0 ? void 0 : doc.documentType}-${index}`,
|
|
11659
|
-
value: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.documents,
|
|
11660
|
-
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
11661
|
-
index: index
|
|
11662
|
-
}))));
|
|
11663
|
-
});
|
|
11664
|
-
const ApplicationTimeline = ({
|
|
11534
|
+
function NewApplicationTimeline({
|
|
11665
11535
|
workflowDetails,
|
|
11666
11536
|
t
|
|
11667
|
-
})
|
|
11668
|
-
|
|
11669
|
-
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
}
|
|
11673
|
-
const
|
|
11674
|
-
|
|
11675
|
-
const
|
|
11676
|
-
const
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
|
|
11680
|
-
|
|
11681
|
-
|
|
11537
|
+
}) {
|
|
11538
|
+
const parseActionDateTime = auditDetails => {
|
|
11539
|
+
if (!(auditDetails !== null && auditDetails !== void 0 && auditDetails.created) || !(auditDetails !== null && auditDetails !== void 0 && auditDetails.timing)) return null;
|
|
11540
|
+
const [day, month, year] = auditDetails.created.split("/");
|
|
11541
|
+
return new Date(`${year}-${month}-${day} ${auditDetails.timing}`);
|
|
11542
|
+
};
|
|
11543
|
+
const calculateSLA = (currentDate, previousDate) => {
|
|
11544
|
+
if (!currentDate || !previousDate) return null;
|
|
11545
|
+
const diffMs = currentDate - previousDate;
|
|
11546
|
+
const totalMinutes = Math.floor(diffMs / (1000 * 60));
|
|
11547
|
+
const hours = Math.floor(totalMinutes / 60);
|
|
11548
|
+
const days = Math.floor(hours / 24);
|
|
11549
|
+
if (days > 0) return `${days} day(s)`;
|
|
11550
|
+
if (hours > 0) return `${hours} hour(s)`;
|
|
11551
|
+
return `${totalMinutes} minute(s)`;
|
|
11552
|
+
};
|
|
11553
|
+
const normalizeTimeline = workflowDetails => {
|
|
11554
|
+
const details = (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.data) || workflowDetails;
|
|
11555
|
+
const rawTimeline = details === null || details === void 0 ? void 0 : details.timeline;
|
|
11556
|
+
if (!Array.isArray(rawTimeline)) return [];
|
|
11557
|
+
const orderedTimeline = [...rawTimeline].reverse();
|
|
11558
|
+
const normalized = orderedTimeline.map((item, index) => {
|
|
11559
|
+
var _orderedTimeline;
|
|
11560
|
+
const currentDate = parseActionDateTime(item.auditDetails);
|
|
11561
|
+
const previousDate = index > 0 ? parseActionDateTime((_orderedTimeline = orderedTimeline[index - 1]) === null || _orderedTimeline === void 0 ? void 0 : _orderedTimeline.auditDetails) : null;
|
|
11562
|
+
return {
|
|
11563
|
+
...item,
|
|
11564
|
+
status: (item === null || item === void 0 ? void 0 : item.state) || (item === null || item === void 0 ? void 0 : item.status),
|
|
11565
|
+
assigner: (item === null || item === void 0 ? void 0 : item.assigner) || null,
|
|
11566
|
+
assignes: Array.isArray(item === null || item === void 0 ? void 0 : item.assignes) ? item.assignes : [],
|
|
11567
|
+
wfComment: Array.isArray(item === null || item === void 0 ? void 0 : item.wfComment) ? item.wfComment : item !== null && item !== void 0 && item.comment ? [item.comment] : [],
|
|
11568
|
+
wfDocuments: Array.isArray(item === null || item === void 0 ? void 0 : item.wfDocuments) ? item.wfDocuments : [],
|
|
11569
|
+
actionDateTime: currentDate,
|
|
11570
|
+
sla: calculateSLA(currentDate, previousDate)
|
|
11571
|
+
};
|
|
11572
|
+
});
|
|
11573
|
+
return normalized.reverse();
|
|
11574
|
+
};
|
|
11575
|
+
const data = useMemo(() => normalizeTimeline(workflowDetails), [workflowDetails]);
|
|
11576
|
+
const sortedData = data || [];
|
|
11577
|
+
console.log("sortedData", sortedData);
|
|
11578
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
11579
|
+
className: "custom-timeline-container"
|
|
11682
11580
|
}, /*#__PURE__*/React.createElement("div", {
|
|
11683
|
-
className: "timeline-header
|
|
11684
|
-
}, /*#__PURE__*/React.createElement(
|
|
11685
|
-
className: "
|
|
11686
|
-
},
|
|
11687
|
-
|
|
11688
|
-
|
|
11689
|
-
|
|
11690
|
-
|
|
11691
|
-
|
|
11692
|
-
|
|
11693
|
-
|
|
11694
|
-
|
|
11695
|
-
|
|
11696
|
-
|
|
11697
|
-
|
|
11698
|
-
|
|
11699
|
-
|
|
11700
|
-
|
|
11701
|
-
|
|
11702
|
-
|
|
11703
|
-
|
|
11704
|
-
|
|
11705
|
-
|
|
11706
|
-
|
|
11581
|
+
className: "custom-timeline-header"
|
|
11582
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11583
|
+
className: "custom-tracking-status-header"
|
|
11584
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11585
|
+
className: "custom-tracking-line"
|
|
11586
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
11587
|
+
className: "custom-tracking-status-text"
|
|
11588
|
+
}, t("TRACKING STATUS")), /*#__PURE__*/React.createElement("div", {
|
|
11589
|
+
className: "custom-tracking-line"
|
|
11590
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
11591
|
+
className: "custom-title-bar-row"
|
|
11592
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
11593
|
+
className: "custom-timeline-title"
|
|
11594
|
+
}, t("Application History")), /*#__PURE__*/React.createElement("div", {
|
|
11595
|
+
className: "custom-blue-bar"
|
|
11596
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
11597
|
+
className: "custom-timeline-entries"
|
|
11598
|
+
}, sortedData === null || sortedData === void 0 ? void 0 : sortedData.map((item, index) => {
|
|
11599
|
+
var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$assigner2, _item$assigner3, _item$wfComment, _item$wfComment2, _item$wfComment3, _item$assignes, _item$assignes$, _item$wfDocuments, _item$wfDocuments2;
|
|
11600
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11601
|
+
key: index,
|
|
11602
|
+
className: "custom-timeline-entry"
|
|
11603
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11604
|
+
className: "custom-vertical-line"
|
|
11605
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
11606
|
+
className: "custom-date-badge"
|
|
11607
|
+
}, item === null || item === void 0 ? void 0 : (_item$auditDetails = item.auditDetails) === null || _item$auditDetails === void 0 ? void 0 : _item$auditDetails.created, " ", item === null || item === void 0 ? void 0 : (_item$auditDetails2 = item.auditDetails) === null || _item$auditDetails2 === void 0 ? void 0 : _item$auditDetails2.timing), /*#__PURE__*/React.createElement("div", {
|
|
11608
|
+
className: "custom-entry-content"
|
|
11609
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11610
|
+
className: "custom-icon-container"
|
|
11611
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11612
|
+
className: "custom-circular-icon"
|
|
11613
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
11614
|
+
className: "custom-mail-icon",
|
|
11615
|
+
viewBox: "0 0 24 24"
|
|
11616
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
11617
|
+
x: "3",
|
|
11618
|
+
y: "5",
|
|
11619
|
+
width: "18",
|
|
11620
|
+
height: "14",
|
|
11621
|
+
rx: "2"
|
|
11622
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
11623
|
+
d: "M3 7l9 6 9-6"
|
|
11624
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
11625
|
+
className: "custom-content-card"
|
|
11626
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11627
|
+
className: "custom-card-top"
|
|
11628
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11629
|
+
className: "custom-card-left"
|
|
11630
|
+
}, /*#__PURE__*/React.createElement("h3", {
|
|
11631
|
+
className: "custom-action-title"
|
|
11632
|
+
}, t("Action taken by")), (item === null || item === void 0 ? void 0 : item.assigner) && /*#__PURE__*/React.createElement("div", {
|
|
11633
|
+
className: "custom-officer-info"
|
|
11634
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11635
|
+
className: "custom-officer-name"
|
|
11636
|
+
}, (item === null || item === void 0 ? void 0 : (_item$assigner = item.assigner) === null || _item$assigner === void 0 ? void 0 : _item$assigner.name) || t("CS_COMMON_NA")), (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.emailId) && /*#__PURE__*/React.createElement("div", {
|
|
11637
|
+
className: "custom-officer-email"
|
|
11638
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
11639
|
+
className: "custom-email-label"
|
|
11640
|
+
}, t("Email")), " ", item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.emailId))), (item === null || item === void 0 ? void 0 : item.sla) && /*#__PURE__*/React.createElement("div", {
|
|
11641
|
+
className: "custom-card-left"
|
|
11642
|
+
}, /*#__PURE__*/React.createElement("h3", {
|
|
11643
|
+
className: "custom-action-title"
|
|
11644
|
+
}, t("Time Taken")), /*#__PURE__*/React.createElement("div", {
|
|
11645
|
+
className: "custom-officer-email"
|
|
11646
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
11647
|
+
className: "custom-email-label"
|
|
11648
|
+
}, item === null || item === void 0 ? void 0 : item.sla))), /*#__PURE__*/React.createElement("div", {
|
|
11649
|
+
className: "custom-card-right"
|
|
11650
|
+
}, /*#__PURE__*/React.createElement("h3", {
|
|
11651
|
+
className: "custom-action-title"
|
|
11652
|
+
}, t("Action")), /*#__PURE__*/React.createElement("div", {
|
|
11653
|
+
className: "custom-status-text"
|
|
11654
|
+
}, t((item === null || item === void 0 ? void 0 : item.performedAction) || "CS_COMMON_NA")))), (item === null || item === void 0 ? void 0 : item.wfComment) && (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment.length) > 0 && (item === null || item === void 0 ? void 0 : (_item$wfComment2 = item.wfComment) === null || _item$wfComment2 === void 0 ? void 0 : _item$wfComment2.some(c => c === null || c === void 0 ? void 0 : c.trim())) && /*#__PURE__*/React.createElement("div", {
|
|
11655
|
+
className: "custom-comments-section"
|
|
11656
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11657
|
+
className: "custom-comment-text"
|
|
11658
|
+
}, /*#__PURE__*/React.createElement("h4", {
|
|
11659
|
+
className: "custom-comments-title"
|
|
11660
|
+
}, t("Officer Comments")), item === null || item === void 0 ? void 0 : (_item$wfComment3 = item.wfComment) === null || _item$wfComment3 === void 0 ? void 0 : _item$wfComment3.map((comment, idx) => /*#__PURE__*/React.createElement("p", {
|
|
11661
|
+
key: idx
|
|
11662
|
+
}, comment))), (item === null || item === void 0 ? void 0 : (_item$assignes = item.assignes) === null || _item$assignes === void 0 ? void 0 : _item$assignes.length) > 0 && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", {
|
|
11663
|
+
className: "custom-comments-title"
|
|
11664
|
+
}, t("Assigned To")), /*#__PURE__*/React.createElement("div", {
|
|
11665
|
+
className: "custom-officer-info"
|
|
11666
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11667
|
+
className: "custom-officer-name"
|
|
11668
|
+
}, (_item$assignes$ = item.assignes[0]) === null || _item$assignes$ === void 0 ? void 0 : _item$assignes$.name)))), (item === null || item === void 0 ? void 0 : item.wfDocuments) && (item === null || item === void 0 ? void 0 : (_item$wfDocuments = item.wfDocuments) === null || _item$wfDocuments === void 0 ? void 0 : _item$wfDocuments.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
11669
|
+
className: "custom-comments-section-no-border"
|
|
11670
|
+
}, /*#__PURE__*/React.createElement("h4", {
|
|
11671
|
+
className: "custom-comments-title"
|
|
11672
|
+
}, "Document Attached:"), /*#__PURE__*/React.createElement("div", {
|
|
11673
|
+
className: "custom-comment-text"
|
|
11674
|
+
}, item === null || item === void 0 ? void 0 : (_item$wfDocuments2 = item.wfDocuments) === null || _item$wfDocuments2 === void 0 ? void 0 : _item$wfDocuments2.map((doc, index) => /*#__PURE__*/React.createElement(TimelineDocument, {
|
|
11675
|
+
key: `${doc === null || doc === void 0 ? void 0 : doc.documentType}-${index}`,
|
|
11676
|
+
value: item === null || item === void 0 ? void 0 : item.wfDocuments,
|
|
11677
|
+
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
11678
|
+
index: index
|
|
11679
|
+
})))))));
|
|
11707
11680
|
}))));
|
|
11708
|
-
}
|
|
11681
|
+
}
|
|
11709
11682
|
|
|
11710
11683
|
const ChallanApplicationDetails = () => {
|
|
11711
|
-
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _getChallanData$conne, _getChallanData$conne2, _getChallanData$conne3, _getChallanData$conne4, _getChallanData$conne5, _getChallanData$conne6, _getChallanData$docum, _getChallanData$docum2;
|
|
11684
|
+
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _getChallanData$conne, _getChallanData$conne2, _getChallanData$conne3, _getChallanData$conne4, _getChallanData$conne5, _getChallanData$conne6, _getChallanData$conne7, _getChallanData$conne8, _getChallanData$conne9, _getChallanData$conne0, _getChallanData$docum, _getChallanData$docum2;
|
|
11712
11685
|
const {
|
|
11713
11686
|
t
|
|
11714
11687
|
} = useTranslation();
|
|
@@ -11876,6 +11849,10 @@ const ChallanApplicationDetails = () => {
|
|
|
11876
11849
|
className: "border-none",
|
|
11877
11850
|
label: t("CORE_EMAIL_ID"),
|
|
11878
11851
|
text: (getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$conne5 = getChallanData.connectionHolders) === null || _getChallanData$conne5 === void 0 ? void 0 : (_getChallanData$conne6 = _getChallanData$conne5[0]) === null || _getChallanData$conne6 === void 0 ? void 0 : _getChallanData$conne6.emailId) || t("CS_NA")
|
|
11852
|
+
}), (getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$conne7 = getChallanData.connectionHolders) === null || _getChallanData$conne7 === void 0 ? void 0 : (_getChallanData$conne8 = _getChallanData$conne7[0]) === null || _getChallanData$conne8 === void 0 ? void 0 : _getChallanData$conne8.permanentAddress) && /*#__PURE__*/React.createElement(Row, {
|
|
11853
|
+
className: "border-none",
|
|
11854
|
+
label: t("PTR_ADDRESS"),
|
|
11855
|
+
text: (getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$conne9 = getChallanData.connectionHolders) === null || _getChallanData$conne9 === void 0 ? void 0 : (_getChallanData$conne0 = _getChallanData$conne9[0]) === null || _getChallanData$conne0 === void 0 ? void 0 : _getChallanData$conne0.permanentAddress) || t("CS_NA")
|
|
11879
11856
|
})), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
11880
11857
|
style: {
|
|
11881
11858
|
fontSize: "24px",
|
|
@@ -11944,7 +11921,7 @@ const ChallanApplicationDetails = () => {
|
|
|
11944
11921
|
marginTop: "10px",
|
|
11945
11922
|
fontSize: "15px"
|
|
11946
11923
|
}
|
|
11947
|
-
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(
|
|
11924
|
+
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
11948
11925
|
workflowDetails: workflowDetails,
|
|
11949
11926
|
t: t
|
|
11950
11927
|
})), (loader || (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.isLoading)) && /*#__PURE__*/React.createElement(Loader, {
|
|
@@ -12302,7 +12279,7 @@ const NDCModal = ({
|
|
|
12302
12279
|
};
|
|
12303
12280
|
|
|
12304
12281
|
const ChallanApplicationDetails$1 = () => {
|
|
12305
|
-
var _getChallanData$proce, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user$info, _user$info$roles, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _getChallanData$conne, _getChallanData$conne2, _getChallanData$conne3, _getChallanData$conne4, _getChallanData$conne5, _getChallanData$conne6, _getChallanData$docum, _getChallanData$docum2, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data12;
|
|
12282
|
+
var _getChallanData$proce, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user$info, _user$info$roles, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _getChallanData$conne, _getChallanData$conne2, _getChallanData$conne3, _getChallanData$conne4, _getChallanData$conne5, _getChallanData$conne6, _getChallanData$conne7, _getChallanData$conne8, _getChallanData$conne9, _getChallanData$conne0, _getChallanData$docum, _getChallanData$docum2, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data12;
|
|
12306
12283
|
const {
|
|
12307
12284
|
t
|
|
12308
12285
|
} = useTranslation();
|
|
@@ -12473,6 +12450,10 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12473
12450
|
className: "border-none",
|
|
12474
12451
|
label: t("CORE_EMAIL_ID"),
|
|
12475
12452
|
text: (getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$conne5 = getChallanData.connectionHolders) === null || _getChallanData$conne5 === void 0 ? void 0 : (_getChallanData$conne6 = _getChallanData$conne5[0]) === null || _getChallanData$conne6 === void 0 ? void 0 : _getChallanData$conne6.emailId) || t("CS_NA")
|
|
12453
|
+
}), (getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$conne7 = getChallanData.connectionHolders) === null || _getChallanData$conne7 === void 0 ? void 0 : (_getChallanData$conne8 = _getChallanData$conne7[0]) === null || _getChallanData$conne8 === void 0 ? void 0 : _getChallanData$conne8.permanentAddress) && /*#__PURE__*/React.createElement(Row, {
|
|
12454
|
+
className: "border-none",
|
|
12455
|
+
label: t("PTR_ADDRESS"),
|
|
12456
|
+
text: (getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$conne9 = getChallanData.connectionHolders) === null || _getChallanData$conne9 === void 0 ? void 0 : (_getChallanData$conne0 = _getChallanData$conne9[0]) === null || _getChallanData$conne0 === void 0 ? void 0 : _getChallanData$conne0.permanentAddress) || t("CS_NA")
|
|
12476
12457
|
})), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
12477
12458
|
style: {
|
|
12478
12459
|
fontSize: "24px",
|
|
@@ -12541,7 +12522,7 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12541
12522
|
marginTop: "10px",
|
|
12542
12523
|
fontSize: "15px"
|
|
12543
12524
|
}
|
|
12544
|
-
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(
|
|
12525
|
+
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
12545
12526
|
workflowDetails: workflowDetails,
|
|
12546
12527
|
t: t
|
|
12547
12528
|
}), (getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.applicationStatus) != "INITIATED" && actions && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data1 = workflowDetails.data) !== null && _workflowDetails$data1 !== void 0 && (_workflowDetails$data10 = _workflowDetails$data1.actionState) !== null && _workflowDetails$data10 !== void 0 && _workflowDetails$data10.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data11 = workflowDetails.data) !== null && _workflowDetails$data11 !== void 0 && _workflowDetails$data11.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
|
|
@@ -12590,6 +12571,356 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12590
12571
|
}));
|
|
12591
12572
|
};
|
|
12592
12573
|
|
|
12574
|
+
const GenerateBill = () => {
|
|
12575
|
+
const dispatch = useDispatch();
|
|
12576
|
+
const history = useHistory();
|
|
12577
|
+
const {
|
|
12578
|
+
t
|
|
12579
|
+
} = useTranslation();
|
|
12580
|
+
const tenantId = window.location.href.includes("citizen") ? window.localStorage.getItem("CITIZEN.CITY") : window.localStorage.getItem("Employee.tenant-id");
|
|
12581
|
+
const [loader, setLoader] = useState(false);
|
|
12582
|
+
const [getData, setData] = useState();
|
|
12583
|
+
const {
|
|
12584
|
+
control,
|
|
12585
|
+
handleSubmit,
|
|
12586
|
+
setValue,
|
|
12587
|
+
formState: {
|
|
12588
|
+
errors
|
|
12589
|
+
},
|
|
12590
|
+
getValues,
|
|
12591
|
+
watch,
|
|
12592
|
+
clearErrors
|
|
12593
|
+
} = useForm();
|
|
12594
|
+
const onSubmit = async data => {
|
|
12595
|
+
console.log("data===", data);
|
|
12596
|
+
};
|
|
12597
|
+
const batchLocality = [{
|
|
12598
|
+
name: "Batch",
|
|
12599
|
+
code: "Block"
|
|
12600
|
+
}, {
|
|
12601
|
+
name: "Locality",
|
|
12602
|
+
code: "Locality"
|
|
12603
|
+
}];
|
|
12604
|
+
const handleApiData = async val => {
|
|
12605
|
+
setLoader(true);
|
|
12606
|
+
const filters = {};
|
|
12607
|
+
filters.hierarchyTypeCode = "REVENUE";
|
|
12608
|
+
filters.boundaryType = val === null || val === void 0 ? void 0 : val.code;
|
|
12609
|
+
try {
|
|
12610
|
+
var _response$TenantBound, _response$TenantBound2, _response$TenantBound3, _response$TenantBound4;
|
|
12611
|
+
const response = await Digit.GCService.location({
|
|
12612
|
+
tenantId,
|
|
12613
|
+
filters
|
|
12614
|
+
});
|
|
12615
|
+
setLoader(false);
|
|
12616
|
+
console.log("response==", response === null || response === void 0 ? void 0 : (_response$TenantBound = response.TenantBoundary) === null || _response$TenantBound === void 0 ? void 0 : (_response$TenantBound2 = _response$TenantBound[0]) === null || _response$TenantBound2 === void 0 ? void 0 : _response$TenantBound2.boundary);
|
|
12617
|
+
setData(response === null || response === void 0 ? void 0 : (_response$TenantBound3 = response.TenantBoundary) === null || _response$TenantBound3 === void 0 ? void 0 : (_response$TenantBound4 = _response$TenantBound3[0]) === null || _response$TenantBound4 === void 0 ? void 0 : _response$TenantBound4.boundary);
|
|
12618
|
+
} catch (error) {
|
|
12619
|
+
setLoader(false);
|
|
12620
|
+
console.log("error==", error);
|
|
12621
|
+
}
|
|
12622
|
+
};
|
|
12623
|
+
const boundaryType = watch("batchOrLocality");
|
|
12624
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
12625
|
+
style: {
|
|
12626
|
+
fontSize: "24px",
|
|
12627
|
+
margin: "30px 0 40px"
|
|
12628
|
+
}
|
|
12629
|
+
}, t("ACTION_TEST_GENERATE_BILL")), /*#__PURE__*/React.createElement("form", {
|
|
12630
|
+
onSubmit: handleSubmit(onSubmit)
|
|
12631
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
12632
|
+
style: {
|
|
12633
|
+
display: "flex",
|
|
12634
|
+
flexWrap: "wrap",
|
|
12635
|
+
gap: "24px",
|
|
12636
|
+
width: "100%"
|
|
12637
|
+
}
|
|
12638
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
12639
|
+
style: {
|
|
12640
|
+
flex: "0 0 20%",
|
|
12641
|
+
maxWidth: "20%"
|
|
12642
|
+
}
|
|
12643
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("Select Batch or Locality")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
12644
|
+
style: {
|
|
12645
|
+
color: "red"
|
|
12646
|
+
}
|
|
12647
|
+
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
12648
|
+
control: control,
|
|
12649
|
+
name: "batchOrLocality",
|
|
12650
|
+
rules: {
|
|
12651
|
+
required: t("GC_BATCH_LOCALITY_REQUIRED")
|
|
12652
|
+
},
|
|
12653
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
12654
|
+
style: {
|
|
12655
|
+
marginBottom: 0,
|
|
12656
|
+
width: "100%"
|
|
12657
|
+
},
|
|
12658
|
+
className: "form-field",
|
|
12659
|
+
select: e => {
|
|
12660
|
+
props.onChange(e);
|
|
12661
|
+
handleApiData(e);
|
|
12662
|
+
},
|
|
12663
|
+
selected: props.value,
|
|
12664
|
+
option: batchLocality,
|
|
12665
|
+
optionKey: "name",
|
|
12666
|
+
t: t
|
|
12667
|
+
})
|
|
12668
|
+
}), (errors === null || errors === void 0 ? void 0 : errors.batchOrLocality) && /*#__PURE__*/React.createElement("p", {
|
|
12669
|
+
style: {
|
|
12670
|
+
color: "red"
|
|
12671
|
+
}
|
|
12672
|
+
}, errors.batchOrLocality.message)), (boundaryType === null || boundaryType === void 0 ? void 0 : boundaryType.code) == "Locality" && /*#__PURE__*/React.createElement("div", {
|
|
12673
|
+
style: {
|
|
12674
|
+
flex: "0 0 20%",
|
|
12675
|
+
maxWidth: "20%"
|
|
12676
|
+
}
|
|
12677
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("CS_SWACH_LOCALITY")}`), /*#__PURE__*/React.createElement(Controller, {
|
|
12678
|
+
control: control,
|
|
12679
|
+
name: "locality",
|
|
12680
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
12681
|
+
style: {
|
|
12682
|
+
marginBottom: 0,
|
|
12683
|
+
width: "100%"
|
|
12684
|
+
},
|
|
12685
|
+
className: "form-field",
|
|
12686
|
+
select: e => {
|
|
12687
|
+
props.onChange(e);
|
|
12688
|
+
},
|
|
12689
|
+
selected: props.value,
|
|
12690
|
+
option: getData,
|
|
12691
|
+
optionKey: "name",
|
|
12692
|
+
t: t
|
|
12693
|
+
})
|
|
12694
|
+
}), (errors === null || errors === void 0 ? void 0 : errors.locality) && /*#__PURE__*/React.createElement("p", {
|
|
12695
|
+
style: {
|
|
12696
|
+
color: "red"
|
|
12697
|
+
}
|
|
12698
|
+
}, errors.locality.message)), (boundaryType === null || boundaryType === void 0 ? void 0 : boundaryType.code) == "Block" && /*#__PURE__*/React.createElement("div", {
|
|
12699
|
+
style: {
|
|
12700
|
+
flex: "0 0 20%",
|
|
12701
|
+
maxWidth: "20%"
|
|
12702
|
+
}
|
|
12703
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("Batch")}`), /*#__PURE__*/React.createElement(Controller, {
|
|
12704
|
+
control: control,
|
|
12705
|
+
name: "batch",
|
|
12706
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
12707
|
+
style: {
|
|
12708
|
+
marginBottom: 0,
|
|
12709
|
+
width: "100%"
|
|
12710
|
+
},
|
|
12711
|
+
className: "form-field",
|
|
12712
|
+
select: e => {
|
|
12713
|
+
props.onChange(e);
|
|
12714
|
+
},
|
|
12715
|
+
selected: props.value,
|
|
12716
|
+
option: getData,
|
|
12717
|
+
optionKey: "name",
|
|
12718
|
+
t: t
|
|
12719
|
+
})
|
|
12720
|
+
}), (errors === null || errors === void 0 ? void 0 : errors.batch) && /*#__PURE__*/React.createElement("p", {
|
|
12721
|
+
style: {
|
|
12722
|
+
color: "red"
|
|
12723
|
+
}
|
|
12724
|
+
}, errors.batch.message))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
12725
|
+
style: {
|
|
12726
|
+
background: "#eee",
|
|
12727
|
+
color: "black",
|
|
12728
|
+
border: "1px solid"
|
|
12729
|
+
},
|
|
12730
|
+
label: "Search",
|
|
12731
|
+
submit: "submit"
|
|
12732
|
+
}), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
12733
|
+
label: "Generate Bill",
|
|
12734
|
+
submit: "submit"
|
|
12735
|
+
}))), loader && /*#__PURE__*/React.createElement(Loader, {
|
|
12736
|
+
page: true
|
|
12737
|
+
}));
|
|
12738
|
+
};
|
|
12739
|
+
|
|
12740
|
+
const BillGenie = () => {
|
|
12741
|
+
const dispatch = useDispatch();
|
|
12742
|
+
const history = useHistory();
|
|
12743
|
+
const {
|
|
12744
|
+
t
|
|
12745
|
+
} = useTranslation();
|
|
12746
|
+
const tenantId = window.location.href.includes("citizen") ? window.localStorage.getItem("CITIZEN.CITY") : window.localStorage.getItem("Employee.tenant-id");
|
|
12747
|
+
const [loader, setLoader] = useState(false);
|
|
12748
|
+
const [getData, setData] = useState();
|
|
12749
|
+
const {
|
|
12750
|
+
control,
|
|
12751
|
+
handleSubmit,
|
|
12752
|
+
setValue,
|
|
12753
|
+
formState: {
|
|
12754
|
+
errors
|
|
12755
|
+
},
|
|
12756
|
+
getValues,
|
|
12757
|
+
watch,
|
|
12758
|
+
clearErrors
|
|
12759
|
+
} = useForm();
|
|
12760
|
+
const onSubmit = async data => {
|
|
12761
|
+
console.log("data===", data);
|
|
12762
|
+
};
|
|
12763
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
12764
|
+
style: {
|
|
12765
|
+
fontSize: "24px",
|
|
12766
|
+
margin: "30px 0 40px"
|
|
12767
|
+
}
|
|
12768
|
+
}, t("ACTION_TEST_GARBAGE_COLLECTION_BILL_GENIE")), /*#__PURE__*/React.createElement("form", {
|
|
12769
|
+
onSubmit: handleSubmit(onSubmit)
|
|
12770
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
12771
|
+
style: {
|
|
12772
|
+
display: "flex",
|
|
12773
|
+
flexWrap: "wrap",
|
|
12774
|
+
gap: "24px",
|
|
12775
|
+
width: "100%"
|
|
12776
|
+
}
|
|
12777
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
12778
|
+
style: {
|
|
12779
|
+
flex: "0 0 20%",
|
|
12780
|
+
maxWidth: "20%"
|
|
12781
|
+
}
|
|
12782
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("ULB")}`), /*#__PURE__*/React.createElement(Controller, {
|
|
12783
|
+
control: control,
|
|
12784
|
+
name: "locality",
|
|
12785
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
12786
|
+
style: {
|
|
12787
|
+
marginBottom: 0,
|
|
12788
|
+
width: "100%"
|
|
12789
|
+
},
|
|
12790
|
+
className: "form-field",
|
|
12791
|
+
select: e => {
|
|
12792
|
+
props.onChange(e);
|
|
12793
|
+
},
|
|
12794
|
+
selected: props.value,
|
|
12795
|
+
option: [],
|
|
12796
|
+
optionKey: "name",
|
|
12797
|
+
t: t
|
|
12798
|
+
})
|
|
12799
|
+
}), (errors === null || errors === void 0 ? void 0 : errors.locality) && /*#__PURE__*/React.createElement("p", {
|
|
12800
|
+
style: {
|
|
12801
|
+
color: "red"
|
|
12802
|
+
}
|
|
12803
|
+
}, errors.locality.message)), /*#__PURE__*/React.createElement("div", {
|
|
12804
|
+
style: {
|
|
12805
|
+
flex: "0 0 20%",
|
|
12806
|
+
maxWidth: "20%"
|
|
12807
|
+
}
|
|
12808
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("Service Category")}`), /*#__PURE__*/React.createElement(Controller, {
|
|
12809
|
+
control: control,
|
|
12810
|
+
name: "locality",
|
|
12811
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
12812
|
+
style: {
|
|
12813
|
+
marginBottom: 0,
|
|
12814
|
+
width: "100%"
|
|
12815
|
+
},
|
|
12816
|
+
className: "form-field",
|
|
12817
|
+
select: e => {
|
|
12818
|
+
props.onChange(e);
|
|
12819
|
+
},
|
|
12820
|
+
selected: props.value,
|
|
12821
|
+
option: [],
|
|
12822
|
+
optionKey: "name",
|
|
12823
|
+
t: t
|
|
12824
|
+
})
|
|
12825
|
+
}), (errors === null || errors === void 0 ? void 0 : errors.locality) && /*#__PURE__*/React.createElement("p", {
|
|
12826
|
+
style: {
|
|
12827
|
+
color: "red"
|
|
12828
|
+
}
|
|
12829
|
+
}, errors.locality.message)), /*#__PURE__*/React.createElement("div", {
|
|
12830
|
+
style: {
|
|
12831
|
+
flex: "0 0 20%",
|
|
12832
|
+
maxWidth: "20%"
|
|
12833
|
+
}
|
|
12834
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("NDC_MSG_PROPERTY_LABEL")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
12835
|
+
style: {
|
|
12836
|
+
color: "red"
|
|
12837
|
+
}
|
|
12838
|
+
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
12839
|
+
control: control,
|
|
12840
|
+
name: "propertyId",
|
|
12841
|
+
render: props => {
|
|
12842
|
+
var _errors$name;
|
|
12843
|
+
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12844
|
+
style: {
|
|
12845
|
+
marginBottom: 0
|
|
12846
|
+
},
|
|
12847
|
+
value: props.value,
|
|
12848
|
+
error: errors === null || errors === void 0 ? void 0 : (_errors$name = errors.name) === null || _errors$name === void 0 ? void 0 : _errors$name.message,
|
|
12849
|
+
onChange: e => {
|
|
12850
|
+
props.onChange(e.target.value);
|
|
12851
|
+
},
|
|
12852
|
+
onBlur: e => {
|
|
12853
|
+
props.onBlur(e);
|
|
12854
|
+
},
|
|
12855
|
+
t: t
|
|
12856
|
+
});
|
|
12857
|
+
}
|
|
12858
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
12859
|
+
style: {
|
|
12860
|
+
flex: "0 0 20%",
|
|
12861
|
+
maxWidth: "20%"
|
|
12862
|
+
}
|
|
12863
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("Bill No.")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
12864
|
+
style: {
|
|
12865
|
+
color: "red"
|
|
12866
|
+
}
|
|
12867
|
+
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
12868
|
+
control: control,
|
|
12869
|
+
name: "billNo",
|
|
12870
|
+
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
12871
|
+
style: {
|
|
12872
|
+
marginBottom: 0
|
|
12873
|
+
},
|
|
12874
|
+
value: props.value,
|
|
12875
|
+
onChange: e => {
|
|
12876
|
+
props.onChange(e.target.value);
|
|
12877
|
+
},
|
|
12878
|
+
onBlur: e => {
|
|
12879
|
+
props.onBlur(e);
|
|
12880
|
+
},
|
|
12881
|
+
t: t
|
|
12882
|
+
})
|
|
12883
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
12884
|
+
style: {
|
|
12885
|
+
flex: "0 0 20%",
|
|
12886
|
+
maxWidth: "20%"
|
|
12887
|
+
}
|
|
12888
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("NOC_APPLICANT_MOBILE_NO_LABEL")}`), /*#__PURE__*/React.createElement(Controller, {
|
|
12889
|
+
control: control,
|
|
12890
|
+
name: "mobileNumber",
|
|
12891
|
+
rules: {
|
|
12892
|
+
pattern: {
|
|
12893
|
+
value: /^[6-9]\d{9}$/,
|
|
12894
|
+
message: "Enter a valid 10-digit mobile number"
|
|
12895
|
+
}
|
|
12896
|
+
},
|
|
12897
|
+
render: props => /*#__PURE__*/React.createElement(MobileNumber, {
|
|
12898
|
+
style: {
|
|
12899
|
+
marginBottom: 0
|
|
12900
|
+
},
|
|
12901
|
+
value: props.value,
|
|
12902
|
+
onChange: e => {
|
|
12903
|
+
props.onChange(e);
|
|
12904
|
+
},
|
|
12905
|
+
onBlur: props.onBlur,
|
|
12906
|
+
t: t
|
|
12907
|
+
})
|
|
12908
|
+
}))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
12909
|
+
style: {
|
|
12910
|
+
background: "#eee",
|
|
12911
|
+
color: "black",
|
|
12912
|
+
border: "1px solid"
|
|
12913
|
+
},
|
|
12914
|
+
label: "Reset",
|
|
12915
|
+
submit: "submit"
|
|
12916
|
+
}), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
12917
|
+
label: "Search",
|
|
12918
|
+
submit: "submit"
|
|
12919
|
+
}))), loader && /*#__PURE__*/React.createElement(Loader, {
|
|
12920
|
+
page: true
|
|
12921
|
+
}));
|
|
12922
|
+
};
|
|
12923
|
+
|
|
12593
12924
|
const GarbageCollectionModule = ({
|
|
12594
12925
|
stateCode,
|
|
12595
12926
|
userType,
|
|
@@ -12662,7 +12993,9 @@ const componentsToRegister = {
|
|
|
12662
12993
|
GCMyApplications: MyChallans,
|
|
12663
12994
|
GCApplicationDetails: ChallanApplicationDetails,
|
|
12664
12995
|
GCResponseCitizen,
|
|
12665
|
-
ApplicationDetails: ChallanApplicationDetails$1
|
|
12996
|
+
ApplicationDetails: ChallanApplicationDetails$1,
|
|
12997
|
+
GenerateBill,
|
|
12998
|
+
BillGenie
|
|
12666
12999
|
};
|
|
12667
13000
|
const initGarbageCollectionComponents = () => {
|
|
12668
13001
|
Object.entries(componentsToRegister).forEach(([key, value]) => {
|