@djb25/digit-ui-module-fsm 1.0.25 → 1.0.26
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 +1366 -867
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1403 -904
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19,6 +19,171 @@ function _extends() {
|
|
|
19
19
|
}, _extends.apply(null, arguments);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
const _Pact = /*#__PURE__*/function () {
|
|
23
|
+
function _Pact() {}
|
|
24
|
+
_Pact.prototype.then = function (onFulfilled, onRejected) {
|
|
25
|
+
const result = new _Pact();
|
|
26
|
+
const state = this.s;
|
|
27
|
+
if (state) {
|
|
28
|
+
const callback = state & 1 ? onFulfilled : onRejected;
|
|
29
|
+
if (callback) {
|
|
30
|
+
try {
|
|
31
|
+
_settle(result, 1, callback(this.v));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
_settle(result, 2, e);
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
} else {
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
this.o = function (_this) {
|
|
41
|
+
try {
|
|
42
|
+
const value = _this.v;
|
|
43
|
+
if (_this.s & 1) {
|
|
44
|
+
_settle(result, 1, onFulfilled ? onFulfilled(value) : value);
|
|
45
|
+
} else if (onRejected) {
|
|
46
|
+
_settle(result, 1, onRejected(value));
|
|
47
|
+
} else {
|
|
48
|
+
_settle(result, 2, value);
|
|
49
|
+
}
|
|
50
|
+
} catch (e) {
|
|
51
|
+
_settle(result, 2, e);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
return result;
|
|
55
|
+
};
|
|
56
|
+
return _Pact;
|
|
57
|
+
}();
|
|
58
|
+
function _settle(pact, state, value) {
|
|
59
|
+
if (!pact.s) {
|
|
60
|
+
if (value instanceof _Pact) {
|
|
61
|
+
if (value.s) {
|
|
62
|
+
if (state & 1) {
|
|
63
|
+
state = value.s;
|
|
64
|
+
}
|
|
65
|
+
value = value.v;
|
|
66
|
+
} else {
|
|
67
|
+
value.o = _settle.bind(null, pact, state);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (value && value.then) {
|
|
72
|
+
value.then(_settle.bind(null, pact, state), _settle.bind(null, pact, 2));
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
pact.s = state;
|
|
76
|
+
pact.v = value;
|
|
77
|
+
const observer = pact.o;
|
|
78
|
+
if (observer) {
|
|
79
|
+
observer(pact);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function _isSettledPact(thenable) {
|
|
84
|
+
return thenable instanceof _Pact && thenable.s & 1;
|
|
85
|
+
}
|
|
86
|
+
function _forTo(array, body, check) {
|
|
87
|
+
var i = -1,
|
|
88
|
+
pact,
|
|
89
|
+
reject;
|
|
90
|
+
function _cycle(result) {
|
|
91
|
+
try {
|
|
92
|
+
while (++i < array.length && (!check || !check())) {
|
|
93
|
+
result = body(i);
|
|
94
|
+
if (result && result.then) {
|
|
95
|
+
if (_isSettledPact(result)) {
|
|
96
|
+
result = result.v;
|
|
97
|
+
} else {
|
|
98
|
+
result.then(_cycle, reject || (reject = _settle.bind(null, pact = new _Pact(), 2)));
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (pact) {
|
|
104
|
+
_settle(pact, 1, result);
|
|
105
|
+
} else {
|
|
106
|
+
pact = result;
|
|
107
|
+
}
|
|
108
|
+
} catch (e) {
|
|
109
|
+
_settle(pact || (pact = new _Pact()), 2, e);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
_cycle();
|
|
113
|
+
return pact;
|
|
114
|
+
}
|
|
115
|
+
const _iteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
|
|
116
|
+
function _forOf(target, body, check) {
|
|
117
|
+
if (typeof target[_iteratorSymbol] === "function") {
|
|
118
|
+
var iterator = target[_iteratorSymbol](),
|
|
119
|
+
step,
|
|
120
|
+
pact,
|
|
121
|
+
reject;
|
|
122
|
+
function _cycle(result) {
|
|
123
|
+
try {
|
|
124
|
+
while (!(step = iterator.next()).done && (!check || !check())) {
|
|
125
|
+
result = body(step.value);
|
|
126
|
+
if (result && result.then) {
|
|
127
|
+
if (_isSettledPact(result)) {
|
|
128
|
+
result = result.v;
|
|
129
|
+
} else {
|
|
130
|
+
result.then(_cycle, reject || (reject = _settle.bind(null, pact = new _Pact(), 2)));
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (pact) {
|
|
136
|
+
_settle(pact, 1, result);
|
|
137
|
+
} else {
|
|
138
|
+
pact = result;
|
|
139
|
+
}
|
|
140
|
+
} catch (e) {
|
|
141
|
+
_settle(pact || (pact = new _Pact()), 2, e);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
_cycle();
|
|
145
|
+
if (iterator.return) {
|
|
146
|
+
var _fixup = function (value) {
|
|
147
|
+
try {
|
|
148
|
+
if (!step.done) {
|
|
149
|
+
iterator.return();
|
|
150
|
+
}
|
|
151
|
+
} catch (e) {}
|
|
152
|
+
return value;
|
|
153
|
+
};
|
|
154
|
+
if (pact && pact.then) {
|
|
155
|
+
return pact.then(_fixup, function (e) {
|
|
156
|
+
throw _fixup(e);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
_fixup();
|
|
160
|
+
}
|
|
161
|
+
return pact;
|
|
162
|
+
}
|
|
163
|
+
if (!("length" in target)) {
|
|
164
|
+
throw new TypeError("Object is not iterable");
|
|
165
|
+
}
|
|
166
|
+
var values = [];
|
|
167
|
+
for (var i = 0; i < target.length; i++) {
|
|
168
|
+
values.push(target[i]);
|
|
169
|
+
}
|
|
170
|
+
return _forTo(values, function (i) {
|
|
171
|
+
return body(values[i]);
|
|
172
|
+
}, check);
|
|
173
|
+
}
|
|
174
|
+
const _asyncIteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator")) : "@@asyncIterator";
|
|
175
|
+
function _catch(body, recover) {
|
|
176
|
+
try {
|
|
177
|
+
var result = body();
|
|
178
|
+
} catch (e) {
|
|
179
|
+
return recover(e);
|
|
180
|
+
}
|
|
181
|
+
if (result && result.then) {
|
|
182
|
+
return result.then(void 0, recover);
|
|
183
|
+
}
|
|
184
|
+
return result;
|
|
185
|
+
}
|
|
186
|
+
|
|
22
187
|
const getPropertyTypeLocale = value => {
|
|
23
188
|
return `PROPERTYTYPE_MASTERS_${value === null || value === void 0 ? void 0 : value.split(".")[0]}`;
|
|
24
189
|
};
|
|
@@ -39,6 +204,121 @@ const convertEpochToDate = dateEpoch => {
|
|
|
39
204
|
return null;
|
|
40
205
|
}
|
|
41
206
|
};
|
|
207
|
+
const normalizeTenantId = tenant => {
|
|
208
|
+
var _window, _digitObj$ULBService, _digitObj$ULBService$;
|
|
209
|
+
const digitObj = typeof Digit !== "undefined" ? Digit : (_window = window) === null || _window === void 0 ? void 0 : _window.Digit;
|
|
210
|
+
const currentTenant = (digitObj === null || digitObj === void 0 ? void 0 : (_digitObj$ULBService = digitObj.ULBService) === null || _digitObj$ULBService === void 0 ? void 0 : (_digitObj$ULBService$ = _digitObj$ULBService.getCurrentTenantId) === null || _digitObj$ULBService$ === void 0 ? void 0 : _digitObj$ULBService$.call(_digitObj$ULBService)) || "dl.djb";
|
|
211
|
+
if (!tenant || tenant === "dl") {
|
|
212
|
+
return currentTenant && currentTenant.startsWith("dl") ? currentTenant : "dl.djb";
|
|
213
|
+
}
|
|
214
|
+
if (!tenant.includes(".")) {
|
|
215
|
+
return currentTenant && currentTenant.startsWith(tenant) ? currentTenant : `${tenant}.djb`;
|
|
216
|
+
}
|
|
217
|
+
return tenant;
|
|
218
|
+
};
|
|
219
|
+
const billingSlabCache = new Map();
|
|
220
|
+
const inFlightRequests = new Map();
|
|
221
|
+
const fetchBillingSlabDetails = function (tenantId, formData) {
|
|
222
|
+
try {
|
|
223
|
+
var _window2, _formData$address, _formData$address$pro, _formData$tripData, _formData$tripData$ve, _formData$selectTripN, _formData$selectTripN2, _formData$tripData2, _formData$address2, _formData$address2$ci, _formData$subtype, _formData$propertyTyp;
|
|
224
|
+
const digitObj = typeof Digit !== "undefined" ? Digit : (_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.Digit;
|
|
225
|
+
if (!digitObj || !digitObj.FSMService || !digitObj.FSMService.billingSlabSearch) {
|
|
226
|
+
return Promise.resolve(null);
|
|
227
|
+
}
|
|
228
|
+
const propertyLocation = formData === null || formData === void 0 ? void 0 : (_formData$address = formData.address) === null || _formData$address === void 0 ? void 0 : (_formData$address$pro = _formData$address.propertyLocation) === null || _formData$address$pro === void 0 ? void 0 : _formData$address$pro.code;
|
|
229
|
+
if (propertyLocation && propertyLocation !== "WITHIN_ULB_LIMITS") {
|
|
230
|
+
return Promise.resolve(null);
|
|
231
|
+
}
|
|
232
|
+
const capacity = (formData === null || formData === void 0 ? void 0 : (_formData$tripData = formData.tripData) === null || _formData$tripData === void 0 ? void 0 : (_formData$tripData$ve = _formData$tripData.vehicleType) === null || _formData$tripData$ve === void 0 ? void 0 : _formData$tripData$ve.capacity) || (formData === null || formData === void 0 ? void 0 : (_formData$selectTripN = formData.selectTripNo) === null || _formData$selectTripN === void 0 ? void 0 : (_formData$selectTripN2 = _formData$selectTripN.vehicleCapacity) === null || _formData$selectTripN2 === void 0 ? void 0 : _formData$selectTripN2.capacity) || (formData === null || formData === void 0 ? void 0 : (_formData$tripData2 = formData.tripData) === null || _formData$tripData2 === void 0 ? void 0 : _formData$tripData2.vehicleCapacity);
|
|
233
|
+
if (!capacity) {
|
|
234
|
+
return Promise.resolve(null);
|
|
235
|
+
}
|
|
236
|
+
const {
|
|
237
|
+
slum: slumDetails
|
|
238
|
+
} = (formData === null || formData === void 0 ? void 0 : formData.address) || {};
|
|
239
|
+
const isSlum = typeof slumDetails === "string" && slumDetails && slumDetails !== "NO" && slumDetails !== "false" || typeof slumDetails === "object" && (slumDetails === null || slumDetails === void 0 ? void 0 : slumDetails.code);
|
|
240
|
+
const slum = isSlum ? "YES" : "NO";
|
|
241
|
+
const targetTenant = normalizeTenantId(tenantId || (formData === null || formData === void 0 ? void 0 : (_formData$address2 = formData.address) === null || _formData$address2 === void 0 ? void 0 : (_formData$address2$ci = _formData$address2.city) === null || _formData$address2$ci === void 0 ? void 0 : _formData$address2$ci.code));
|
|
242
|
+
const subtypeCode = (formData === null || formData === void 0 ? void 0 : (_formData$subtype = formData.subtype) === null || _formData$subtype === void 0 ? void 0 : _formData$subtype.code) || (typeof (formData === null || formData === void 0 ? void 0 : formData.subtype) === "string" ? formData === null || formData === void 0 ? void 0 : formData.subtype : null);
|
|
243
|
+
const parentPropTypeCode = (formData === null || formData === void 0 ? void 0 : (_formData$propertyTyp = formData.propertyType) === null || _formData$propertyTyp === void 0 ? void 0 : _formData$propertyTyp.code) || (typeof (formData === null || formData === void 0 ? void 0 : formData.propertyType) === "string" ? formData === null || formData === void 0 ? void 0 : formData.propertyType : null);
|
|
244
|
+
const cacheKey = `${targetTenant}_${capacity}_${subtypeCode || ""}_${parentPropTypeCode || ""}_${slum}`;
|
|
245
|
+
if (billingSlabCache.has(cacheKey)) {
|
|
246
|
+
return Promise.resolve(billingSlabCache.get(cacheKey));
|
|
247
|
+
}
|
|
248
|
+
if (inFlightRequests.has(cacheKey)) {
|
|
249
|
+
return Promise.resolve(inFlightRequests.get(cacheKey));
|
|
250
|
+
}
|
|
251
|
+
const searchAttempts = [subtypeCode ? {
|
|
252
|
+
tenant: targetTenant,
|
|
253
|
+
filters: {
|
|
254
|
+
propertyType: subtypeCode,
|
|
255
|
+
capacity,
|
|
256
|
+
slum
|
|
257
|
+
}
|
|
258
|
+
} : null, parentPropTypeCode && parentPropTypeCode !== subtypeCode ? {
|
|
259
|
+
tenant: targetTenant,
|
|
260
|
+
filters: {
|
|
261
|
+
propertyType: parentPropTypeCode,
|
|
262
|
+
capacity,
|
|
263
|
+
slum
|
|
264
|
+
}
|
|
265
|
+
} : null, subtypeCode && slum === "YES" ? {
|
|
266
|
+
tenant: targetTenant,
|
|
267
|
+
filters: {
|
|
268
|
+
propertyType: subtypeCode,
|
|
269
|
+
capacity,
|
|
270
|
+
slum: "NO"
|
|
271
|
+
}
|
|
272
|
+
} : null, {
|
|
273
|
+
tenant: targetTenant,
|
|
274
|
+
filters: {
|
|
275
|
+
capacity
|
|
276
|
+
}
|
|
277
|
+
}].filter(Boolean);
|
|
278
|
+
const seenAttempts = new Set();
|
|
279
|
+
const uniqueAttempts = searchAttempts.filter(att => {
|
|
280
|
+
const key = `${att.tenant}_${JSON.stringify(att.filters)}`;
|
|
281
|
+
if (seenAttempts.has(key)) return false;
|
|
282
|
+
seenAttempts.add(key);
|
|
283
|
+
return true;
|
|
284
|
+
});
|
|
285
|
+
const fetchPromise = function () {
|
|
286
|
+
try {
|
|
287
|
+
let _exit = false;
|
|
288
|
+
function _temp2(_result2) {
|
|
289
|
+
if (_exit) return _result2;
|
|
290
|
+
billingSlabCache.set(cacheKey, null);
|
|
291
|
+
return null;
|
|
292
|
+
}
|
|
293
|
+
const _temp = _forOf(uniqueAttempts, function (attempt) {
|
|
294
|
+
return _catch(function () {
|
|
295
|
+
return Promise.resolve(digitObj.FSMService.billingSlabSearch(attempt.tenant, attempt.filters)).then(function (res) {
|
|
296
|
+
if (res !== null && res !== void 0 && res.billingSlab && res.billingSlab.length > 0) {
|
|
297
|
+
billingSlabCache.set(cacheKey, res.billingSlab[0]);
|
|
298
|
+
const _res$billingSlab$ = res.billingSlab[0];
|
|
299
|
+
_exit = true;
|
|
300
|
+
return _res$billingSlab$;
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
}, function (err) {
|
|
304
|
+
console.warn("FSM billingSlabSearch attempt failed:", attempt, err);
|
|
305
|
+
});
|
|
306
|
+
}, function () {
|
|
307
|
+
return _exit;
|
|
308
|
+
});
|
|
309
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp));
|
|
310
|
+
} catch (e) {
|
|
311
|
+
return Promise.reject(e);
|
|
312
|
+
}
|
|
313
|
+
}().finally(() => {
|
|
314
|
+
inFlightRequests.delete(cacheKey);
|
|
315
|
+
});
|
|
316
|
+
inFlightRequests.set(cacheKey, fetchPromise);
|
|
317
|
+
return Promise.resolve(fetchPromise);
|
|
318
|
+
} catch (e) {
|
|
319
|
+
return Promise.reject(e);
|
|
320
|
+
}
|
|
321
|
+
};
|
|
42
322
|
|
|
43
323
|
const FSMCard = () => {
|
|
44
324
|
const {
|
|
@@ -115,40 +395,47 @@ const FSMCard = () => {
|
|
|
115
395
|
setTotal(total);
|
|
116
396
|
}
|
|
117
397
|
}, [inbox]);
|
|
398
|
+
const isSuperUser = Digit.UserService.hasAccess(["SUPERUSER", "ADMIN"]) || false;
|
|
399
|
+
const isFsmAdmin = Digit.UserService.hasAccess(["FSM_ADMIN", "ES_FSM_ADMIN", "FSM_CEMP"]) || isSuperUser;
|
|
400
|
+
const isCreator = Digit.UserService.hasAccess(["FSM_CREATOR_EMP", "FSM_CEMP"]) || isSuperUser;
|
|
401
|
+
const isEditor = Digit.UserService.hasAccess(["FSM_EDITOR_EMP"]) || isSuperUser;
|
|
402
|
+
const isViewer = Digit.UserService.hasAccess(["FSM_VIEW_EMP"]) || isSuperUser;
|
|
403
|
+
const isReportViewer = Digit.UserService.hasAccess(["FSM_REPORT_VIEWER"]) || isSuperUser;
|
|
404
|
+
const isGenericEmployee = !isFSTPOperator && !isCreator && !isEditor && !isViewer && !isReportViewer && !COLLECTOR && !DSO && !isFsmAdmin;
|
|
118
405
|
const allFSMLinks = [{
|
|
119
406
|
count: total,
|
|
120
407
|
label: t("ES_COMMON_INBOX"),
|
|
121
408
|
link: `/digit-ui/employee/fsm/inbox`
|
|
122
|
-
}, {
|
|
409
|
+
}, (isCreator || isFsmAdmin || isGenericEmployee || !isFSTPOperator) && {
|
|
123
410
|
label: t("ES_TITLE_NEW_DESULDGING_APPLICATION"),
|
|
124
411
|
link: `/digit-ui/employee/fsm/new-application`
|
|
125
412
|
}, {
|
|
126
413
|
label: t("ES_TITILE_SEARCH_APPLICATION"),
|
|
127
414
|
link: `/digit-ui/employee/fsm/search`
|
|
128
|
-
}, {
|
|
415
|
+
}, (isFsmAdmin || isGenericEmployee) && {
|
|
129
416
|
label: t("ES_TITLE_FSM_REGISTRY"),
|
|
130
417
|
link: `/digit-ui/employee/fsm/registry?selectedTabs=VENDOR`
|
|
131
|
-
}, {
|
|
132
|
-
label: t("ES_COMMON_FSTP_OPERATION"),
|
|
133
|
-
link: `/digit-ui/employee/fsm/fstp-operations`
|
|
134
|
-
}, {
|
|
418
|
+
}, (isFSTPOperator || isSuperUser || isGenericEmployee) && {
|
|
135
419
|
label: t("ES_TITLE_VEHICLE_LOG"),
|
|
136
420
|
link: `/digit-ui/employee/fsm/fstp-inbox`
|
|
137
|
-
}, {
|
|
421
|
+
}, (isFSTPOperator || isSuperUser || isGenericEmployee) && {
|
|
422
|
+
label: t("ES_COMMON_FSTP_OPERATION"),
|
|
423
|
+
link: `/digit-ui/employee/fsm/fstp-operations`
|
|
424
|
+
}, (isFSTPOperator || isSuperUser || isGenericEmployee) && {
|
|
138
425
|
label: t("ES_FSM_ADD_NEW_BUTTON"),
|
|
139
426
|
link: `/digit-ui/employee/fsm/fstp-add-vehicle`
|
|
140
|
-
}, {
|
|
427
|
+
}, (isReportViewer || isSuperUser || isGenericEmployee) && {
|
|
141
428
|
label: t("ES_TITLE_REPORTS"),
|
|
142
429
|
link: `/employee/report/fsm/FSMDailyDesludingReport`,
|
|
143
430
|
hyperlink: true
|
|
144
|
-
}, {
|
|
431
|
+
}, (isReportViewer || isFSTPOperator || isGenericEmployee) && {
|
|
145
432
|
label: t("ES_FSM_VIEW_REPORTS_BUTTON"),
|
|
146
433
|
link: `/employee/report/fsm/FSMFSTPPlantWithVehicleLogReport`,
|
|
147
434
|
hyperlink: true
|
|
148
|
-
}];
|
|
435
|
+
}].filter(Boolean);
|
|
149
436
|
const propsForModuleCard = {
|
|
150
437
|
Icon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.ShippingTruck, null),
|
|
151
|
-
moduleName: isFSTPOperator ? t("ES_TITLE_VEHICLE_LOG") : t("ES_TITLE_FAECAL_SLUDGE_MGMT"),
|
|
438
|
+
moduleName: isFSTPOperator && !isFsmAdmin && !isCreator && !isEditor ? t("ES_TITLE_VEHICLE_LOG") : t("ES_TITLE_FAECAL_SLUDGE_MGMT"),
|
|
152
439
|
kpis: [{
|
|
153
440
|
count: total,
|
|
154
441
|
label: t("TOTAL_FSM"),
|
|
@@ -423,7 +710,14 @@ const FSMSelectAddress = _ref => {
|
|
|
423
710
|
}
|
|
424
711
|
if (userType === "employee") {
|
|
425
712
|
var _formData$address7, _formData$address7$lo;
|
|
426
|
-
return /*#__PURE__*/React__default.createElement(
|
|
713
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
714
|
+
style: {
|
|
715
|
+
display: "grid",
|
|
716
|
+
gridTemplateColumns: "1fr 1fr",
|
|
717
|
+
gap: "16px 24px",
|
|
718
|
+
width: "100%"
|
|
719
|
+
}
|
|
720
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
427
721
|
className: "card-label-smaller"
|
|
428
722
|
}, t("MYCITY_CODE_LABEL"), config.isMandatory ? " * " : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
429
723
|
className: "form-field",
|
|
@@ -510,6 +804,19 @@ const SelectChannel = _ref => {
|
|
|
510
804
|
data: channelMenu
|
|
511
805
|
} = Digit.Hooks.fsm.useMDMS(tenantId, "FSM", "EmployeeApplicationChannel");
|
|
512
806
|
const [channel, setChannel] = React.useState(formData === null || formData === void 0 ? void 0 : formData.channel);
|
|
807
|
+
React.useEffect(() => {
|
|
808
|
+
if (channelMenu && channelMenu.length > 0) {
|
|
809
|
+
const selectedOption = channelMenu.find(item => {
|
|
810
|
+
var _formData$channel;
|
|
811
|
+
return item.code === ((formData === null || formData === void 0 ? void 0 : (_formData$channel = formData.channel) === null || _formData$channel === void 0 ? void 0 : _formData$channel.code) || (formData === null || formData === void 0 ? void 0 : formData.channel) || (channel === null || channel === void 0 ? void 0 : channel.code));
|
|
812
|
+
});
|
|
813
|
+
const defaultOption = selectedOption || channelMenu.find(item => item.code === "COUNTER") || channelMenu[0];
|
|
814
|
+
if (!channel && defaultOption) {
|
|
815
|
+
setChannel(defaultOption);
|
|
816
|
+
onSelect(config.key, defaultOption);
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}, [channelMenu, formData === null || formData === void 0 ? void 0 : formData.channel]);
|
|
513
820
|
function selectChannel(value) {
|
|
514
821
|
setChannel(value);
|
|
515
822
|
onSelect(config.key, value);
|
|
@@ -619,7 +926,6 @@ const SelectGender = _ref => {
|
|
|
619
926
|
};
|
|
620
927
|
|
|
621
928
|
const SelectPaymentType = _ref => {
|
|
622
|
-
var _formData$paymentPref2;
|
|
623
929
|
let {
|
|
624
930
|
t,
|
|
625
931
|
config,
|
|
@@ -639,31 +945,34 @@ const SelectPaymentType = _ref => {
|
|
|
639
945
|
} = reactRouterDom.useLocation();
|
|
640
946
|
const editScreen = url.includes("/modify-application/");
|
|
641
947
|
const [paymentType, setPaymentType] = React.useState(null);
|
|
642
|
-
const
|
|
948
|
+
const defaultPaymentOptions = [{
|
|
949
|
+
code: "POST_PAY",
|
|
950
|
+
name: "Pay Later",
|
|
951
|
+
i18nKey: "CS_PAYMENT_POST_PAY"
|
|
952
|
+
}, {
|
|
953
|
+
code: "PRE_PAY",
|
|
954
|
+
name: "Pay Now",
|
|
955
|
+
i18nKey: "CS_PAYMENT_PRE_PAY"
|
|
956
|
+
}];
|
|
957
|
+
const paymentOptions = paymentData && paymentData.length > 0 ? paymentData : defaultPaymentOptions;
|
|
643
958
|
const inputs = [{
|
|
644
|
-
label: "
|
|
959
|
+
label: "ES_FSM_PAYMENT_PREFERENCE_LABEL",
|
|
645
960
|
type: "RadioButton",
|
|
646
961
|
name: "paymentPreference",
|
|
647
|
-
options:
|
|
962
|
+
options: paymentOptions,
|
|
648
963
|
isMandatory: false
|
|
649
964
|
}];
|
|
650
965
|
React.useEffect(() => {
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
const {
|
|
662
|
-
slum: slumDetails
|
|
663
|
-
} = formData.address;
|
|
664
|
-
slumDetails ? setIsSlum(true) : setIsSlum(false);
|
|
665
|
-
}
|
|
666
|
-
}, [formData]);
|
|
966
|
+
var _formData$paymentPref;
|
|
967
|
+
const opts = paymentData && paymentData.length > 0 ? paymentData : defaultPaymentOptions;
|
|
968
|
+
const currentCode = (formData === null || formData === void 0 ? void 0 : (_formData$paymentPref = formData.paymentPreference) === null || _formData$paymentPref === void 0 ? void 0 : _formData$paymentPref.code) || (formData === null || formData === void 0 ? void 0 : formData.paymentPreference);
|
|
969
|
+
const preFilledPaymentType = opts.find(pt => pt.code === currentCode);
|
|
970
|
+
const defaultOption = preFilledPaymentType || opts.find(i => i.code === "POST_PAY") || opts[0];
|
|
971
|
+
setPaymentType(defaultOption);
|
|
972
|
+
if (!currentCode && defaultOption) {
|
|
973
|
+
onSelect(config.key, defaultOption.code);
|
|
974
|
+
}
|
|
975
|
+
}, [formData === null || formData === void 0 ? void 0 : formData.paymentPreference, paymentData]);
|
|
667
976
|
function selectPaymentType(value) {
|
|
668
977
|
setPaymentType(value);
|
|
669
978
|
onSelect(config.key, value.code);
|
|
@@ -674,7 +983,7 @@ const SelectPaymentType = _ref => {
|
|
|
674
983
|
key: index
|
|
675
984
|
}, (formData === null || formData === void 0 ? void 0 : (_formData$tripData = formData.tripData) === null || _formData$tripData === void 0 ? void 0 : _formData$tripData.amountPerTrip) !== 0 && input.type === "RadioButton" && /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
676
985
|
className: "card-label-smaller"
|
|
677
|
-
}, t(input.label), input.isMandatory ? " * " : null), /*#__PURE__*/React__default.createElement("div", {
|
|
986
|
+
}, t(input.label) || "Payment Preference", input.isMandatory ? " * " : null), /*#__PURE__*/React__default.createElement("div", {
|
|
678
987
|
className: "field"
|
|
679
988
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.RadioButtons, {
|
|
680
989
|
selectedOption: paymentType,
|
|
@@ -843,9 +1152,27 @@ const SelectName = _ref => {
|
|
|
843
1152
|
pathname: url
|
|
844
1153
|
} = reactRouterDom.useLocation();
|
|
845
1154
|
const editScreen = url.includes("/modify-application/");
|
|
846
|
-
const [dropdownValue, setDropdownValue] = React.useState("");
|
|
847
1155
|
const [genderTypes, setGenderTypes] = React.useState([]);
|
|
848
|
-
const
|
|
1156
|
+
const defaultGenderOptions = [{
|
|
1157
|
+
code: "MALE",
|
|
1158
|
+
name: "Male",
|
|
1159
|
+
i18nKey: "COMMON_GENDER_MALE"
|
|
1160
|
+
}, {
|
|
1161
|
+
code: "FEMALE",
|
|
1162
|
+
name: "Female",
|
|
1163
|
+
i18nKey: "COMMON_GENDER_FEMALE"
|
|
1164
|
+
}, {
|
|
1165
|
+
code: "TRANSGENDER",
|
|
1166
|
+
name: "Transgender",
|
|
1167
|
+
i18nKey: "COMMON_GENDER_TRANSGENDER"
|
|
1168
|
+
}];
|
|
1169
|
+
React.useEffect(() => {
|
|
1170
|
+
if (!isLoading && GenderData && GenderData.length > 0) {
|
|
1171
|
+
setGenderTypes(GenderData);
|
|
1172
|
+
} else {
|
|
1173
|
+
setGenderTypes(defaultGenderOptions);
|
|
1174
|
+
}
|
|
1175
|
+
}, [GenderData, isLoading]);
|
|
849
1176
|
const inputs = [{
|
|
850
1177
|
label: "ES_NEW_APPLICATION_APPLICANT_NAME",
|
|
851
1178
|
type: "text",
|
|
@@ -871,65 +1198,58 @@ const SelectName = _ref => {
|
|
|
871
1198
|
}, "+91"),
|
|
872
1199
|
isMandatory: true
|
|
873
1200
|
}, {
|
|
874
|
-
label: "
|
|
875
|
-
type: "
|
|
876
|
-
name: "
|
|
877
|
-
|
|
878
|
-
pattern: "/^[a-zA-Z0-9._%+-]+@[a-z.-]+\.(com|org|in)$/",
|
|
879
|
-
title: t("CORE_COMMON_EMAIL_ID_INVALID")
|
|
880
|
-
},
|
|
1201
|
+
label: "ES_NEW_APPLICATION_GENDER",
|
|
1202
|
+
type: "dropdown",
|
|
1203
|
+
name: "applicantGender",
|
|
1204
|
+
options: genderTypes.length > 0 ? genderTypes : defaultGenderOptions,
|
|
881
1205
|
isMandatory: false
|
|
882
1206
|
}];
|
|
883
|
-
React.useEffect(() => {
|
|
884
|
-
if (!isLoading && GenderData) {
|
|
885
|
-
setGenderTypes(GenderData);
|
|
886
|
-
}
|
|
887
|
-
}, [GenderData]);
|
|
888
1207
|
const setValue = (value, input) => {
|
|
889
|
-
if (input === "emailId") {
|
|
890
|
-
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-z.-]+\.(com|org|in)$/;
|
|
891
|
-
if (!emailRegex.test(value)) {
|
|
892
|
-
setError(t("CORE_INVALID_EMAIL_ID_PATTERN"));
|
|
893
|
-
} else {
|
|
894
|
-
setError("");
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
1208
|
onSelect(config.key, {
|
|
898
1209
|
...formData[config.key],
|
|
899
1210
|
[input]: value
|
|
900
1211
|
});
|
|
901
1212
|
};
|
|
902
|
-
|
|
903
|
-
setDropdownValue(value);
|
|
1213
|
+
const selectDropdown = value => {
|
|
904
1214
|
onSelect(config.key, {
|
|
905
1215
|
...formData[config.key],
|
|
906
1216
|
applicantGender: value.code
|
|
907
1217
|
});
|
|
908
|
-
}
|
|
909
|
-
return /*#__PURE__*/React__default.createElement("div",
|
|
1218
|
+
};
|
|
1219
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1220
|
+
style: {
|
|
1221
|
+
display: "grid",
|
|
1222
|
+
gridTemplateColumns: "1fr 1fr",
|
|
1223
|
+
gap: "16px 24px",
|
|
1224
|
+
width: "100%"
|
|
1225
|
+
}
|
|
1226
|
+
}, inputs === null || inputs === void 0 ? void 0 : inputs.map((input, index) => {
|
|
910
1227
|
var _input$options;
|
|
911
|
-
return /*#__PURE__*/React__default.createElement(
|
|
912
|
-
key: index
|
|
1228
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1229
|
+
key: index,
|
|
1230
|
+
style: {
|
|
1231
|
+
width: "100%"
|
|
1232
|
+
}
|
|
913
1233
|
}, input.type === "text" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, errors[input.name] && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, null, t(input.error)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
914
1234
|
className: "card-label-smaller"
|
|
915
1235
|
}, t(input.label), input.isMandatory ? " * " : null), /*#__PURE__*/React__default.createElement("div", {
|
|
916
1236
|
className: "field",
|
|
917
1237
|
style: {
|
|
918
|
-
display: "flex"
|
|
1238
|
+
display: "flex",
|
|
1239
|
+
width: "100%"
|
|
919
1240
|
}
|
|
920
1241
|
}, input.componentInFront ? input.componentInFront : null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, _extends({
|
|
921
1242
|
key: input.name,
|
|
922
1243
|
value: formData && formData[config.key] ? formData[config.key][input.name] : null,
|
|
923
1244
|
onChange: e => setValue(e.target.value, input.name),
|
|
924
1245
|
disable: editScreen
|
|
925
|
-
}, input.validation)))), input.
|
|
926
|
-
style: {
|
|
927
|
-
color: "red"
|
|
928
|
-
}
|
|
929
|
-
}, error)), input.type === "dropdown" && /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
1246
|
+
}, input.validation))))), input.type === "dropdown" && /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
930
1247
|
className: "card-label-smaller"
|
|
931
1248
|
}, t(input.label), input.isMandatory ? " * " : null), /*#__PURE__*/React__default.createElement("div", {
|
|
932
|
-
className: "field"
|
|
1249
|
+
className: "field",
|
|
1250
|
+
style: {
|
|
1251
|
+
width: "100%"
|
|
1252
|
+
}
|
|
933
1253
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
934
1254
|
option: (_input$options = input.options) === null || _input$options === void 0 ? void 0 : _input$options.sort((a, b) => a.code.localeCompare(b.code)),
|
|
935
1255
|
optionKey: "i18nKey",
|
|
@@ -2445,7 +2765,6 @@ const FormStep = _ref => {
|
|
|
2445
2765
|
}));
|
|
2446
2766
|
if (input.type === "date") {
|
|
2447
2767
|
var _input$validation3, _input$validation4;
|
|
2448
|
-
console.log("datedatedate");
|
|
2449
2768
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
2450
2769
|
key: index
|
|
2451
2770
|
}, /*#__PURE__*/React__default.createElement(CardLabel, null, t(input.label), " ", input.labelChildren && input.labelChildren), errors[input.name] && /*#__PURE__*/React__default.createElement(CardLabelError, null, t(input.error)), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -9190,7 +9509,14 @@ const FSMSelectStreet = _ref => {
|
|
|
9190
9509
|
};
|
|
9191
9510
|
if (userType === "employee") {
|
|
9192
9511
|
var _inputs2;
|
|
9193
|
-
return
|
|
9512
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9513
|
+
style: {
|
|
9514
|
+
display: "grid",
|
|
9515
|
+
gridTemplateColumns: "1fr 1fr",
|
|
9516
|
+
gap: "16px 24px",
|
|
9517
|
+
width: "100%"
|
|
9518
|
+
}
|
|
9519
|
+
}, (_inputs2 = inputs) === null || _inputs2 === void 0 ? void 0 : _inputs2.map((input, index) => {
|
|
9194
9520
|
var _formData$cpt0, _formData$cpt0$detail, _formData$cpt0$detail2, _formData$address7;
|
|
9195
9521
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, {
|
|
9196
9522
|
key: index
|
|
@@ -9254,7 +9580,7 @@ const FSMSelectStreet = _ref => {
|
|
|
9254
9580
|
})));
|
|
9255
9581
|
}
|
|
9256
9582
|
})));
|
|
9257
|
-
});
|
|
9583
|
+
}));
|
|
9258
9584
|
}
|
|
9259
9585
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, window.location.href.includes("/fsm") ? /*#__PURE__*/React__default.createElement(Timeline, {
|
|
9260
9586
|
currentStep: 2
|
|
@@ -9383,7 +9709,7 @@ const SelectTankSize = _ref => {
|
|
|
9383
9709
|
};
|
|
9384
9710
|
|
|
9385
9711
|
const SelectTripData = _ref => {
|
|
9386
|
-
var _formData$tripData, _formData$tripData2, _formData$address, _formData$address$pro, _formData$tripData3, _formData$address4, _formData$
|
|
9712
|
+
var _formData$tripData, _formData$tripData2, _formData$address, _formData$address$pro, _formData$tripData3, _formData$address4, _formData$address5, _formData$address5$ci, _formData$tripData16, _formData$tripData16$, _formData$tripData17, _formData$address6, _formData$address6$pr, _formData$tripData18, _formData$tripData19;
|
|
9387
9713
|
let {
|
|
9388
9714
|
t,
|
|
9389
9715
|
config,
|
|
@@ -9391,7 +9717,7 @@ const SelectTripData = _ref => {
|
|
|
9391
9717
|
formData = {},
|
|
9392
9718
|
userType
|
|
9393
9719
|
} = _ref;
|
|
9394
|
-
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
9720
|
+
const tenantId = normalizeTenantId(Digit.ULBService.getCurrentTenantId());
|
|
9395
9721
|
const state = Digit.ULBService.getStateId();
|
|
9396
9722
|
const {
|
|
9397
9723
|
pathname: url
|
|
@@ -9470,80 +9796,108 @@ const SelectTripData = _ref => {
|
|
|
9470
9796
|
disable: true,
|
|
9471
9797
|
isMandatory: true
|
|
9472
9798
|
}];
|
|
9473
|
-
function setTripNum(value) {
|
|
9474
|
-
onSelect(config.key, {
|
|
9475
|
-
...formData[config.key],
|
|
9476
|
-
noOfTrips: value
|
|
9477
|
-
});
|
|
9478
|
-
}
|
|
9479
9799
|
function setAmount(value) {
|
|
9800
|
+
var _formData$tripData4;
|
|
9801
|
+
const numVal = value === "" ? "" : Number(value);
|
|
9802
|
+
const trips = Number(formData === null || formData === void 0 ? void 0 : (_formData$tripData4 = formData.tripData) === null || _formData$tripData4 === void 0 ? void 0 : _formData$tripData4.noOfTrips) || 1;
|
|
9803
|
+
const totalAmount = numVal === "" || isNaN(numVal) ? "" : numVal * trips;
|
|
9480
9804
|
onSelect(config.key, {
|
|
9481
9805
|
...formData[config.key],
|
|
9482
9806
|
amountPerTrip: value,
|
|
9483
|
-
amount:
|
|
9807
|
+
amount: totalAmount
|
|
9484
9808
|
});
|
|
9809
|
+
if (value !== "" && !isNaN(numVal)) {
|
|
9810
|
+
setError(false);
|
|
9811
|
+
Digit.SessionStorage.set("total_amount", totalAmount);
|
|
9812
|
+
}
|
|
9485
9813
|
}
|
|
9486
9814
|
function setValue(object) {
|
|
9487
9815
|
let a = {
|
|
9488
9816
|
...formData[config.key],
|
|
9489
9817
|
...object
|
|
9490
9818
|
};
|
|
9491
|
-
console.log("config.key", config.key, a);
|
|
9492
9819
|
onSelect(config.key, a);
|
|
9493
9820
|
}
|
|
9494
9821
|
React.useEffect(() => {
|
|
9495
9822
|
(function () {
|
|
9496
9823
|
try {
|
|
9497
|
-
var _formData$
|
|
9498
|
-
if ((formData === null || formData === void 0 ? void 0 : (_formData$
|
|
9499
|
-
var _formData$
|
|
9824
|
+
var _formData$tripData5, _formData$tripData7;
|
|
9825
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$tripData5 = formData.tripData) === null || _formData$tripData5 === void 0 ? void 0 : _formData$tripData5.vehicleType) !== vehicle) {
|
|
9826
|
+
var _formData$tripData6, _formData$tripData6$v;
|
|
9500
9827
|
setVehicle({
|
|
9501
|
-
label: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
9828
|
+
label: formData === null || formData === void 0 ? void 0 : (_formData$tripData6 = formData.tripData) === null || _formData$tripData6 === void 0 ? void 0 : (_formData$tripData6$v = _formData$tripData6.vehicleType) === null || _formData$tripData6$v === void 0 ? void 0 : _formData$tripData6$v.capacity
|
|
9502
9829
|
});
|
|
9503
9830
|
}
|
|
9504
|
-
const
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9831
|
+
const trips = Number(formData === null || formData === void 0 ? void 0 : (_formData$tripData7 = formData.tripData) === null || _formData$tripData7 === void 0 ? void 0 : _formData$tripData7.noOfTrips) || 1;
|
|
9832
|
+
const _temp2 = function (_formData$address2, _formData$address2$pr) {
|
|
9833
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$address2 = formData.address) === null || _formData$address2 === void 0 ? void 0 : (_formData$address2$pr = _formData$address2.propertyLocation) === null || _formData$address2$pr === void 0 ? void 0 : _formData$address2$pr.code) === "FROM_GRAM_PANCHAYAT") {
|
|
9834
|
+
var _formData$tripData8;
|
|
9835
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$tripData8 = formData.tripData) === null || _formData$tripData8 === void 0 ? void 0 : _formData$tripData8.amount) !== totalAmt) {
|
|
9836
|
+
setValue({
|
|
9837
|
+
amount: totalAmt
|
|
9838
|
+
});
|
|
9839
|
+
}
|
|
9840
|
+
Digit.SessionStorage.set("total_amount", totalAmt);
|
|
9841
|
+
setError(false);
|
|
9842
|
+
} else {
|
|
9843
|
+
const _temp = function (_formData$tripData9, _formData$tripData9$v, _formData$address3, _formData$address3$pr) {
|
|
9844
|
+
if (formData !== null && formData !== void 0 && formData.propertyType && formData !== null && formData !== void 0 && formData.subtype && formData !== null && formData !== void 0 && formData.address && formData !== null && formData !== void 0 && (_formData$tripData9 = formData.tripData) !== null && _formData$tripData9 !== void 0 && (_formData$tripData9$v = _formData$tripData9.vehicleType) !== null && _formData$tripData9$v !== void 0 && _formData$tripData9$v.capacity && (formData === null || formData === void 0 ? void 0 : (_formData$address3 = formData.address) === null || _formData$address3 === void 0 ? void 0 : (_formData$address3$pr = _formData$address3.propertyLocation) === null || _formData$address3$pr === void 0 ? void 0 : _formData$address3$pr.code) === "WITHIN_ULB_LIMITS") {
|
|
9845
|
+
return Promise.resolve(fetchBillingSlabDetails(tenantId, formData)).then(function (billSlab) {
|
|
9846
|
+
if (billSlab && (billSlab !== null && billSlab !== void 0 && billSlab.price || (billSlab === null || billSlab === void 0 ? void 0 : billSlab.price) === 0)) {
|
|
9847
|
+
var _formData$tripData0, _formData$tripData1;
|
|
9848
|
+
const rate = billSlab.price;
|
|
9849
|
+
const totalAmt = rate * trips;
|
|
9850
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$tripData0 = formData.tripData) === null || _formData$tripData0 === void 0 ? void 0 : _formData$tripData0.amountPerTrip) !== rate || (formData === null || formData === void 0 ? void 0 : (_formData$tripData1 = formData.tripData) === null || _formData$tripData1 === void 0 ? void 0 : _formData$tripData1.amount) !== totalAmt) {
|
|
9851
|
+
setValue({
|
|
9852
|
+
amountPerTrip: rate,
|
|
9853
|
+
amount: totalAmt
|
|
9854
|
+
});
|
|
9855
|
+
}
|
|
9856
|
+
Digit.SessionStorage.set("total_amount", totalAmt);
|
|
9857
|
+
setError(false);
|
|
9858
|
+
} else {
|
|
9859
|
+
var _formData$tripData10, _formData$tripData11, _formData$tripData12;
|
|
9860
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$tripData10 = formData.tripData) === null || _formData$tripData10 === void 0 ? void 0 : _formData$tripData10.amountPerTrip) !== undefined && (formData === null || formData === void 0 ? void 0 : (_formData$tripData11 = formData.tripData) === null || _formData$tripData11 === void 0 ? void 0 : _formData$tripData11.amountPerTrip) !== null && (formData === null || formData === void 0 ? void 0 : (_formData$tripData12 = formData.tripData) === null || _formData$tripData12 === void 0 ? void 0 : _formData$tripData12.amountPerTrip) !== "") {
|
|
9861
|
+
var _formData$tripData13;
|
|
9862
|
+
const totalAmt = Number(formData.tripData.amountPerTrip) * trips;
|
|
9863
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$tripData13 = formData.tripData) === null || _formData$tripData13 === void 0 ? void 0 : _formData$tripData13.amount) !== totalAmt) {
|
|
9864
|
+
setValue({
|
|
9865
|
+
amount: totalAmt
|
|
9866
|
+
});
|
|
9867
|
+
}
|
|
9868
|
+
Digit.SessionStorage.set("total_amount", totalAmt);
|
|
9869
|
+
setError(false);
|
|
9870
|
+
} else {
|
|
9871
|
+
var _formData$tripData14, _formData$tripData15;
|
|
9872
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$tripData14 = formData.tripData) === null || _formData$tripData14 === void 0 ? void 0 : _formData$tripData14.amountPerTrip) !== "" || (formData === null || formData === void 0 ? void 0 : (_formData$tripData15 = formData.tripData) === null || _formData$tripData15 === void 0 ? void 0 : _formData$tripData15.amount) !== "") {
|
|
9873
|
+
setValue({
|
|
9874
|
+
amountPerTrip: "",
|
|
9875
|
+
amount: ""
|
|
9876
|
+
});
|
|
9877
|
+
}
|
|
9878
|
+
setError(true);
|
|
9879
|
+
}
|
|
9880
|
+
}
|
|
9530
9881
|
});
|
|
9531
|
-
setError(true);
|
|
9532
9882
|
}
|
|
9533
|
-
});
|
|
9534
|
-
|
|
9535
|
-
setValue({
|
|
9536
|
-
amount: formData.tripData.amountPerTrip * formData.tripData.noOfTrips
|
|
9537
|
-
});
|
|
9883
|
+
}();
|
|
9884
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
9538
9885
|
}
|
|
9539
9886
|
}();
|
|
9540
|
-
return
|
|
9887
|
+
return _temp2 && _temp2.then ? _temp2.then(function () {}) : void 0;
|
|
9541
9888
|
} catch (e) {
|
|
9542
9889
|
Promise.reject(e);
|
|
9543
9890
|
}
|
|
9544
9891
|
})();
|
|
9545
|
-
}, [formData === null || formData === void 0 ? void 0 : formData.propertyType, formData === null || formData === void 0 ? void 0 : formData.subtype, formData === null || formData === void 0 ? void 0 : (_formData$address4 = formData.address) === null || _formData$address4 === void 0 ? void 0 : _formData$address4.slum, formData === null || formData === void 0 ? void 0 : (_formData$
|
|
9546
|
-
return isVehicleMenuLoading && isDsoLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div",
|
|
9892
|
+
}, [formData === null || formData === void 0 ? void 0 : formData.propertyType, formData === null || formData === void 0 ? void 0 : formData.subtype, formData === null || formData === void 0 ? void 0 : (_formData$address4 = formData.address) === null || _formData$address4 === void 0 ? void 0 : _formData$address4.slum, formData === null || formData === void 0 ? void 0 : (_formData$address5 = formData.address) === null || _formData$address5 === void 0 ? void 0 : (_formData$address5$ci = _formData$address5.city) === null || _formData$address5$ci === void 0 ? void 0 : _formData$address5$ci.code, formData === null || formData === void 0 ? void 0 : (_formData$tripData16 = formData.tripData) === null || _formData$tripData16 === void 0 ? void 0 : (_formData$tripData16$ = _formData$tripData16.vehicleType) === null || _formData$tripData16$ === void 0 ? void 0 : _formData$tripData16$.capacity, formData === null || formData === void 0 ? void 0 : (_formData$tripData17 = formData.tripData) === null || _formData$tripData17 === void 0 ? void 0 : _formData$tripData17.noOfTrips, formData === null || formData === void 0 ? void 0 : (_formData$address6 = formData.address) === null || _formData$address6 === void 0 ? void 0 : (_formData$address6$pr = _formData$address6.propertyLocation) === null || _formData$address6$pr === void 0 ? void 0 : _formData$address6$pr.code]);
|
|
9893
|
+
return isVehicleMenuLoading && isDsoLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div", {
|
|
9894
|
+
style: {
|
|
9895
|
+
display: "grid",
|
|
9896
|
+
gridTemplateColumns: "1fr 1fr",
|
|
9897
|
+
gap: "16px 24px",
|
|
9898
|
+
width: "100%"
|
|
9899
|
+
}
|
|
9900
|
+
}, inputs === null || inputs === void 0 ? void 0 : inputs.map((input, index) => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, {
|
|
9547
9901
|
key: index
|
|
9548
9902
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
9549
9903
|
className: "card-label-smaller"
|
|
@@ -9552,23 +9906,25 @@ const SelectTripData = _ref => {
|
|
|
9552
9906
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, _extends({
|
|
9553
9907
|
type: input.type,
|
|
9554
9908
|
onChange: e => {
|
|
9555
|
-
|
|
9556
|
-
|
|
9909
|
+
if (index === 0) {
|
|
9910
|
+
setAmount(e.target.value);
|
|
9911
|
+
}
|
|
9557
9912
|
},
|
|
9558
9913
|
key: input.name,
|
|
9559
9914
|
value: input.default ? input.default : formData && formData[config.key] ? formData[config.key][input.name] : null
|
|
9560
9915
|
}, input.validation, {
|
|
9561
9916
|
disable: input.disable
|
|
9562
|
-
}))))), billError ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
9917
|
+
}))))), billError && !(formData !== null && formData !== void 0 && (_formData$tripData18 = formData.tripData) !== null && _formData$tripData18 !== void 0 && _formData$tripData18.amountPerTrip) && (formData === null || formData === void 0 ? void 0 : (_formData$tripData19 = formData.tripData) === null || _formData$tripData19 === void 0 ? void 0 : _formData$tripData19.amountPerTrip) !== 0 ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
9563
9918
|
style: {
|
|
9564
9919
|
width: "100%",
|
|
9565
|
-
textAlign: "center"
|
|
9920
|
+
textAlign: "center",
|
|
9921
|
+
gridColumn: "span 2"
|
|
9566
9922
|
}
|
|
9567
9923
|
}, t("ES_APPLICATION_BILL_SLAB_ERROR")) : null);
|
|
9568
9924
|
};
|
|
9569
9925
|
|
|
9570
9926
|
const SelectPaymentPreference = _ref => {
|
|
9571
|
-
var _formData$selectPayme, _formData$
|
|
9927
|
+
var _formData$selectPayme, _formData$selectTripN4, _formData$selectTripN5, _formData$selectTripN6, _formData$address3, _formData$address3$pr, _formData$address4, _formData$address4$pr;
|
|
9572
9928
|
let {
|
|
9573
9929
|
config,
|
|
9574
9930
|
formData,
|
|
@@ -9611,25 +9967,14 @@ const SelectPaymentPreference = _ref => {
|
|
|
9611
9967
|
try {
|
|
9612
9968
|
const _temp2 = function (_formData$selectTripN, _formData$address, _formData$address$pro) {
|
|
9613
9969
|
if (formData !== null && formData !== void 0 && formData.propertyType && formData !== null && formData !== void 0 && formData.subtype && formData !== null && formData !== void 0 && formData.address && formData !== null && formData !== void 0 && (_formData$selectTripN = formData.selectTripNo) !== null && _formData$selectTripN !== void 0 && _formData$selectTripN.vehicleCapacity.capacity && (formData === null || formData === void 0 ? void 0 : (_formData$address = formData.address) === null || _formData$address === void 0 ? void 0 : (_formData$address$pro = _formData$address.propertyLocation) === null || _formData$address$pro === void 0 ? void 0 : _formData$address$pro.code) === "WITHIN_ULB_LIMITS") {
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
const {
|
|
9617
|
-
slum: slumDetails
|
|
9618
|
-
} = formData.address;
|
|
9619
|
-
const slum = slumDetails ? "YES" : "NO";
|
|
9620
|
-
return Promise.resolve(Digit.FSMService.billingSlabSearch(tenantId === (formData === null || formData === void 0 ? void 0 : (_formData$address2 = formData.address) === null || _formData$address2 === void 0 ? void 0 : (_formData$address2$ci = _formData$address2.city) === null || _formData$address2$ci === void 0 ? void 0 : _formData$address2$ci.code) ? tenantId : formData === null || formData === void 0 ? void 0 : (_formData$address3 = formData.address) === null || _formData$address3 === void 0 ? void 0 : (_formData$address3$ci = _formData$address3.city) === null || _formData$address3$ci === void 0 ? void 0 : _formData$address3$ci.code, {
|
|
9621
|
-
propertyType: formData === null || formData === void 0 ? void 0 : (_formData$subtype = formData.subtype) === null || _formData$subtype === void 0 ? void 0 : _formData$subtype.code,
|
|
9622
|
-
capacity,
|
|
9623
|
-
slum
|
|
9624
|
-
})).then(function (billingDetails) {
|
|
9625
|
-
var _billingDetails$billi;
|
|
9626
|
-
const billSlab = (billingDetails === null || billingDetails === void 0 ? void 0 : (_billingDetails$billi = billingDetails.billingSlab) === null || _billingDetails$billi === void 0 ? void 0 : _billingDetails$billi.length) && (billingDetails === null || billingDetails === void 0 ? void 0 : billingDetails.billingSlab[0]);
|
|
9627
|
-
Digit.SessionStorage.set("amount_per_trip", billSlab.price);
|
|
9970
|
+
return Promise.resolve(fetchBillingSlabDetails(tenantId, formData)).then(function (billSlab) {
|
|
9971
|
+
Digit.SessionStorage.set("amount_per_trip", billSlab === null || billSlab === void 0 ? void 0 : billSlab.price);
|
|
9628
9972
|
const _temp = function () {
|
|
9629
9973
|
if (billSlab !== null && billSlab !== void 0 && billSlab.price) {
|
|
9630
|
-
var _formData$
|
|
9631
|
-
let totaltripAmount = billSlab.price * (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
9632
|
-
|
|
9974
|
+
var _formData$selectTripN2, _formData$selectTripN3, _formData$address2, _formData$address2$ci;
|
|
9975
|
+
let totaltripAmount = billSlab.price * (formData === null || formData === void 0 ? void 0 : (_formData$selectTripN2 = formData.selectTripNo) === null || _formData$selectTripN2 === void 0 ? void 0 : (_formData$selectTripN3 = _formData$selectTripN2.tripNo) === null || _formData$selectTripN3 === void 0 ? void 0 : _formData$selectTripN3.code);
|
|
9976
|
+
const cleanTenant = normalizeTenantId(tenantId || (formData === null || formData === void 0 ? void 0 : (_formData$address2 = formData.address) === null || _formData$address2 === void 0 ? void 0 : (_formData$address2$ci = _formData$address2.city) === null || _formData$address2$ci === void 0 ? void 0 : _formData$address2$ci.code));
|
|
9977
|
+
return Promise.resolve(Digit.FSMService.advanceBalanceCalculate(cleanTenant, {
|
|
9633
9978
|
totalTripAmount: totaltripAmount
|
|
9634
9979
|
})).then(function (_ref2) {
|
|
9635
9980
|
var _formData$selectPayme2, _formData$selectPayme3;
|
|
@@ -9665,7 +10010,7 @@ const SelectPaymentPreference = _ref => {
|
|
|
9665
10010
|
Promise.reject(e);
|
|
9666
10011
|
}
|
|
9667
10012
|
})();
|
|
9668
|
-
}, [formData === null || formData === void 0 ? void 0 : formData.propertyType, formData === null || formData === void 0 ? void 0 : formData.subtype, formData === null || formData === void 0 ? void 0 : formData.address, formData === null || formData === void 0 ? void 0 : (_formData$
|
|
10013
|
+
}, [formData === null || formData === void 0 ? void 0 : formData.propertyType, formData === null || formData === void 0 ? void 0 : formData.subtype, formData === null || formData === void 0 ? void 0 : formData.address, formData === null || formData === void 0 ? void 0 : (_formData$selectTripN4 = formData.selectTripNo) === null || _formData$selectTripN4 === void 0 ? void 0 : _formData$selectTripN4.vehicleCapacity.capacity, formData === null || formData === void 0 ? void 0 : (_formData$selectTripN5 = formData.selectTripNo) === null || _formData$selectTripN5 === void 0 ? void 0 : (_formData$selectTripN6 = _formData$selectTripN5.tripNo) === null || _formData$selectTripN6 === void 0 ? void 0 : _formData$selectTripN6.code]);
|
|
9669
10014
|
if (userType === "employee") {
|
|
9670
10015
|
return null;
|
|
9671
10016
|
}
|
|
@@ -9687,8 +10032,8 @@ const SelectPaymentPreference = _ref => {
|
|
|
9687
10032
|
t: t
|
|
9688
10033
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.KeyNote, {
|
|
9689
10034
|
keyValue: t("ADV_TOTAL_AMOUNT") + " (₹)",
|
|
9690
|
-
note: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
9691
|
-
}), (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
10035
|
+
note: (formData === null || formData === void 0 ? void 0 : (_formData$address3 = formData.address) === null || _formData$address3 === void 0 ? void 0 : (_formData$address3$pr = _formData$address3.propertyLocation) === null || _formData$address3$pr === void 0 ? void 0 : _formData$address3$pr.code) === "FROM_GRAM_PANCHAYAT" ? "N/A" : max
|
|
10036
|
+
}), (formData === null || formData === void 0 ? void 0 : (_formData$address4 = formData.address) === null || _formData$address4 === void 0 ? void 0 : (_formData$address4$pr = _formData$address4.propertyLocation) === null || _formData$address4$pr === void 0 ? void 0 : _formData$address4$pr.code) === "FROM_GRAM_PANCHAYAT" && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
9692
10037
|
style: {
|
|
9693
10038
|
width: "100%",
|
|
9694
10039
|
marginTop: "-15px",
|
|
@@ -9805,26 +10150,40 @@ const SelectVehicleType = _ref => {
|
|
|
9805
10150
|
type: type
|
|
9806
10151
|
});
|
|
9807
10152
|
};
|
|
9808
|
-
return /*#__PURE__*/React__default.createElement(
|
|
9809
|
-
|
|
9810
|
-
|
|
10153
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10154
|
+
style: {
|
|
10155
|
+
display: "grid",
|
|
10156
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(240px, 1fr))",
|
|
10157
|
+
gap: "16px",
|
|
10158
|
+
columnGap: "24px",
|
|
10159
|
+
width: "100%"
|
|
10160
|
+
}
|
|
10161
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("ES_FSM_REGISTRY_VEHICLE_MODEL"), config.isMandatory ? /*#__PURE__*/React__default.createElement("span", {
|
|
10162
|
+
className: "check-page-link-button"
|
|
10163
|
+
}, " * ") : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
10164
|
+
className: "payment-form-text-input-correction",
|
|
10165
|
+
isMandatory: config.isMandatory,
|
|
9811
10166
|
selected: selectedModal,
|
|
9812
10167
|
disable: false,
|
|
9813
10168
|
option: modals === null || modals === void 0 ? void 0 : modals.sort((a, b) => a.name.localeCompare(b.name)),
|
|
9814
10169
|
select: selectModal,
|
|
9815
10170
|
optionKey: "name",
|
|
9816
10171
|
t: t
|
|
9817
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("ES_FSM_REGISTRY_VEHICLE_TYPE"), config.isMandatory ?
|
|
9818
|
-
className: "
|
|
9819
|
-
|
|
10172
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("ES_FSM_REGISTRY_VEHICLE_TYPE"), config.isMandatory ? /*#__PURE__*/React__default.createElement("span", {
|
|
10173
|
+
className: "check-page-link-button"
|
|
10174
|
+
}, " * ") : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
10175
|
+
className: "payment-form-text-input-correction",
|
|
10176
|
+
isMandatory: config.isMandatory,
|
|
9820
10177
|
selected: selectedType,
|
|
9821
10178
|
option: types === null || types === void 0 ? void 0 : types.sort((a, b) => a.name.localeCompare(b.name)),
|
|
9822
10179
|
select: selectType,
|
|
9823
10180
|
optionKey: "name",
|
|
9824
10181
|
t: t
|
|
9825
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("ES_FSM_REGISTRY_VEHICLE_CAPACITY"), config.isMandatory ?
|
|
9826
|
-
className: ""
|
|
9827
|
-
|
|
10182
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("ES_FSM_REGISTRY_VEHICLE_CAPACITY"), config.isMandatory ? /*#__PURE__*/React__default.createElement("span", {
|
|
10183
|
+
className: "check-page-link-button"
|
|
10184
|
+
}, " * ") : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
10185
|
+
className: "payment-form-text-input-correction",
|
|
10186
|
+
value: selectedCapacity ? `${selectedCapacity} ${t("CS_COMMON_LITRES") || "KL"}` : "",
|
|
9828
10187
|
onChange: () => {},
|
|
9829
10188
|
disable: true
|
|
9830
10189
|
})));
|
|
@@ -9877,17 +10236,15 @@ const CheckPage = _ref2 => {
|
|
|
9877
10236
|
}, "");
|
|
9878
10237
|
const getAddress = (address, t) => {
|
|
9879
10238
|
var _address$gramPanchaya, _address$propertyLoca2;
|
|
9880
|
-
console.log("address", address);
|
|
9881
10239
|
if ((address === null || address === void 0 ? void 0 : (_address$gramPanchaya = address.gramPanchayat) === null || _address$gramPanchaya === void 0 ? void 0 : _address$gramPanchaya.code) === "OTH1") {
|
|
9882
10240
|
var _address$doorNo, _address$doorNo2, _address$street, _address$street2, _address$propertyLoca, _address$locality, _address$village, _address$city;
|
|
9883
10241
|
return `${address !== null && address !== void 0 && (_address$doorNo = address.doorNo) !== null && _address$doorNo !== void 0 && _address$doorNo.trim() ? `${address === null || address === void 0 ? void 0 : (_address$doorNo2 = address.doorNo) === null || _address$doorNo2 === void 0 ? void 0 : _address$doorNo2.trim()}, ` : ""} ${address !== null && address !== void 0 && (_address$street = address.street) !== null && _address$street !== void 0 && _address$street.trim() ? `${address === null || address === void 0 ? void 0 : (_address$street2 = address.street) === null || _address$street2 === void 0 ? void 0 : _address$street2.trim()}, ` : ""}${(address === null || address === void 0 ? void 0 : (_address$propertyLoca = address.propertyLocation) === null || _address$propertyLoca === void 0 ? void 0 : _address$propertyLoca.code) === "WITHIN_ULB_LIMITS" ? t(address === null || address === void 0 ? void 0 : (_address$locality = address.locality) === null || _address$locality === void 0 ? void 0 : _address$locality.i18nkey) : address === null || address === void 0 ? void 0 : address.newGramPanchayat},${t(address === null || address === void 0 ? void 0 : (_address$village = address.village) === null || _address$village === void 0 ? void 0 : _address$village.code)}, ${t((address === null || address === void 0 ? void 0 : (_address$city = address.city) === null || _address$city === void 0 ? void 0 : _address$city.code) || (address === null || address === void 0 ? void 0 : address.city) || "")}`;
|
|
9884
10242
|
} else if ((address === null || address === void 0 ? void 0 : (_address$propertyLoca2 = address.propertyLocation) === null || _address$propertyLoca2 === void 0 ? void 0 : _address$propertyLoca2.code) === "WITHIN_ULB_LIMITS") {
|
|
9885
|
-
var _address$locality2
|
|
9886
|
-
|
|
9887
|
-
return `${t(address === null || address === void 0 ? void 0 : (_address$locality3 = address.locality) === null || _address$locality3 === void 0 ? void 0 : _address$locality3.code)}`;
|
|
10243
|
+
var _address$locality2;
|
|
10244
|
+
return `${t(address === null || address === void 0 ? void 0 : (_address$locality2 = address.locality) === null || _address$locality2 === void 0 ? void 0 : _address$locality2.code)}`;
|
|
9888
10245
|
} else {
|
|
9889
|
-
var _address$doorNo3, _address$doorNo4, _address$street3, _address$street4, _address$propertyLoca3, _address$
|
|
9890
|
-
return `${address !== null && address !== void 0 && (_address$doorNo3 = address.doorNo) !== null && _address$doorNo3 !== void 0 && _address$doorNo3.trim() ? `${address === null || address === void 0 ? void 0 : (_address$doorNo4 = address.doorNo) === null || _address$doorNo4 === void 0 ? void 0 : _address$doorNo4.trim()}, ` : ""} ${address !== null && address !== void 0 && (_address$street3 = address.street) !== null && _address$street3 !== void 0 && _address$street3.trim() ? `${address === null || address === void 0 ? void 0 : (_address$street4 = address.street) === null || _address$street4 === void 0 ? void 0 : _address$street4.trim()}, ` : ""}${(address === null || address === void 0 ? void 0 : (_address$propertyLoca3 = address.propertyLocation) === null || _address$propertyLoca3 === void 0 ? void 0 : _address$propertyLoca3.code) === "WITHIN_ULB_LIMITS" ? t(address === null || address === void 0 ? void 0 : (_address$
|
|
10246
|
+
var _address$doorNo3, _address$doorNo4, _address$street3, _address$street4, _address$propertyLoca3, _address$locality3, _address$gramPanchaya2, _address$village2, _address$city2;
|
|
10247
|
+
return `${address !== null && address !== void 0 && (_address$doorNo3 = address.doorNo) !== null && _address$doorNo3 !== void 0 && _address$doorNo3.trim() ? `${address === null || address === void 0 ? void 0 : (_address$doorNo4 = address.doorNo) === null || _address$doorNo4 === void 0 ? void 0 : _address$doorNo4.trim()}, ` : ""} ${address !== null && address !== void 0 && (_address$street3 = address.street) !== null && _address$street3 !== void 0 && _address$street3.trim() ? `${address === null || address === void 0 ? void 0 : (_address$street4 = address.street) === null || _address$street4 === void 0 ? void 0 : _address$street4.trim()}, ` : ""}${(address === null || address === void 0 ? void 0 : (_address$propertyLoca3 = address.propertyLocation) === null || _address$propertyLoca3 === void 0 ? void 0 : _address$propertyLoca3.code) === "WITHIN_ULB_LIMITS" ? t(address === null || address === void 0 ? void 0 : (_address$locality3 = address.locality) === null || _address$locality3 === void 0 ? void 0 : _address$locality3.i18nkey) : address === null || address === void 0 ? void 0 : (_address$gramPanchaya2 = address.gramPanchayat) === null || _address$gramPanchaya2 === void 0 ? void 0 : _address$gramPanchaya2.i18nkey},${t(address === null || address === void 0 ? void 0 : (_address$village2 = address.village) === null || _address$village2 === void 0 ? void 0 : _address$village2.code)}, ${t((address === null || address === void 0 ? void 0 : (_address$city2 = address.city) === null || _address$city2 === void 0 ? void 0 : _address$city2.code) || (address === null || address === void 0 ? void 0 : address.city) || "")}`;
|
|
9891
10248
|
}
|
|
9892
10249
|
};
|
|
9893
10250
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Timeline, {
|
|
@@ -11584,18 +11941,18 @@ const CitizenApp = _ref => {
|
|
|
11584
11941
|
getBackPageNumber: () => -4
|
|
11585
11942
|
}, t("CS_COMMON_BACK")) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.BackButton, null, t("CS_COMMON_BACK")), /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
11586
11943
|
path: `${path}/inbox`,
|
|
11587
|
-
component:
|
|
11944
|
+
component: props => Digit.UserService.hasAccess(["FSM_DSO", "FSM_ADMIN", "ADMIN", "SUPERUSER"]) ? /*#__PURE__*/React__default.createElement(Inbox, _extends({}, props, {
|
|
11588
11945
|
parentRoute: path,
|
|
11589
11946
|
isInbox: true
|
|
11590
|
-
}) : /*#__PURE__*/React__default.createElement(reactRouterDom.Redirect, {
|
|
11947
|
+
})) : /*#__PURE__*/React__default.createElement(reactRouterDom.Redirect, {
|
|
11591
11948
|
to: "/digit-ui/citizen"
|
|
11592
11949
|
})
|
|
11593
11950
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
11594
11951
|
path: `${path}/search`,
|
|
11595
|
-
component:
|
|
11952
|
+
component: props => Digit.UserService.hasAccess(["FSM_DSO", "FSM_ADMIN", "ADMIN", "SUPERUSER"]) ? /*#__PURE__*/React__default.createElement(Inbox, _extends({}, props, {
|
|
11596
11953
|
parentRoute: path,
|
|
11597
11954
|
isSearch: true
|
|
11598
|
-
}) : /*#__PURE__*/React__default.createElement(reactRouterDom.Redirect, {
|
|
11955
|
+
})) : /*#__PURE__*/React__default.createElement(reactRouterDom.Redirect, {
|
|
11599
11956
|
to: "/digit-ui/citizen"
|
|
11600
11957
|
})
|
|
11601
11958
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
@@ -11915,7 +12272,16 @@ const Filter = _ref => {
|
|
|
11915
12272
|
});
|
|
11916
12273
|
};
|
|
11917
12274
|
const clearAll = () => {
|
|
11918
|
-
|
|
12275
|
+
var _props$onClose;
|
|
12276
|
+
onFilterChange({
|
|
12277
|
+
applicationStatus: [],
|
|
12278
|
+
locality: [],
|
|
12279
|
+
uuid: {
|
|
12280
|
+
code: DSO || isFstpOperator ? "ASSIGNED_TO_ME" : "ASSIGNED_TO_ALL",
|
|
12281
|
+
name: DSO || isFstpOperator ? t("ES_INBOX_ASSIGNED_TO_ME") : t("ES_INBOX_ASSIGNED_TO_ALL")
|
|
12282
|
+
}
|
|
12283
|
+
});
|
|
12284
|
+
props === null || props === void 0 ? void 0 : (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
|
|
11919
12285
|
};
|
|
11920
12286
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, (!DSO && !isFstpOperator && searchParams || (mergedRoleDetails === null || mergedRoleDetails === void 0 ? void 0 : (_mergedRoleDetails$st = mergedRoleDetails.statuses) === null || _mergedRoleDetails$st === void 0 ? void 0 : _mergedRoleDetails$st.length) > 0 || isFstpOperatorRequest) && /*#__PURE__*/React__default.createElement("div", {
|
|
11921
12287
|
className: "filter",
|
|
@@ -13180,6 +13546,7 @@ const EmployeeApp = _ref2 => {
|
|
|
13180
13546
|
const DriverDetails = Digit.ComponentRegistryService.getComponent("DriverDetails");
|
|
13181
13547
|
const AddDriver = Digit.ComponentRegistryService.getComponent("AddDriver");
|
|
13182
13548
|
const EditDriver = Digit.ComponentRegistryService.getComponent("EditDriver");
|
|
13549
|
+
const DsoDashboard = Digit.ComponentRegistryService.getComponent("FSMDsoDashboard");
|
|
13183
13550
|
const getDynamicBreadcrumbs = () => {
|
|
13184
13551
|
const pathname = location.pathname;
|
|
13185
13552
|
let crumbs = [{
|
|
@@ -13215,7 +13582,7 @@ const EmployeeApp = _ref2 => {
|
|
|
13215
13582
|
path: `${path}/inbox`
|
|
13216
13583
|
});
|
|
13217
13584
|
crumbs.push({
|
|
13218
|
-
label: t("
|
|
13585
|
+
label: t("ES_TITLE_APPLICATION_DETAILS")
|
|
13219
13586
|
});
|
|
13220
13587
|
} else if (pathname.includes("/registry/new-vendor")) {
|
|
13221
13588
|
crumbs.push({
|
|
@@ -13351,11 +13718,26 @@ const EmployeeApp = _ref2 => {
|
|
|
13351
13718
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
13352
13719
|
path: `${path}/application-details/:id`,
|
|
13353
13720
|
component: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|
|
13354
|
-
layoutClass: "
|
|
13721
|
+
layoutClass: "action"
|
|
13355
13722
|
}, /*#__PURE__*/React__default.createElement(EmployeeApplicationDetails, _extends({}, props, {
|
|
13356
13723
|
parentRoute: path,
|
|
13357
13724
|
userType: "EMPLOYEE"
|
|
13358
13725
|
})))
|
|
13726
|
+
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
13727
|
+
path: `${path}/dso-application-details/:id`,
|
|
13728
|
+
component: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|
|
13729
|
+
layoutClass: "action"
|
|
13730
|
+
}, /*#__PURE__*/React__default.createElement(EmployeeApplicationDetails, _extends({}, props, {
|
|
13731
|
+
parentRoute: path,
|
|
13732
|
+
userType: "DSO"
|
|
13733
|
+
})))
|
|
13734
|
+
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
13735
|
+
path: `${path}/dso-dashboard`,
|
|
13736
|
+
component: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|
|
13737
|
+
layoutClass: "normal"
|
|
13738
|
+
}, DsoDashboard ? /*#__PURE__*/React__default.createElement(DsoDashboard, _extends({}, props, {
|
|
13739
|
+
parentRoute: path
|
|
13740
|
+
})) : null)
|
|
13359
13741
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
13360
13742
|
path: `${path}/fstp-operator-details/:id`,
|
|
13361
13743
|
component: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|
|
@@ -14227,6 +14609,8 @@ const ActionModal = _ref => {
|
|
|
14227
14609
|
actionData,
|
|
14228
14610
|
module
|
|
14229
14611
|
} = _ref;
|
|
14612
|
+
const history = reactRouterDom.useHistory();
|
|
14613
|
+
const applicationNumber = id;
|
|
14230
14614
|
const mobileView = Digit.Utils.browser.isMobile() ? true : false;
|
|
14231
14615
|
const {
|
|
14232
14616
|
data: dsoData,
|
|
@@ -14327,7 +14711,7 @@ const ActionModal = _ref => {
|
|
|
14327
14711
|
const [defaultValues, setDefautValue] = React.useState({
|
|
14328
14712
|
capacity: vehicle === null || vehicle === void 0 ? void 0 : vehicle.capacity,
|
|
14329
14713
|
wasteCollected: vehicle === null || vehicle === void 0 ? void 0 : vehicle.capacity,
|
|
14330
|
-
propertyType: applicationData
|
|
14714
|
+
propertyType: applicationData !== null && applicationData !== void 0 && applicationData.propertyUsage ? applicationData.propertyUsage.split('.')[0] : "",
|
|
14331
14715
|
subtype: applicationData === null || applicationData === void 0 ? void 0 : applicationData.propertyUsage,
|
|
14332
14716
|
pitType: applicationData === null || applicationData === void 0 ? void 0 : applicationData.sanitationtype,
|
|
14333
14717
|
pitDetail: applicationData === null || applicationData === void 0 ? void 0 : applicationData.pitDetail,
|
|
@@ -14347,8 +14731,9 @@ const ActionModal = _ref => {
|
|
|
14347
14731
|
}
|
|
14348
14732
|
}, [isVehicleDataLoaded, isSuccess]);
|
|
14349
14733
|
React.useEffect(() => {
|
|
14350
|
-
if (isSuccess && isPropertyDataLoaded && applicationData) {
|
|
14351
|
-
const
|
|
14734
|
+
if (isSuccess && isPropertyDataLoaded && applicationData && applicationData.propertyUsage) {
|
|
14735
|
+
const propertyCode = typeof applicationData.propertyUsage === "string" ? applicationData.propertyUsage.split('.')[0] : "";
|
|
14736
|
+
const [property] = propertyList.filter(item => item.code === propertyCode);
|
|
14352
14737
|
let arrayList = defaultValues;
|
|
14353
14738
|
arrayList.propertyType = property;
|
|
14354
14739
|
setPropertyMenu([property]);
|
|
@@ -14391,7 +14776,7 @@ const ActionModal = _ref => {
|
|
|
14391
14776
|
var _dso$vehicles2;
|
|
14392
14777
|
const [dso] = dsoData.filter(dso => dso.id === applicationData.dsoId);
|
|
14393
14778
|
const tempList = dso === null || dso === void 0 ? void 0 : (_dso$vehicles2 = dso.vehicles) === null || _dso$vehicles2 === void 0 ? void 0 : _dso$vehicles2.filter(vehicle => vehicle.capacity == (applicationData === null || applicationData === void 0 ? void 0 : applicationData.vehicleCapacity));
|
|
14394
|
-
const vehicleNoList = tempList.sort((a, b) => a.registrationNumber > b.registrationNumber ? 1 : -1);
|
|
14779
|
+
const vehicleNoList = tempList ? tempList.sort((a, b) => a.registrationNumber > b.registrationNumber ? 1 : -1) : [];
|
|
14395
14780
|
setVehicleNoList(vehicleNoList);
|
|
14396
14781
|
}
|
|
14397
14782
|
}, [isSuccess, isDsoSuccess]);
|
|
@@ -14712,34 +15097,164 @@ const ViewImages = props => {
|
|
|
14712
15097
|
})));
|
|
14713
15098
|
};
|
|
14714
15099
|
|
|
14715
|
-
const
|
|
14716
|
-
|
|
14717
|
-
|
|
14718
|
-
|
|
15100
|
+
const CheckIcon = () => /*#__PURE__*/React__default.createElement("svg", {
|
|
15101
|
+
width: "14",
|
|
15102
|
+
height: "14",
|
|
15103
|
+
viewBox: "0 0 24 24",
|
|
15104
|
+
fill: "none",
|
|
15105
|
+
stroke: "currentColor",
|
|
15106
|
+
strokeWidth: "3",
|
|
15107
|
+
strokeLinecap: "round",
|
|
15108
|
+
strokeLinejoin: "round"
|
|
15109
|
+
}, /*#__PURE__*/React__default.createElement("polyline", {
|
|
15110
|
+
points: "20 6 9 17 4 12"
|
|
15111
|
+
}));
|
|
15112
|
+
const ClockIcon = () => /*#__PURE__*/React__default.createElement("svg", {
|
|
15113
|
+
width: "14",
|
|
15114
|
+
height: "14",
|
|
15115
|
+
viewBox: "0 0 24 24",
|
|
15116
|
+
fill: "none",
|
|
15117
|
+
stroke: "currentColor",
|
|
15118
|
+
strokeWidth: "2",
|
|
15119
|
+
strokeLinecap: "round",
|
|
15120
|
+
strokeLinejoin: "round"
|
|
15121
|
+
}, /*#__PURE__*/React__default.createElement("circle", {
|
|
15122
|
+
cx: "12",
|
|
15123
|
+
cy: "12",
|
|
15124
|
+
r: "10"
|
|
15125
|
+
}), /*#__PURE__*/React__default.createElement("polyline", {
|
|
15126
|
+
className: "clock-hands2",
|
|
15127
|
+
points: "12 6 12 12 16 14"
|
|
15128
|
+
}));
|
|
15129
|
+
const WorkflowTimeline = _ref => {
|
|
15130
|
+
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4;
|
|
15131
|
+
let {
|
|
15132
|
+
workflowDetails,
|
|
15133
|
+
hideTimeline,
|
|
15134
|
+
setHideTimeline
|
|
15135
|
+
} = _ref;
|
|
14719
15136
|
const {
|
|
14720
15137
|
t
|
|
14721
15138
|
} = reactI18next.useTranslation();
|
|
14722
|
-
const
|
|
14723
|
-
|
|
14724
|
-
|
|
14725
|
-
|
|
14726
|
-
|
|
14727
|
-
|
|
14728
|
-
|
|
14729
|
-
|
|
14730
|
-
|
|
14731
|
-
|
|
14732
|
-
|
|
14733
|
-
const {
|
|
14734
|
-
|
|
14735
|
-
|
|
14736
|
-
|
|
14737
|
-
|
|
14738
|
-
|
|
14739
|
-
|
|
14740
|
-
|
|
14741
|
-
|
|
14742
|
-
|
|
15139
|
+
const timeline = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.processInstances) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.length) > 0 ? workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data3 = workflowDetails.data) === null || _workflowDetails$data3 === void 0 ? void 0 : _workflowDetails$data3.processInstances : workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data4 = workflowDetails.data) === null || _workflowDetails$data4 === void 0 ? void 0 : _workflowDetails$data4.timeline;
|
|
15140
|
+
if (!timeline || timeline.length === 0) {
|
|
15141
|
+
return null;
|
|
15142
|
+
}
|
|
15143
|
+
const getStatusClass = (index, checkpoint) => {
|
|
15144
|
+
var _checkpoint$state, _checkpoint$state2;
|
|
15145
|
+
const state = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state = checkpoint.state) === null || _checkpoint$state === void 0 ? void 0 : _checkpoint$state.state) || (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.status);
|
|
15146
|
+
const isTerminal = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state2 = checkpoint.state) === null || _checkpoint$state2 === void 0 ? void 0 : _checkpoint$state2.isTerminateState) || state === "COMPLETED" || state === "DISPOSED" || state === "CANCELED" || state === "REJECTED";
|
|
15147
|
+
if (index === 0 && !isTerminal) return "current2";
|
|
15148
|
+
return "completed2";
|
|
15149
|
+
};
|
|
15150
|
+
const convertEpochToDateTime = epoch => {
|
|
15151
|
+
if (!epoch) return "N/A";
|
|
15152
|
+
const date = new Date(epoch);
|
|
15153
|
+
if (isNaN(date.getTime())) return typeof epoch === "string" ? epoch : "N/A";
|
|
15154
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
15155
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
15156
|
+
const year = date.getFullYear().toString().slice(-2);
|
|
15157
|
+
const hours = String(date.getHours()).padStart(2, "0");
|
|
15158
|
+
const minutes = String(date.getMinutes()).padStart(2, "0");
|
|
15159
|
+
return `${day}/${month}/${year} ${hours}:${minutes}`;
|
|
15160
|
+
};
|
|
15161
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
15162
|
+
className: "workflow-timeline-card2 digit-form-composer",
|
|
15163
|
+
style: {
|
|
15164
|
+
background: "#fff",
|
|
15165
|
+
padding: "16px",
|
|
15166
|
+
height: hideTimeline ? "100%" : ""
|
|
15167
|
+
}
|
|
15168
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15169
|
+
className: `timeline-header-wrapper ${hideTimeline ? "collapsed" : ""}`
|
|
15170
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, {
|
|
15171
|
+
style: {
|
|
15172
|
+
marginBottom: "0",
|
|
15173
|
+
fontSize: "16px",
|
|
15174
|
+
fontWeight: "700",
|
|
15175
|
+
color: "#374151"
|
|
15176
|
+
},
|
|
15177
|
+
className: hideTimeline ? "hidden-content" : ""
|
|
15178
|
+
}, t("WORKFLOW_TIMELINE"))), /*#__PURE__*/React__default.createElement("div", {
|
|
15179
|
+
className: hideTimeline ? "hidden-content" : "timeline-container2"
|
|
15180
|
+
}, timeline.map((checkpoint, index) => {
|
|
15181
|
+
var _checkpoint$auditDeta, _checkpoint$auditDeta2, _checkpoint$auditDeta3, _checkpoint$auditDeta4, _checkpoint$state3, _checkpoint$state4, _checkpoint$state5, _checkpoint$assigner, _checkpoint$assignes, _checkpoint$assignes$;
|
|
15182
|
+
const statusClass = getStatusClass(index, checkpoint);
|
|
15183
|
+
const showLine = index !== timeline.length - 1 && timeline.length > 1;
|
|
15184
|
+
const epochTime = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModifiedTime) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta2 = checkpoint.auditDetails) === null || _checkpoint$auditDeta2 === void 0 ? void 0 : _checkpoint$auditDeta2.createdTime) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta3 = checkpoint.auditDetails) === null || _checkpoint$auditDeta3 === void 0 ? void 0 : _checkpoint$auditDeta3.lastModified) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta4 = checkpoint.auditDetails) === null || _checkpoint$auditDeta4 === void 0 ? void 0 : _checkpoint$auditDeta4.created);
|
|
15185
|
+
const stateCode = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state3 = checkpoint.state) === null || _checkpoint$state3 === void 0 ? void 0 : _checkpoint$state3.state) || (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.status);
|
|
15186
|
+
const appStatus = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state4 = checkpoint.state) === null || _checkpoint$state4 === void 0 ? void 0 : _checkpoint$state4.applicationStatus) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state5 = checkpoint.state) === null || _checkpoint$state5 === void 0 ? void 0 : _checkpoint$state5.state) || (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.status);
|
|
15187
|
+
const title = t(`CS_COMMON_FSM_${(checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.performedAction) === "UPDATE" ? "UPDATE_" : ""}${stateCode}`) || t(`WF_${stateCode}`) || t(`CS_COMMON_${stateCode}`) || stateCode;
|
|
15188
|
+
const statusTag = t(`CS_COMMON_FSM_${appStatus}`) || t(`CS_COMMON_${appStatus}`) || t(`WF_${appStatus}`) || appStatus;
|
|
15189
|
+
let comment = checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.comment;
|
|
15190
|
+
if (comment && comment.includes("~")) {
|
|
15191
|
+
const [reason, reasonComment] = comment.split("~");
|
|
15192
|
+
comment = `${t(`ES_ACTION_REASON_${reason}`) || reason}${reasonComment ? `: ${reasonComment}` : ""}`;
|
|
15193
|
+
}
|
|
15194
|
+
const assigneeName = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assignes = checkpoint.assignes) === null || _checkpoint$assignes === void 0 ? void 0 : (_checkpoint$assignes$ = _checkpoint$assignes[0]) === null || _checkpoint$assignes$ === void 0 ? void 0 : _checkpoint$assignes$.name);
|
|
15195
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
15196
|
+
key: index,
|
|
15197
|
+
className: `timeline-item2 ${statusClass}`
|
|
15198
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15199
|
+
className: "timeline-marker2"
|
|
15200
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15201
|
+
className: "timeline-circle2"
|
|
15202
|
+
}, statusClass === "completed2" ? /*#__PURE__*/React__default.createElement(CheckIcon, null) : /*#__PURE__*/React__default.createElement(ClockIcon, null)), showLine && /*#__PURE__*/React__default.createElement("div", {
|
|
15203
|
+
className: "timeline-line2"
|
|
15204
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
15205
|
+
className: "timeline-content2"
|
|
15206
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15207
|
+
className: "timeline-header2"
|
|
15208
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15209
|
+
className: "timeline-title2"
|
|
15210
|
+
}, title), /*#__PURE__*/React__default.createElement("span", {
|
|
15211
|
+
className: "timeline-date2"
|
|
15212
|
+
}, convertEpochToDateTime(epochTime))), /*#__PURE__*/React__default.createElement("div", {
|
|
15213
|
+
className: "timeline-body2"
|
|
15214
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15215
|
+
className: `timeline-status-tag2 status-${statusClass}`
|
|
15216
|
+
}, statusTag), comment && /*#__PURE__*/React__default.createElement("div", {
|
|
15217
|
+
className: "timeline-comment2"
|
|
15218
|
+
}, comment), (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.numberOfTrips) && /*#__PURE__*/React__default.createElement("div", {
|
|
15219
|
+
className: "timeline-comment2",
|
|
15220
|
+
style: {
|
|
15221
|
+
marginTop: "4px"
|
|
15222
|
+
}
|
|
15223
|
+
}, t("NUMBER_OF_TRIPS"), ": ", checkpoint.numberOfTrips)), assigneeName && /*#__PURE__*/React__default.createElement("div", {
|
|
15224
|
+
className: "timeline-footer2"
|
|
15225
|
+
}, /*#__PURE__*/React__default.createElement("span", null, t("ES_COMMON_ASSIGNED_TO"), ": ", /*#__PURE__*/React__default.createElement("strong", null, assigneeName)))));
|
|
15226
|
+
})));
|
|
15227
|
+
};
|
|
15228
|
+
|
|
15229
|
+
const ApplicationDetails$1 = props => {
|
|
15230
|
+
var _applicationData$addi, _applicationDetails$a, _applicationData$pitD, _applicationData$pitD2, _applicationData$pitD3, _applicationData$pitD4, _applicationData$pitD5, _applicationData$pitD6, _applicationData$pitD7, _applicationData$pitD8, _applicationData$pitD9, _applicationData$pitD0, _applicationData$pitD1, _applicationData$pitD10, _applicationData$pitD11, _applicationData$pitD12, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data12;
|
|
15231
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
15232
|
+
const state = Digit.ULBService.getStateId();
|
|
15233
|
+
const {
|
|
15234
|
+
t
|
|
15235
|
+
} = reactI18next.useTranslation();
|
|
15236
|
+
const history = reactRouterDom.useHistory();
|
|
15237
|
+
const queryClient = reactQuery.useQueryClient();
|
|
15238
|
+
let {
|
|
15239
|
+
id: applicationNumber
|
|
15240
|
+
} = reactRouterDom.useParams();
|
|
15241
|
+
const [displayMenu, setDisplayMenu] = React.useState(false);
|
|
15242
|
+
const [selectedAction, setSelectedAction] = React.useState(null);
|
|
15243
|
+
const [showModal, setShowModal] = React.useState(false);
|
|
15244
|
+
const [showToast, setShowToast] = React.useState(null);
|
|
15245
|
+
const [imageZoom, setImageZoom] = React.useState(null);
|
|
15246
|
+
const [hideTimeline, setHideTimeline] = React.useState(typeof window !== "undefined" ? window.innerWidth < 768 : false);
|
|
15247
|
+
const userType = props.userType || "EMPLOYEE";
|
|
15248
|
+
const {
|
|
15249
|
+
isLoading,
|
|
15250
|
+
data: applicationDetails
|
|
15251
|
+
} = Digit.Hooks.fsm.useApplicationDetail(t, tenantId, applicationNumber, {}, userType);
|
|
15252
|
+
const {
|
|
15253
|
+
isLoading: isDataLoading,
|
|
15254
|
+
data: applicationData
|
|
15255
|
+
} = Digit.Hooks.fsm.useSearch(tenantId, {
|
|
15256
|
+
applicationNos: applicationNumber
|
|
15257
|
+
}, {
|
|
14743
15258
|
staleTime: Infinity
|
|
14744
15259
|
});
|
|
14745
15260
|
const {
|
|
@@ -14749,7 +15264,7 @@ const ApplicationDetails$1 = props => {
|
|
|
14749
15264
|
tenantId: (applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId) || tenantId,
|
|
14750
15265
|
id: applicationNumber,
|
|
14751
15266
|
moduleCode: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.paymentPreference) === "POST_PAY" ? "FSM_POST_PAY_SERVICE" : (applicationData === null || applicationData === void 0 ? void 0 : applicationData.advanceAmount) === 0 ? "PAY_LATER_SERVICE" : (applicationData === null || applicationData === void 0 ? void 0 : applicationData.advanceAmount) > 0 ? "FSM_ADVANCE_PAY_SERVICE" : (applicationData === null || applicationData === void 0 ? void 0 : applicationData.paymentPreference) === null && (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi = applicationData.additionalDetails) === null || _applicationData$addi === void 0 ? void 0 : _applicationData$addi.tripAmount) === 0 && (applicationData === null || applicationData === void 0 ? void 0 : applicationData.advanceAmount) === null ? "FSM_ZERO_PAY_SERVICE" : "FSM",
|
|
14752
|
-
role: "FSM_EMPLOYEE",
|
|
15267
|
+
role: userType === "DSO" ? "FSM_DSO" : "FSM_EMPLOYEE",
|
|
14753
15268
|
serviceData: applicationDetails,
|
|
14754
15269
|
getTripData: true
|
|
14755
15270
|
});
|
|
@@ -14797,14 +15312,6 @@ const ApplicationDetails$1 = props => {
|
|
|
14797
15312
|
const closeToast = () => {
|
|
14798
15313
|
setShowToast(null);
|
|
14799
15314
|
};
|
|
14800
|
-
const handleViewTimeline = () => {
|
|
14801
|
-
const timelineSection = document.getElementById("timeline");
|
|
14802
|
-
if (timelineSection) {
|
|
14803
|
-
timelineSection.scrollIntoView({
|
|
14804
|
-
behavior: "smooth"
|
|
14805
|
-
});
|
|
14806
|
-
}
|
|
14807
|
-
};
|
|
14808
15315
|
const submitAction = data => {
|
|
14809
15316
|
mutate(data, {
|
|
14810
15317
|
onError: (error, variables) => {
|
|
@@ -14833,107 +15340,70 @@ const ApplicationDetails$1 = props => {
|
|
|
14833
15340
|
function onCloseImageZoom() {
|
|
14834
15341
|
setImageZoom(null);
|
|
14835
15342
|
}
|
|
14836
|
-
|
|
14837
|
-
var _checkpoint$comment;
|
|
14838
|
-
const __comment = checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$comment = checkpoint.comment) === null || _checkpoint$comment === void 0 ? void 0 : _checkpoint$comment.split("~");
|
|
14839
|
-
const reason = __comment ? __comment[0] : null;
|
|
14840
|
-
const reason_comment = __comment ? __comment[1] : null;
|
|
14841
|
-
if (checkpoint.status === "CREATED") {
|
|
14842
|
-
var _checkpoint$auditDeta, _applicationData$citi, _applicationData$citi2;
|
|
14843
|
-
const caption = {
|
|
14844
|
-
date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.created,
|
|
14845
|
-
name: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.assigner,
|
|
14846
|
-
mobileNumber: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$citi = applicationData.citizen) === null || _applicationData$citi === void 0 ? void 0 : _applicationData$citi.mobileNumber,
|
|
14847
|
-
emailId: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$citi2 = applicationData.citizen) === null || _applicationData$citi2 === void 0 ? void 0 : _applicationData$citi2.emailId,
|
|
14848
|
-
source: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.source) || ""
|
|
14849
|
-
};
|
|
14850
|
-
return /*#__PURE__*/React__default.createElement(TLCaption, {
|
|
14851
|
-
data: caption
|
|
14852
|
-
});
|
|
14853
|
-
} else if (checkpoint.status === "PENDING_APPL_FEE_PAYMENT" || checkpoint.status === "DSO_REJECTED" || checkpoint.status === "CANCELED" || checkpoint.status === "REJECTED") {
|
|
14854
|
-
var _checkpoint$auditDeta2;
|
|
14855
|
-
const caption = {
|
|
14856
|
-
date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta2 = checkpoint.auditDetails) === null || _checkpoint$auditDeta2 === void 0 ? void 0 : _checkpoint$auditDeta2.created,
|
|
14857
|
-
name: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.assigner,
|
|
14858
|
-
comment: reason ? t(`ES_ACTION_REASON_${reason}`) : null,
|
|
14859
|
-
otherComment: reason_comment ? reason_comment : null
|
|
14860
|
-
};
|
|
14861
|
-
return /*#__PURE__*/React__default.createElement(TLCaption, {
|
|
14862
|
-
data: caption
|
|
14863
|
-
});
|
|
14864
|
-
} else if (checkpoint.status === "DSO_INPROGRESS") {
|
|
14865
|
-
var _checkpoint$assigner;
|
|
14866
|
-
const caption = {
|
|
14867
|
-
name: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.assigner,
|
|
14868
|
-
mobileNumber: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.mobileNumber,
|
|
14869
|
-
date: `${t("CS_FSM_EXPECTED_DATE")} ${Digit.DateUtils.ConvertTimestampToDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.possibleServiceDate)}`
|
|
14870
|
-
};
|
|
14871
|
-
return /*#__PURE__*/React__default.createElement(TLCaption, {
|
|
14872
|
-
data: caption
|
|
14873
|
-
});
|
|
14874
|
-
} else if (checkpoint.status === "COMPLETED") {
|
|
14875
|
-
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Rating, {
|
|
14876
|
-
withText: true,
|
|
14877
|
-
text: t(`ES_FSM_YOU_RATED`),
|
|
14878
|
-
currentRating: checkpoint.rating
|
|
14879
|
-
}), /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
14880
|
-
to: `/digit-ui/employee/fsm/rate-view/${applicationNumber}`
|
|
14881
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionLinks, null, t("CS_FSM_RATE_VIEW"))));
|
|
14882
|
-
} else if (checkpoint.status === "WAITING_FOR_DISPOSAL" || checkpoint.status === "DISPOSAL_IN_PROGRESS" || checkpoint.status === "DISPOSED" || checkpoint.status === "CITIZEN_FEEDBACK_PENDING") {
|
|
14883
|
-
var _checkpoint$auditDeta3, _checkpoint$assigner2;
|
|
14884
|
-
const caption = {
|
|
14885
|
-
date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta3 = checkpoint.auditDetails) === null || _checkpoint$auditDeta3 === void 0 ? void 0 : _checkpoint$auditDeta3.created,
|
|
14886
|
-
name: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.assigner,
|
|
14887
|
-
mobileNumber: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner2 = checkpoint.assigner) === null || _checkpoint$assigner2 === void 0 ? void 0 : _checkpoint$assigner2.mobileNumber
|
|
14888
|
-
};
|
|
14889
|
-
if (checkpoint !== null && checkpoint !== void 0 && checkpoint.numberOfTrips) caption.comment = `${t("NUMBER_OF_TRIPS")}: ${checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.numberOfTrips}`;
|
|
14890
|
-
return /*#__PURE__*/React__default.createElement(TLCaption, {
|
|
14891
|
-
data: caption
|
|
14892
|
-
});
|
|
14893
|
-
}
|
|
14894
|
-
};
|
|
14895
|
-
if (isLoading) {
|
|
15343
|
+
if (isLoading || isDataLoading) {
|
|
14896
15344
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
14897
15345
|
}
|
|
14898
|
-
|
|
14899
|
-
|
|
14900
|
-
};
|
|
14901
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !isLoading ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
15346
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
15347
|
+
className: "employee-main-application-details",
|
|
14902
15348
|
style: {
|
|
14903
15349
|
display: "flex",
|
|
14904
|
-
|
|
14905
|
-
}
|
|
14906
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Header, {
|
|
14907
|
-
style: {
|
|
14908
|
-
marginBottom: "16px"
|
|
15350
|
+
gap: "20px"
|
|
14909
15351
|
}
|
|
14910
|
-
},
|
|
14911
|
-
|
|
15352
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15353
|
+
className: `workflow-timeline-wrapper no-scrollbar ${hideTimeline ? "hide-workflow" : ""}`,
|
|
14912
15354
|
style: {
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
15355
|
+
flex: "1 1 300px",
|
|
15356
|
+
maxWidth: hideTimeline ? "fit-content" : "400px",
|
|
15357
|
+
transition: "max-width 0.3s"
|
|
15358
|
+
}
|
|
15359
|
+
}, /*#__PURE__*/React__default.createElement(WorkflowTimeline, {
|
|
15360
|
+
workflowDetails: workflowDetails,
|
|
15361
|
+
hideTimeline: hideTimeline,
|
|
15362
|
+
setHideTimeline: setHideTimeline
|
|
15363
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
14918
15364
|
style: {
|
|
14919
|
-
|
|
15365
|
+
flex: "2 1 500px",
|
|
15366
|
+
minWidth: "300px"
|
|
14920
15367
|
}
|
|
14921
|
-
},
|
|
14922
|
-
|
|
15368
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
15369
|
+
className: "employeeCard-override"
|
|
15370
|
+
}, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationDetails) === null || _applicationDetails$a === void 0 ? void 0 : _applicationDetails$a.map((detail, index) => {
|
|
15371
|
+
var _detail$title, _detail$values;
|
|
14923
15372
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
14924
15373
|
key: index
|
|
14925
|
-
},
|
|
14926
|
-
|
|
14927
|
-
|
|
15374
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15375
|
+
style: {
|
|
15376
|
+
lineHeight: "19px",
|
|
15377
|
+
maxWidth: "100%",
|
|
15378
|
+
minWidth: "280px"
|
|
15379
|
+
}
|
|
15380
|
+
}, (detail === null || detail === void 0 ? void 0 : (_detail$title = detail.title) === null || _detail$title === void 0 ? void 0 : _detail$title.trim()) && (index === 0 && !detail.asSectionHeader ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, {
|
|
14928
15381
|
style: {
|
|
14929
15382
|
marginBottom: "16px",
|
|
14930
|
-
|
|
15383
|
+
fontSize: "24px"
|
|
15384
|
+
}
|
|
15385
|
+
}, t(detail.title)) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
|
|
15386
|
+
style: {
|
|
15387
|
+
marginBottom: "16px",
|
|
15388
|
+
marginTop: "16px",
|
|
15389
|
+
fontSize: "24px"
|
|
15390
|
+
}
|
|
15391
|
+
}, t(detail.title), detail !== null && detail !== void 0 && detail.Component ? /*#__PURE__*/React__default.createElement(detail.Component, null) : null)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
|
|
15392
|
+
style: {
|
|
15393
|
+
position: "relative",
|
|
15394
|
+
marginTop: "19px"
|
|
14931
15395
|
}
|
|
14932
|
-
},
|
|
14933
|
-
var _detail$
|
|
14934
|
-
if (value === null) return null;
|
|
15396
|
+
}, detail === null || detail === void 0 ? void 0 : (_detail$values = detail.values) === null || _detail$values === void 0 ? void 0 : _detail$values.map((value, valIndex) => {
|
|
15397
|
+
var _detail$values3;
|
|
15398
|
+
if (value === null || value === undefined) return null;
|
|
14935
15399
|
if (value.map === true && value.value !== "N/A") {
|
|
14936
15400
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
15401
|
+
labelStyle: {
|
|
15402
|
+
wordBreak: "break-all"
|
|
15403
|
+
},
|
|
15404
|
+
textStyle: {
|
|
15405
|
+
wordBreak: "break-all"
|
|
15406
|
+
},
|
|
14937
15407
|
key: t(value.title),
|
|
14938
15408
|
label: t(value.title),
|
|
14939
15409
|
text: /*#__PURE__*/React__default.createElement("img", {
|
|
@@ -14942,60 +15412,69 @@ const ApplicationDetails$1 = props => {
|
|
|
14942
15412
|
})
|
|
14943
15413
|
});
|
|
14944
15414
|
}
|
|
15415
|
+
if ((value === null || value === void 0 ? void 0 : value.isLink) === true) {
|
|
15416
|
+
var _detail$values2;
|
|
15417
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
15418
|
+
key: t(value.title),
|
|
15419
|
+
label: t(value.title),
|
|
15420
|
+
text: /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
15421
|
+
to: value === null || value === void 0 ? void 0 : value.to
|
|
15422
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
15423
|
+
className: "link",
|
|
15424
|
+
style: {
|
|
15425
|
+
color: "#a82227"
|
|
15426
|
+
}
|
|
15427
|
+
}, value === null || value === void 0 ? void 0 : value.value))),
|
|
15428
|
+
last: valIndex === (detail === null || detail === void 0 ? void 0 : (_detail$values2 = detail.values) === null || _detail$values2 === void 0 ? void 0 : _detail$values2.length) - 1,
|
|
15429
|
+
caption: value.caption,
|
|
15430
|
+
className: "border-none"
|
|
15431
|
+
});
|
|
15432
|
+
}
|
|
14945
15433
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
15434
|
+
className: "border-none",
|
|
14946
15435
|
key: t(value.title),
|
|
14947
15436
|
label: t(value.title),
|
|
14948
|
-
text: t(value.value) || "N/A",
|
|
14949
|
-
last:
|
|
14950
|
-
caption: value.caption
|
|
14951
|
-
className: "border-none"
|
|
15437
|
+
text: t(value.value) || value.value || "N/A",
|
|
15438
|
+
last: valIndex === (detail === null || detail === void 0 ? void 0 : (_detail$values3 = detail.values) === null || _detail$values3 === void 0 ? void 0 : _detail$values3.length) - 1,
|
|
15439
|
+
caption: value.caption
|
|
14952
15440
|
});
|
|
14953
|
-
})));
|
|
14954
|
-
}),
|
|
15441
|
+
}))));
|
|
15442
|
+
}), applicationData !== null && applicationData !== void 0 && (_applicationData$pitD = applicationData.pitDetail) !== null && _applicationData$pitD !== void 0 && (_applicationData$pitD2 = _applicationData$pitD.additionalDetails) !== null && _applicationData$pitD2 !== void 0 && (_applicationData$pitD3 = _applicationData$pitD2.fileStoreId) !== null && _applicationData$pitD3 !== void 0 && (_applicationData$pitD4 = _applicationData$pitD3.CITIZEN) !== null && _applicationData$pitD4 !== void 0 && _applicationData$pitD4.length ? /*#__PURE__*/React__default.createElement("div", {
|
|
15443
|
+
style: {
|
|
15444
|
+
lineHeight: "19px",
|
|
15445
|
+
maxWidth: "100%",
|
|
15446
|
+
minWidth: "280px"
|
|
15447
|
+
}
|
|
15448
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
|
|
14955
15449
|
style: {
|
|
14956
15450
|
marginBottom: "16px",
|
|
14957
|
-
marginTop: "
|
|
15451
|
+
marginTop: "16px",
|
|
15452
|
+
fontSize: "24px"
|
|
14958
15453
|
}
|
|
14959
15454
|
}, t("ES_FSM_SUB_HEADING_CITIZEN_UPLOADS")), /*#__PURE__*/React__default.createElement(ViewImages, {
|
|
14960
15455
|
fileStoreIds: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$pitD5 = applicationData.pitDetail) === null || _applicationData$pitD5 === void 0 ? void 0 : (_applicationData$pitD6 = _applicationData$pitD5.additionalDetails) === null || _applicationData$pitD6 === void 0 ? void 0 : (_applicationData$pitD7 = _applicationData$pitD6.fileStoreId) === null || _applicationData$pitD7 === void 0 ? void 0 : _applicationData$pitD7.CITIZEN,
|
|
14961
15456
|
tenantId: state,
|
|
14962
15457
|
onClick: (source, index) => zoomImageWrapper(source)
|
|
14963
|
-
})),
|
|
15458
|
+
})) : null, applicationData !== null && applicationData !== void 0 && (_applicationData$pitD8 = applicationData.pitDetail) !== null && _applicationData$pitD8 !== void 0 && (_applicationData$pitD9 = _applicationData$pitD8.additionalDetails) !== null && _applicationData$pitD9 !== void 0 && (_applicationData$pitD0 = _applicationData$pitD9.fileStoreId) !== null && _applicationData$pitD0 !== void 0 && (_applicationData$pitD1 = _applicationData$pitD0.FSM_DSO) !== null && _applicationData$pitD1 !== void 0 && _applicationData$pitD1.length ? /*#__PURE__*/React__default.createElement("div", {
|
|
15459
|
+
style: {
|
|
15460
|
+
lineHeight: "19px",
|
|
15461
|
+
maxWidth: "100%",
|
|
15462
|
+
minWidth: "280px"
|
|
15463
|
+
}
|
|
15464
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
|
|
14964
15465
|
style: {
|
|
14965
15466
|
marginBottom: "16px",
|
|
14966
|
-
marginTop: "
|
|
15467
|
+
marginTop: "16px",
|
|
15468
|
+
fontSize: "24px"
|
|
14967
15469
|
}
|
|
14968
15470
|
}, t("ES_FSM_SUB_HEADING_DSO_UPLOADS")), /*#__PURE__*/React__default.createElement(ViewImages, {
|
|
14969
15471
|
fileStoreIds: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$pitD10 = applicationData.pitDetail) === null || _applicationData$pitD10 === void 0 ? void 0 : (_applicationData$pitD11 = _applicationData$pitD10.additionalDetails) === null || _applicationData$pitD11 === void 0 ? void 0 : (_applicationData$pitD12 = _applicationData$pitD11.fileStoreId) === null || _applicationData$pitD12 === void 0 ? void 0 : _applicationData$pitD12.FSM_DSO,
|
|
14970
15472
|
tenantId: tenantId,
|
|
14971
15473
|
onClick: (source, index) => zoomImageWrapper(source)
|
|
14972
|
-
})), imageZoom ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.ImageViewer, {
|
|
15474
|
+
})) : null, imageZoom ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.ImageViewer, {
|
|
14973
15475
|
imageSrc: imageZoom,
|
|
14974
15476
|
onClose: onCloseImageZoom
|
|
14975
|
-
}) : null
|
|
14976
|
-
id: "timeline"
|
|
14977
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
|
|
14978
|
-
style: {
|
|
14979
|
-
marginBottom: "16px",
|
|
14980
|
-
marginTop: "32px"
|
|
14981
|
-
}
|
|
14982
|
-
}, t("ES_APPLICATION_DETAILS_APPLICATION_TIMELINE")), workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data = workflowDetails.data) !== null && _workflowDetails$data !== void 0 && _workflowDetails$data.timeline && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : (_workflowDetails$data3 = _workflowDetails$data2.timeline) === null || _workflowDetails$data3 === void 0 ? void 0 : _workflowDetails$data3.length) === 1 ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CheckPoint, {
|
|
14983
|
-
isCompleted: true,
|
|
14984
|
-
label: t("CS_COMMON_" + (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data4 = workflowDetails.data) === null || _workflowDetails$data4 === void 0 ? void 0 : (_workflowDetails$data5 = _workflowDetails$data4.timeline[0]) === null || _workflowDetails$data5 === void 0 ? void 0 : _workflowDetails$data5.status)),
|
|
14985
|
-
customChild: getTimelineCaptions(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data6 = workflowDetails.data) === null || _workflowDetails$data6 === void 0 ? void 0 : _workflowDetails$data6.timeline[0])
|
|
14986
|
-
}) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.ConnectingCheckPoints, null, (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data7 = workflowDetails.data) === null || _workflowDetails$data7 === void 0 ? void 0 : _workflowDetails$data7.timeline) && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data8 = workflowDetails.data) === null || _workflowDetails$data8 === void 0 ? void 0 : _workflowDetails$data8.timeline.slice(0, showAllTimeline ? workflowDetails.data.timeline.length : 2).map((checkpoint, index, arr) => {
|
|
14987
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
14988
|
-
key: index
|
|
14989
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CheckPoint, {
|
|
14990
|
-
keyValue: index,
|
|
14991
|
-
isCompleted: index === 0,
|
|
14992
|
-
label: t(`CS_COMMON_FSM_${checkpoint.performedAction === "UPDATE" ? "UPDATE_" : ""}${checkpoint.status}`),
|
|
14993
|
-
customChild: getTimelineCaptions(checkpoint)
|
|
14994
|
-
}));
|
|
14995
|
-
}))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : (_workflowDetails$data0 = _workflowDetails$data9.timeline) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.length) > 2 && /*#__PURE__*/React__default.createElement(digitUiReactComponents.LinkButton, {
|
|
14996
|
-
label: showAllTimeline ? t("COLLAPSE") : t("VIEW_TIMELINE"),
|
|
14997
|
-
onClick: toggleTimeline
|
|
14998
|
-
})))), showModal ? /*#__PURE__*/React__default.createElement(ActionModal, {
|
|
15477
|
+
}) : null), showModal ? /*#__PURE__*/React__default.createElement(ActionModal, {
|
|
14999
15478
|
t: t,
|
|
15000
15479
|
action: selectedAction,
|
|
15001
15480
|
tenantId: tenantId,
|
|
@@ -15003,43 +15482,49 @@ const ApplicationDetails$1 = props => {
|
|
|
15003
15482
|
id: applicationNumber,
|
|
15004
15483
|
closeModal: closeModal,
|
|
15005
15484
|
submitAction: submitAction,
|
|
15006
|
-
actionData: workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$
|
|
15007
|
-
module: workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$
|
|
15485
|
+
actionData: workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline,
|
|
15486
|
+
module: workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.applicationBusinessService
|
|
15008
15487
|
}) : null, showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
15009
15488
|
error: showToast.key === "error" ? true : false,
|
|
15010
15489
|
label: t(showToast.key === "success" ? `ES_FSM_${showToast.action}_UPDATE_SUCCESS` : showToast.action),
|
|
15011
15490
|
onClose: closeToast
|
|
15012
|
-
}), !(workflowDetails !== null && workflowDetails !== void 0 && workflowDetails.isLoading) && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$
|
|
15491
|
+
}), !(workflowDetails !== null && workflowDetails !== void 0 && workflowDetails.isLoading) && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data3 = workflowDetails.data) === null || _workflowDetails$data3 === void 0 ? void 0 : (_workflowDetails$data4 = _workflowDetails$data3.nextActions) === null || _workflowDetails$data4 === void 0 ? void 0 : _workflowDetails$data4.length) === 1 && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data5 = workflowDetails.data) === null || _workflowDetails$data5 === void 0 ? void 0 : (_workflowDetails$data6 = _workflowDetails$data5.nextActions) === null || _workflowDetails$data6 === void 0 ? void 0 : (_workflowDetails$data7 = _workflowDetails$data6[0]) === null || _workflowDetails$data7 === void 0 ? void 0 : _workflowDetails$data7.action) !== "RATE" && /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, {
|
|
15013
15492
|
style: {
|
|
15014
15493
|
zIndex: "19"
|
|
15015
15494
|
}
|
|
15016
15495
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
15017
|
-
label: t(`ES_FSM_${workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$
|
|
15496
|
+
label: t(`ES_FSM_${workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data8 = workflowDetails.data) === null || _workflowDetails$data8 === void 0 ? void 0 : _workflowDetails$data8.nextActions[0].action}`) || t(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : _workflowDetails$data9.nextActions[0].action),
|
|
15018
15497
|
onSubmit: () => {
|
|
15019
|
-
var _workflowDetails$
|
|
15020
|
-
return onActionSelect(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$
|
|
15498
|
+
var _workflowDetails$data0;
|
|
15499
|
+
return onActionSelect(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data0 = workflowDetails.data) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.nextActions[0].action);
|
|
15021
15500
|
}
|
|
15022
|
-
})), !(workflowDetails !== null && workflowDetails !== void 0 && workflowDetails.isLoading) && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$
|
|
15501
|
+
})), !(workflowDetails !== null && workflowDetails !== void 0 && workflowDetails.isLoading) && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data1 = workflowDetails.data) === null || _workflowDetails$data1 === void 0 ? void 0 : (_workflowDetails$data10 = _workflowDetails$data1.nextActions) === null || _workflowDetails$data10 === void 0 ? void 0 : _workflowDetails$data10.length) > 1 && /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, {
|
|
15023
15502
|
style: {
|
|
15024
15503
|
zIndex: "19"
|
|
15025
15504
|
}
|
|
15026
|
-
}, displayMenu && workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$
|
|
15505
|
+
}, displayMenu && workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data11 = workflowDetails.data) !== null && _workflowDetails$data11 !== void 0 && _workflowDetails$data11.nextActions ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Menu, {
|
|
15027
15506
|
localeKeyPrefix: "ES_FSM",
|
|
15028
|
-
options: workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$
|
|
15507
|
+
options: workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data12 = workflowDetails.data) === null || _workflowDetails$data12 === void 0 ? void 0 : _workflowDetails$data12.nextActions.map(action => action.action),
|
|
15029
15508
|
t: t,
|
|
15030
15509
|
onSelect: onActionSelect
|
|
15031
15510
|
}) : null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
15032
15511
|
label: t("ES_COMMON_TAKE_ACTION"),
|
|
15033
15512
|
onSubmit: () => setDisplayMenu(!displayMenu)
|
|
15034
|
-
})))
|
|
15513
|
+
})))));
|
|
15035
15514
|
};
|
|
15036
15515
|
|
|
15037
15516
|
const DsoDashboard = () => {
|
|
15038
|
-
var _inbox$statuses$
|
|
15517
|
+
var _inbox$statuses$find, _inbox$statuses$find2;
|
|
15039
15518
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
15040
15519
|
const {
|
|
15041
15520
|
t
|
|
15042
15521
|
} = reactI18next.useTranslation();
|
|
15522
|
+
const history = reactRouterDom.useHistory();
|
|
15523
|
+
const {
|
|
15524
|
+
pathname
|
|
15525
|
+
} = reactRouterDom.useLocation();
|
|
15526
|
+
const isEmployee = pathname.includes("/employee/");
|
|
15527
|
+
const inboxLink = isEmployee ? "/digit-ui/employee/fsm/inbox" : "/digit-ui/citizen/fsm/inbox";
|
|
15043
15528
|
const [total, setTotal] = React.useState("-");
|
|
15044
15529
|
const [loader, setLoader] = React.useState(true);
|
|
15045
15530
|
const [isDsoLoaded, setIsDsoLoaded] = React.useState(false);
|
|
@@ -15059,12 +15544,16 @@ const DsoDashboard = () => {
|
|
|
15059
15544
|
isFetching: vendorDetailsFetching
|
|
15060
15545
|
} = Digit.Hooks.fsm.useVendorDetail();
|
|
15061
15546
|
React.useEffect(() => {
|
|
15062
|
-
|
|
15547
|
+
var _vendorDetails$vendor;
|
|
15548
|
+
if (vendorDetails !== null && vendorDetails !== void 0 && vendorDetails.vendor && vendorDetails.vendor.length > 0) {
|
|
15063
15549
|
const {
|
|
15064
15550
|
vendor
|
|
15065
15551
|
} = vendorDetails;
|
|
15066
15552
|
Digit.UserService.setExtraRoleDetails(vendor[0]);
|
|
15067
15553
|
setIsDsoLoaded(true);
|
|
15554
|
+
} else if (vendorDetails && (!(vendorDetails !== null && vendorDetails !== void 0 && vendorDetails.vendor) || (vendorDetails === null || vendorDetails === void 0 ? void 0 : (_vendorDetails$vendor = vendorDetails.vendor) === null || _vendorDetails$vendor === void 0 ? void 0 : _vendorDetails$vendor.length) === 0)) {
|
|
15555
|
+
setIsDsoLoaded(true);
|
|
15556
|
+
setLoader(false);
|
|
15068
15557
|
}
|
|
15069
15558
|
}, [vendorDetails]);
|
|
15070
15559
|
const {
|
|
@@ -15075,26 +15564,24 @@ const DsoDashboard = () => {
|
|
|
15075
15564
|
}, {
|
|
15076
15565
|
enabled: isDsoLoaded
|
|
15077
15566
|
}, true);
|
|
15078
|
-
const
|
|
15079
|
-
|
|
15080
|
-
return {
|
|
15081
|
-
[t("ES_COMPLETION_PENDING")]: (inbox === null || inbox === void 0 ? void 0 : (_inbox$statuses$filte = inbox.statuses.filter(e => e.applicationstatus === "DSO_INPROGRESS")[0]) === null || _inbox$statuses$filte === void 0 ? void 0 : _inbox$statuses$filte.count) || 0,
|
|
15082
|
-
[t("ES_VEHICLE_ASSIGNMENT_PENDING")]: (inbox === null || inbox === void 0 ? void 0 : (_inbox$statuses$filte2 = inbox.statuses.filter(e => e.applicationstatus === "PENDING_DSO_APPROVAL")[0]) === null || _inbox$statuses$filte2 === void 0 ? void 0 : _inbox$statuses$filte2.count) || 0
|
|
15083
|
-
};
|
|
15084
|
-
}, [inbox === null || inbox === void 0 ? void 0 : inbox.totalCount]);
|
|
15567
|
+
const inprogressCount = Array.isArray(inbox === null || inbox === void 0 ? void 0 : inbox.statuses) ? ((_inbox$statuses$find = inbox.statuses.find(e => e.applicationstatus === "DSO_INPROGRESS")) === null || _inbox$statuses$find === void 0 ? void 0 : _inbox$statuses$find.count) || 0 : 0;
|
|
15568
|
+
const pendingApprovalCount = Array.isArray(inbox === null || inbox === void 0 ? void 0 : inbox.statuses) ? ((_inbox$statuses$find2 = inbox.statuses.find(e => e.applicationstatus === "PENDING_DSO_APPROVAL")) === null || _inbox$statuses$find2 === void 0 ? void 0 : _inbox$statuses$find2.count) || 0 : 0;
|
|
15085
15569
|
const links = React.useMemo(() => [{
|
|
15086
|
-
link:
|
|
15570
|
+
link: inboxLink,
|
|
15087
15571
|
label: t("ES_TITLE_INBOX"),
|
|
15088
15572
|
count: total
|
|
15089
|
-
}], [total]);
|
|
15573
|
+
}], [total, t, inboxLink]);
|
|
15090
15574
|
React.useEffect(() => {
|
|
15091
15575
|
if (inbox) {
|
|
15092
|
-
|
|
15093
|
-
|
|
15094
|
-
|
|
15095
|
-
|
|
15096
|
-
}
|
|
15097
|
-
}, [
|
|
15576
|
+
setTotal(inprogressCount + pendingApprovalCount);
|
|
15577
|
+
setLoader(false);
|
|
15578
|
+
} else if (!inboxFetching && isDsoLoaded) {
|
|
15579
|
+
setLoader(false);
|
|
15580
|
+
}
|
|
15581
|
+
}, [inbox, inboxFetching, isDsoLoaded, inprogressCount, pendingApprovalCount]);
|
|
15582
|
+
const handleCardClick = () => {
|
|
15583
|
+
history.push(inboxLink);
|
|
15584
|
+
};
|
|
15098
15585
|
if (loader) {
|
|
15099
15586
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
15100
15587
|
}
|
|
@@ -15102,19 +15589,22 @@ const DsoDashboard = () => {
|
|
|
15102
15589
|
Icon: /*#__PURE__*/React__default.createElement(digitUiReactComponents.ShippingTruck, null),
|
|
15103
15590
|
moduleName: t("ES_TITLE_FAECAL_SLUDGE_MGMT"),
|
|
15104
15591
|
kpis: [{
|
|
15105
|
-
count:
|
|
15592
|
+
count: inprogressCount,
|
|
15106
15593
|
label: t("ES_COMPLETION_PENDING"),
|
|
15107
|
-
link:
|
|
15594
|
+
link: inboxLink
|
|
15108
15595
|
}, {
|
|
15109
|
-
count:
|
|
15596
|
+
count: pendingApprovalCount,
|
|
15110
15597
|
label: t("ES_VEHICLE_ASSIGNMENT_PENDING"),
|
|
15111
|
-
link:
|
|
15598
|
+
link: inboxLink
|
|
15112
15599
|
}],
|
|
15113
|
-
links
|
|
15600
|
+
links,
|
|
15601
|
+
onDetailsClick: handleCardClick
|
|
15114
15602
|
};
|
|
15115
15603
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
15116
15604
|
className: "ground-container moduleCardWrapper"
|
|
15117
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.EmployeeModuleCard, propsForModuleCard
|
|
15605
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.EmployeeModuleCard, _extends({}, propsForModuleCard, {
|
|
15606
|
+
onDetailsClick: handleCardClick
|
|
15607
|
+
})));
|
|
15118
15608
|
};
|
|
15119
15609
|
|
|
15120
15610
|
const isConventionalSpecticTank$1 = tankDimension => tankDimension === "lbd";
|
|
@@ -15353,6 +15843,7 @@ const EditForm = _ref => {
|
|
|
15353
15843
|
"withoutLabel": true,
|
|
15354
15844
|
"key": "cpt",
|
|
15355
15845
|
"type": "component",
|
|
15846
|
+
"colSpan": "span 2",
|
|
15356
15847
|
"hideInCitizen": true
|
|
15357
15848
|
}, {
|
|
15358
15849
|
"label": "ES_NEW_APPLICATION_PROPERTY_TYPE",
|
|
@@ -15360,6 +15851,7 @@ const EditForm = _ref => {
|
|
|
15360
15851
|
"type": "component",
|
|
15361
15852
|
"route": "property-type",
|
|
15362
15853
|
"key": "propertyType",
|
|
15854
|
+
"colSpan": "span 1",
|
|
15363
15855
|
"component": "SelectPropertyType",
|
|
15364
15856
|
"texts": {
|
|
15365
15857
|
"headerCaption": "",
|
|
@@ -15374,6 +15866,7 @@ const EditForm = _ref => {
|
|
|
15374
15866
|
"type": "component",
|
|
15375
15867
|
"route": "property-subtype",
|
|
15376
15868
|
"key": "subtype",
|
|
15869
|
+
"colSpan": "span 1",
|
|
15377
15870
|
"component": "SelectPropertySubtype",
|
|
15378
15871
|
"texts": {
|
|
15379
15872
|
"headerCaption": "",
|
|
@@ -15390,12 +15883,14 @@ const EditForm = _ref => {
|
|
|
15390
15883
|
"isMandatory": true,
|
|
15391
15884
|
"type": "component",
|
|
15392
15885
|
"key": "channel",
|
|
15886
|
+
"colSpan": "span 1",
|
|
15393
15887
|
"component": "SelectChannel",
|
|
15394
15888
|
"nextStep": "applicantName"
|
|
15395
15889
|
}, {
|
|
15396
15890
|
"type": "component",
|
|
15397
15891
|
"key": "applicationData",
|
|
15398
15892
|
"withoutLabel": true,
|
|
15893
|
+
"colSpan": "span 2",
|
|
15399
15894
|
"component": "SelectName"
|
|
15400
15895
|
}]
|
|
15401
15896
|
}, {
|
|
@@ -15411,6 +15906,7 @@ const EditForm = _ref => {
|
|
|
15411
15906
|
"submitBarLabel": "CS_COMMON_NEXT"
|
|
15412
15907
|
},
|
|
15413
15908
|
"key": "address",
|
|
15909
|
+
"colSpan": "span 2",
|
|
15414
15910
|
"nextStep": "locality-gramPanchayat",
|
|
15415
15911
|
"isMandatory": true,
|
|
15416
15912
|
"type": "component"
|
|
@@ -15440,6 +15936,7 @@ const EditForm = _ref => {
|
|
|
15440
15936
|
},
|
|
15441
15937
|
"withoutLabel": true,
|
|
15442
15938
|
"key": "address",
|
|
15939
|
+
"colSpan": "span 1",
|
|
15443
15940
|
"nextStep": "check-slum",
|
|
15444
15941
|
"type": "component"
|
|
15445
15942
|
}, {
|
|
@@ -15455,24 +15952,12 @@ const EditForm = _ref => {
|
|
|
15455
15952
|
"withoutLabel": true,
|
|
15456
15953
|
"nextStep": "slum-details",
|
|
15457
15954
|
"hideInEmployee": true
|
|
15458
|
-
}, {
|
|
15459
|
-
"type": "component",
|
|
15460
|
-
"route": "slum-details",
|
|
15461
|
-
"isMandatory": true,
|
|
15462
|
-
"component": "SelectSlumName",
|
|
15463
|
-
"texts": {
|
|
15464
|
-
"header": "CS_NEW_APPLICATION_SLUM_NAME",
|
|
15465
|
-
"cardText": "CS_NEW_APPLICATION_SLUM_TEXT",
|
|
15466
|
-
"submitBarLabel": "CS_COMMON_NEXT"
|
|
15467
|
-
},
|
|
15468
|
-
"withoutLabel": true,
|
|
15469
|
-
"key": "address",
|
|
15470
|
-
"nextStep": "street"
|
|
15471
15955
|
}, {
|
|
15472
15956
|
"type": "component",
|
|
15473
15957
|
"route": "street",
|
|
15474
15958
|
"component": "FSMSelectStreet",
|
|
15475
15959
|
"key": "address",
|
|
15960
|
+
"colSpan": "span 2",
|
|
15476
15961
|
"withoutLabel": true,
|
|
15477
15962
|
"texts": {
|
|
15478
15963
|
"headerCaption": "CS_FILE_APPLICATION_PROPERTY_LOCATION_LABEL",
|
|
@@ -15482,11 +15967,26 @@ const EditForm = _ref => {
|
|
|
15482
15967
|
"skipText": "CORE_COMMON_SKIP_CONTINUE"
|
|
15483
15968
|
},
|
|
15484
15969
|
"nextStep": "landmark"
|
|
15970
|
+
}, {
|
|
15971
|
+
"type": "component",
|
|
15972
|
+
"route": "slum-details",
|
|
15973
|
+
"isMandatory": true,
|
|
15974
|
+
"component": "SelectSlumName",
|
|
15975
|
+
"texts": {
|
|
15976
|
+
"header": "CS_NEW_APPLICATION_SLUM_NAME",
|
|
15977
|
+
"cardText": "CS_NEW_APPLICATION_SLUM_TEXT",
|
|
15978
|
+
"submitBarLabel": "CS_COMMON_NEXT"
|
|
15979
|
+
},
|
|
15980
|
+
"withoutLabel": true,
|
|
15981
|
+
"colSpan": "span 2",
|
|
15982
|
+
"key": "address",
|
|
15983
|
+
"nextStep": "street"
|
|
15485
15984
|
}, {
|
|
15486
15985
|
"type": "component",
|
|
15487
15986
|
"route": "landmark",
|
|
15488
15987
|
"component": "FSMSelectLandmark",
|
|
15489
15988
|
"withoutLabel": true,
|
|
15989
|
+
"colSpan": "span 1",
|
|
15490
15990
|
"texts": {
|
|
15491
15991
|
"headerCaption": "CS_FILE_APPLICATION_PROPERTY_LOCATION_LABEL",
|
|
15492
15992
|
"header": "CS_FILE_APPLICATION_PROPERTY_LOCATION_PROVIDE_LANDMARK_TITLE",
|
|
@@ -15520,6 +16020,7 @@ const EditForm = _ref => {
|
|
|
15520
16020
|
"type": "component",
|
|
15521
16021
|
"route": "pit-type",
|
|
15522
16022
|
"key": "pitType",
|
|
16023
|
+
"colSpan": "span 2",
|
|
15523
16024
|
"component": "SelectPitType",
|
|
15524
16025
|
"texts": {
|
|
15525
16026
|
"header": "CS_FILE_PROPERTY_PIT_TYPE",
|
|
@@ -15531,6 +16032,7 @@ const EditForm = _ref => {
|
|
|
15531
16032
|
"route": "tank-size",
|
|
15532
16033
|
"component": "SelectTankSize",
|
|
15533
16034
|
"isMandatory": false,
|
|
16035
|
+
"colSpan": "span 2",
|
|
15534
16036
|
"texts": {
|
|
15535
16037
|
"headerCaption": "",
|
|
15536
16038
|
"header": "CS_FILE_APPLICATION_PIT_SEPTIC_TANK_SIZE_TITLE",
|
|
@@ -15546,6 +16048,7 @@ const EditForm = _ref => {
|
|
|
15546
16048
|
"type": "component",
|
|
15547
16049
|
"key": "tripData",
|
|
15548
16050
|
"withoutLabel": true,
|
|
16051
|
+
"colSpan": "span 2",
|
|
15549
16052
|
"component": "SelectTrips"
|
|
15550
16053
|
}]
|
|
15551
16054
|
}, {
|
|
@@ -15607,11 +16110,13 @@ const EditForm = _ref => {
|
|
|
15607
16110
|
"type": "component",
|
|
15608
16111
|
"key": "tripData",
|
|
15609
16112
|
"withoutLabel": true,
|
|
16113
|
+
"colSpan": "span 2",
|
|
15610
16114
|
"component": "SelectTripData"
|
|
15611
16115
|
}, {
|
|
15612
16116
|
"type": "component",
|
|
15613
16117
|
"key": "advancepaymentPreference",
|
|
15614
16118
|
"withoutLabel": true,
|
|
16119
|
+
"colSpan": "span 2",
|
|
15615
16120
|
"component": "AdvanceCollection"
|
|
15616
16121
|
}]
|
|
15617
16122
|
}];
|
|
@@ -16921,15 +17426,20 @@ const Inbox = _ref => {
|
|
|
16921
17426
|
const fetchPrevPage = () => {
|
|
16922
17427
|
setPageOffset(prevState => prevState - pageSize);
|
|
16923
17428
|
};
|
|
16924
|
-
const handleFilterChange = filterParam
|
|
16925
|
-
|
|
17429
|
+
const handleFilterChange = function (filterParam) {
|
|
17430
|
+
if (filterParam === void 0) {
|
|
17431
|
+
filterParam = {};
|
|
17432
|
+
}
|
|
17433
|
+
const safeFilterParam = filterParam || {};
|
|
17434
|
+
let keys_to_delete = safeFilterParam === null || safeFilterParam === void 0 ? void 0 : safeFilterParam.delete;
|
|
16926
17435
|
let _new = {
|
|
16927
17436
|
...searchParams
|
|
16928
17437
|
};
|
|
16929
17438
|
if (keys_to_delete) keys_to_delete.forEach(key => delete _new[key]);
|
|
17439
|
+
safeFilterParam === null || safeFilterParam === void 0 ? true : delete safeFilterParam.delete;
|
|
16930
17440
|
setSearchParams({
|
|
16931
17441
|
..._new,
|
|
16932
|
-
...
|
|
17442
|
+
...safeFilterParam
|
|
16933
17443
|
});
|
|
16934
17444
|
};
|
|
16935
17445
|
const handleSort = React.useCallback(args => {
|
|
@@ -17110,8 +17620,12 @@ const NewApplication = _ref => {
|
|
|
17110
17620
|
t
|
|
17111
17621
|
} = reactI18next.useTranslation();
|
|
17112
17622
|
const history = reactRouterDom.useHistory();
|
|
17113
|
-
const [canSubmit, setSubmitValve] = React.useState(
|
|
17623
|
+
const [canSubmit, setSubmitValve] = React.useState(true);
|
|
17114
17624
|
const defaultValues = {
|
|
17625
|
+
paymentPreference: "POST_PAY",
|
|
17626
|
+
channel: {
|
|
17627
|
+
code: "COUNTER"
|
|
17628
|
+
},
|
|
17115
17629
|
tripData: {
|
|
17116
17630
|
noOfTrips: 1,
|
|
17117
17631
|
amountPerTrip: null,
|
|
@@ -17119,15 +17633,10 @@ const NewApplication = _ref => {
|
|
|
17119
17633
|
}
|
|
17120
17634
|
};
|
|
17121
17635
|
const onFormValueChange = (setValue, formData) => {
|
|
17122
|
-
var _formData$
|
|
17123
|
-
|
|
17124
|
-
if ((formData === null || formData === void 0 ? void 0 : formData.pitType) !== undefined && formData !== null && formData !== void 0 && (_formData$tripData = formData.tripData) !== null && _formData$tripData !== void 0 && _formData$tripData.vehicleType && (formData === null || formData === void 0 ? void 0 : (_formData$tripData2 = formData.tripData) === null || _formData$tripData2 === void 0 ? void 0 : _formData$tripData2.roadWidth) !== undefined && (formData === null || formData === void 0 ? void 0 : (_formData$tripData3 = formData.tripData) === null || _formData$tripData3 === void 0 ? void 0 : _formData$tripData3.distancefromroad) !== undefined && formData !== null && formData !== void 0 && formData.propertyType && formData !== null && formData !== void 0 && formData.subtype && formData !== null && formData !== void 0 && (_formData$address = formData.address) !== null && _formData$address !== void 0 && (_formData$address$loc = _formData$address.locality) !== null && _formData$address$loc !== void 0 && _formData$address$loc.code || formData !== null && formData !== void 0 && (_formData$cpt = formData.cpt) !== null && _formData$cpt !== void 0 && (_formData$cpt$details = _formData$cpt.details) !== null && _formData$cpt$details !== void 0 && (_formData$cpt$details2 = _formData$cpt$details.address) !== null && _formData$cpt$details2 !== void 0 && (_formData$cpt$details3 = _formData$cpt$details2.locality) !== null && _formData$cpt$details3 !== void 0 && _formData$cpt$details3.code && formData !== null && formData !== void 0 && (_formData$tripData4 = formData.tripData) !== null && _formData$tripData4 !== void 0 && _formData$tripData4.vehicleType && formData !== null && formData !== void 0 && formData.channel && formData !== null && formData !== void 0 && formData.pitType && formData !== null && formData !== void 0 && (_formData$tripData5 = formData.tripData) !== null && _formData$tripData5 !== void 0 && _formData$tripData5.roadWidth && formData !== null && formData !== void 0 && (_formData$tripData6 = formData.tripData) !== null && _formData$tripData6 !== void 0 && _formData$tripData6.distancefromroad && formData !== null && formData !== void 0 && (_formData$address2 = formData.address) !== null && _formData$address2 !== void 0 && _formData$address2.street && formData !== null && formData !== void 0 && (_formData$address3 = formData.address) !== null && _formData$address3 !== void 0 && _formData$address3.doorNo && (formData !== null && formData !== void 0 && (_formData$tripData7 = formData.tripData) !== null && _formData$tripData7 !== void 0 && _formData$tripData7.amountPerTrip || (formData === null || formData === void 0 ? void 0 : (_formData$tripData8 = formData.tripData) === null || _formData$tripData8 === void 0 ? void 0 : _formData$tripData8.amountPerTrip) === 0)) {
|
|
17125
|
-
var _formData$tripData9, _formData$advancepaym, _formData$advancepaym2, _formData$advancepaym3;
|
|
17126
|
-
console.log("formDataformData", formData);
|
|
17636
|
+
var _formData$address, _formData$address$loc, _formData$address2, _formData$address2$ci, _formData$address3, _formData$address4, _formData$tripData, _formData$tripData2, _formData$tripData3, _formData$tripData4;
|
|
17637
|
+
if (formData !== null && formData !== void 0 && formData.channel && formData !== null && formData !== void 0 && formData.propertyType && formData !== null && formData !== void 0 && formData.subtype && (formData !== null && formData !== void 0 && (_formData$address = formData.address) !== null && _formData$address !== void 0 && (_formData$address$loc = _formData$address.locality) !== null && _formData$address$loc !== void 0 && _formData$address$loc.code || formData !== null && formData !== void 0 && (_formData$address2 = formData.address) !== null && _formData$address2 !== void 0 && (_formData$address2$ci = _formData$address2.city) !== null && _formData$address2$ci !== void 0 && _formData$address2$ci.code) && formData !== null && formData !== void 0 && (_formData$address3 = formData.address) !== null && _formData$address3 !== void 0 && _formData$address3.street && formData !== null && formData !== void 0 && (_formData$address4 = formData.address) !== null && _formData$address4 !== void 0 && _formData$address4.doorNo && formData !== null && formData !== void 0 && formData.pitType && formData !== null && formData !== void 0 && (_formData$tripData = formData.tripData) !== null && _formData$tripData !== void 0 && _formData$tripData.vehicleType && formData !== null && formData !== void 0 && (_formData$tripData2 = formData.tripData) !== null && _formData$tripData2 !== void 0 && _formData$tripData2.noOfTrips && (formData !== null && formData !== void 0 && (_formData$tripData3 = formData.tripData) !== null && _formData$tripData3 !== void 0 && _formData$tripData3.amountPerTrip || (formData === null || formData === void 0 ? void 0 : (_formData$tripData4 = formData.tripData) === null || _formData$tripData4 === void 0 ? void 0 : _formData$tripData4.amountPerTrip) === 0)) {
|
|
17127
17638
|
setSubmitValve(true);
|
|
17128
17639
|
const pitDetailValues = formData !== null && formData !== void 0 && formData.pitDetail ? Object.values(formData === null || formData === void 0 ? void 0 : formData.pitDetail).filter(value => value > 0) : null;
|
|
17129
|
-
let max = Digit.SessionStorage.get("total_amount");
|
|
17130
|
-
let min = Digit.SessionStorage.get("advance_amount");
|
|
17131
17640
|
if (formData !== null && formData !== void 0 && formData.pitType) {
|
|
17132
17641
|
var _formData$pitType, _formData$pitType2;
|
|
17133
17642
|
if (pitDetailValues === null || (pitDetailValues === null || pitDetailValues === void 0 ? void 0 : pitDetailValues.length) === 0) {
|
|
@@ -17138,45 +17647,43 @@ const NewApplication = _ref => {
|
|
|
17138
17647
|
setSubmitValve(true);
|
|
17139
17648
|
} else setSubmitValve(false);
|
|
17140
17649
|
}
|
|
17141
|
-
if ((formData === null || formData === void 0 ? void 0 : (_formData$tripData9 = formData.tripData) === null || _formData$tripData9 === void 0 ? void 0 : _formData$tripData9.amountPerTrip) !== 0 && ((formData === null || formData === void 0 ? void 0 : (_formData$advancepaym = formData.advancepaymentPreference) === null || _formData$advancepaym === void 0 ? void 0 : _formData$advancepaym.advanceAmount) < min || (formData === null || formData === void 0 ? void 0 : (_formData$advancepaym2 = formData.advancepaymentPreference) === null || _formData$advancepaym2 === void 0 ? void 0 : _formData$advancepaym2.advanceAmount) > max || (formData === null || formData === void 0 ? void 0 : (_formData$advancepaym3 = formData.advancepaymentPreference) === null || _formData$advancepaym3 === void 0 ? void 0 : _formData$advancepaym3.advanceAmount) === "")) {
|
|
17142
|
-
setSubmitValve(false);
|
|
17143
|
-
}
|
|
17144
17650
|
} else {
|
|
17145
17651
|
setSubmitValve(false);
|
|
17146
17652
|
}
|
|
17147
17653
|
};
|
|
17148
17654
|
const onSubmit = data => {
|
|
17149
|
-
var _data$pitType, _data$address, _data$address2, _data$address2$street, _data$address3, _data$address3$doorNo, _data$address4, _data$address5, _data$address5$landma, _data$tripData, _data$tripData2, _data$
|
|
17150
|
-
|
|
17151
|
-
|
|
17655
|
+
var _data$pitType, _data$applicationData, _data$applicationData2, _data$applicationData3, _data$address, _data$address2, _data$address2$street, _data$address3, _data$address3$doorNo, _data$address4, _data$address5, _data$address5$landma, _data$propertyID, _data$cpt, _data$cpt$details, _data$tripData, _data$tripData2, _data$tripData3, _data$tripData4, _data$tripData4$undef, _data$address6, _data$address6$city, _data$address7, _data$address7$city, _data$address8, _data$address8$city, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ad, _data$cpt2$details$ad2, _data$address9, _data$address9$locali, _data$cpt3, _data$cpt3$details, _data$cpt3$details$ad, _data$cpt3$details$ad2, _data$address0, _data$address0$locali, _data$applicationData4, _data$paymentPreferen, _data$tripData5, _data$tripData6, _data$address1, _data$address10, _data$address11, _data$address11$prope, _data$address12, _data$address13, _data$address14, _data$tripData7, _data$tripData7$vehic, _data$address15, _data$address16;
|
|
17656
|
+
const applicationChannel = (data === null || data === void 0 ? void 0 : data.channel) || {
|
|
17657
|
+
code: "COUNTER"
|
|
17658
|
+
};
|
|
17152
17659
|
const sanitationtype = data === null || data === void 0 ? void 0 : (_data$pitType = data.pitType) === null || _data$pitType === void 0 ? void 0 : _data$pitType.code;
|
|
17153
17660
|
const pitDimension = data === null || data === void 0 ? void 0 : data.pitDetail;
|
|
17154
|
-
const applicantName = data.applicationData.applicantName;
|
|
17155
|
-
const mobileNumber = data.applicationData.mobileNumber;
|
|
17156
|
-
const emailId = data.applicationData.emailId;
|
|
17661
|
+
const applicantName = data === null || data === void 0 ? void 0 : (_data$applicationData = data.applicationData) === null || _data$applicationData === void 0 ? void 0 : _data$applicationData.applicantName;
|
|
17662
|
+
const mobileNumber = data === null || data === void 0 ? void 0 : (_data$applicationData2 = data.applicationData) === null || _data$applicationData2 === void 0 ? void 0 : _data$applicationData2.mobileNumber;
|
|
17663
|
+
const emailId = data === null || data === void 0 ? void 0 : (_data$applicationData3 = data.applicationData) === null || _data$applicationData3 === void 0 ? void 0 : _data$applicationData3.emailId;
|
|
17157
17664
|
const pincode = data === null || data === void 0 ? void 0 : (_data$address = data.address) === null || _data$address === void 0 ? void 0 : _data$address.pincode;
|
|
17158
17665
|
const street = data === null || data === void 0 ? void 0 : (_data$address2 = data.address) === null || _data$address2 === void 0 ? void 0 : (_data$address2$street = _data$address2.street) === null || _data$address2$street === void 0 ? void 0 : _data$address2$street.trim();
|
|
17159
17666
|
const doorNo = data === null || data === void 0 ? void 0 : (_data$address3 = data.address) === null || _data$address3 === void 0 ? void 0 : (_data$address3$doorNo = _data$address3.doorNo) === null || _data$address3$doorNo === void 0 ? void 0 : _data$address3$doorNo.trim();
|
|
17160
17667
|
const slum = data === null || data === void 0 ? void 0 : (_data$address4 = data.address) === null || _data$address4 === void 0 ? void 0 : _data$address4.slum;
|
|
17161
17668
|
const landmark = data === null || data === void 0 ? void 0 : (_data$address5 = data.address) === null || _data$address5 === void 0 ? void 0 : (_data$address5$landma = _data$address5.landmark) === null || _data$address5$landma === void 0 ? void 0 : _data$address5$landma.trim();
|
|
17669
|
+
const propertyID = (data === null || data === void 0 ? void 0 : (_data$propertyID = data.propertyID) === null || _data$propertyID === void 0 ? void 0 : _data$propertyID.propertyID) || (data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : (_data$cpt$details = _data$cpt.details) === null || _data$cpt$details === void 0 ? void 0 : _data$cpt$details.propertyId) || "";
|
|
17162
17670
|
const noOfTrips = data === null || data === void 0 ? void 0 : (_data$tripData = data.tripData) === null || _data$tripData === void 0 ? void 0 : _data$tripData.noOfTrips;
|
|
17163
|
-
const amount = data.tripData.amount || (data === null || data === void 0 ? void 0 : (_data$
|
|
17671
|
+
const amount = (data === null || data === void 0 ? void 0 : (_data$tripData2 = data.tripData) === null || _data$tripData2 === void 0 ? void 0 : _data$tripData2.amount) !== undefined ? data === null || data === void 0 ? void 0 : (_data$tripData3 = data.tripData) === null || _data$tripData3 === void 0 ? void 0 : _data$tripData3.amount : data === null || data === void 0 ? void 0 : (_data$tripData4 = data.tripData) === null || _data$tripData4 === void 0 ? void 0 : (_data$tripData4$undef = _data$tripData4.undefined) === null || _data$tripData4$undef === void 0 ? void 0 : _data$tripData4$undef.amount;
|
|
17164
17672
|
const cityCode = data === null || data === void 0 ? void 0 : (_data$address6 = data.address) === null || _data$address6 === void 0 ? void 0 : (_data$address6$city = _data$address6.city) === null || _data$address6$city === void 0 ? void 0 : _data$address6$city.code;
|
|
17165
17673
|
const city = data === null || data === void 0 ? void 0 : (_data$address7 = data.address) === null || _data$address7 === void 0 ? void 0 : (_data$address7$city = _data$address7.city) === null || _data$address7$city === void 0 ? void 0 : _data$address7$city.name;
|
|
17166
17674
|
const state = data === null || data === void 0 ? void 0 : (_data$address8 = data.address) === null || _data$address8 === void 0 ? void 0 : (_data$address8$city = _data$address8.city) === null || _data$address8$city === void 0 ? void 0 : _data$address8$city.state;
|
|
17167
|
-
const localityCode = ((_data$
|
|
17168
|
-
const localityName = ((_data$
|
|
17169
|
-
const gender = data.applicationData.applicantGender;
|
|
17170
|
-
const paymentPreference =
|
|
17171
|
-
const
|
|
17172
|
-
const
|
|
17173
|
-
const
|
|
17174
|
-
const
|
|
17175
|
-
const
|
|
17176
|
-
const
|
|
17177
|
-
const
|
|
17178
|
-
const
|
|
17179
|
-
const newVillage = data === null || data === void 0 ? void 0 : (_data$address12 = data.address) === null || _data$address12 === void 0 ? void 0 : _data$address12.newVillage;
|
|
17675
|
+
const localityCode = (data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : (_data$cpt2$details = _data$cpt2.details) === null || _data$cpt2$details === void 0 ? void 0 : (_data$cpt2$details$ad = _data$cpt2$details.address) === null || _data$cpt2$details$ad === void 0 ? void 0 : (_data$cpt2$details$ad2 = _data$cpt2$details$ad.locality) === null || _data$cpt2$details$ad2 === void 0 ? void 0 : _data$cpt2$details$ad2.code) || (data === null || data === void 0 ? void 0 : (_data$address9 = data.address) === null || _data$address9 === void 0 ? void 0 : (_data$address9$locali = _data$address9.locality) === null || _data$address9$locali === void 0 ? void 0 : _data$address9$locali.code);
|
|
17676
|
+
const localityName = (data === null || data === void 0 ? void 0 : (_data$cpt3 = data.cpt) === null || _data$cpt3 === void 0 ? void 0 : (_data$cpt3$details = _data$cpt3.details) === null || _data$cpt3$details === void 0 ? void 0 : (_data$cpt3$details$ad = _data$cpt3$details.address) === null || _data$cpt3$details$ad === void 0 ? void 0 : (_data$cpt3$details$ad2 = _data$cpt3$details$ad.locality) === null || _data$cpt3$details$ad2 === void 0 ? void 0 : _data$cpt3$details$ad2.name) || (data === null || data === void 0 ? void 0 : (_data$address0 = data.address) === null || _data$address0 === void 0 ? void 0 : (_data$address0$locali = _data$address0.locality) === null || _data$address0$locali === void 0 ? void 0 : _data$address0$locali.name);
|
|
17677
|
+
const gender = data === null || data === void 0 ? void 0 : (_data$applicationData4 = data.applicationData) === null || _data$applicationData4 === void 0 ? void 0 : _data$applicationData4.applicantGender;
|
|
17678
|
+
const paymentPreference = data !== null && data !== void 0 && data.paymentPreference ? (data === null || data === void 0 ? void 0 : (_data$paymentPreferen = data.paymentPreference) === null || _data$paymentPreferen === void 0 ? void 0 : _data$paymentPreferen.code) || (data === null || data === void 0 ? void 0 : data.paymentPreference) : "POST_PAY";
|
|
17679
|
+
const distancefromroad = (data === null || data === void 0 ? void 0 : (_data$tripData5 = data.tripData) === null || _data$tripData5 === void 0 ? void 0 : _data$tripData5.distancefromroad) || "";
|
|
17680
|
+
const roadWidth = (data === null || data === void 0 ? void 0 : (_data$tripData6 = data.tripData) === null || _data$tripData6 === void 0 ? void 0 : _data$tripData6.roadWidth) || "";
|
|
17681
|
+
const gramPanchayat = data === null || data === void 0 ? void 0 : (_data$address1 = data.address) === null || _data$address1 === void 0 ? void 0 : _data$address1.gramPanchayat;
|
|
17682
|
+
const village = data === null || data === void 0 ? void 0 : (_data$address10 = data.address) === null || _data$address10 === void 0 ? void 0 : _data$address10.village;
|
|
17683
|
+
const propertyLocation = data === null || data === void 0 ? void 0 : (_data$address11 = data.address) === null || _data$address11 === void 0 ? void 0 : (_data$address11$prope = _data$address11.propertyLocation) === null || _data$address11$prope === void 0 ? void 0 : _data$address11$prope.code;
|
|
17684
|
+
const newLocality = data === null || data === void 0 ? void 0 : (_data$address12 = data.address) === null || _data$address12 === void 0 ? void 0 : _data$address12.newLocality;
|
|
17685
|
+
const newGp = data === null || data === void 0 ? void 0 : (_data$address13 = data.address) === null || _data$address13 === void 0 ? void 0 : _data$address13.newGp;
|
|
17686
|
+
const newVillage = data === null || data === void 0 ? void 0 : (_data$address14 = data.address) === null || _data$address14 === void 0 ? void 0 : _data$address14.newVillage;
|
|
17180
17687
|
const formData = {
|
|
17181
17688
|
fsm: {
|
|
17182
17689
|
citizen: {
|
|
@@ -17187,15 +17694,15 @@ const NewApplication = _ref => {
|
|
|
17187
17694
|
},
|
|
17188
17695
|
tenantId: tenantId,
|
|
17189
17696
|
sanitationtype: sanitationtype,
|
|
17190
|
-
source: applicationChannel.code,
|
|
17697
|
+
source: (applicationChannel === null || applicationChannel === void 0 ? void 0 : applicationChannel.code) || "COUNTER",
|
|
17191
17698
|
additionalDetails: {
|
|
17192
17699
|
tripAmount: typeof amount === "number" ? JSON.stringify(amount) : amount,
|
|
17193
17700
|
distancefromroad: distancefromroad,
|
|
17194
17701
|
roadWidth: roadWidth,
|
|
17195
|
-
propertyID:
|
|
17702
|
+
propertyID: propertyID
|
|
17196
17703
|
},
|
|
17197
17704
|
propertyUsage: data === null || data === void 0 ? void 0 : data.subtype,
|
|
17198
|
-
vehicleCapacity: data === null || data === void 0 ? void 0 : (_data$
|
|
17705
|
+
vehicleCapacity: data === null || data === void 0 ? void 0 : (_data$tripData7 = data.tripData) === null || _data$tripData7 === void 0 ? void 0 : (_data$tripData7$vehic = _data$tripData7.vehicleType) === null || _data$tripData7$vehic === void 0 ? void 0 : _data$tripData7$vehic.capacity,
|
|
17199
17706
|
pitDetail: {
|
|
17200
17707
|
...pitDimension,
|
|
17201
17708
|
distanceFromRoad: data === null || data === void 0 ? void 0 : data.distanceFromRoad
|
|
@@ -17214,8 +17721,8 @@ const NewApplication = _ref => {
|
|
|
17214
17721
|
name: propertyLocation === "FROM_GRAM_PANCHAYAT" ? gramPanchayat === null || gramPanchayat === void 0 ? void 0 : gramPanchayat.name : localityName
|
|
17215
17722
|
},
|
|
17216
17723
|
geoLocation: {
|
|
17217
|
-
latitude: data === null || data === void 0 ? void 0 : (_data$
|
|
17218
|
-
longitude: data === null || data === void 0 ? void 0 : (_data$
|
|
17724
|
+
latitude: data === null || data === void 0 ? void 0 : (_data$address15 = data.address) === null || _data$address15 === void 0 ? void 0 : _data$address15.latitude,
|
|
17725
|
+
longitude: data === null || data === void 0 ? void 0 : (_data$address16 = data.address) === null || _data$address16 === void 0 ? void 0 : _data$address16.longitude
|
|
17219
17726
|
},
|
|
17220
17727
|
additionalDetails: {
|
|
17221
17728
|
boundaryType: propertyLocation === "FROM_GRAM_PANCHAYAT" ? "GP" : "Locality",
|
|
@@ -17233,7 +17740,7 @@ const NewApplication = _ref => {
|
|
|
17233
17740
|
},
|
|
17234
17741
|
noOfTrips,
|
|
17235
17742
|
paymentPreference,
|
|
17236
|
-
advanceAmount:
|
|
17743
|
+
advanceAmount: "0"
|
|
17237
17744
|
},
|
|
17238
17745
|
workflow: null
|
|
17239
17746
|
};
|
|
@@ -17248,274 +17755,200 @@ const NewApplication = _ref => {
|
|
|
17248
17755
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
17249
17756
|
}
|
|
17250
17757
|
let conf = [{
|
|
17251
|
-
|
|
17252
|
-
|
|
17253
|
-
|
|
17254
|
-
|
|
17255
|
-
|
|
17256
|
-
"
|
|
17257
|
-
|
|
17258
|
-
|
|
17259
|
-
"
|
|
17260
|
-
}, {
|
|
17261
|
-
"label": "ES_NEW_APPLICATION_PROPERTY_TYPE",
|
|
17262
|
-
"isMandatory": true,
|
|
17263
|
-
"type": "component",
|
|
17264
|
-
"route": "property-type",
|
|
17265
|
-
"key": "propertyType",
|
|
17266
|
-
"component": "SelectPropertyType",
|
|
17267
|
-
"texts": {
|
|
17268
|
-
"headerCaption": "",
|
|
17269
|
-
"header": "CS_FILE_APPLICATION_PROPERTY_LABEL",
|
|
17270
|
-
"cardText": "CS_FILE_APPLICATION_PROPERTY_TEXT",
|
|
17271
|
-
"submitBarLabel": "CS_COMMON_NEXT"
|
|
17272
|
-
},
|
|
17273
|
-
"nextStep": "property-subtype"
|
|
17758
|
+
head: "ES_TITLE_APPLICANT_DETAILS",
|
|
17759
|
+
body: [{
|
|
17760
|
+
label: "ES_NEW_APPLICATION_APPLICATION_CHANNEL",
|
|
17761
|
+
isMandatory: true,
|
|
17762
|
+
type: "component",
|
|
17763
|
+
key: "channel",
|
|
17764
|
+
colSpan: "span 1",
|
|
17765
|
+
component: "SelectChannel",
|
|
17766
|
+
nextStep: "applicantName"
|
|
17274
17767
|
}, {
|
|
17275
|
-
|
|
17276
|
-
"
|
|
17277
|
-
|
|
17278
|
-
|
|
17279
|
-
|
|
17280
|
-
"component": "SelectPropertySubtype",
|
|
17281
|
-
"texts": {
|
|
17282
|
-
"headerCaption": "",
|
|
17283
|
-
"header": "CS_FILE_APPLICATION_PROPERTY_SUBTYPE_LABEL",
|
|
17284
|
-
"cardText": "CS_FILE_APPLICATION_PROPERTY_SUBTYPE_TEXT",
|
|
17285
|
-
"submitBarLabel": "CS_COMMON_NEXT"
|
|
17286
|
-
},
|
|
17287
|
-
"nextStep": "map"
|
|
17288
|
-
}]
|
|
17289
|
-
}, {
|
|
17290
|
-
"head": "ES_TITLE_APPLICANT_DETAILS",
|
|
17291
|
-
"body": [{
|
|
17292
|
-
"label": "ES_NEW_APPLICATION_APPLICATION_CHANNEL",
|
|
17293
|
-
"isMandatory": true,
|
|
17294
|
-
"type": "component",
|
|
17295
|
-
"key": "channel",
|
|
17296
|
-
"component": "SelectChannel",
|
|
17297
|
-
"nextStep": "applicantName"
|
|
17768
|
+
type: "component",
|
|
17769
|
+
key: "applicationData",
|
|
17770
|
+
withoutLabel: true,
|
|
17771
|
+
colSpan: "span 2",
|
|
17772
|
+
component: "SelectName"
|
|
17298
17773
|
}, {
|
|
17299
|
-
|
|
17300
|
-
|
|
17301
|
-
|
|
17302
|
-
|
|
17774
|
+
type: "component",
|
|
17775
|
+
key: "paymentPreference",
|
|
17776
|
+
withoutLabel: true,
|
|
17777
|
+
colSpan: "span 2",
|
|
17778
|
+
component: "SelectPaymentType"
|
|
17303
17779
|
}]
|
|
17304
17780
|
}, {
|
|
17305
|
-
|
|
17306
|
-
|
|
17307
|
-
|
|
17308
|
-
|
|
17309
|
-
"
|
|
17310
|
-
"
|
|
17311
|
-
|
|
17312
|
-
|
|
17313
|
-
|
|
17314
|
-
|
|
17315
|
-
|
|
17316
|
-
|
|
17317
|
-
|
|
17318
|
-
|
|
17319
|
-
"type": "component"
|
|
17320
|
-
}, {
|
|
17321
|
-
"route": "locality-gramPanchayat",
|
|
17322
|
-
"component": "SelectLocalityOrGramPanchayat",
|
|
17323
|
-
"withoutLabel": true,
|
|
17324
|
-
"texts": {
|
|
17325
|
-
"headerCaption": "CS_FILE_APPLICATION_PROPERTY_LOCATION_LABEL",
|
|
17326
|
-
"header": "CS_FILE_APPLICATION_PROPERTY_LOCATION_ADDRESS_TEXT",
|
|
17327
|
-
"cardText": "CS_FILE_APPLICATION_PROPERTY_LOCATION_CITY_MOHALLA_TEXT",
|
|
17328
|
-
"submitBarLabel": "CS_COMMON_NEXT"
|
|
17329
|
-
},
|
|
17330
|
-
"key": "address",
|
|
17331
|
-
"nextStep": "select-trip-number",
|
|
17332
|
-
"isMandatory": true,
|
|
17333
|
-
"type": "component"
|
|
17334
|
-
}, {
|
|
17335
|
-
"route": "pincode",
|
|
17336
|
-
"component": "FSMSelectPincode",
|
|
17337
|
-
"texts": {
|
|
17338
|
-
"headerCaption": "",
|
|
17339
|
-
"header": "CS_FILE_APPLICATION_PINCODE_LABEL",
|
|
17340
|
-
"cardText": "CS_FILE_APPLICATION_PINCODE_TEXT",
|
|
17341
|
-
"submitBarLabel": "CS_COMMON_NEXT",
|
|
17342
|
-
"skipText": "CORE_COMMON_SKIP_CONTINUE"
|
|
17343
|
-
},
|
|
17344
|
-
"withoutLabel": true,
|
|
17345
|
-
"key": "address",
|
|
17346
|
-
"nextStep": "check-slum",
|
|
17347
|
-
"type": "component"
|
|
17348
|
-
}, {
|
|
17349
|
-
"type": "component",
|
|
17350
|
-
"route": "check-slum",
|
|
17351
|
-
"isMandatory": true,
|
|
17352
|
-
"component": "CheckSlum",
|
|
17353
|
-
"texts": {
|
|
17354
|
-
"header": "ES_NEW_APPLICATION_SLUM_CHECK",
|
|
17355
|
-
"submitBarLabel": "CS_COMMON_NEXT"
|
|
17356
|
-
},
|
|
17357
|
-
"key": "address",
|
|
17358
|
-
"withoutLabel": true,
|
|
17359
|
-
"nextStep": "slum-details",
|
|
17360
|
-
"hideInEmployee": true
|
|
17361
|
-
}, {
|
|
17362
|
-
"type": "component",
|
|
17363
|
-
"route": "slum-details",
|
|
17364
|
-
"isMandatory": true,
|
|
17365
|
-
"component": "SelectSlumName",
|
|
17366
|
-
"texts": {
|
|
17367
|
-
"header": "CS_NEW_APPLICATION_SLUM_NAME",
|
|
17368
|
-
"cardText": "CS_NEW_APPLICATION_SLUM_TEXT",
|
|
17369
|
-
"submitBarLabel": "CS_COMMON_NEXT"
|
|
17370
|
-
},
|
|
17371
|
-
"withoutLabel": true,
|
|
17372
|
-
"key": "address",
|
|
17373
|
-
"nextStep": "street"
|
|
17374
|
-
}, {
|
|
17375
|
-
"type": "component",
|
|
17376
|
-
"route": "street",
|
|
17377
|
-
"component": "FSMSelectStreet",
|
|
17378
|
-
"key": "address",
|
|
17379
|
-
"withoutLabel": true,
|
|
17380
|
-
"texts": {
|
|
17381
|
-
"headerCaption": "CS_FILE_APPLICATION_PROPERTY_LOCATION_LABEL",
|
|
17382
|
-
"header": "CS_FILE_APPLICATION_PROPERTY_LOCATION_ADDRESS_TEXT",
|
|
17383
|
-
"cardText": "CS_FILE_APPLICATION_PROPERTY_LOCATION_STREET_DOOR_NO_LABEL",
|
|
17384
|
-
"submitBarLabel": "CS_COMMON_NEXT",
|
|
17385
|
-
"skipText": "CORE_COMMON_SKIP_CONTINUE"
|
|
17781
|
+
head: "ES_NEW_APPLICATION_PROPERTY_DETAILS",
|
|
17782
|
+
body: [{
|
|
17783
|
+
label: "ES_NEW_APPLICATION_PROPERTY_TYPE",
|
|
17784
|
+
isMandatory: true,
|
|
17785
|
+
type: "component",
|
|
17786
|
+
route: "property-type",
|
|
17787
|
+
key: "propertyType",
|
|
17788
|
+
colSpan: "span 1",
|
|
17789
|
+
component: "SelectPropertyType",
|
|
17790
|
+
texts: {
|
|
17791
|
+
headerCaption: "",
|
|
17792
|
+
header: "CS_FILE_APPLICATION_PROPERTY_LABEL",
|
|
17793
|
+
cardText: "CS_FILE_APPLICATION_PROPERTY_TEXT",
|
|
17794
|
+
submitBarLabel: "CS_COMMON_NEXT"
|
|
17386
17795
|
},
|
|
17387
|
-
|
|
17796
|
+
nextStep: "property-subtype"
|
|
17388
17797
|
}, {
|
|
17389
|
-
|
|
17390
|
-
|
|
17391
|
-
|
|
17392
|
-
"
|
|
17393
|
-
"
|
|
17394
|
-
|
|
17395
|
-
|
|
17396
|
-
|
|
17397
|
-
|
|
17398
|
-
|
|
17798
|
+
label: "ES_NEW_APPLICATION_PROPERTY_SUB-TYPE",
|
|
17799
|
+
isMandatory: true,
|
|
17800
|
+
type: "component",
|
|
17801
|
+
route: "property-subtype",
|
|
17802
|
+
key: "subtype",
|
|
17803
|
+
colSpan: "span 1",
|
|
17804
|
+
component: "SelectPropertySubtype",
|
|
17805
|
+
texts: {
|
|
17806
|
+
headerCaption: "",
|
|
17807
|
+
header: "CS_FILE_APPLICATION_PROPERTY_SUBTYPE_LABEL",
|
|
17808
|
+
cardText: "CS_FILE_APPLICATION_PROPERTY_SUBTYPE_TEXT",
|
|
17809
|
+
submitBarLabel: "CS_COMMON_NEXT"
|
|
17399
17810
|
},
|
|
17400
|
-
|
|
17401
|
-
"nextStep": "pit-type"
|
|
17811
|
+
nextStep: "map"
|
|
17402
17812
|
}]
|
|
17403
17813
|
}, {
|
|
17404
|
-
|
|
17405
|
-
|
|
17406
|
-
|
|
17407
|
-
"
|
|
17408
|
-
|
|
17409
|
-
|
|
17410
|
-
|
|
17411
|
-
|
|
17412
|
-
|
|
17413
|
-
|
|
17414
|
-
"header": "CS_FILE_PROPERTY_ROAD_WIDTH",
|
|
17415
|
-
"cardText": "CS_FILE_PROPERTY_ROAD_WIDTH_TEXT",
|
|
17416
|
-
"submitBarLabel": "CS_COMMON_NEXT",
|
|
17417
|
-
"skipText": "CORE_COMMON_SKIP_CONTINUE"
|
|
17814
|
+
head: "ES_NEW_APPLICATION_LOCATION_DETAILS",
|
|
17815
|
+
body: [{
|
|
17816
|
+
route: "pincode",
|
|
17817
|
+
component: "FSMSelectPincode",
|
|
17818
|
+
texts: {
|
|
17819
|
+
headerCaption: "",
|
|
17820
|
+
header: "CS_FILE_APPLICATION_PINCODE_LABEL",
|
|
17821
|
+
cardText: "CS_FILE_APPLICATION_PINCODE_TEXT",
|
|
17822
|
+
submitBarLabel: "CS_COMMON_NEXT",
|
|
17823
|
+
skipText: "CORE_COMMON_SKIP_CONTINUE"
|
|
17418
17824
|
},
|
|
17419
|
-
|
|
17825
|
+
withoutLabel: true,
|
|
17826
|
+
key: "address",
|
|
17827
|
+
colSpan: "span 1",
|
|
17828
|
+
nextStep: "check-slum",
|
|
17829
|
+
type: "component"
|
|
17420
17830
|
}, {
|
|
17421
|
-
|
|
17422
|
-
"
|
|
17423
|
-
|
|
17424
|
-
|
|
17425
|
-
|
|
17426
|
-
|
|
17427
|
-
|
|
17428
|
-
|
|
17429
|
-
"cardText": "CS_FILE_PROPERTY_PIT_TYPE_TEXT",
|
|
17430
|
-
"submitBarLabel": "CS_COMMON_NEXT"
|
|
17831
|
+
route: "address",
|
|
17832
|
+
component: "FSMSelectAddress",
|
|
17833
|
+
withoutLabel: true,
|
|
17834
|
+
texts: {
|
|
17835
|
+
headerCaption: "CS_FILE_APPLICATION_PROPERTY_LOCATION_LABEL",
|
|
17836
|
+
header: "CS_FILE_APPLICATION_PROPERTY_LOCATION_ADDRESS_TEXT",
|
|
17837
|
+
cardText: "CS_FILE_APPLICATION_PROPERTY_LOCATION_CITY_MOHALLA_TEXT",
|
|
17838
|
+
submitBarLabel: "CS_COMMON_NEXT"
|
|
17431
17839
|
},
|
|
17432
|
-
|
|
17840
|
+
key: "address",
|
|
17841
|
+
colSpan: "span 1",
|
|
17842
|
+
nextStep: "locality-gramPanchayat",
|
|
17843
|
+
isMandatory: true,
|
|
17844
|
+
type: "component"
|
|
17433
17845
|
}, {
|
|
17434
|
-
|
|
17435
|
-
|
|
17436
|
-
|
|
17437
|
-
|
|
17438
|
-
|
|
17439
|
-
|
|
17440
|
-
|
|
17441
|
-
|
|
17442
|
-
"skipText": "CORE_COMMON_SKIP_CONTINUE"
|
|
17846
|
+
route: "locality-gramPanchayat",
|
|
17847
|
+
component: "SelectLocalityOrGramPanchayat",
|
|
17848
|
+
withoutLabel: true,
|
|
17849
|
+
texts: {
|
|
17850
|
+
headerCaption: "CS_FILE_APPLICATION_PROPERTY_LOCATION_LABEL",
|
|
17851
|
+
header: "CS_FILE_APPLICATION_PROPERTY_LOCATION_ADDRESS_TEXT",
|
|
17852
|
+
cardText: "CS_FILE_APPLICATION_PROPERTY_LOCATION_CITY_MOHALLA_TEXT",
|
|
17853
|
+
submitBarLabel: "CS_COMMON_NEXT"
|
|
17443
17854
|
},
|
|
17444
|
-
|
|
17445
|
-
|
|
17446
|
-
|
|
17447
|
-
|
|
17855
|
+
key: "address",
|
|
17856
|
+
colSpan: "span 1",
|
|
17857
|
+
nextStep: "select-trip-number",
|
|
17858
|
+
isMandatory: true,
|
|
17859
|
+
type: "component"
|
|
17448
17860
|
}, {
|
|
17449
|
-
|
|
17450
|
-
|
|
17451
|
-
|
|
17452
|
-
|
|
17453
|
-
|
|
17454
|
-
|
|
17455
|
-
|
|
17456
|
-
|
|
17457
|
-
|
|
17458
|
-
"label": "a",
|
|
17459
|
-
"isMandatory": true,
|
|
17460
|
-
"type": "component",
|
|
17461
|
-
"route": "select-trip-number",
|
|
17462
|
-
"key": "selectTripNo",
|
|
17463
|
-
"component": "SelectTripNo",
|
|
17464
|
-
"hideInEmployee": true,
|
|
17465
|
-
"texts": {
|
|
17466
|
-
"headerCaption": "",
|
|
17467
|
-
"header": "ES_FSM_SERVICE_REQUEST",
|
|
17468
|
-
"cardText": "ES_FSM_SERVICE_REQUEST_TEXT",
|
|
17469
|
-
"skipText": "CORE_COMMON_SKIP_CONTINUE",
|
|
17470
|
-
"submitBarLabel": "CS_COMMON_NEXT",
|
|
17471
|
-
"skipLabel": "CS_COMMON_SERVICE_SKIP_INFO"
|
|
17861
|
+
type: "component",
|
|
17862
|
+
route: "slum-details",
|
|
17863
|
+
isMandatory: true,
|
|
17864
|
+
component: "SelectSlumName",
|
|
17865
|
+
colSpan: "span 2",
|
|
17866
|
+
texts: {
|
|
17867
|
+
header: "CS_NEW_APPLICATION_SLUM_NAME",
|
|
17868
|
+
cardText: "CS_NEW_APPLICATION_SLUM_TEXT",
|
|
17869
|
+
submitBarLabel: "CS_COMMON_NEXT"
|
|
17472
17870
|
},
|
|
17473
|
-
|
|
17871
|
+
withoutLabel: true,
|
|
17872
|
+
key: "address",
|
|
17873
|
+
nextStep: "street"
|
|
17474
17874
|
}, {
|
|
17475
|
-
|
|
17476
|
-
"
|
|
17477
|
-
|
|
17478
|
-
|
|
17479
|
-
"
|
|
17480
|
-
|
|
17481
|
-
|
|
17482
|
-
|
|
17483
|
-
|
|
17484
|
-
|
|
17485
|
-
|
|
17486
|
-
|
|
17487
|
-
"skipText": "CORE_COMMON_SKIP_CONTINUE"
|
|
17875
|
+
type: "component",
|
|
17876
|
+
route: "street",
|
|
17877
|
+
component: "FSMSelectStreet",
|
|
17878
|
+
key: "address",
|
|
17879
|
+
colSpan: "span 2",
|
|
17880
|
+
withoutLabel: true,
|
|
17881
|
+
texts: {
|
|
17882
|
+
headerCaption: "CS_FILE_APPLICATION_PROPERTY_LOCATION_LABEL",
|
|
17883
|
+
header: "CS_FILE_APPLICATION_PROPERTY_LOCATION_ADDRESS_TEXT",
|
|
17884
|
+
cardText: "CS_FILE_APPLICATION_PROPERTY_LOCATION_STREET_DOOR_NO_LABEL",
|
|
17885
|
+
submitBarLabel: "CS_COMMON_NEXT",
|
|
17886
|
+
skipText: "CORE_COMMON_SKIP_CONTINUE"
|
|
17488
17887
|
},
|
|
17489
|
-
|
|
17888
|
+
nextStep: "landmark"
|
|
17490
17889
|
}, {
|
|
17491
|
-
|
|
17492
|
-
"
|
|
17493
|
-
|
|
17494
|
-
|
|
17495
|
-
|
|
17496
|
-
|
|
17497
|
-
|
|
17498
|
-
|
|
17499
|
-
|
|
17500
|
-
|
|
17501
|
-
|
|
17502
|
-
"submitBarLabel": "CS_COMMON_NEXT",
|
|
17503
|
-
"skipText": "CORE_COMMON_SKIP_CONTINUE"
|
|
17890
|
+
type: "component",
|
|
17891
|
+
route: "landmark",
|
|
17892
|
+
component: "FSMSelectLandmark",
|
|
17893
|
+
withoutLabel: true,
|
|
17894
|
+
colSpan: "span 1",
|
|
17895
|
+
texts: {
|
|
17896
|
+
headerCaption: "CS_FILE_APPLICATION_PROPERTY_LOCATION_LABEL",
|
|
17897
|
+
header: "CS_FILE_APPLICATION_PROPERTY_LOCATION_PROVIDE_LANDMARK_TITLE",
|
|
17898
|
+
cardText: "CS_FILE_APPLICATION_PROPERTY_LOCATION_PROVIDE_LANDMARK_TEXT",
|
|
17899
|
+
submitBarLabel: "CS_COMMON_NEXT",
|
|
17900
|
+
skipText: "CORE_COMMON_SKIP_CONTINUE"
|
|
17504
17901
|
},
|
|
17505
|
-
"
|
|
17902
|
+
key: "address",
|
|
17903
|
+
nextStep: "pit-type"
|
|
17506
17904
|
}]
|
|
17507
17905
|
}, {
|
|
17508
|
-
|
|
17509
|
-
|
|
17510
|
-
|
|
17511
|
-
|
|
17512
|
-
"
|
|
17513
|
-
|
|
17906
|
+
head: "CS_CHECK_PIT_SEPTIC_TANK_DETAILS",
|
|
17907
|
+
body: [{
|
|
17908
|
+
label: "ES_NEW_APPLICATION_PIT_TYPE",
|
|
17909
|
+
isMandatory: true,
|
|
17910
|
+
type: "component",
|
|
17911
|
+
route: "pit-type",
|
|
17912
|
+
key: "pitType",
|
|
17913
|
+
colSpan: "span 1",
|
|
17914
|
+
component: "SelectPitType",
|
|
17915
|
+
texts: {
|
|
17916
|
+
header: "CS_FILE_PROPERTY_PIT_TYPE",
|
|
17917
|
+
cardText: "CS_FILE_PROPERTY_PIT_TYPE_TEXT",
|
|
17918
|
+
submitBarLabel: "CS_COMMON_NEXT"
|
|
17919
|
+
},
|
|
17920
|
+
nextStep: "tank-size"
|
|
17514
17921
|
}, {
|
|
17515
|
-
|
|
17516
|
-
|
|
17517
|
-
|
|
17518
|
-
|
|
17922
|
+
route: "tank-size",
|
|
17923
|
+
component: "SelectTankSize",
|
|
17924
|
+
isMandatory: false,
|
|
17925
|
+
colSpan: "span 1",
|
|
17926
|
+
texts: {
|
|
17927
|
+
headerCaption: "",
|
|
17928
|
+
header: "CS_FILE_APPLICATION_PIT_SEPTIC_TANK_SIZE_TITLE",
|
|
17929
|
+
cardText: "CS_FILE_APPLICATION_PIT_SEPTIC_TANK_SIZE_TEXT",
|
|
17930
|
+
submitBarLabel: "CS_COMMON_NEXT",
|
|
17931
|
+
skipText: "CORE_COMMON_SKIP_CONTINUE"
|
|
17932
|
+
},
|
|
17933
|
+
type: "component",
|
|
17934
|
+
key: "pitDetail",
|
|
17935
|
+
nextStep: "select-payment-preference",
|
|
17936
|
+
label: "ES_NEW_APPLICATION_PIT_DIMENSION"
|
|
17937
|
+
}]
|
|
17938
|
+
}, {
|
|
17939
|
+
head: "ES_TITLE_PAYMENT_DETAILS",
|
|
17940
|
+
body: [{
|
|
17941
|
+
type: "component",
|
|
17942
|
+
key: "tripData",
|
|
17943
|
+
withoutLabel: true,
|
|
17944
|
+
colSpan: "span 2",
|
|
17945
|
+
component: "SelectTrips"
|
|
17946
|
+
}, {
|
|
17947
|
+
type: "component",
|
|
17948
|
+
key: "tripData",
|
|
17949
|
+
withoutLabel: true,
|
|
17950
|
+
colSpan: "span 2",
|
|
17951
|
+
component: "SelectTripData"
|
|
17519
17952
|
}]
|
|
17520
17953
|
}];
|
|
17521
17954
|
console.log(conf, "confffffffff");
|
|
@@ -19026,10 +19459,6 @@ const VehicleDetails = props => {
|
|
|
19026
19459
|
}))) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
19027
19460
|
};
|
|
19028
19461
|
|
|
19029
|
-
const {
|
|
19030
|
-
DatePicker,
|
|
19031
|
-
Dropdown
|
|
19032
|
-
} = require("@djb25/digit-ui-react-components");
|
|
19033
19462
|
const VehicleConfig = function (t, disabled) {
|
|
19034
19463
|
if (disabled === void 0) {
|
|
19035
19464
|
disabled = false;
|
|
@@ -19041,6 +19470,7 @@ const VehicleConfig = function (t, disabled) {
|
|
|
19041
19470
|
isMandatory: true,
|
|
19042
19471
|
type: "text",
|
|
19043
19472
|
disable: disabled,
|
|
19473
|
+
colSpan: "span 2",
|
|
19044
19474
|
populators: {
|
|
19045
19475
|
name: "registrationNumber",
|
|
19046
19476
|
ValidationRequired: true,
|
|
@@ -19058,7 +19488,8 @@ const VehicleConfig = function (t, disabled) {
|
|
|
19058
19488
|
withoutLabel: true,
|
|
19059
19489
|
key: "vehicle",
|
|
19060
19490
|
isMandatory: true,
|
|
19061
|
-
type: "component"
|
|
19491
|
+
type: "component",
|
|
19492
|
+
colSpan: "span 2"
|
|
19062
19493
|
}, {
|
|
19063
19494
|
label: "ES_FSM_REGISTRY_VEHICLE_POLLUTION_CERT",
|
|
19064
19495
|
isMandatory: false,
|
|
@@ -19069,7 +19500,7 @@ const VehicleConfig = function (t, disabled) {
|
|
|
19069
19500
|
validation: {
|
|
19070
19501
|
required: true
|
|
19071
19502
|
},
|
|
19072
|
-
component: (props, customProps) => /*#__PURE__*/React__default.createElement(DatePicker, _extends({
|
|
19503
|
+
component: (props, customProps) => /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, _extends({
|
|
19073
19504
|
onChange: props.onChange,
|
|
19074
19505
|
date: props.value
|
|
19075
19506
|
}, customProps))
|
|
@@ -19084,7 +19515,7 @@ const VehicleConfig = function (t, disabled) {
|
|
|
19084
19515
|
validation: {
|
|
19085
19516
|
required: true
|
|
19086
19517
|
},
|
|
19087
|
-
component: (props, customProps) => /*#__PURE__*/React__default.createElement(DatePicker, _extends({
|
|
19518
|
+
component: (props, customProps) => /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, _extends({
|
|
19088
19519
|
onChange: props.onChange,
|
|
19089
19520
|
date: props.value
|
|
19090
19521
|
}, customProps))
|
|
@@ -19099,7 +19530,7 @@ const VehicleConfig = function (t, disabled) {
|
|
|
19099
19530
|
validation: {
|
|
19100
19531
|
required: true
|
|
19101
19532
|
},
|
|
19102
|
-
component: (props, customProps) => /*#__PURE__*/React__default.createElement(DatePicker, _extends({
|
|
19533
|
+
component: (props, customProps) => /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, _extends({
|
|
19103
19534
|
onChange: props.onChange,
|
|
19104
19535
|
date: props.value
|
|
19105
19536
|
}, customProps))
|
|
@@ -19114,12 +19545,15 @@ const VehicleConfig = function (t, disabled) {
|
|
|
19114
19545
|
validation: {
|
|
19115
19546
|
required: true
|
|
19116
19547
|
},
|
|
19117
|
-
component: (props, customProps) => /*#__PURE__*/React__default.createElement(DatePicker, _extends({
|
|
19548
|
+
component: (props, customProps) => /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, _extends({
|
|
19118
19549
|
onChange: props.onChange,
|
|
19119
19550
|
date: props.value
|
|
19120
19551
|
}, customProps))
|
|
19121
19552
|
}
|
|
19122
|
-
}
|
|
19553
|
+
}]
|
|
19554
|
+
}, {
|
|
19555
|
+
head: "ES_FSM_REGISTRY_PERSONAL_DETAILS",
|
|
19556
|
+
body: [{
|
|
19123
19557
|
label: "ES_FSM_REGISTRY_NEW_VEHICLE_OWNER_NAME",
|
|
19124
19558
|
isMandatory: true,
|
|
19125
19559
|
type: "text",
|
|
@@ -19148,11 +19582,7 @@ const VehicleConfig = function (t, disabled) {
|
|
|
19148
19582
|
},
|
|
19149
19583
|
error: t("FSM_REGISTRY_INVALID_PHONE"),
|
|
19150
19584
|
defaultValue: "",
|
|
19151
|
-
className: "payment-form-text-input-correction"
|
|
19152
|
-
labelStyle: {
|
|
19153
|
-
border: "1px solid black",
|
|
19154
|
-
borderRight: "none"
|
|
19155
|
-
}
|
|
19585
|
+
className: "payment-form-text-input-correction"
|
|
19156
19586
|
}
|
|
19157
19587
|
}, {
|
|
19158
19588
|
label: "ES_FSM_REGISTRY_NEW_GENDER",
|
|
@@ -19161,23 +19591,37 @@ const VehicleConfig = function (t, disabled) {
|
|
|
19161
19591
|
route: "select-gender",
|
|
19162
19592
|
hideInEmployee: false,
|
|
19163
19593
|
key: "selectGender",
|
|
19164
|
-
component:
|
|
19594
|
+
component: SelectGender,
|
|
19595
|
+
withoutLabel: true,
|
|
19596
|
+
colSpan: "span 1"
|
|
19165
19597
|
}, {
|
|
19166
|
-
label:
|
|
19598
|
+
label: "ES_FSM_REGISTRY_NEW_DOB",
|
|
19167
19599
|
isMandatory: false,
|
|
19168
19600
|
type: "custom",
|
|
19169
19601
|
key: "dob",
|
|
19170
19602
|
populators: {
|
|
19171
19603
|
name: "dob",
|
|
19172
19604
|
validation: {
|
|
19173
|
-
required:
|
|
19605
|
+
required: false
|
|
19174
19606
|
},
|
|
19175
|
-
component: (props, customProps) =>
|
|
19176
|
-
|
|
19177
|
-
|
|
19178
|
-
|
|
19179
|
-
|
|
19180
|
-
|
|
19607
|
+
component: (props, customProps) => {
|
|
19608
|
+
var _window, _window$Digit, _window$Digit$Compone;
|
|
19609
|
+
const Picker = digitUiReactComponents.DatePicker || ((_window = window) === null || _window === void 0 ? void 0 : (_window$Digit = _window.Digit) === null || _window$Digit === void 0 ? void 0 : (_window$Digit$Compone = _window$Digit.ComponentRegistryService) === null || _window$Digit$Compone === void 0 ? void 0 : _window$Digit$Compone.getComponent("DatePicker"));
|
|
19610
|
+
if (!Picker) {
|
|
19611
|
+
return /*#__PURE__*/React__default.createElement("input", {
|
|
19612
|
+
type: "date",
|
|
19613
|
+
className: "payment-form-text-input-correction employee-card-input",
|
|
19614
|
+
value: props.value || "",
|
|
19615
|
+
onChange: e => props.onChange(e.target.value)
|
|
19616
|
+
});
|
|
19617
|
+
}
|
|
19618
|
+
return /*#__PURE__*/React__default.createElement(Picker, _extends({
|
|
19619
|
+
onChange: props.onChange,
|
|
19620
|
+
date: props.value
|
|
19621
|
+
}, customProps, {
|
|
19622
|
+
max: convertEpochToDate(new Date().setFullYear(new Date().getFullYear()))
|
|
19623
|
+
}));
|
|
19624
|
+
}
|
|
19181
19625
|
}
|
|
19182
19626
|
}, {
|
|
19183
19627
|
label: "ES_FSM_REGISTRY_NEW_EMAIL",
|
|
@@ -19199,6 +19643,7 @@ const VehicleConfig = function (t, disabled) {
|
|
|
19199
19643
|
isMandatory: false,
|
|
19200
19644
|
type: "textarea",
|
|
19201
19645
|
key: "additionalDetails",
|
|
19646
|
+
colSpan: "span 2",
|
|
19202
19647
|
populators: {
|
|
19203
19648
|
name: "additionalDetails",
|
|
19204
19649
|
className: "payment-form-text-input-correction"
|
|
@@ -19304,9 +19749,9 @@ const AddVehicle = _ref => {
|
|
|
19304
19749
|
name: ownerName,
|
|
19305
19750
|
fatherOrHusbandName: ownerName,
|
|
19306
19751
|
relationship: "OTHER",
|
|
19307
|
-
gender: "OTHERS",
|
|
19752
|
+
gender: gender || "OTHERS",
|
|
19308
19753
|
dob: dob,
|
|
19309
|
-
emailId: "abc@egov.com",
|
|
19754
|
+
emailId: emailId || "abc@egov.com",
|
|
19310
19755
|
correspondenceAddress: "",
|
|
19311
19756
|
mobileNumber: phone,
|
|
19312
19757
|
gender: gender,
|
|
@@ -19340,12 +19785,8 @@ const AddVehicle = _ref => {
|
|
|
19340
19785
|
}
|
|
19341
19786
|
});
|
|
19342
19787
|
};
|
|
19343
|
-
|
|
19344
|
-
|
|
19345
|
-
style: !isMobile ? {
|
|
19346
|
-
marginLeft: "-15px"
|
|
19347
|
-
} : {}
|
|
19348
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FormComposer, {
|
|
19788
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FormComposer, {
|
|
19789
|
+
heading: t("ES_FSM_REGISTRY_TITLE_NEW_VEHICLE"),
|
|
19349
19790
|
isDisabled: !canSubmit,
|
|
19350
19791
|
label: t("ES_COMMON_APPLICATION_SUBMIT"),
|
|
19351
19792
|
config: Config.filter(i => !i.hideInEmployee).map(config => {
|
|
@@ -19360,12 +19801,13 @@ const AddVehicle = _ref => {
|
|
|
19360
19801
|
onSubmit: onSubmit,
|
|
19361
19802
|
defaultValues: defaultValues,
|
|
19362
19803
|
onFormValueChange: onFormValueChange,
|
|
19363
|
-
noBreakLine: true
|
|
19804
|
+
noBreakLine: true,
|
|
19805
|
+
formClassName: "vehicle-details-card"
|
|
19364
19806
|
}), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
19365
19807
|
error: showToast.key === "error" ? true : false,
|
|
19366
19808
|
label: t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_SUCCESS` : showToast.action),
|
|
19367
19809
|
onClose: closeToast
|
|
19368
|
-
}))
|
|
19810
|
+
}));
|
|
19369
19811
|
};
|
|
19370
19812
|
|
|
19371
19813
|
const EditVehicle = _ref => {
|
|
@@ -19993,9 +20435,6 @@ const DriverDetails = props => {
|
|
|
19993
20435
|
}))) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
19994
20436
|
};
|
|
19995
20437
|
|
|
19996
|
-
const {
|
|
19997
|
-
DatePicker: DatePicker$1
|
|
19998
|
-
} = require("@djb25/digit-ui-react-components");
|
|
19999
20438
|
const DriverConfig = function (t, disabled) {
|
|
20000
20439
|
if (disabled === void 0) {
|
|
20001
20440
|
disabled = false;
|
|
@@ -20029,7 +20468,6 @@ const DriverConfig = function (t, disabled) {
|
|
|
20029
20468
|
pattern: /^[a-zA-Z-]{0,}[- ]{0,1}[ 0-9]{1,}/
|
|
20030
20469
|
},
|
|
20031
20470
|
error: t("FSM_REGISTRY_INVALID_DRIVER_LICENSE"),
|
|
20032
|
-
required: false,
|
|
20033
20471
|
defaultValue: "",
|
|
20034
20472
|
className: "payment-form-text-input-correction"
|
|
20035
20473
|
}
|
|
@@ -20037,13 +20475,35 @@ const DriverConfig = function (t, disabled) {
|
|
|
20037
20475
|
}, {
|
|
20038
20476
|
head: "ES_FSM_REGISTRY_PERSONAL_DETAILS",
|
|
20039
20477
|
body: [{
|
|
20478
|
+
label: "ES_FSM_REGISTRY_DRIVER_MOBILE",
|
|
20479
|
+
isMandatory: true,
|
|
20480
|
+
type: "mobileNumber",
|
|
20481
|
+
key: "mobileNumber",
|
|
20482
|
+
disable: disabled,
|
|
20483
|
+
populators: {
|
|
20484
|
+
name: "mobileNumber",
|
|
20485
|
+
validation: {
|
|
20486
|
+
required: true,
|
|
20487
|
+
pattern: /^[6-9]\d{9}$/
|
|
20488
|
+
},
|
|
20489
|
+
labelStyle: {
|
|
20490
|
+
border: "1px solid black",
|
|
20491
|
+
borderRight: "none"
|
|
20492
|
+
},
|
|
20493
|
+
error: t("ES_FSM_REGISTRY_INVALID_MOBILE_NO"),
|
|
20494
|
+
defaultValue: "",
|
|
20495
|
+
className: "payment-form-text-input-correction"
|
|
20496
|
+
}
|
|
20497
|
+
}, {
|
|
20040
20498
|
label: "ES_FSM_REGISTRY_NEW_GENDER",
|
|
20041
20499
|
isMandatory: true,
|
|
20042
20500
|
type: "component",
|
|
20043
20501
|
route: "select-gender",
|
|
20044
20502
|
hideInEmployee: false,
|
|
20045
20503
|
key: "selectGender",
|
|
20046
|
-
component:
|
|
20504
|
+
component: SelectGender,
|
|
20505
|
+
withoutLabel: true,
|
|
20506
|
+
colSpan: "span 1",
|
|
20047
20507
|
texts: {
|
|
20048
20508
|
headerCaption: "",
|
|
20049
20509
|
header: "CS_COMMON_CHOOSE_GENDER",
|
|
@@ -20052,27 +20512,41 @@ const DriverConfig = function (t, disabled) {
|
|
|
20052
20512
|
skipText: "CORE_COMMON_SKIP_CONTINUE"
|
|
20053
20513
|
}
|
|
20054
20514
|
}, {
|
|
20055
|
-
label:
|
|
20515
|
+
label: "ES_FSM_REGISTRY_NEW_DOB",
|
|
20056
20516
|
isMandatory: false,
|
|
20057
20517
|
type: "custom",
|
|
20058
20518
|
key: "dob",
|
|
20059
20519
|
populators: {
|
|
20060
20520
|
name: "dob",
|
|
20061
20521
|
validation: {
|
|
20062
|
-
required:
|
|
20522
|
+
required: false
|
|
20063
20523
|
},
|
|
20064
|
-
component: (props, customProps) =>
|
|
20065
|
-
|
|
20066
|
-
|
|
20067
|
-
|
|
20068
|
-
|
|
20069
|
-
|
|
20524
|
+
component: (props, customProps) => {
|
|
20525
|
+
var _window, _window$Digit, _window$Digit$Compone;
|
|
20526
|
+
const Picker = digitUiReactComponents.DatePicker || ((_window = window) === null || _window === void 0 ? void 0 : (_window$Digit = _window.Digit) === null || _window$Digit === void 0 ? void 0 : (_window$Digit$Compone = _window$Digit.ComponentRegistryService) === null || _window$Digit$Compone === void 0 ? void 0 : _window$Digit$Compone.getComponent("DatePicker"));
|
|
20527
|
+
if (!Picker) {
|
|
20528
|
+
return /*#__PURE__*/React__default.createElement("input", {
|
|
20529
|
+
type: "date",
|
|
20530
|
+
className: "payment-form-text-input-correction employee-card-input",
|
|
20531
|
+
value: props.value || "",
|
|
20532
|
+
onChange: e => props.onChange(e.target.value)
|
|
20533
|
+
});
|
|
20534
|
+
}
|
|
20535
|
+
return /*#__PURE__*/React__default.createElement(Picker, _extends({
|
|
20536
|
+
onChange: props.onChange,
|
|
20537
|
+
date: props.value,
|
|
20538
|
+
isDOB: true
|
|
20539
|
+
}, customProps, {
|
|
20540
|
+
max: convertEpochToDate(new Date().setFullYear(new Date().getFullYear()))
|
|
20541
|
+
}));
|
|
20542
|
+
}
|
|
20070
20543
|
}
|
|
20071
20544
|
}, {
|
|
20072
20545
|
label: "ES_FSM_REGISTRY_NEW_EMAIL",
|
|
20073
20546
|
isMandatory: false,
|
|
20074
20547
|
type: "text",
|
|
20075
20548
|
key: "emailId",
|
|
20549
|
+
colSpan: "span 2",
|
|
20076
20550
|
populators: {
|
|
20077
20551
|
name: "emailId",
|
|
20078
20552
|
validation: {
|
|
@@ -20083,6 +20557,16 @@ const DriverConfig = function (t, disabled) {
|
|
|
20083
20557
|
defaultValue: "",
|
|
20084
20558
|
className: "payment-form-text-input-correction"
|
|
20085
20559
|
}
|
|
20560
|
+
}, {
|
|
20561
|
+
label: "ES_FSM_REGISTRY_NEW_VENDOR_ADDITIONAL_DETAILS",
|
|
20562
|
+
isMandatory: false,
|
|
20563
|
+
type: "textarea",
|
|
20564
|
+
key: "additionalDetails",
|
|
20565
|
+
colSpan: "span 2",
|
|
20566
|
+
populators: {
|
|
20567
|
+
name: "additionalDetails",
|
|
20568
|
+
className: "payment-form-text-input-correction"
|
|
20569
|
+
}
|
|
20086
20570
|
}]
|
|
20087
20571
|
}];
|
|
20088
20572
|
};
|
|
@@ -20121,7 +20605,8 @@ const AddDriver = _ref => {
|
|
|
20121
20605
|
}
|
|
20122
20606
|
};
|
|
20123
20607
|
const onFormValueChange = (setValue, formData) => {
|
|
20124
|
-
|
|
20608
|
+
var _formData$selectGende;
|
|
20609
|
+
if (formData !== null && formData !== void 0 && formData.driverName && formData !== null && formData !== void 0 && formData.license && (formData !== null && formData !== void 0 && formData.mobileNumber || formData !== null && formData !== void 0 && formData.phone) && (formData !== null && formData !== void 0 && (_formData$selectGende = formData.selectGender) !== null && _formData$selectGende !== void 0 && _formData$selectGende.code || formData !== null && formData !== void 0 && formData.selectGender)) {
|
|
20125
20610
|
setSubmitValve(true);
|
|
20126
20611
|
} else {
|
|
20127
20612
|
setSubmitValve(false);
|
|
@@ -20134,15 +20619,17 @@ const AddDriver = _ref => {
|
|
|
20134
20619
|
var _data$selectGender;
|
|
20135
20620
|
const name = data === null || data === void 0 ? void 0 : data.driverName;
|
|
20136
20621
|
const license = data === null || data === void 0 ? void 0 : data.license;
|
|
20137
|
-
const gender = data === null || data === void 0 ? void 0 : (_data$selectGender = data.selectGender) === null || _data$selectGender === void 0 ? void 0 : _data$selectGender.code;
|
|
20622
|
+
const gender = (data === null || data === void 0 ? void 0 : (_data$selectGender = data.selectGender) === null || _data$selectGender === void 0 ? void 0 : _data$selectGender.code) || (data === null || data === void 0 ? void 0 : data.selectGender);
|
|
20138
20623
|
const emailId = data === null || data === void 0 ? void 0 : data.emailId;
|
|
20139
|
-
const
|
|
20624
|
+
const mobileNumber = (data === null || data === void 0 ? void 0 : data.mobileNumber) || (data === null || data === void 0 ? void 0 : data.phone);
|
|
20625
|
+
const dob = data !== null && data !== void 0 && data.dob ? new Date(`${data.dob}`).getTime() : new Date(`1/1/1970`).getTime();
|
|
20140
20626
|
const additionalDetails = data === null || data === void 0 ? void 0 : data.additionalDetails;
|
|
20141
20627
|
const formData = {
|
|
20142
20628
|
driver: {
|
|
20143
20629
|
tenantId: tenantId,
|
|
20144
20630
|
name: name,
|
|
20145
20631
|
licenseNumber: license,
|
|
20632
|
+
mobileNumber: mobileNumber,
|
|
20146
20633
|
additionalDetails: additionalDetails,
|
|
20147
20634
|
status: "ACTIVE",
|
|
20148
20635
|
owner: {
|
|
@@ -20150,9 +20637,10 @@ const AddDriver = _ref => {
|
|
|
20150
20637
|
name: name,
|
|
20151
20638
|
fatherOrHusbandName: name,
|
|
20152
20639
|
relationship: "OTHER",
|
|
20153
|
-
gender: gender,
|
|
20640
|
+
gender: gender || "OTHER",
|
|
20154
20641
|
dob: dob,
|
|
20155
|
-
emailId: emailId || "abc@egov.com"
|
|
20642
|
+
emailId: emailId || "abc@egov.com",
|
|
20643
|
+
mobileNumber: mobileNumber
|
|
20156
20644
|
},
|
|
20157
20645
|
vendorDriverStatus: "INACTIVE"
|
|
20158
20646
|
}
|
|
@@ -20179,12 +20667,8 @@ const AddDriver = _ref => {
|
|
|
20179
20667
|
}
|
|
20180
20668
|
});
|
|
20181
20669
|
};
|
|
20182
|
-
|
|
20183
|
-
|
|
20184
|
-
style: !isMobile ? {
|
|
20185
|
-
marginLeft: "-15px"
|
|
20186
|
-
} : {}
|
|
20187
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FormComposer, {
|
|
20670
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FormComposer, {
|
|
20671
|
+
heading: t("ES_FSM_REGISTRY_TITLE_NEW_DRIVER"),
|
|
20188
20672
|
isDisabled: !canSubmit,
|
|
20189
20673
|
label: t("ES_COMMON_APPLICATION_SUBMIT"),
|
|
20190
20674
|
config: Config.filter(i => !i.hideInEmployee).map(config => {
|
|
@@ -20199,12 +20683,13 @@ const AddDriver = _ref => {
|
|
|
20199
20683
|
onSubmit: onSubmit,
|
|
20200
20684
|
defaultValues: defaultValues,
|
|
20201
20685
|
onFormValueChange: onFormValueChange,
|
|
20202
|
-
noBreakLine: true
|
|
20686
|
+
noBreakLine: true,
|
|
20687
|
+
formClassName: "vehicle-details-card"
|
|
20203
20688
|
}), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
20204
20689
|
error: showToast.key === "error" ? true : false,
|
|
20205
20690
|
label: t(showToast.key === "success" ? `ES_FSM_${showToast.action}_SUCCESS` : showToast.action),
|
|
20206
20691
|
onClose: closeToast
|
|
20207
|
-
}))
|
|
20692
|
+
}));
|
|
20208
20693
|
};
|
|
20209
20694
|
|
|
20210
20695
|
const EditDriver = _ref => {
|
|
@@ -20245,7 +20730,7 @@ const EditDriver = _ref => {
|
|
|
20245
20730
|
}, []);
|
|
20246
20731
|
React.useEffect(() => {
|
|
20247
20732
|
if (driverData && driverData[0]) {
|
|
20248
|
-
var _driverDetails$driver, _driverDetails$driver2, _driverDetails$driver3, _driverDetails$driver4, _driverDetails$driver5, _driverDetails$driver6, _driverDetails$driver7, _driverDetails$driver8, _driverDetails$driver9, _driverDetails$driver0, _driverDetails$driver1, _driverDetails$driver10, _driverDetails$driver11, _driverDetails$driver12;
|
|
20733
|
+
var _driverDetails$driver, _driverDetails$driver2, _driverDetails$driver3, _driverDetails$driver4, _driverDetails$driver5, _driverDetails$driver6, _driverDetails$driver7, _driverDetails$driver8, _driverDetails$driver9, _driverDetails$driver0, _driverDetails$driver1, _driverDetails$driver10, _driverDetails$driver11, _driverDetails$driver12, _driverDetails$driver13, _driverDetails$driver14, _driverDetails$driver15;
|
|
20249
20734
|
let driverDetails = driverData[0];
|
|
20250
20735
|
setDriverDetails(driverDetails === null || driverDetails === void 0 ? void 0 : driverDetails.driverData);
|
|
20251
20736
|
let values = {
|
|
@@ -20254,7 +20739,8 @@ const EditDriver = _ref => {
|
|
|
20254
20739
|
selectGender: driverDetails === null || driverDetails === void 0 ? void 0 : (_driverDetails$driver3 = driverDetails.driverData) === null || _driverDetails$driver3 === void 0 ? void 0 : (_driverDetails$driver4 = _driverDetails$driver3.owner) === null || _driverDetails$driver4 === void 0 ? void 0 : _driverDetails$driver4.gender,
|
|
20255
20740
|
dob: (driverDetails === null || driverDetails === void 0 ? void 0 : (_driverDetails$driver5 = driverDetails.driverData) === null || _driverDetails$driver5 === void 0 ? void 0 : (_driverDetails$driver6 = _driverDetails$driver5.owner) === null || _driverDetails$driver6 === void 0 ? void 0 : _driverDetails$driver6.dob) && Digit.DateUtils.ConvertTimestampToDate(driverDetails === null || driverDetails === void 0 ? void 0 : (_driverDetails$driver7 = driverDetails.driverData) === null || _driverDetails$driver7 === void 0 ? void 0 : (_driverDetails$driver8 = _driverDetails$driver7.owner) === null || _driverDetails$driver8 === void 0 ? void 0 : _driverDetails$driver8.dob, "yyyy-MM-dd"),
|
|
20256
20741
|
emailId: (driverDetails === null || driverDetails === void 0 ? void 0 : (_driverDetails$driver9 = driverDetails.driverData) === null || _driverDetails$driver9 === void 0 ? void 0 : (_driverDetails$driver0 = _driverDetails$driver9.owner) === null || _driverDetails$driver0 === void 0 ? void 0 : _driverDetails$driver0.emailId) === "abc@egov.com" ? "" : driverDetails === null || driverDetails === void 0 ? void 0 : (_driverDetails$driver1 = driverDetails.driverData) === null || _driverDetails$driver1 === void 0 ? void 0 : (_driverDetails$driver10 = _driverDetails$driver1.owner) === null || _driverDetails$driver10 === void 0 ? void 0 : _driverDetails$driver10.emailId,
|
|
20257
|
-
|
|
20742
|
+
mobileNumber: (driverDetails === null || driverDetails === void 0 ? void 0 : (_driverDetails$driver11 = driverDetails.driverData) === null || _driverDetails$driver11 === void 0 ? void 0 : (_driverDetails$driver12 = _driverDetails$driver11.owner) === null || _driverDetails$driver12 === void 0 ? void 0 : _driverDetails$driver12.mobileNumber) || (driverDetails === null || driverDetails === void 0 ? void 0 : (_driverDetails$driver13 = driverDetails.driverData) === null || _driverDetails$driver13 === void 0 ? void 0 : _driverDetails$driver13.mobileNumber),
|
|
20743
|
+
additionalDetails: driverDetails === null || driverDetails === void 0 ? void 0 : (_driverDetails$driver14 = driverDetails.driverData) === null || _driverDetails$driver14 === void 0 ? void 0 : (_driverDetails$driver15 = _driverDetails$driver14.additionalDetails) === null || _driverDetails$driver15 === void 0 ? void 0 : _driverDetails$driver15.description
|
|
20258
20744
|
};
|
|
20259
20745
|
setDefaultValues(values);
|
|
20260
20746
|
}
|
|
@@ -20275,23 +20761,26 @@ const EditDriver = _ref => {
|
|
|
20275
20761
|
setShowToast(null);
|
|
20276
20762
|
};
|
|
20277
20763
|
const onSubmit = data => {
|
|
20278
|
-
var _data$selectGender, _driverDetails$owner;
|
|
20764
|
+
var _data$selectGender, _driverDetails$owner, _driverDetails$owner2;
|
|
20279
20765
|
const license = data === null || data === void 0 ? void 0 : data.license;
|
|
20280
20766
|
const gender = data === null || data === void 0 ? void 0 : (_data$selectGender = data.selectGender) === null || _data$selectGender === void 0 ? void 0 : _data$selectGender.code;
|
|
20281
20767
|
const emailId = data === null || data === void 0 ? void 0 : data.emailId;
|
|
20282
20768
|
const dob = new Date(`${data.dob}`).getTime();
|
|
20283
20769
|
const additionalDetails = data === null || data === void 0 ? void 0 : data.additionalDetails;
|
|
20770
|
+
const mobileNumber = (data === null || data === void 0 ? void 0 : data.mobileNumber) || (driverDetails === null || driverDetails === void 0 ? void 0 : (_driverDetails$owner = driverDetails.owner) === null || _driverDetails$owner === void 0 ? void 0 : _driverDetails$owner.mobileNumber) || (driverDetails === null || driverDetails === void 0 ? void 0 : driverDetails.mobileNumber);
|
|
20284
20771
|
const formData = {
|
|
20285
20772
|
driver: {
|
|
20286
20773
|
...driverDetails,
|
|
20287
20774
|
licenseNumber: license,
|
|
20775
|
+
mobileNumber: mobileNumber,
|
|
20288
20776
|
additionalDetails: additionalDetails,
|
|
20289
20777
|
owner: {
|
|
20290
20778
|
...driverDetails.owner,
|
|
20291
|
-
relationship: ((_driverDetails$
|
|
20779
|
+
relationship: ((_driverDetails$owner2 = driverDetails.owner) === null || _driverDetails$owner2 === void 0 ? void 0 : _driverDetails$owner2.relationship) || "OTHER",
|
|
20292
20780
|
gender: gender || driverDetails.owner.gender || "OTHER",
|
|
20293
20781
|
dob: dob,
|
|
20294
|
-
emailId: emailId || "abc@egov.com"
|
|
20782
|
+
emailId: emailId || "abc@egov.com",
|
|
20783
|
+
mobileNumber: mobileNumber
|
|
20295
20784
|
}
|
|
20296
20785
|
}
|
|
20297
20786
|
};
|
|
@@ -20346,7 +20835,7 @@ const EditDriver = _ref => {
|
|
|
20346
20835
|
};
|
|
20347
20836
|
|
|
20348
20837
|
const AdvanceCollection = _ref => {
|
|
20349
|
-
var _formData$tripData, _formData$
|
|
20838
|
+
var _formData$tripData, _formData$address3, _formData$address4, _formData$address4$ci, _formData$tripData7, _formData$tripData7$v, _formData$tripData8, _formData$tripData9, _formData$address5, _formData$address5$pr, _formData$tripData0;
|
|
20350
20839
|
let {
|
|
20351
20840
|
t,
|
|
20352
20841
|
config,
|
|
@@ -20355,7 +20844,7 @@ const AdvanceCollection = _ref => {
|
|
|
20355
20844
|
userType,
|
|
20356
20845
|
FSMTextFieldStyle
|
|
20357
20846
|
} = _ref;
|
|
20358
|
-
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
20847
|
+
const tenantId = normalizeTenantId(Digit.ULBService.getCurrentTenantId());
|
|
20359
20848
|
const state = Digit.ULBService.getStateId();
|
|
20360
20849
|
const {
|
|
20361
20850
|
pathname: url
|
|
@@ -20424,98 +20913,86 @@ const AdvanceCollection = _ref => {
|
|
|
20424
20913
|
React.useEffect(() => {
|
|
20425
20914
|
(function () {
|
|
20426
20915
|
try {
|
|
20427
|
-
var _formData$tripData2;
|
|
20428
|
-
|
|
20429
|
-
|
|
20430
|
-
|
|
20431
|
-
|
|
20432
|
-
|
|
20433
|
-
|
|
20434
|
-
|
|
20435
|
-
|
|
20436
|
-
|
|
20437
|
-
|
|
20438
|
-
|
|
20439
|
-
|
|
20440
|
-
|
|
20441
|
-
|
|
20442
|
-
|
|
20443
|
-
|
|
20444
|
-
|
|
20445
|
-
slum
|
|
20446
|
-
})).then(function (billingDetails) {
|
|
20447
|
-
var _billingDetails$billi;
|
|
20448
|
-
const billSlab = (billingDetails === null || billingDetails === void 0 ? void 0 : (_billingDetails$billi = billingDetails.billingSlab) === null || _billingDetails$billi === void 0 ? void 0 : _billingDetails$billi.length) && (billingDetails === null || billingDetails === void 0 ? void 0 : billingDetails.billingSlab[0]);
|
|
20449
|
-
const _temp = function () {
|
|
20450
|
-
if (billSlab !== null && billSlab !== void 0 && billSlab.price || (billSlab === null || billSlab === void 0 ? void 0 : billSlab.price) === 0) {
|
|
20451
|
-
const totaltripAmount = billSlab.price * formData.tripData.noOfTrips;
|
|
20452
|
-
return Promise.resolve(Digit.FSMService.advanceBalanceCalculate(tenantId, {
|
|
20453
|
-
totalTripAmount: totaltripAmount
|
|
20454
|
-
})).then(function (_ref2) {
|
|
20455
|
-
var _formData$advancepaym;
|
|
20456
|
-
let {
|
|
20457
|
-
advanceAmount: advanceBalanceAmount
|
|
20458
|
-
} = _ref2;
|
|
20459
|
-
Digit.SessionStorage.set("total_amount", totaltripAmount);
|
|
20460
|
-
Digit.SessionStorage.set("advance_amount", advanceBalanceAmount);
|
|
20461
|
-
setTotalAmount(totaltripAmount);
|
|
20462
|
-
setAdvanceAmounts(advanceBalanceAmount);
|
|
20463
|
-
if (!url.includes("modify") || url.includes("modify") && advanceBalanceAmount > (formData === null || formData === void 0 ? void 0 : (_formData$advancepaym = formData.advancepaymentPreference) === null || _formData$advancepaym === void 0 ? void 0 : _formData$advancepaym.advanceAmount)) {
|
|
20916
|
+
var _formData$tripData2, _formData$tripData4, _formData$address, _formData$address$cit, _formData$tripData5;
|
|
20917
|
+
function _temp4() {
|
|
20918
|
+
const _temp2 = function () {
|
|
20919
|
+
if (rate !== undefined && rate !== null && rate !== "") {
|
|
20920
|
+
const totaltripAmount = Number(rate) * trips;
|
|
20921
|
+
const _temp = _catch(function () {
|
|
20922
|
+
return Promise.resolve(Digit.FSMService.advanceBalanceCalculate(targetTenant, {
|
|
20923
|
+
totalTripAmount: totaltripAmount
|
|
20924
|
+
})).then(function (res) {
|
|
20925
|
+
var _formData$advancepaym;
|
|
20926
|
+
const advanceBalanceAmount = (res === null || res === void 0 ? void 0 : res.advanceAmount) !== undefined ? res.advanceAmount : 0;
|
|
20927
|
+
Digit.SessionStorage.set("total_amount", totaltripAmount);
|
|
20928
|
+
Digit.SessionStorage.set("advance_amount", advanceBalanceAmount);
|
|
20929
|
+
setTotalAmount(totaltripAmount);
|
|
20930
|
+
setAdvanceAmounts(advanceBalanceAmount);
|
|
20931
|
+
if (!url.includes("modify") || url.includes("modify") && advanceBalanceAmount > (formData === null || formData === void 0 ? void 0 : (_formData$advancepaym = formData.advancepaymentPreference) === null || _formData$advancepaym === void 0 ? void 0 : _formData$advancepaym.advanceAmount)) {
|
|
20932
|
+
var _formData$advancepaym2;
|
|
20933
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$advancepaym2 = formData.advancepaymentPreference) === null || _formData$advancepaym2 === void 0 ? void 0 : _formData$advancepaym2.advanceAmount) !== advanceBalanceAmount) {
|
|
20464
20934
|
setValue({
|
|
20465
20935
|
advanceAmount: advanceBalanceAmount
|
|
20466
20936
|
});
|
|
20467
20937
|
}
|
|
20468
|
-
|
|
20938
|
+
}
|
|
20939
|
+
setError(false);
|
|
20940
|
+
});
|
|
20941
|
+
}, function (calcErr) {
|
|
20942
|
+
var _formData$advancepaym3;
|
|
20943
|
+
console.warn("advanceBalanceCalculate failed, using fallback:", calcErr);
|
|
20944
|
+
Digit.SessionStorage.set("total_amount", totaltripAmount);
|
|
20945
|
+
Digit.SessionStorage.set("advance_amount", 0);
|
|
20946
|
+
setTotalAmount(totaltripAmount);
|
|
20947
|
+
setAdvanceAmounts(0);
|
|
20948
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$advancepaym3 = formData.advancepaymentPreference) === null || _formData$advancepaym3 === void 0 ? void 0 : _formData$advancepaym3.advanceAmount) !== 0) {
|
|
20949
|
+
setValue({
|
|
20950
|
+
advanceAmount: advanceBalanceAmount
|
|
20469
20951
|
});
|
|
20470
|
-
} else {
|
|
20471
|
-
sessionStorage.removeItem("Digit.total_amount");
|
|
20472
|
-
sessionStorage.removeItem("Digit.advance_amount");
|
|
20473
|
-
setError(true);
|
|
20474
20952
|
}
|
|
20475
|
-
|
|
20953
|
+
setError(false);
|
|
20954
|
+
});
|
|
20476
20955
|
if (_temp && _temp.then) return _temp.then(function () {});
|
|
20477
|
-
}
|
|
20478
|
-
|
|
20479
|
-
|
|
20480
|
-
|
|
20481
|
-
|
|
20482
|
-
|
|
20483
|
-
|
|
20484
|
-
|
|
20485
|
-
|
|
20486
|
-
|
|
20487
|
-
|
|
20488
|
-
|
|
20489
|
-
|
|
20490
|
-
|
|
20491
|
-
|
|
20492
|
-
|
|
20493
|
-
|
|
20494
|
-
|
|
20495
|
-
|
|
20496
|
-
|
|
20497
|
-
|
|
20498
|
-
|
|
20499
|
-
Digit.SessionStorage.set("total_amount", totaltripAmount);
|
|
20500
|
-
Digit.SessionStorage.set("advance_amount", advanceBalanceAmount);
|
|
20501
|
-
setTotalAmount(totaltripAmount);
|
|
20502
|
-
setAdvanceAmounts(advanceBalanceAmount);
|
|
20503
|
-
if (!url.includes("modify") || url.includes("modify") && advanceBalanceAmount > (formData === null || formData === void 0 ? void 0 : (_formData$advancepaym2 = formData.advancepaymentPreference) === null || _formData$advancepaym2 === void 0 ? void 0 : _formData$advancepaym2.advanceAmount)) {
|
|
20504
|
-
setValue({
|
|
20505
|
-
advanceAmount: advanceBalanceAmount
|
|
20506
|
-
});
|
|
20956
|
+
} else {
|
|
20957
|
+
sessionStorage.removeItem("Digit.total_amount");
|
|
20958
|
+
sessionStorage.removeItem("Digit.advance_amount");
|
|
20959
|
+
setError(true);
|
|
20960
|
+
}
|
|
20961
|
+
}();
|
|
20962
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
20963
|
+
}
|
|
20964
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$tripData2 = formData.tripData) === null || _formData$tripData2 === void 0 ? void 0 : _formData$tripData2.vehicleType) !== vehicle) {
|
|
20965
|
+
var _formData$tripData3, _formData$tripData3$v;
|
|
20966
|
+
setVehicle({
|
|
20967
|
+
label: formData === null || formData === void 0 ? void 0 : (_formData$tripData3 = formData.tripData) === null || _formData$tripData3 === void 0 ? void 0 : (_formData$tripData3$v = _formData$tripData3.vehicleType) === null || _formData$tripData3$v === void 0 ? void 0 : _formData$tripData3$v.capacity
|
|
20968
|
+
});
|
|
20969
|
+
}
|
|
20970
|
+
const trips = Number(formData === null || formData === void 0 ? void 0 : (_formData$tripData4 = formData.tripData) === null || _formData$tripData4 === void 0 ? void 0 : _formData$tripData4.noOfTrips) || 1;
|
|
20971
|
+
const targetTenant = normalizeTenantId((formData === null || formData === void 0 ? void 0 : (_formData$address = formData.address) === null || _formData$address === void 0 ? void 0 : (_formData$address$cit = _formData$address.city) === null || _formData$address$cit === void 0 ? void 0 : _formData$address$cit.code) || tenantId);
|
|
20972
|
+
let rate = formData === null || formData === void 0 ? void 0 : (_formData$tripData5 = formData.tripData) === null || _formData$tripData5 === void 0 ? void 0 : _formData$tripData5.amountPerTrip;
|
|
20973
|
+
const _temp3 = function (_formData$tripData6, _formData$tripData6$v, _formData$address2, _formData$address2$pr) {
|
|
20974
|
+
if ((rate === undefined || rate === null || rate === "") && formData !== null && formData !== void 0 && formData.propertyType && formData !== null && formData !== void 0 && formData.subtype && formData !== null && formData !== void 0 && formData.address && formData !== null && formData !== void 0 && (_formData$tripData6 = formData.tripData) !== null && _formData$tripData6 !== void 0 && (_formData$tripData6$v = _formData$tripData6.vehicleType) !== null && _formData$tripData6$v !== void 0 && _formData$tripData6$v.capacity && (formData === null || formData === void 0 ? void 0 : (_formData$address2 = formData.address) === null || _formData$address2 === void 0 ? void 0 : (_formData$address2$pr = _formData$address2.propertyLocation) === null || _formData$address2$pr === void 0 ? void 0 : _formData$address2$pr.code) === "WITHIN_ULB_LIMITS") {
|
|
20975
|
+
return Promise.resolve(fetchBillingSlabDetails(tenantId, formData)).then(function (billSlab) {
|
|
20976
|
+
if (billSlab && (billSlab !== null && billSlab !== void 0 && billSlab.price || (billSlab === null || billSlab === void 0 ? void 0 : billSlab.price) === 0)) {
|
|
20977
|
+
rate = billSlab.price;
|
|
20507
20978
|
}
|
|
20508
|
-
setError(false);
|
|
20509
20979
|
});
|
|
20510
20980
|
}
|
|
20511
20981
|
}();
|
|
20512
|
-
return _temp3 && _temp3.then ? _temp3.then(
|
|
20982
|
+
return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
|
|
20513
20983
|
} catch (e) {
|
|
20514
20984
|
Promise.reject(e);
|
|
20515
20985
|
}
|
|
20516
20986
|
})();
|
|
20517
|
-
}, [formData.tripData.noOfTrips, formData.tripData.amountPerTrip]);
|
|
20518
|
-
return isVehicleMenuLoading && isDsoLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div",
|
|
20987
|
+
}, [formData === null || formData === void 0 ? void 0 : formData.propertyType, formData === null || formData === void 0 ? void 0 : formData.subtype, formData === null || formData === void 0 ? void 0 : (_formData$address3 = formData.address) === null || _formData$address3 === void 0 ? void 0 : _formData$address3.slum, formData === null || formData === void 0 ? void 0 : (_formData$address4 = formData.address) === null || _formData$address4 === void 0 ? void 0 : (_formData$address4$ci = _formData$address4.city) === null || _formData$address4$ci === void 0 ? void 0 : _formData$address4$ci.code, formData === null || formData === void 0 ? void 0 : (_formData$tripData7 = formData.tripData) === null || _formData$tripData7 === void 0 ? void 0 : (_formData$tripData7$v = _formData$tripData7.vehicleType) === null || _formData$tripData7$v === void 0 ? void 0 : _formData$tripData7$v.capacity, formData === null || formData === void 0 ? void 0 : (_formData$tripData8 = formData.tripData) === null || _formData$tripData8 === void 0 ? void 0 : _formData$tripData8.noOfTrips, formData === null || formData === void 0 ? void 0 : (_formData$tripData9 = formData.tripData) === null || _formData$tripData9 === void 0 ? void 0 : _formData$tripData9.amountPerTrip, formData === null || formData === void 0 ? void 0 : (_formData$address5 = formData.address) === null || _formData$address5 === void 0 ? void 0 : (_formData$address5$pr = _formData$address5.propertyLocation) === null || _formData$address5$pr === void 0 ? void 0 : _formData$address5$pr.code]);
|
|
20988
|
+
return isVehicleMenuLoading && isDsoLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div", {
|
|
20989
|
+
style: {
|
|
20990
|
+
display: "grid",
|
|
20991
|
+
gridTemplateColumns: "1fr 1fr",
|
|
20992
|
+
gap: "16px 24px",
|
|
20993
|
+
width: "100%"
|
|
20994
|
+
}
|
|
20995
|
+
}, (formData === null || formData === void 0 ? void 0 : (_formData$tripData0 = formData.tripData) === null || _formData$tripData0 === void 0 ? void 0 : _formData$tripData0.amountPerTrip) !== 0 && (inputs === null || inputs === void 0 ? void 0 : inputs.map((input, index) => {
|
|
20519
20996
|
let currentValue = formData && formData[config.key] && formData[config.key][input.name];
|
|
20520
20997
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
20521
20998
|
key: index
|
|
@@ -20558,7 +21035,7 @@ const AdvanceCollection = _ref => {
|
|
|
20558
21035
|
};
|
|
20559
21036
|
|
|
20560
21037
|
const SelectTrips = _ref => {
|
|
20561
|
-
var _formData$tripData, _formData$tripData2, _formData$
|
|
21038
|
+
var _formData$tripData, _formData$tripData2, _formData$address3, _formData$address4, _formData$address4$ci, _formData$tripData13, _formData$tripData13$, _formData$tripData14, _formData$address5, _formData$address5$pr;
|
|
20562
21039
|
let {
|
|
20563
21040
|
t,
|
|
20564
21041
|
config,
|
|
@@ -20568,7 +21045,7 @@ const SelectTrips = _ref => {
|
|
|
20568
21045
|
styles,
|
|
20569
21046
|
FSMTextFieldStyle
|
|
20570
21047
|
} = _ref;
|
|
20571
|
-
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
21048
|
+
const tenantId = normalizeTenantId(Digit.ULBService.getCurrentTenantId());
|
|
20572
21049
|
const state = Digit.ULBService.getStateId();
|
|
20573
21050
|
const {
|
|
20574
21051
|
pathname: url
|
|
@@ -20632,18 +21109,6 @@ const SelectTrips = _ref => {
|
|
|
20632
21109
|
default: formData === null || formData === void 0 ? void 0 : (_formData$tripData2 = formData.tripData) === null || _formData$tripData2 === void 0 ? void 0 : _formData$tripData2.noOfTrips,
|
|
20633
21110
|
disable: false,
|
|
20634
21111
|
isMandatory: true
|
|
20635
|
-
}, {
|
|
20636
|
-
label: "ES_NEW_APPLICATION_DISTANCE_FROM_ROAD",
|
|
20637
|
-
type: "text",
|
|
20638
|
-
name: "distancefromroad",
|
|
20639
|
-
default: formData === null || formData === void 0 ? void 0 : (_formData$tripData3 = formData.tripData) === null || _formData$tripData3 === void 0 ? void 0 : _formData$tripData3.distancefromroad,
|
|
20640
|
-
isMandatory: true
|
|
20641
|
-
}, {
|
|
20642
|
-
label: "ES_NEW_APPLICATION_ROAD_WIDTH",
|
|
20643
|
-
type: "text",
|
|
20644
|
-
name: "roadWidth",
|
|
20645
|
-
default: formData === null || formData === void 0 ? void 0 : (_formData$tripData4 = formData.tripData) === null || _formData$tripData4 === void 0 ? void 0 : _formData$tripData4.roadWidth,
|
|
20646
|
-
isMandatory: true
|
|
20647
21112
|
}];
|
|
20648
21113
|
function selectVehicle(value) {
|
|
20649
21114
|
setVehicle({
|
|
@@ -20655,52 +21120,65 @@ const SelectTrips = _ref => {
|
|
|
20655
21120
|
});
|
|
20656
21121
|
}
|
|
20657
21122
|
function setValue(value, input) {
|
|
20658
|
-
|
|
20659
|
-
|
|
20660
|
-
|
|
20661
|
-
|
|
21123
|
+
if (input !== undefined && input !== null) {
|
|
21124
|
+
var _formData$tripData3, _formData$tripData4, _formData$tripData5;
|
|
21125
|
+
const trips = input === "noOfTrips" ? Number(value) : Number(formData === null || formData === void 0 ? void 0 : (_formData$tripData3 = formData.tripData) === null || _formData$tripData3 === void 0 ? void 0 : _formData$tripData3.noOfTrips) || 1;
|
|
21126
|
+
const rate = Number(formData === null || formData === void 0 ? void 0 : (_formData$tripData4 = formData.tripData) === null || _formData$tripData4 === void 0 ? void 0 : _formData$tripData4.amountPerTrip);
|
|
21127
|
+
const totalAmount = !isNaN(trips) && !isNaN(rate) && rate > 0 ? trips * rate : formData === null || formData === void 0 ? void 0 : (_formData$tripData5 = formData.tripData) === null || _formData$tripData5 === void 0 ? void 0 : _formData$tripData5.amount;
|
|
21128
|
+
onSelect(config.key, {
|
|
21129
|
+
...formData[config.key],
|
|
21130
|
+
[input]: value,
|
|
21131
|
+
...(totalAmount !== undefined && totalAmount !== null ? {
|
|
21132
|
+
amount: totalAmount
|
|
21133
|
+
} : {})
|
|
21134
|
+
});
|
|
21135
|
+
}
|
|
20662
21136
|
}
|
|
20663
21137
|
React.useEffect(() => {
|
|
20664
21138
|
(function () {
|
|
20665
21139
|
try {
|
|
20666
|
-
var _formData$
|
|
20667
|
-
if ((formData === null || formData === void 0 ? void 0 : (_formData$
|
|
20668
|
-
var _formData$
|
|
21140
|
+
var _formData$tripData6, _formData$tripData8;
|
|
21141
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$tripData6 = formData.tripData) === null || _formData$tripData6 === void 0 ? void 0 : _formData$tripData6.vehicleType) !== vehicle) {
|
|
21142
|
+
var _formData$tripData7, _formData$tripData7$v;
|
|
20669
21143
|
setVehicle({
|
|
20670
|
-
label: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
21144
|
+
label: formData === null || formData === void 0 ? void 0 : (_formData$tripData7 = formData.tripData) === null || _formData$tripData7 === void 0 ? void 0 : (_formData$tripData7$v = _formData$tripData7.vehicleType) === null || _formData$tripData7$v === void 0 ? void 0 : _formData$tripData7$v.capacity
|
|
20671
21145
|
});
|
|
20672
21146
|
}
|
|
20673
|
-
const
|
|
20674
|
-
|
|
20675
|
-
|
|
20676
|
-
|
|
20677
|
-
|
|
21147
|
+
const trips = Number(formData === null || formData === void 0 ? void 0 : (_formData$tripData8 = formData.tripData) === null || _formData$tripData8 === void 0 ? void 0 : _formData$tripData8.noOfTrips) || 1;
|
|
21148
|
+
const _temp2 = function (_formData$address, _formData$address$pro, _formData$tripData9, _formData$tripData0) {
|
|
21149
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$address = formData.address) === null || _formData$address === void 0 ? void 0 : (_formData$address$pro = _formData$address.propertyLocation) === null || _formData$address$pro === void 0 ? void 0 : _formData$address$pro.code) === "FROM_GRAM_PANCHAYAT" && (_formData$tripData9 = formData.tripData) !== null && _formData$tripData9 !== void 0 && _formData$tripData9.noOfTrips && (_formData$tripData0 = formData.tripData) !== null && _formData$tripData0 !== void 0 && _formData$tripData0.amountPerTrip) {
|
|
21150
|
+
var _formData$config$key;
|
|
21151
|
+
const calculatedAmt = Number(formData.tripData.amountPerTrip) * trips;
|
|
21152
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$config$key = formData[config.key]) === null || _formData$config$key === void 0 ? void 0 : _formData$config$key.amount) !== calculatedAmt) {
|
|
21153
|
+
onSelect(config.key, {
|
|
21154
|
+
...formData[config.key],
|
|
21155
|
+
amount: calculatedAmt
|
|
21156
|
+
});
|
|
21157
|
+
}
|
|
20678
21158
|
} else {
|
|
20679
|
-
const _temp = function (_formData$
|
|
20680
|
-
if (formData !== null && formData !== void 0 && formData.propertyType && formData !== null && formData !== void 0 && formData.subtype && formData !== null && formData !== void 0 && formData.address && formData !== null && formData !== void 0 && (_formData$
|
|
20681
|
-
|
|
20682
|
-
|
|
20683
|
-
|
|
20684
|
-
|
|
20685
|
-
|
|
20686
|
-
|
|
20687
|
-
|
|
20688
|
-
|
|
20689
|
-
|
|
20690
|
-
|
|
20691
|
-
|
|
20692
|
-
|
|
20693
|
-
|
|
20694
|
-
if (billSlab !== null && billSlab !== void 0 && billSlab.price || (billSlab === null || billSlab === void 0 ? void 0 : billSlab.price) === 0) {
|
|
20695
|
-
setValue(billSlab.price, "amountPerTrip");
|
|
20696
|
-
setValue(billSlab.price * formData.tripData.noOfTrips, "amount");
|
|
21159
|
+
const _temp = function (_formData$tripData1, _formData$tripData1$v, _formData$address2, _formData$address2$pr) {
|
|
21160
|
+
if (formData !== null && formData !== void 0 && formData.propertyType && formData !== null && formData !== void 0 && formData.subtype && formData !== null && formData !== void 0 && formData.address && formData !== null && formData !== void 0 && (_formData$tripData1 = formData.tripData) !== null && _formData$tripData1 !== void 0 && (_formData$tripData1$v = _formData$tripData1.vehicleType) !== null && _formData$tripData1$v !== void 0 && _formData$tripData1$v.capacity && (formData === null || formData === void 0 ? void 0 : (_formData$address2 = formData.address) === null || _formData$address2 === void 0 ? void 0 : (_formData$address2$pr = _formData$address2.propertyLocation) === null || _formData$address2$pr === void 0 ? void 0 : _formData$address2$pr.code) === "WITHIN_ULB_LIMITS") {
|
|
21161
|
+
return Promise.resolve(fetchBillingSlabDetails(tenantId, formData)).then(function (billSlab) {
|
|
21162
|
+
if (billSlab && (billSlab !== null && billSlab !== void 0 && billSlab.price || (billSlab === null || billSlab === void 0 ? void 0 : billSlab.price) === 0)) {
|
|
21163
|
+
var _formData$config$key2, _formData$config$key3;
|
|
21164
|
+
const rate = billSlab.price;
|
|
21165
|
+
const totalAmt = rate * trips;
|
|
21166
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$config$key2 = formData[config.key]) === null || _formData$config$key2 === void 0 ? void 0 : _formData$config$key2.amountPerTrip) !== rate || (formData === null || formData === void 0 ? void 0 : (_formData$config$key3 = formData[config.key]) === null || _formData$config$key3 === void 0 ? void 0 : _formData$config$key3.amount) !== totalAmt) {
|
|
21167
|
+
onSelect(config.key, {
|
|
21168
|
+
...formData[config.key],
|
|
21169
|
+
amountPerTrip: rate,
|
|
21170
|
+
amount: totalAmt
|
|
21171
|
+
});
|
|
21172
|
+
Digit.SessionStorage.set("total_amount", totalAmt);
|
|
21173
|
+
}
|
|
20697
21174
|
setError(false);
|
|
20698
21175
|
} else {
|
|
20699
|
-
|
|
20700
|
-
|
|
20701
|
-
|
|
20702
|
-
}
|
|
20703
|
-
|
|
21176
|
+
var _formData$tripData10, _formData$tripData11, _formData$tripData12;
|
|
21177
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$tripData10 = formData.tripData) === null || _formData$tripData10 === void 0 ? void 0 : _formData$tripData10.amountPerTrip) !== undefined && (formData === null || formData === void 0 ? void 0 : (_formData$tripData11 = formData.tripData) === null || _formData$tripData11 === void 0 ? void 0 : _formData$tripData11.amountPerTrip) !== null && (formData === null || formData === void 0 ? void 0 : (_formData$tripData12 = formData.tripData) === null || _formData$tripData12 === void 0 ? void 0 : _formData$tripData12.amountPerTrip) !== "") {
|
|
21178
|
+
setError(false);
|
|
21179
|
+
} else {
|
|
21180
|
+
setError(false);
|
|
21181
|
+
}
|
|
20704
21182
|
}
|
|
20705
21183
|
});
|
|
20706
21184
|
}
|
|
@@ -20713,8 +21191,15 @@ const SelectTrips = _ref => {
|
|
|
20713
21191
|
Promise.reject(e);
|
|
20714
21192
|
}
|
|
20715
21193
|
})();
|
|
20716
|
-
}, [formData === null || formData === void 0 ? void 0 : formData.propertyType, formData === null || formData === void 0 ? void 0 : formData.subtype, formData === null || formData === void 0 ? void 0 : formData.address, formData === null || formData === void 0 ? void 0 : (_formData$
|
|
20717
|
-
return isVehicleMenuLoading && isDsoLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div",
|
|
21194
|
+
}, [formData === null || formData === void 0 ? void 0 : formData.propertyType, formData === null || formData === void 0 ? void 0 : formData.subtype, formData === null || formData === void 0 ? void 0 : (_formData$address3 = formData.address) === null || _formData$address3 === void 0 ? void 0 : _formData$address3.slum, formData === null || formData === void 0 ? void 0 : (_formData$address4 = formData.address) === null || _formData$address4 === void 0 ? void 0 : (_formData$address4$ci = _formData$address4.city) === null || _formData$address4$ci === void 0 ? void 0 : _formData$address4$ci.code, formData === null || formData === void 0 ? void 0 : (_formData$tripData13 = formData.tripData) === null || _formData$tripData13 === void 0 ? void 0 : (_formData$tripData13$ = _formData$tripData13.vehicleType) === null || _formData$tripData13$ === void 0 ? void 0 : _formData$tripData13$.capacity, formData === null || formData === void 0 ? void 0 : (_formData$tripData14 = formData.tripData) === null || _formData$tripData14 === void 0 ? void 0 : _formData$tripData14.noOfTrips, formData === null || formData === void 0 ? void 0 : (_formData$address5 = formData.address) === null || _formData$address5 === void 0 ? void 0 : (_formData$address5$pr = _formData$address5.propertyLocation) === null || _formData$address5$pr === void 0 ? void 0 : _formData$address5$pr.code]);
|
|
21195
|
+
return isVehicleMenuLoading && isDsoLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div", {
|
|
21196
|
+
style: {
|
|
21197
|
+
display: "grid",
|
|
21198
|
+
gridTemplateColumns: "1fr 1fr",
|
|
21199
|
+
gap: "16px 24px",
|
|
21200
|
+
width: "100%"
|
|
21201
|
+
}
|
|
21202
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
20718
21203
|
className: "card-label-smaller"
|
|
20719
21204
|
}, t("ES_NEW_APPLICATION_LOCATION_VEHICLE_REQUESTED") + " * "), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
20720
21205
|
className: "form-field",
|
|
@@ -20747,12 +21232,7 @@ const SelectTrips = _ref => {
|
|
|
20747
21232
|
value: formData && formData[config.key] ? formData[config.key][input.name] : null
|
|
20748
21233
|
}, input.validation, {
|
|
20749
21234
|
disable: input.disable
|
|
20750
|
-
})))))
|
|
20751
|
-
style: {
|
|
20752
|
-
width: "100%",
|
|
20753
|
-
textAlign: "center"
|
|
20754
|
-
}
|
|
20755
|
-
}, t("ES_APPLICATION_BILL_SLAB_ERROR")) : null);
|
|
21235
|
+
}))))));
|
|
20756
21236
|
};
|
|
20757
21237
|
|
|
20758
21238
|
const SelectLocalityOrGramPanchayat = _ref => {
|
|
@@ -21360,8 +21840,13 @@ const AddVendor = () => {
|
|
|
21360
21840
|
clearSuccessData();
|
|
21361
21841
|
clearError();
|
|
21362
21842
|
}, []);
|
|
21843
|
+
const isFsmRoute = window.location.pathname.includes("/fsm/");
|
|
21363
21844
|
const defaultValues = {
|
|
21364
|
-
serviceType: {
|
|
21845
|
+
serviceType: isFsmRoute ? {
|
|
21846
|
+
code: "FSM",
|
|
21847
|
+
name: "FSM",
|
|
21848
|
+
i18nKey: "FSM"
|
|
21849
|
+
} : {
|
|
21365
21850
|
code: "WT",
|
|
21366
21851
|
name: "WT",
|
|
21367
21852
|
i18nKey: "WT"
|
|
@@ -21734,6 +22219,16 @@ const FSMLinks = _ref2 => {
|
|
|
21734
22219
|
Icon: digitUiReactComponents.CitizenTruck
|
|
21735
22220
|
});
|
|
21736
22221
|
} else {
|
|
22222
|
+
const isSuperUser = Digit.UserService.hasAccess(["SUPERUSER", "ADMIN"]) || false;
|
|
22223
|
+
const isFsmAdmin = Digit.UserService.hasAccess(["FSM_ADMIN", "ES_FSM_ADMIN", "FSM_CEMP"]) || isSuperUser;
|
|
22224
|
+
const isCreator = Digit.UserService.hasAccess(["FSM_CREATOR_EMP", "FSM_CEMP"]) || isSuperUser;
|
|
22225
|
+
const isEditor = Digit.UserService.hasAccess(["FSM_EDITOR_EMP"]) || isSuperUser;
|
|
22226
|
+
const isViewer = Digit.UserService.hasAccess(["FSM_VIEW_EMP"]) || isSuperUser;
|
|
22227
|
+
const isFSTPOperator = Digit.UserService.hasAccess(["FSM_EMP_FSTPO"]) || isSuperUser;
|
|
22228
|
+
const isReportViewer = Digit.UserService.hasAccess(["FSM_REPORT_VIEWER"]) || isSuperUser;
|
|
22229
|
+
const DSO = Digit.UserService.hasAccess(["FSM_DSO"]) || false;
|
|
22230
|
+
const COLLECTOR = Digit.UserService.hasAccess(["FSM_COLLECTOR"]) || false;
|
|
22231
|
+
const isGenericEmployee = !isFSTPOperator && !isCreator && !isEditor && !isViewer && !isReportViewer && !COLLECTOR && !DSO && !isFsmAdmin;
|
|
21737
22232
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
21738
22233
|
className: "employee-app-container"
|
|
21739
22234
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -21765,7 +22260,7 @@ const FSMLinks = _ref2 => {
|
|
|
21765
22260
|
className: "link"
|
|
21766
22261
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
21767
22262
|
to: `${matchPath}/inbox`
|
|
21768
|
-
}, t("ES_TITLE_INBOX"))), /*#__PURE__*/React__default.createElement("span", {
|
|
22263
|
+
}, t("ES_TITLE_INBOX"))), (isCreator || isFsmAdmin || isGenericEmployee || !isFSTPOperator) && /*#__PURE__*/React__default.createElement("span", {
|
|
21769
22264
|
className: "link"
|
|
21770
22265
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
21771
22266
|
to: `${matchPath}/new-application/`
|
|
@@ -21773,23 +22268,27 @@ const FSMLinks = _ref2 => {
|
|
|
21773
22268
|
className: "link"
|
|
21774
22269
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
21775
22270
|
to: `${matchPath}/search`
|
|
21776
|
-
}, t("ES_TITILE_SEARCH_APPLICATION"))), /*#__PURE__*/React__default.createElement("span", {
|
|
22271
|
+
}, t("ES_TITILE_SEARCH_APPLICATION"))), (isFsmAdmin || isGenericEmployee) && /*#__PURE__*/React__default.createElement("span", {
|
|
21777
22272
|
className: "link"
|
|
21778
22273
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
21779
22274
|
to: `${matchPath}/registry?selectedTabs=VENDOR`
|
|
21780
|
-
}, t("ES_TITLE_FSM_REGISTRY"))), /*#__PURE__*/React__default.createElement("span", {
|
|
22275
|
+
}, t("ES_TITLE_FSM_REGISTRY"))), (isFSTPOperator || isGenericEmployee) && /*#__PURE__*/React__default.createElement("span", {
|
|
21781
22276
|
className: "link"
|
|
21782
22277
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
21783
|
-
to: `${matchPath}/fstp-
|
|
21784
|
-
}, t("
|
|
22278
|
+
to: `${matchPath}/fstp-inbox`
|
|
22279
|
+
}, t("ES_TITLE_VEHICLE_LOG"))), (isFSTPOperator || isGenericEmployee) && /*#__PURE__*/React__default.createElement("span", {
|
|
21785
22280
|
className: "link"
|
|
21786
22281
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
21787
|
-
to: `${matchPath}/fstp-
|
|
21788
|
-
}, t("
|
|
22282
|
+
to: `${matchPath}/fstp-operations`
|
|
22283
|
+
}, t("ES_COMMON_FSTP_OPERATION"))), (isFSTPOperator || isGenericEmployee) && /*#__PURE__*/React__default.createElement("span", {
|
|
21789
22284
|
className: "link"
|
|
21790
22285
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
21791
22286
|
to: `${matchPath}/fstp-add-vehicle`
|
|
21792
|
-
}, t("ES_FSM_ADD_NEW_BUTTON"))))
|
|
22287
|
+
}, t("ES_FSM_ADD_NEW_BUTTON"))), (isReportViewer || isSuperUser || isGenericEmployee) && /*#__PURE__*/React__default.createElement("span", {
|
|
22288
|
+
className: "link"
|
|
22289
|
+
}, /*#__PURE__*/React__default.createElement("a", {
|
|
22290
|
+
href: "/employee/report/fsm/FSMDailyDesludingReport"
|
|
22291
|
+
}, t("ES_TITLE_REPORTS"))))))));
|
|
21793
22292
|
}
|
|
21794
22293
|
};
|
|
21795
22294
|
const componentsToRegister = {
|