@djb25/digit-ui-module-wt 1.0.7 → 1.0.9
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 +32 -18
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1453,9 +1453,10 @@ const RequestDetails = ({
|
|
|
1453
1453
|
const [description, setdescription] = useState((formData === null || formData === void 0 ? void 0 : (_formData$requestDeta6 = formData.requestDetails) === null || _formData$requestDeta6 === void 0 ? void 0 : _formData$requestDeta6.description) || "");
|
|
1454
1454
|
const [deliveryTime, setdeliveryTime] = useState((formData === null || formData === void 0 ? void 0 : (_formData$requestDeta7 = formData.requestDetails) === null || _formData$requestDeta7 === void 0 ? void 0 : _formData$requestDeta7.deliveryTime) || "");
|
|
1455
1455
|
const [extraCharge, setextraCharge] = useState((formData === null || formData === void 0 ? void 0 : (_formData$requestDeta8 = formData.requestDetails) === null || _formData$requestDeta8 === void 0 ? void 0 : _formData$requestDeta8.extraCharge) || false);
|
|
1456
|
+
const [error, setError] = useState(null);
|
|
1456
1457
|
const tenantId = Digit.ULBService.getStateId();
|
|
1457
1458
|
const inputStyles = {
|
|
1458
|
-
width: user.type === "EMPLOYEE" ? "
|
|
1459
|
+
width: user.type === "EMPLOYEE" ? "100%" : "100%"
|
|
1459
1460
|
};
|
|
1460
1461
|
const {
|
|
1461
1462
|
data: VehicleType
|
|
@@ -1590,7 +1591,7 @@ const RequestDetails = ({
|
|
|
1590
1591
|
onSelect: goNext,
|
|
1591
1592
|
t: t,
|
|
1592
1593
|
isDisabled: !tankerType || !deliveryDate || !tankerQuantity || !waterQuantity || !deliveryTime || !description || !waterType
|
|
1593
|
-
}, /*#__PURE__*/React.createElement(
|
|
1594
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_TANKER_TYPE")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1594
1595
|
className: "astericColor"
|
|
1595
1596
|
}, "*")), /*#__PURE__*/React.createElement(RadioButtons, {
|
|
1596
1597
|
t: t,
|
|
@@ -1610,7 +1611,7 @@ const RequestDetails = ({
|
|
|
1610
1611
|
onSelect: settankerType,
|
|
1611
1612
|
labelKey: "i18nKey",
|
|
1612
1613
|
isPTFlow: true
|
|
1613
|
-
}), /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_WATER_TYPE")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1614
|
+
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_WATER_TYPE")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1614
1615
|
className: "astericColor"
|
|
1615
1616
|
}, "*")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
1616
1617
|
className: "form-field",
|
|
@@ -1621,7 +1622,7 @@ const RequestDetails = ({
|
|
|
1621
1622
|
style: inputStyles,
|
|
1622
1623
|
optionKey: "i18nKey",
|
|
1623
1624
|
t: t
|
|
1624
|
-
}), /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_WATER_QUANTITY")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1625
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_WATER_QUANTITY")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1625
1626
|
className: "astericColor"
|
|
1626
1627
|
}, "*")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
1627
1628
|
className: "form-field",
|
|
@@ -1632,7 +1633,7 @@ const RequestDetails = ({
|
|
|
1632
1633
|
style: inputStyles,
|
|
1633
1634
|
optionKey: "i18nKey",
|
|
1634
1635
|
t: t
|
|
1635
|
-
}), /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_TANKER_QUANTITY")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1636
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_TANKER_QUANTITY")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1636
1637
|
className: "astericColor"
|
|
1637
1638
|
}, "*")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
1638
1639
|
className: "form-field",
|
|
@@ -1643,7 +1644,7 @@ const RequestDetails = ({
|
|
|
1643
1644
|
style: inputStyles,
|
|
1644
1645
|
optionKey: "i18nKey",
|
|
1645
1646
|
t: t
|
|
1646
|
-
}), /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_DELIVERY_DATE")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1647
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_DELIVERY_DATE")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1647
1648
|
className: "astericColor"
|
|
1648
1649
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
1649
1650
|
t: t,
|
|
@@ -1654,14 +1655,14 @@ const RequestDetails = ({
|
|
|
1654
1655
|
style: inputStyles,
|
|
1655
1656
|
value: deliveryDate,
|
|
1656
1657
|
onChange: setDeliveryDate,
|
|
1657
|
-
min: new Date().toISOString().split(
|
|
1658
|
+
min: new Date().toISOString().split("T")[0],
|
|
1658
1659
|
rules: {
|
|
1659
1660
|
required: t("CORE_COMMON_REQUIRED_ERRMSG"),
|
|
1660
1661
|
validDate: val => /^\d{4}-\d{2}-\d{2}$/.test(val) ? true : t("ERR_DEFAULT_INPUT_FIELD_MSG")
|
|
1661
1662
|
}
|
|
1662
|
-
}), /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_DELIVERY_TIME")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1663
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_DELIVERY_TIME")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1663
1664
|
className: "astericColor"
|
|
1664
|
-
}, "*")), /*#__PURE__*/React.createElement(TimeInput, null), /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_DESCRIPTION")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1665
|
+
}, "*")), /*#__PURE__*/React.createElement(TimeInput, null)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WT_DESCRIPTION")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1665
1666
|
className: "astericColor"
|
|
1666
1667
|
}, "*")), /*#__PURE__*/React.createElement(TextArea, Object.assign({
|
|
1667
1668
|
t: t,
|
|
@@ -1678,11 +1679,25 @@ const RequestDetails = ({
|
|
|
1678
1679
|
pattern: "^[a-zA-Z ]+$",
|
|
1679
1680
|
type: "tel",
|
|
1680
1681
|
title: t("PT_NAME_ERROR_MESSAGE")
|
|
1681
|
-
})), /*#__PURE__*/React.createElement(
|
|
1682
|
+
}))), error ? /*#__PURE__*/React.createElement("div", {
|
|
1683
|
+
style: {
|
|
1684
|
+
height: "20px",
|
|
1685
|
+
width: "100%",
|
|
1686
|
+
fontSize: "20px",
|
|
1687
|
+
color: "red",
|
|
1688
|
+
marginTop: "5px"
|
|
1689
|
+
}
|
|
1690
|
+
}, error) : "", /*#__PURE__*/React.createElement("div", {
|
|
1691
|
+
style: {
|
|
1692
|
+
disabled: "true",
|
|
1693
|
+
height: "20px",
|
|
1694
|
+
width: "100%"
|
|
1695
|
+
}
|
|
1696
|
+
}), /*#__PURE__*/React.createElement(CheckBox, {
|
|
1682
1697
|
label: t("WT_IMMEDIATE"),
|
|
1683
1698
|
onChange: setextrachargeHandler,
|
|
1684
1699
|
checked: extraCharge
|
|
1685
|
-
})))
|
|
1700
|
+
})));
|
|
1686
1701
|
};
|
|
1687
1702
|
|
|
1688
1703
|
const ActionButton = ({
|
|
@@ -17193,7 +17208,6 @@ function ApplicationDetailsContent({
|
|
|
17193
17208
|
const openFilePDF = fileId => {
|
|
17194
17209
|
Digit.UploadServices.Filefetch([fileId], Digit.ULBService.getStateId()).then(res => {
|
|
17195
17210
|
var _res$data, _res$data$fileStoreId, _res$data$fileStoreId2;
|
|
17196
|
-
console.log("Response of file:", res);
|
|
17197
17211
|
const concatenatedUrls = res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$fileStoreId = _res$data.fileStoreIds) === null || _res$data$fileStoreId === void 0 ? void 0 : (_res$data$fileStoreId2 = _res$data$fileStoreId[0]) === null || _res$data$fileStoreId2 === void 0 ? void 0 : _res$data$fileStoreId2.url;
|
|
17198
17212
|
if (concatenatedUrls) {
|
|
17199
17213
|
const urlArray = concatenatedUrls.split(",");
|
|
@@ -17214,7 +17228,6 @@ function ApplicationDetailsContent({
|
|
|
17214
17228
|
setSelectedData(data);
|
|
17215
17229
|
setShowPopup(true);
|
|
17216
17230
|
};
|
|
17217
|
-
console.log("===========================");
|
|
17218
17231
|
return /*#__PURE__*/React.createElement(Card, {
|
|
17219
17232
|
style: {
|
|
17220
17233
|
position: "relative"
|
|
@@ -17252,7 +17265,6 @@ function ApplicationDetailsContent({
|
|
|
17252
17265
|
tableLayout: "fixed",
|
|
17253
17266
|
width: "100%",
|
|
17254
17267
|
borderCollapse: "collapse",
|
|
17255
|
-
borderCollapse: "collapse",
|
|
17256
17268
|
border: "1px solid black"
|
|
17257
17269
|
}
|
|
17258
17270
|
}, /*#__PURE__*/React.createElement("tr", {
|
|
@@ -17283,7 +17295,9 @@ function ApplicationDetailsContent({
|
|
|
17283
17295
|
flexWrap: "nowrap",
|
|
17284
17296
|
gap: "5px"
|
|
17285
17297
|
}
|
|
17286
|
-
}, element.map((file, fileIndex) =>
|
|
17298
|
+
}, element.map((file, fileIndex) =>
|
|
17299
|
+
/*#__PURE__*/
|
|
17300
|
+
React.createElement("a", {
|
|
17287
17301
|
key: fileIndex,
|
|
17288
17302
|
onClick: () => openFilePDF(file.fileStoreId),
|
|
17289
17303
|
rel: "noopener noreferrer",
|
|
@@ -17305,7 +17319,7 @@ function ApplicationDetailsContent({
|
|
|
17305
17319
|
border: "1px solid black",
|
|
17306
17320
|
verticalAlign: "middle"
|
|
17307
17321
|
}
|
|
17308
|
-
},
|
|
17322
|
+
}, element && element.editButton === true ? /*#__PURE__*/React.createElement("span", {
|
|
17309
17323
|
style: {
|
|
17310
17324
|
display: "inline-flex",
|
|
17311
17325
|
gap: "10px",
|
|
@@ -17346,7 +17360,7 @@ function ApplicationDetailsContent({
|
|
|
17346
17360
|
})
|
|
17347
17361
|
});
|
|
17348
17362
|
}
|
|
17349
|
-
if ((value === null || value === void 0 ? void 0 : value.isLink)
|
|
17363
|
+
if ((value === null || value === void 0 ? void 0 : value.isLink) === true) {
|
|
17350
17364
|
var _detail$values2;
|
|
17351
17365
|
return /*#__PURE__*/React.createElement(Row, {
|
|
17352
17366
|
key: t(value.title),
|
|
@@ -17501,7 +17515,7 @@ function ApplicationDetailsContent({
|
|
|
17501
17515
|
let timelineStatusPostfix = "";
|
|
17502
17516
|
if (window.location.href.includes("/obps/")) {
|
|
17503
17517
|
var _workflowDetails$data12, _workflowDetails$data13, _workflowDetails$data14, _workflowDetails$data15, _workflowDetails$data16, _workflowDetails$data17;
|
|
17504
|
-
if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data12 = workflowDetails.data) !== null && _workflowDetails$data12 !== void 0 && (_workflowDetails$data13 = _workflowDetails$data12.timeline[index - 1]) !== null && _workflowDetails$data13 !== void 0 && (_workflowDetails$data14 = _workflowDetails$data13.state) !== null && _workflowDetails$data14 !== void 0 && _workflowDetails$data14.includes("BACK_FROM") || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data15 = workflowDetails.data) !== null && _workflowDetails$data15 !== void 0 && (_workflowDetails$data16 = _workflowDetails$data15.timeline[index - 1]) !== null && _workflowDetails$data16 !== void 0 && (_workflowDetails$data17 = _workflowDetails$data16.state) !== null && _workflowDetails$data17 !== void 0 && _workflowDetails$data17.includes("SEND_TO_CITIZEN")) timelineStatusPostfix = `_NOT_DONE`;else if ((checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.performedAction) === "SEND_TO_ARCHITECT") timelineStatusPostfix = `_BY_ARCHITECT_DONE`;else timelineStatusPostfix = index
|
|
17518
|
+
if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data12 = workflowDetails.data) !== null && _workflowDetails$data12 !== void 0 && (_workflowDetails$data13 = _workflowDetails$data12.timeline[index - 1]) !== null && _workflowDetails$data13 !== void 0 && (_workflowDetails$data14 = _workflowDetails$data13.state) !== null && _workflowDetails$data14 !== void 0 && _workflowDetails$data14.includes("BACK_FROM") || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data15 = workflowDetails.data) !== null && _workflowDetails$data15 !== void 0 && (_workflowDetails$data16 = _workflowDetails$data15.timeline[index - 1]) !== null && _workflowDetails$data16 !== void 0 && (_workflowDetails$data17 = _workflowDetails$data16.state) !== null && _workflowDetails$data17 !== void 0 && _workflowDetails$data17.includes("SEND_TO_CITIZEN")) timelineStatusPostfix = `_NOT_DONE`;else if ((checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.performedAction) === "SEND_TO_ARCHITECT") timelineStatusPostfix = `_BY_ARCHITECT_DONE`;else timelineStatusPostfix = index === 0 ? "" : `_DONE`;
|
|
17505
17519
|
}
|
|
17506
17520
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
17507
17521
|
key: index
|