@djb25/digit-ui-module-wt 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +238 -151
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -182,7 +182,7 @@ const VerticalTimeline = ({
|
|
|
182
182
|
};
|
|
183
183
|
|
|
184
184
|
const WTCreate = () => {
|
|
185
|
-
var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi, _Digit3, _Digit3$ComponentRegi, _Digit4, _Digit4$ComponentRegi;
|
|
185
|
+
var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi, _Digit3, _Digit3$ComponentRegi, _Digit4, _Digit4$ComponentRegi, _params$serviceType2, _params$serviceType2$, _Digit5, _Digit5$ComponentRegi, _Digit6, _Digit6$ComponentRegi, _Digit7, _Digit7$ComponentRegi, _Digit8, _Digit8$ComponentRegi, _Digit9, _Digit9$ComponentRegi;
|
|
186
186
|
const queryClient = useQueryClient();
|
|
187
187
|
const match = useRouteMatch();
|
|
188
188
|
const {
|
|
@@ -196,7 +196,6 @@ const WTCreate = () => {
|
|
|
196
196
|
const [params, setParams, clearParams] = Digit.Hooks.useSessionStorage("WT_Create", {});
|
|
197
197
|
if ((!params.serviceType || Object.keys(params.serviceType).length === 0) && pathname.includes("employee")) {
|
|
198
198
|
if (pathname.includes("mt")) {
|
|
199
|
-
console.log("MT Create");
|
|
200
199
|
setParams({
|
|
201
200
|
"serviceType": {
|
|
202
201
|
"serviceType": {
|
|
@@ -228,101 +227,35 @@ const WTCreate = () => {
|
|
|
228
227
|
});
|
|
229
228
|
}
|
|
230
229
|
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
isMultiple = false,
|
|
235
|
-
nextPage;
|
|
236
|
-
if (Number(parseInt(currentPath)) || currentPath == "0" || currentPath == "-1") {
|
|
237
|
-
if (currentPath == "-1" || currentPath == "-2") {
|
|
238
|
-
currentPath = pathname.slice(0, -3);
|
|
239
|
-
currentPath = currentPath.split("/").pop();
|
|
240
|
-
isMultiple = true;
|
|
241
|
-
} else {
|
|
242
|
-
currentPath = pathname.slice(0, -2);
|
|
243
|
-
currentPath = currentPath.split("/").pop();
|
|
244
|
-
isMultiple = true;
|
|
245
|
-
}
|
|
246
|
-
} else {
|
|
247
|
-
isMultiple = false;
|
|
248
|
-
}
|
|
249
|
-
if (!isNaN(lastchar)) {
|
|
250
|
-
isMultiple = true;
|
|
251
|
-
}
|
|
252
|
-
let {
|
|
253
|
-
nextStep = {}
|
|
254
|
-
} = config.find(routeObj => routeObj.route === currentPath);
|
|
255
|
-
let redirectWithHistory = history.push;
|
|
256
|
-
if (skipStep) {
|
|
257
|
-
redirectWithHistory = history.replace;
|
|
258
|
-
}
|
|
259
|
-
if (isAddMultiple) {
|
|
260
|
-
nextStep = key;
|
|
261
|
-
}
|
|
262
|
-
if (nextStep === "request-details") {
|
|
263
|
-
var _params$serviceType, _params$serviceType$s;
|
|
264
|
-
const code = params === null || params === void 0 ? void 0 : (_params$serviceType = params.serviceType) === null || _params$serviceType === void 0 ? void 0 : (_params$serviceType$s = _params$serviceType.serviceType) === null || _params$serviceType$s === void 0 ? void 0 : _params$serviceType$s.code;
|
|
265
|
-
if (code === "MobileToilet") {
|
|
266
|
-
nextStep = "toiletRequest-details";
|
|
267
|
-
} else if (code === "TREE_PRUNING") {
|
|
268
|
-
nextStep = "treePruningRequest-details";
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
if (nextStep === null) {
|
|
272
|
-
return redirectWithHistory(`${match.path}/check`);
|
|
273
|
-
}
|
|
274
|
-
if (!isNaN(nextStep.split("/").pop())) {
|
|
275
|
-
nextPage = `${match.path}/${nextStep}`;
|
|
276
|
-
} else {
|
|
277
|
-
nextPage = isMultiple && nextStep !== "map" ? `${match.path}/${nextStep}/${index}` : `${match.path}/${nextStep}`;
|
|
278
|
-
}
|
|
279
|
-
redirectWithHistory(nextPage);
|
|
280
|
-
};
|
|
230
|
+
if (pathname.includes("employee") && pathname.endsWith("/info")) {
|
|
231
|
+
history.replace(`${match.path}/form`);
|
|
232
|
+
}
|
|
281
233
|
if (params && Object.keys(params).length > 0 && window.location.href.includes("/service-type") && sessionStorage.getItem("docReqScreenByBack") !== "true") {
|
|
282
234
|
clearParams();
|
|
283
235
|
queryClient.invalidateQueries("WT_Create");
|
|
284
236
|
}
|
|
285
237
|
const wt_create = async () => {
|
|
286
|
-
var _params$
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
if (
|
|
291
|
-
history.push(`${match.path}/mt-acknowledgement`);
|
|
292
|
-
}
|
|
293
|
-
if ((params === null || params === void 0 ? void 0 : (_params$serviceType4 = params.serviceType) === null || _params$serviceType4 === void 0 ? void 0 : (_params$serviceType4$ = _params$serviceType4.serviceType) === null || _params$serviceType4$ === void 0 ? void 0 : _params$serviceType4$.code) === "TREE_PRUNING") {
|
|
294
|
-
history.push(`${match.path}/tp-acknowledgement`);
|
|
295
|
-
}
|
|
238
|
+
var _params$serviceType, _params$serviceType$s;
|
|
239
|
+
const code = params === null || params === void 0 ? void 0 : (_params$serviceType = params.serviceType) === null || _params$serviceType === void 0 ? void 0 : (_params$serviceType$s = _params$serviceType.serviceType) === null || _params$serviceType$s === void 0 ? void 0 : _params$serviceType$s.code;
|
|
240
|
+
if (code === "WT") history.push(`${match.path}/wt-acknowledgement`);
|
|
241
|
+
if (code === "MobileToilet") history.push(`${match.path}/mt-acknowledgement`);
|
|
242
|
+
if (code === "TREE_PRUNING") history.push(`${match.path}/tp-acknowledgement`);
|
|
296
243
|
};
|
|
297
|
-
function handleSelect(key, data
|
|
298
|
-
if (key === "owners") {
|
|
299
|
-
let owners = params.owners || [];
|
|
300
|
-
owners[index] = data;
|
|
301
|
-
setParams({
|
|
302
|
-
...params,
|
|
303
|
-
...{
|
|
304
|
-
[key]: [...owners]
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
} else if (key === "units") {
|
|
308
|
-
let units = params.units || [];
|
|
309
|
-
units = data;
|
|
244
|
+
function handleSelect(key, data) {
|
|
245
|
+
if (key === "owners") ; else if (key === "units") {
|
|
310
246
|
setParams({
|
|
311
247
|
...params,
|
|
312
|
-
units
|
|
248
|
+
units: data
|
|
313
249
|
});
|
|
314
250
|
} else {
|
|
315
251
|
setParams({
|
|
316
252
|
...params,
|
|
317
|
-
|
|
318
|
-
[key]
|
|
319
|
-
|
|
320
|
-
...data
|
|
321
|
-
}
|
|
253
|
+
[key]: {
|
|
254
|
+
...params[key],
|
|
255
|
+
...data
|
|
322
256
|
}
|
|
323
257
|
});
|
|
324
258
|
}
|
|
325
|
-
goNext(skipStep, index, isAddMultiple, key);
|
|
326
259
|
}
|
|
327
260
|
const onSuccess = () => {
|
|
328
261
|
clearParams();
|
|
@@ -332,11 +265,115 @@ const WTCreate = () => {
|
|
|
332
265
|
commonFields.forEach(obj => {
|
|
333
266
|
config = config.concat(obj.body.filter(a => !a.hideInCitizen));
|
|
334
267
|
});
|
|
335
|
-
config.indexRoute = pathname.includes("citizen") ? "service-type" : "
|
|
268
|
+
config.indexRoute = pathname.includes("citizen") ? "service-type" : "form";
|
|
336
269
|
const CheckPage = (_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ComponentRegis = _Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent("WTCheckPage");
|
|
337
270
|
const WTAcknowledgement = (_Digit2 = Digit) === null || _Digit2 === void 0 ? void 0 : (_Digit2$ComponentRegi = _Digit2.ComponentRegistryService) === null || _Digit2$ComponentRegi === void 0 ? void 0 : _Digit2$ComponentRegi.getComponent("WTAcknowledgement");
|
|
338
271
|
const MTAcknowledgement = (_Digit3 = Digit) === null || _Digit3 === void 0 ? void 0 : (_Digit3$ComponentRegi = _Digit3.ComponentRegistryService) === null || _Digit3$ComponentRegi === void 0 ? void 0 : _Digit3$ComponentRegi.getComponent("MTAcknowledgement");
|
|
339
272
|
const TPAcknowledgement = (_Digit4 = Digit) === null || _Digit4 === void 0 ? void 0 : (_Digit4$ComponentRegi = _Digit4.ComponentRegistryService) === null || _Digit4$ComponentRegi === void 0 ? void 0 : _Digit4$ComponentRegi.getComponent("TPAcknowledgement");
|
|
273
|
+
const serviceCode = params === null || params === void 0 ? void 0 : (_params$serviceType2 = params.serviceType) === null || _params$serviceType2 === void 0 ? void 0 : (_params$serviceType2$ = _params$serviceType2.serviceType) === null || _params$serviceType2$ === void 0 ? void 0 : _params$serviceType2$.code;
|
|
274
|
+
const ApplicantDetails = (_Digit5 = Digit) === null || _Digit5 === void 0 ? void 0 : (_Digit5$ComponentRegi = _Digit5.ComponentRegistryService) === null || _Digit5$ComponentRegi === void 0 ? void 0 : _Digit5$ComponentRegi.getComponent("ApplicantDetails");
|
|
275
|
+
const AddressDetails = (_Digit6 = Digit) === null || _Digit6 === void 0 ? void 0 : (_Digit6$ComponentRegi = _Digit6.ComponentRegistryService) === null || _Digit6$ComponentRegi === void 0 ? void 0 : _Digit6$ComponentRegi.getComponent("AddressDetails");
|
|
276
|
+
const RequestDetails = (_Digit7 = Digit) === null || _Digit7 === void 0 ? void 0 : (_Digit7$ComponentRegi = _Digit7.ComponentRegistryService) === null || _Digit7$ComponentRegi === void 0 ? void 0 : _Digit7$ComponentRegi.getComponent("RequestDetails");
|
|
277
|
+
const ToiletRequestDetails = (_Digit8 = Digit) === null || _Digit8 === void 0 ? void 0 : (_Digit8$ComponentRegi = _Digit8.ComponentRegistryService) === null || _Digit8$ComponentRegi === void 0 ? void 0 : _Digit8$ComponentRegi.getComponent("ToiletRequestDetails");
|
|
278
|
+
const TreePruningRequestDetails = (_Digit9 = Digit) === null || _Digit9 === void 0 ? void 0 : (_Digit9$ComponentRegi = _Digit9.ComponentRegistryService) === null || _Digit9$ComponentRegi === void 0 ? void 0 : _Digit9$ComponentRegi.getComponent("TreePruningRequestDetails");
|
|
279
|
+
const SinglePageForm = () => {
|
|
280
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
281
|
+
style: {
|
|
282
|
+
display: "flex",
|
|
283
|
+
flexDirection: "column",
|
|
284
|
+
gap: "24px"
|
|
285
|
+
}
|
|
286
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
287
|
+
style: sectionStyle
|
|
288
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
289
|
+
style: sectionHeaderStyle
|
|
290
|
+
}, t("ES_APPLICANT_DETAILS")), /*#__PURE__*/React.createElement(ApplicantDetails, {
|
|
291
|
+
config: {
|
|
292
|
+
texts: {
|
|
293
|
+
submitBarLabel: "COMMON_SAVE_NEXT",
|
|
294
|
+
header: "ES_APPLICANT_DETAILS"
|
|
295
|
+
},
|
|
296
|
+
key: "owner"
|
|
297
|
+
},
|
|
298
|
+
onSelect: (key, data) => handleSelect(key, data),
|
|
299
|
+
t: t,
|
|
300
|
+
formData: params,
|
|
301
|
+
hideSubmitBar: true
|
|
302
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
303
|
+
style: sectionStyle
|
|
304
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
305
|
+
style: sectionHeaderStyle
|
|
306
|
+
}, t("ES_ADDRESS_DETAILS")), /*#__PURE__*/React.createElement(AddressDetails, {
|
|
307
|
+
config: {
|
|
308
|
+
texts: {
|
|
309
|
+
submitBarLabel: "COMMON_SAVE_NEXT",
|
|
310
|
+
header: "ES_ADDRESS_DETAILS"
|
|
311
|
+
},
|
|
312
|
+
key: "address"
|
|
313
|
+
},
|
|
314
|
+
onSelect: (key, data) => handleSelect(key, data),
|
|
315
|
+
t: t,
|
|
316
|
+
formData: params,
|
|
317
|
+
hideSubmitBar: true
|
|
318
|
+
})), (!serviceCode || serviceCode === "WT") && /*#__PURE__*/React.createElement("div", {
|
|
319
|
+
style: sectionStyle
|
|
320
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
321
|
+
style: sectionHeaderStyle
|
|
322
|
+
}, t("WT_REQUEST_DETAILS")), /*#__PURE__*/React.createElement(RequestDetails, {
|
|
323
|
+
config: {
|
|
324
|
+
texts: {
|
|
325
|
+
submitBarLabel: "COMMON_SAVE_NEXT",
|
|
326
|
+
header: "WT_REQUEST_DETAILS"
|
|
327
|
+
},
|
|
328
|
+
key: "requestDetails"
|
|
329
|
+
},
|
|
330
|
+
onSelect: (key, data) => handleSelect(key, data),
|
|
331
|
+
t: t,
|
|
332
|
+
formData: params,
|
|
333
|
+
hideSubmitBar: true
|
|
334
|
+
})), serviceCode === "MobileToilet" && /*#__PURE__*/React.createElement("div", {
|
|
335
|
+
style: sectionStyle
|
|
336
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
337
|
+
style: sectionHeaderStyle
|
|
338
|
+
}, t("MT_REQUEST_DETAILS")), /*#__PURE__*/React.createElement(ToiletRequestDetails, {
|
|
339
|
+
config: {
|
|
340
|
+
texts: {
|
|
341
|
+
submitBarLabel: "COMMON_SAVE_NEXT",
|
|
342
|
+
header: "MT_REQUEST_DETAILS"
|
|
343
|
+
},
|
|
344
|
+
key: "toiletRequestDetails"
|
|
345
|
+
},
|
|
346
|
+
onSelect: (key, data) => handleSelect(key, data),
|
|
347
|
+
t: t,
|
|
348
|
+
formData: params,
|
|
349
|
+
hideSubmitBar: true
|
|
350
|
+
})), serviceCode === "TREE_PRUNING" && /*#__PURE__*/React.createElement("div", {
|
|
351
|
+
style: sectionStyle
|
|
352
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
353
|
+
style: sectionHeaderStyle
|
|
354
|
+
}, t("TP_REQUEST_DETAILS")), /*#__PURE__*/React.createElement(TreePruningRequestDetails, {
|
|
355
|
+
config: {
|
|
356
|
+
texts: {
|
|
357
|
+
submitBarLabel: "COMMON_SAVE_NEXT",
|
|
358
|
+
header: "TP_REQUEST_DETAILS"
|
|
359
|
+
},
|
|
360
|
+
key: "treePruningRequestDetails"
|
|
361
|
+
},
|
|
362
|
+
onSelect: (key, data) => handleSelect(key, data),
|
|
363
|
+
t: t,
|
|
364
|
+
formData: params,
|
|
365
|
+
hideSubmitBar: true
|
|
366
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
367
|
+
style: {
|
|
368
|
+
display: "flex",
|
|
369
|
+
justifyContent: "flex-end",
|
|
370
|
+
padding: "16px 0"
|
|
371
|
+
}
|
|
372
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
373
|
+
style: submitButtonStyle,
|
|
374
|
+
onClick: () => history.push(`${match.path}/check`)
|
|
375
|
+
}, t("COMMON_SAVE_NEXT"))));
|
|
376
|
+
};
|
|
340
377
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
341
378
|
style: {
|
|
342
379
|
display: "flex",
|
|
@@ -358,30 +395,48 @@ const WTCreate = () => {
|
|
|
358
395
|
flex: "1",
|
|
359
396
|
overflowY: "auto"
|
|
360
397
|
}
|
|
361
|
-
}, /*#__PURE__*/React.createElement(Switch, null,
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
} = routeObj;
|
|
369
|
-
const Component = typeof component === "string" ? Digit.ComponentRegistryService.getComponent(component) : component;
|
|
370
|
-
return /*#__PURE__*/React.createElement(Route, {
|
|
371
|
-
path: `${match.path}/${routeObj.route}`,
|
|
372
|
-
key: index
|
|
373
|
-
}, /*#__PURE__*/React.createElement(Component, {
|
|
398
|
+
}, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
|
|
399
|
+
path: `${match.path}/service-type`
|
|
400
|
+
}, (() => {
|
|
401
|
+
const routeObj = config.find(r => r.route === "service-type");
|
|
402
|
+
if (!routeObj) return null;
|
|
403
|
+
const Component = typeof routeObj.component === "string" ? Digit.ComponentRegistryService.getComponent(routeObj.component) : routeObj.component;
|
|
404
|
+
return /*#__PURE__*/React.createElement(Component, {
|
|
374
405
|
config: {
|
|
375
|
-
texts,
|
|
376
|
-
inputs,
|
|
377
|
-
key,
|
|
378
|
-
additionaFields
|
|
406
|
+
texts: routeObj.texts,
|
|
407
|
+
inputs: routeObj.inputs,
|
|
408
|
+
key: routeObj.key,
|
|
409
|
+
additionaFields: routeObj.additionaFields
|
|
410
|
+
},
|
|
411
|
+
onSelect: (k, data) => {
|
|
412
|
+
handleSelect(k, data);
|
|
413
|
+
history.push(`${match.path}/info`);
|
|
379
414
|
},
|
|
380
|
-
onSelect: handleSelect,
|
|
381
415
|
t: t,
|
|
382
416
|
formData: params
|
|
383
|
-
})
|
|
384
|
-
}), /*#__PURE__*/React.createElement(Route, {
|
|
417
|
+
});
|
|
418
|
+
})()), /*#__PURE__*/React.createElement(Route, {
|
|
419
|
+
path: `${match.path}/info`
|
|
420
|
+
}, (() => {
|
|
421
|
+
const routeObj = config.find(r => r.route === "info");
|
|
422
|
+
if (!routeObj) return null;
|
|
423
|
+
const Component = typeof routeObj.component === "string" ? Digit.ComponentRegistryService.getComponent(routeObj.component) : routeObj.component;
|
|
424
|
+
return /*#__PURE__*/React.createElement(Component, {
|
|
425
|
+
config: {
|
|
426
|
+
texts: routeObj.texts,
|
|
427
|
+
inputs: routeObj.inputs,
|
|
428
|
+
key: routeObj.key,
|
|
429
|
+
additionaFields: routeObj.additionaFields
|
|
430
|
+
},
|
|
431
|
+
onSelect: () => {
|
|
432
|
+
history.push(`${match.path}/form`);
|
|
433
|
+
},
|
|
434
|
+
t: t,
|
|
435
|
+
formData: params
|
|
436
|
+
});
|
|
437
|
+
})()), /*#__PURE__*/React.createElement(Route, {
|
|
438
|
+
path: `${match.path}/form`
|
|
439
|
+
}, /*#__PURE__*/React.createElement(SinglePageForm, null)), /*#__PURE__*/React.createElement(Route, {
|
|
385
440
|
path: `${match.path}/check`
|
|
386
441
|
}, /*#__PURE__*/React.createElement(CheckPage, {
|
|
387
442
|
onSubmit: wt_create,
|
|
@@ -405,6 +460,31 @@ const WTCreate = () => {
|
|
|
405
460
|
to: `${match.path}/${config.indexRoute}`
|
|
406
461
|
}))))));
|
|
407
462
|
};
|
|
463
|
+
const sectionStyle = {
|
|
464
|
+
background: "#fff",
|
|
465
|
+
borderRadius: "4px",
|
|
466
|
+
boxShadow: "0 2px 4px rgba(0,0,0,0.08)",
|
|
467
|
+
padding: "24px",
|
|
468
|
+
border: "1px solid #E0E0E0"
|
|
469
|
+
};
|
|
470
|
+
const sectionHeaderStyle = {
|
|
471
|
+
fontSize: "18px",
|
|
472
|
+
fontWeight: "700",
|
|
473
|
+
color: "#0B0C0C",
|
|
474
|
+
marginBottom: "20px",
|
|
475
|
+
paddingBottom: "12px",
|
|
476
|
+
borderBottom: "2px solid #F47738"
|
|
477
|
+
};
|
|
478
|
+
const submitButtonStyle = {
|
|
479
|
+
background: "#F47738",
|
|
480
|
+
color: "#fff",
|
|
481
|
+
border: "none",
|
|
482
|
+
borderRadius: "4px",
|
|
483
|
+
padding: "12px 32px",
|
|
484
|
+
fontSize: "16px",
|
|
485
|
+
fontWeight: "600",
|
|
486
|
+
cursor: "pointer"
|
|
487
|
+
};
|
|
408
488
|
|
|
409
489
|
const checkForNotNull = (value = "") => {
|
|
410
490
|
return value && value != null && value != undefined && value != "" ? true : false;
|
|
@@ -1886,11 +1966,7 @@ const WTCheckPage = ({
|
|
|
1886
1966
|
}))), /*#__PURE__*/React.createElement(CheckBox, {
|
|
1887
1967
|
label: t("FINAL_DECLARATION_MESSAGE"),
|
|
1888
1968
|
onChange: setdeclarationhandler,
|
|
1889
|
-
|
|
1890
|
-
height: "auto",
|
|
1891
|
-
marginBottom: "30px",
|
|
1892
|
-
marginTop: "10px"
|
|
1893
|
-
}
|
|
1969
|
+
checked: agree
|
|
1894
1970
|
})), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
1895
1971
|
label: t("COMMON_BUTTON_SUBMIT"),
|
|
1896
1972
|
onSubmit: onSubmit,
|
|
@@ -14070,13 +14146,15 @@ const ActionModal$b = ({
|
|
|
14070
14146
|
}
|
|
14071
14147
|
});
|
|
14072
14148
|
let vendorDescription = [];
|
|
14073
|
-
dsoData === null || dsoData === void 0 ? void 0 : (_dsoData$vendor = dsoData.vendor) === null || _dsoData$vendor === void 0 ? void 0 : _dsoData$vendor.
|
|
14074
|
-
var _item$additionalDetai;
|
|
14075
|
-
if ((item === null || item === void 0 ? void 0 : (_item$additionalDetai = item.additionalDetails) === null || _item$additionalDetai === void 0 ? void 0 : _item$additionalDetai.description) === "WT") {
|
|
14149
|
+
dsoData === null || dsoData === void 0 ? void 0 : (_dsoData$vendor = dsoData.vendor) === null || _dsoData$vendor === void 0 ? void 0 : _dsoData$vendor.forEach(item => {
|
|
14150
|
+
var _item$additionalDetai, _item$additionalDetai2;
|
|
14151
|
+
if ((item === null || item === void 0 ? void 0 : (_item$additionalDetai = item.additionalDetails) === null || _item$additionalDetai === void 0 ? void 0 : _item$additionalDetai.description) === "WT" || (item === null || item === void 0 ? void 0 : (_item$additionalDetai2 = item.additionalDetails) === null || _item$additionalDetai2 === void 0 ? void 0 : _item$additionalDetai2.serviceType) === "WT") {
|
|
14152
|
+
var _item$owner;
|
|
14153
|
+
const displayLabel = `${item === null || item === void 0 ? void 0 : item.name} (${item === null || item === void 0 ? void 0 : (_item$owner = item.owner) === null || _item$owner === void 0 ? void 0 : _item$owner.mobileNumber})`;
|
|
14076
14154
|
vendorDescription.push({
|
|
14077
14155
|
code: item === null || item === void 0 ? void 0 : item.name,
|
|
14078
|
-
name:
|
|
14079
|
-
i18nKey:
|
|
14156
|
+
name: displayLabel,
|
|
14157
|
+
i18nKey: displayLabel,
|
|
14080
14158
|
vendorId: item === null || item === void 0 ? void 0 : item.id
|
|
14081
14159
|
});
|
|
14082
14160
|
}
|
|
@@ -15966,7 +16044,7 @@ const WSAdditonalDetails = ({
|
|
|
15966
16044
|
connectionDetails: [],
|
|
15967
16045
|
plumberDetails: []
|
|
15968
16046
|
};
|
|
15969
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
16047
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
15970
16048
|
style: {
|
|
15971
16049
|
lineHeight: "19px",
|
|
15972
16050
|
maxWidth: "950px",
|
|
@@ -15977,7 +16055,9 @@ const WSAdditonalDetails = ({
|
|
|
15977
16055
|
}, t("WS_COMMON_CONNECTION_DETAIL")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
15978
16056
|
className: "connection-details-new-value-wrapper"
|
|
15979
16057
|
}, connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.map((value, index) => {
|
|
15980
|
-
return /*#__PURE__*/React.createElement("div",
|
|
16058
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
16059
|
+
key: index
|
|
16060
|
+
}, /*#__PURE__*/React.createElement(Row, {
|
|
15981
16061
|
className: "border-none",
|
|
15982
16062
|
key: `${value.title}`,
|
|
15983
16063
|
label: `${t(`${value.title}`)}`,
|
|
@@ -15999,9 +16079,10 @@ const WSAdditonalDetails = ({
|
|
|
15999
16079
|
style: cardSubHeaderStyles()
|
|
16000
16080
|
}, t("WS_ROAD_CUTTING_DETAILS")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
16001
16081
|
className: "plumber-details-new-value-wrapper"
|
|
16002
|
-
}, roadCuttingDetails === null || roadCuttingDetails === void 0 ? void 0 : roadCuttingDetails.map(value => {
|
|
16082
|
+
}, roadCuttingDetails === null || roadCuttingDetails === void 0 ? void 0 : roadCuttingDetails.map((value, index) => {
|
|
16003
16083
|
var _value$values;
|
|
16004
16084
|
return /*#__PURE__*/React.createElement("div", {
|
|
16085
|
+
key: index,
|
|
16005
16086
|
style: (roadCuttingDetails === null || roadCuttingDetails === void 0 ? void 0 : roadCuttingDetails.length) > 1 ? {
|
|
16006
16087
|
border: "1px solid #D6D5D4",
|
|
16007
16088
|
background: "#FAFAFA",
|
|
@@ -17223,18 +17304,18 @@ function ApplicationDetailsContent({
|
|
|
17223
17304
|
infoClickInfoLabel: getClickInfoDetails(),
|
|
17224
17305
|
infoClickInfoLabel1: getClickInfoDetails1()
|
|
17225
17306
|
}) : null, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a2 = applicationDetails.applicationDetails) === null || _applicationDetails$a2 === void 0 ? void 0 : _applicationDetails$a2.map((detail, index) => {
|
|
17226
|
-
var _detail$values, _detail$additionalDet, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _detail$additionalDet2, _applicationDetails$a6, _applicationDetails$a7, _detail$additionalDet3, _detail$additionalDet4, _detail$additionalDet5, _detail$additionalDet6, _detail$additionalDet7, _detail$additionalDet8, _detail$additionalDet9, _detail$additionalDet0, _detail$additionalDet1, _workflowDetails$data, _workflowDetails$data2, _detail$additionalDet10, _detail$additionalDet11, _detail$additionalDet12, _detail$additionalDet13, _detail$additionalDet14, _detail$additionalDet15, _detail$additionalDet16, _detail$additionalDet17, _detail$additionalDet18, _detail$additionalDet19, _detail$additionalDet20, _detail$additionalDet21, _detail$additionalDet22, _detail$additionalDet23, _detail$additionalDet24, _detail$additionalDet25, _detail$additionalDet26, _detail$additionalDet27, _detail$additionalDet28, _detail$additionalDet29;
|
|
17307
|
+
var _detail$title, _detail$values, _detail$additionalDet, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _detail$additionalDet2, _applicationDetails$a6, _applicationDetails$a7, _detail$additionalDet3, _detail$additionalDet4, _detail$additionalDet5, _detail$additionalDet6, _detail$additionalDet7, _detail$additionalDet8, _detail$additionalDet9, _detail$additionalDet0, _detail$additionalDet1, _workflowDetails$data, _workflowDetails$data2, _detail$additionalDet10, _detail$additionalDet11, _detail$additionalDet12, _detail$additionalDet13, _detail$additionalDet14, _detail$additionalDet15, _detail$additionalDet16, _detail$additionalDet17, _detail$additionalDet18, _detail$additionalDet19, _detail$additionalDet20, _detail$additionalDet21, _detail$additionalDet22, _detail$additionalDet23, _detail$additionalDet24, _detail$additionalDet25, _detail$additionalDet26, _detail$additionalDet27, _detail$additionalDet28, _detail$additionalDet29;
|
|
17227
17308
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
17228
17309
|
key: index
|
|
17229
17310
|
}, /*#__PURE__*/React.createElement("div", {
|
|
17230
17311
|
style: getMainDivStyles()
|
|
17231
|
-
}, index === 0 && !detail.asSectionHeader ? /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
17312
|
+
}, (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.createElement(CardSubHeader, {
|
|
17232
17313
|
style: {
|
|
17233
17314
|
marginBottom: "16px",
|
|
17234
17315
|
fontSize: "24px"
|
|
17235
17316
|
}
|
|
17236
|
-
}, t(detail.title)) : /*#__PURE__*/React.createElement(
|
|
17237
|
-
style: index
|
|
17317
|
+
}, t(detail.title)) : /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
17318
|
+
style: index === 0 && checkLocation ? {
|
|
17238
17319
|
marginBottom: "16px",
|
|
17239
17320
|
fontSize: "24px"
|
|
17240
17321
|
} : {
|
|
@@ -17242,7 +17323,7 @@ function ApplicationDetailsContent({
|
|
|
17242
17323
|
marginTop: "32px",
|
|
17243
17324
|
fontSize: "24px"
|
|
17244
17325
|
}
|
|
17245
|
-
},
|
|
17326
|
+
}, t(detail.title), detail !== null && detail !== void 0 && detail.Component ? /*#__PURE__*/React.createElement(detail.Component, null) : null)), (detail === null || detail === void 0 ? void 0 : detail.isTable) && /*#__PURE__*/React.createElement("table", {
|
|
17246
17327
|
style: {
|
|
17247
17328
|
tableLayout: "fixed",
|
|
17248
17329
|
width: "100%",
|
|
@@ -17254,14 +17335,17 @@ function ApplicationDetailsContent({
|
|
|
17254
17335
|
style: {
|
|
17255
17336
|
textAlign: "left"
|
|
17256
17337
|
}
|
|
17257
|
-
}, detail === null || detail === void 0 ? void 0 : detail.headers.map(header => /*#__PURE__*/React.createElement("th", {
|
|
17338
|
+
}, detail === null || detail === void 0 ? void 0 : detail.headers.map((header, index) => /*#__PURE__*/React.createElement("th", {
|
|
17258
17339
|
style: {
|
|
17259
17340
|
padding: "10px",
|
|
17260
17341
|
paddingLeft: "5px",
|
|
17261
17342
|
border: "1px solid black"
|
|
17262
|
-
}
|
|
17343
|
+
},
|
|
17344
|
+
key: index
|
|
17263
17345
|
}, t(header)))), detail === null || detail === void 0 ? void 0 : detail.tableRows.map((row, index) => {
|
|
17264
|
-
return /*#__PURE__*/React.createElement("tr",
|
|
17346
|
+
return /*#__PURE__*/React.createElement("tr", {
|
|
17347
|
+
key: index
|
|
17348
|
+
}, row.map((element, idx) => Array.isArray(element) && element.length > 1 && detail.isMaintenance === true ? /*#__PURE__*/React.createElement("td", {
|
|
17265
17349
|
style: {
|
|
17266
17350
|
paddingTop: "20px",
|
|
17267
17351
|
textAlign: "left",
|
|
@@ -17374,7 +17458,9 @@ function ApplicationDetailsContent({
|
|
|
17374
17458
|
}
|
|
17375
17459
|
});
|
|
17376
17460
|
}
|
|
17377
|
-
return /*#__PURE__*/React.createElement("div",
|
|
17461
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
17462
|
+
key: index
|
|
17463
|
+
}, window.location.href.includes("modify") ? /*#__PURE__*/React.createElement(Row, {
|
|
17378
17464
|
className: "border-none",
|
|
17379
17465
|
key: `${value.title}`,
|
|
17380
17466
|
label: `${t(`${value.title}`)}`,
|
|
@@ -18083,43 +18169,44 @@ const WorkflowTimeline = ({
|
|
|
18083
18169
|
const {
|
|
18084
18170
|
t
|
|
18085
18171
|
} = useTranslation();
|
|
18086
|
-
|
|
18172
|
+
const timeline = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.processInstances;
|
|
18173
|
+
if (!timeline || timeline.length === 0) {
|
|
18087
18174
|
return null;
|
|
18088
18175
|
}
|
|
18089
|
-
const
|
|
18090
|
-
|
|
18091
|
-
|
|
18092
|
-
return 'completed2';
|
|
18176
|
+
const getStatusClass = index => {
|
|
18177
|
+
if (index === 0) return "current2";
|
|
18178
|
+
return "completed2";
|
|
18093
18179
|
};
|
|
18094
|
-
const
|
|
18095
|
-
if (!
|
|
18096
|
-
const date = new Date(
|
|
18097
|
-
const day = date.getDate()
|
|
18098
|
-
const month = (date.getMonth() + 1).
|
|
18180
|
+
const convertEpochToDateTime = epoch => {
|
|
18181
|
+
if (!epoch) return "N/A";
|
|
18182
|
+
const date = new Date(epoch);
|
|
18183
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
18184
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
18099
18185
|
const year = date.getFullYear().toString().slice(-2);
|
|
18100
|
-
const hours = date.getHours()
|
|
18101
|
-
const minutes = date.getMinutes()
|
|
18186
|
+
const hours = String(date.getHours()).padStart(2, "0");
|
|
18187
|
+
const minutes = String(date.getMinutes()).padStart(2, "0");
|
|
18102
18188
|
return `${day}/${month}/${year} ${hours}:${minutes}`;
|
|
18103
18189
|
};
|
|
18104
18190
|
return /*#__PURE__*/React.createElement(Card, {
|
|
18105
18191
|
className: "workflow-timeline-card2 digit-form-composer",
|
|
18106
18192
|
style: {
|
|
18107
|
-
background:
|
|
18108
|
-
padding:
|
|
18193
|
+
background: "#fafafa",
|
|
18194
|
+
padding: "16px"
|
|
18109
18195
|
}
|
|
18110
18196
|
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
18111
18197
|
style: {
|
|
18112
|
-
marginBottom:
|
|
18113
|
-
fontSize:
|
|
18114
|
-
fontWeight:
|
|
18115
|
-
color:
|
|
18198
|
+
marginBottom: "16px",
|
|
18199
|
+
fontSize: "16px",
|
|
18200
|
+
fontWeight: "700",
|
|
18201
|
+
color: "#374151"
|
|
18116
18202
|
}
|
|
18117
18203
|
}, t("WORKFLOW_TIMELINE")), /*#__PURE__*/React.createElement("div", {
|
|
18118
18204
|
className: "timeline-container2"
|
|
18119
18205
|
}, timeline.map((checkpoint, index) => {
|
|
18120
|
-
var _checkpoint$auditDeta, _checkpoint$
|
|
18121
|
-
const statusClass = getStatusClass(
|
|
18206
|
+
var _checkpoint$auditDeta, _checkpoint$auditDeta2, _checkpoint$state, _checkpoint$state2, _checkpoint$state3, _checkpoint$assigner, _checkpoint$assigner2;
|
|
18207
|
+
const statusClass = getStatusClass(index);
|
|
18122
18208
|
const showLine = index !== timeline.length - 1 && timeline.length > 1;
|
|
18209
|
+
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);
|
|
18123
18210
|
return /*#__PURE__*/React.createElement("div", {
|
|
18124
18211
|
key: index,
|
|
18125
18212
|
className: `timeline-item2 ${statusClass}`
|
|
@@ -18127,7 +18214,7 @@ const WorkflowTimeline = ({
|
|
|
18127
18214
|
className: "timeline-marker2"
|
|
18128
18215
|
}, /*#__PURE__*/React.createElement("div", {
|
|
18129
18216
|
className: "timeline-circle2"
|
|
18130
|
-
}, statusClass ===
|
|
18217
|
+
}, statusClass === "completed2" ? /*#__PURE__*/React.createElement(CheckIcon, null) : /*#__PURE__*/React.createElement(ClockIcon, null)), showLine && /*#__PURE__*/React.createElement("div", {
|
|
18131
18218
|
className: "timeline-line2"
|
|
18132
18219
|
})), /*#__PURE__*/React.createElement("div", {
|
|
18133
18220
|
className: "timeline-content2"
|
|
@@ -18135,17 +18222,17 @@ const WorkflowTimeline = ({
|
|
|
18135
18222
|
className: "timeline-header2"
|
|
18136
18223
|
}, /*#__PURE__*/React.createElement("div", {
|
|
18137
18224
|
className: "timeline-title2"
|
|
18138
|
-
}, t(`WF_${
|
|
18225
|
+
}, t(`WF_${checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state = checkpoint.state) === null || _checkpoint$state === void 0 ? void 0 : _checkpoint$state.state}`)), /*#__PURE__*/React.createElement("span", {
|
|
18139
18226
|
className: "timeline-date2"
|
|
18140
|
-
},
|
|
18227
|
+
}, convertEpochToDateTime(epochTime))), /*#__PURE__*/React.createElement("div", {
|
|
18141
18228
|
className: "timeline-body2"
|
|
18142
18229
|
}, /*#__PURE__*/React.createElement("div", {
|
|
18143
18230
|
className: `timeline-status-tag2 status-${statusClass}`
|
|
18144
|
-
}, t(checkpoint.
|
|
18231
|
+
}, t((checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state2 = checkpoint.state) === null || _checkpoint$state2 === void 0 ? void 0 : _checkpoint$state2.applicationStatus) || (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.comment) && /*#__PURE__*/React.createElement("div", {
|
|
18145
18232
|
className: "timeline-comment2"
|
|
18146
|
-
},
|
|
18233
|
+
}, checkpoint.comment)), (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name) && /*#__PURE__*/React.createElement("div", {
|
|
18147
18234
|
className: "timeline-footer2"
|
|
18148
|
-
}, /*#__PURE__*/React.createElement("span", null, t("ES_COMMON_ASSIGNED_TO"), ": ", /*#__PURE__*/React.createElement("strong", null, checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$
|
|
18235
|
+
}, /*#__PURE__*/React.createElement("span", null, t("ES_COMMON_ASSIGNED_TO"), ":", " ", /*#__PURE__*/React.createElement("strong", null, checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner2 = checkpoint.assigner) === null || _checkpoint$assigner2 === void 0 ? void 0 : _checkpoint$assigner2.name)))));
|
|
18149
18236
|
})));
|
|
18150
18237
|
};
|
|
18151
18238
|
|