@mseva/upyog-ui-module-chb 1.0.75 → 1.0.77
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 +47330 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +312 -213
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -18515,28 +18515,13 @@ const ChbApplication = ({
|
|
|
18515
18515
|
tenantId,
|
|
18516
18516
|
buttonLabel
|
|
18517
18517
|
}) => {
|
|
18518
|
-
var _application$
|
|
18518
|
+
var _application$applican;
|
|
18519
18519
|
const {
|
|
18520
18520
|
t
|
|
18521
18521
|
} = useTranslation();
|
|
18522
18522
|
const history = useHistory();
|
|
18523
18523
|
const [showToast, setShowToast] = useState(null);
|
|
18524
18524
|
console.log("application", application);
|
|
18525
|
-
const {
|
|
18526
|
-
data: slotSearchData,
|
|
18527
|
-
refetch
|
|
18528
|
-
} = Digit.Hooks.chb.useChbSlotSearch({
|
|
18529
|
-
tenantId: application === null || application === void 0 ? void 0 : application.tenantId,
|
|
18530
|
-
filters: {
|
|
18531
|
-
bookingId: application === null || application === void 0 ? void 0 : application.bookingId,
|
|
18532
|
-
communityHallCode: application === null || application === void 0 ? void 0 : application.communityHallCode,
|
|
18533
|
-
bookingStartDate: application === null || application === void 0 ? void 0 : (_application$bookingS = application.bookingSlotDetails) === null || _application$bookingS === void 0 ? void 0 : (_application$bookingS2 = _application$bookingS[0]) === null || _application$bookingS2 === void 0 ? void 0 : _application$bookingS2.bookingDate,
|
|
18534
|
-
bookingEndDate: application === null || application === void 0 ? void 0 : (_application$bookingS3 = application.bookingSlotDetails) === null || _application$bookingS3 === void 0 ? void 0 : (_application$bookingS4 = _application$bookingS3[application.bookingSlotDetails.length - 1]) === null || _application$bookingS4 === void 0 ? void 0 : _application$bookingS4.bookingDate,
|
|
18535
|
-
hallCode: application === null || application === void 0 ? void 0 : (_application$bookingS5 = application.bookingSlotDetails) === null || _application$bookingS5 === void 0 ? void 0 : (_application$bookingS6 = _application$bookingS5[0]) === null || _application$bookingS6 === void 0 ? void 0 : _application$bookingS6.hallCode,
|
|
18536
|
-
isTimerRequired: true
|
|
18537
|
-
},
|
|
18538
|
-
enabled: false
|
|
18539
|
-
});
|
|
18540
18525
|
const getBookingDateRange = bookingSlotDetails => {
|
|
18541
18526
|
var _bookingSlotDetails$, _bookingSlotDetails;
|
|
18542
18527
|
if (!bookingSlotDetails || bookingSlotDetails.length === 0) {
|
|
@@ -18597,10 +18582,7 @@ const CHBMyApplications = () => {
|
|
|
18597
18582
|
const {
|
|
18598
18583
|
t
|
|
18599
18584
|
} = useTranslation();
|
|
18600
|
-
const user = Digit.UserService.getUser().info;
|
|
18601
18585
|
const tenantId = window.localStorage.getItem("CITIZEN.CITY");
|
|
18602
|
-
const [searchTerm, setSearchTerm] = useState("");
|
|
18603
|
-
const [status, setStatus] = useState(null);
|
|
18604
18586
|
const [filters, setFilters] = useState(null);
|
|
18605
18587
|
let filter = window.location.href.split("/").pop();
|
|
18606
18588
|
let t1;
|
|
@@ -18618,7 +18600,7 @@ const CHBMyApplications = () => {
|
|
|
18618
18600
|
offset: off,
|
|
18619
18601
|
tenantId
|
|
18620
18602
|
} : {
|
|
18621
|
-
limit: "
|
|
18603
|
+
limit: "10",
|
|
18622
18604
|
sortOrder: "ASC",
|
|
18623
18605
|
sortBy: "createdTime",
|
|
18624
18606
|
offset: "0",
|
|
@@ -18626,29 +18608,26 @@ const CHBMyApplications = () => {
|
|
|
18626
18608
|
};
|
|
18627
18609
|
useEffect(() => {
|
|
18628
18610
|
setFilters(initialFilters);
|
|
18629
|
-
}, [filter]);
|
|
18611
|
+
}, [filter, tenantId]);
|
|
18630
18612
|
const {
|
|
18631
18613
|
isLoading,
|
|
18632
|
-
data
|
|
18614
|
+
data,
|
|
18615
|
+
refetch
|
|
18633
18616
|
} = Digit.Hooks.chb.useChbSearch({
|
|
18634
18617
|
filters
|
|
18635
18618
|
});
|
|
18619
|
+
const handleLoadMore = () => {
|
|
18620
|
+
setFilters(prev => ({
|
|
18621
|
+
...prev,
|
|
18622
|
+
limit: Number(prev.limit) + 5
|
|
18623
|
+
}));
|
|
18624
|
+
};
|
|
18625
|
+
useEffect(() => {
|
|
18626
|
+
refetch();
|
|
18627
|
+
}, []);
|
|
18636
18628
|
if (isLoading) {
|
|
18637
18629
|
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
18638
18630
|
}
|
|
18639
|
-
const statusOptions = [{
|
|
18640
|
-
i18nKey: "Booked",
|
|
18641
|
-
code: "BOOKED",
|
|
18642
|
-
value: t("CHB_BOOKED")
|
|
18643
|
-
}, {
|
|
18644
|
-
i18nKey: "Booking in Progres",
|
|
18645
|
-
code: "BOOKING_CREATED",
|
|
18646
|
-
value: t("CHB_BOOKING_IN_PROGRES")
|
|
18647
|
-
}, {
|
|
18648
|
-
i18nKey: "Cancelled",
|
|
18649
|
-
code: "CANCELLED",
|
|
18650
|
-
value: t("CANCELLED")
|
|
18651
|
-
}];
|
|
18652
18631
|
const filteredApplications = (data === null || data === void 0 ? void 0 : data.hallsBookingApplication) || [];
|
|
18653
18632
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, null, `${t("CHB_MY_APPLICATION_HEADER")} (${filteredApplications.length})`), /*#__PURE__*/React.createElement("div", null, filteredApplications.length > 0 && filteredApplications.map((application, index) => /*#__PURE__*/React.createElement("div", {
|
|
18654
18633
|
key: index
|
|
@@ -18661,18 +18640,94 @@ const CHBMyApplications = () => {
|
|
|
18661
18640
|
marginLeft: "16px",
|
|
18662
18641
|
marginTop: "16px"
|
|
18663
18642
|
}
|
|
18664
|
-
}, t("CHB_NO_APPLICATION_FOUND_MSG")), filteredApplications.length !== 0 && (data === null || data === void 0 ? void 0 : data.count) > t1 && /*#__PURE__*/React.createElement("div",
|
|
18643
|
+
}, t("CHB_NO_APPLICATION_FOUND_MSG")), filteredApplications.length !== 0 && (data === null || data === void 0 ? void 0 : data.count) > t1 && /*#__PURE__*/React.createElement("div", {
|
|
18665
18644
|
style: {
|
|
18666
18645
|
marginLeft: "16px",
|
|
18667
18646
|
marginTop: "16px"
|
|
18668
18647
|
}
|
|
18669
18648
|
}, /*#__PURE__*/React.createElement("span", {
|
|
18670
|
-
className: "link"
|
|
18671
|
-
|
|
18672
|
-
|
|
18673
|
-
|
|
18649
|
+
className: "link",
|
|
18650
|
+
style: {
|
|
18651
|
+
cursor: "pointer",
|
|
18652
|
+
color: "#007bff"
|
|
18653
|
+
},
|
|
18654
|
+
onClick: handleLoadMore
|
|
18655
|
+
}, t("CHB_LOAD_MORE_MSG")))));
|
|
18674
18656
|
};
|
|
18675
18657
|
|
|
18658
|
+
const PDFSvg = ({
|
|
18659
|
+
width: _width = 20,
|
|
18660
|
+
height: _height = 20,
|
|
18661
|
+
style
|
|
18662
|
+
}) => /*#__PURE__*/React.createElement("svg", {
|
|
18663
|
+
style: style,
|
|
18664
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18665
|
+
width: _width,
|
|
18666
|
+
height: _height,
|
|
18667
|
+
viewBox: "0 0 20 20",
|
|
18668
|
+
fill: "gray"
|
|
18669
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
18670
|
+
d: "M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm10 5.5h1v-3h-1v3z"
|
|
18671
|
+
}));
|
|
18672
|
+
function NDCDocument({
|
|
18673
|
+
value = {},
|
|
18674
|
+
Code,
|
|
18675
|
+
index
|
|
18676
|
+
}) {
|
|
18677
|
+
const {
|
|
18678
|
+
t
|
|
18679
|
+
} = useTranslation();
|
|
18680
|
+
const {
|
|
18681
|
+
isLoading,
|
|
18682
|
+
isError,
|
|
18683
|
+
error,
|
|
18684
|
+
data
|
|
18685
|
+
} = Digit.Hooks.ads.useADSDocumentSearch({
|
|
18686
|
+
value
|
|
18687
|
+
}, {
|
|
18688
|
+
value
|
|
18689
|
+
}, Code, index);
|
|
18690
|
+
console.log("dataInNDCDocument", data);
|
|
18691
|
+
const documents = value !== null && value !== void 0 && value.documents ? value.documents.documents.filter(doc => doc.documentType === Code).map(doc => ({
|
|
18692
|
+
...doc,
|
|
18693
|
+
documentType: doc.documentType.replace(/\./g, "_")
|
|
18694
|
+
})) : value.filter(doc => doc.documentType === Code).map(doc => ({
|
|
18695
|
+
...doc,
|
|
18696
|
+
documentType: doc.documentType.replace(/\./g, "_")
|
|
18697
|
+
}));
|
|
18698
|
+
if (isLoading) {
|
|
18699
|
+
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
18700
|
+
}
|
|
18701
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
18702
|
+
style: {
|
|
18703
|
+
marginTop: "19px"
|
|
18704
|
+
}
|
|
18705
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, (data === null || data === void 0 ? void 0 : data.pdfFiles) && /*#__PURE__*/React.createElement("div", {
|
|
18706
|
+
style: {
|
|
18707
|
+
display: "flex",
|
|
18708
|
+
flexWrap: "wrap"
|
|
18709
|
+
}
|
|
18710
|
+
}, documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
|
|
18711
|
+
let documentLink = pdfDownloadLink(data.pdfFiles, document === null || document === void 0 ? void 0 : document.fileStoreId);
|
|
18712
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
18713
|
+
target: "_",
|
|
18714
|
+
href: documentLink,
|
|
18715
|
+
style: {
|
|
18716
|
+
minWidth: "100px",
|
|
18717
|
+
marginRight: "10px"
|
|
18718
|
+
},
|
|
18719
|
+
key: index
|
|
18720
|
+
}, /*#__PURE__*/React.createElement(PDFSvg, {
|
|
18721
|
+
width: 85,
|
|
18722
|
+
height: 100,
|
|
18723
|
+
style: {
|
|
18724
|
+
background: "#f6f6f6",
|
|
18725
|
+
padding: "8px"
|
|
18726
|
+
}
|
|
18727
|
+
}));
|
|
18728
|
+
}))));
|
|
18729
|
+
}
|
|
18730
|
+
|
|
18676
18731
|
const capitalize = text => text.substr(0, 1).toUpperCase() + text.substr(1);
|
|
18677
18732
|
const ulbCamel = ulb => ulb.toLowerCase().split(" ").map(capitalize).join(" ");
|
|
18678
18733
|
const getChbAcknowledgementData = async (application, tenantInfo, t) => {
|
|
@@ -41594,8 +41649,46 @@ var standalone = createCommonjsModule(function (module, exports) {
|
|
|
41594
41649
|
});
|
|
41595
41650
|
unwrapExports(standalone);
|
|
41596
41651
|
|
|
41652
|
+
const getTimelineCaptions = (checkpoint, index, arr, t) => {
|
|
41653
|
+
var _checkpoint$auditDeta, _checkpoint$assigner, _checkpoint$assigner2, _thumbnailsToShow$thu;
|
|
41654
|
+
console.log("checkpoint", checkpoint);
|
|
41655
|
+
const {
|
|
41656
|
+
wfComment: comment,
|
|
41657
|
+
thumbnailsToShow,
|
|
41658
|
+
wfDocuments
|
|
41659
|
+
} = checkpoint;
|
|
41660
|
+
const caption = {
|
|
41661
|
+
date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModified,
|
|
41662
|
+
name: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name,
|
|
41663
|
+
source: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner2 = checkpoint.assigner) === null || _checkpoint$assigner2 === void 0 ? void 0 : _checkpoint$assigner2.source
|
|
41664
|
+
};
|
|
41665
|
+
return /*#__PURE__*/React.createElement("div", null, (comment === null || comment === void 0 ? void 0 : comment.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
41666
|
+
className: "TLComments"
|
|
41667
|
+
}, /*#__PURE__*/React.createElement("h3", null, t("WF_COMMON_COMMENTS")), /*#__PURE__*/React.createElement("p", {
|
|
41668
|
+
style: {
|
|
41669
|
+
overflowX: "scroll"
|
|
41670
|
+
}
|
|
41671
|
+
}, comment)), (thumbnailsToShow === null || thumbnailsToShow === void 0 ? void 0 : (_thumbnailsToShow$thu = thumbnailsToShow.thumbs) === null || _thumbnailsToShow$thu === void 0 ? void 0 : _thumbnailsToShow$thu.length) > 0 && /*#__PURE__*/React.createElement(DisplayPhotos, {
|
|
41672
|
+
srcs: thumbnailsToShow.thumbs,
|
|
41673
|
+
onClick: (src, idx) => {
|
|
41674
|
+
var _thumbnailsToShow$ful;
|
|
41675
|
+
let fullImage = ((_thumbnailsToShow$ful = thumbnailsToShow.fullImage) === null || _thumbnailsToShow$ful === void 0 ? void 0 : _thumbnailsToShow$ful[idx]) || src;
|
|
41676
|
+
Digit.Utils.zoomImage(fullImage);
|
|
41677
|
+
}
|
|
41678
|
+
}), (wfDocuments === null || wfDocuments === void 0 ? void 0 : wfDocuments.length) > 0 && /*#__PURE__*/React.createElement("div", null, wfDocuments === null || wfDocuments === void 0 ? void 0 : wfDocuments.map((doc, index) => /*#__PURE__*/React.createElement("div", {
|
|
41679
|
+
key: index
|
|
41680
|
+
}, /*#__PURE__*/React.createElement(NDCDocument, {
|
|
41681
|
+
value: wfDocuments,
|
|
41682
|
+
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
41683
|
+
index: index
|
|
41684
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
41685
|
+
style: {
|
|
41686
|
+
marginTop: "8px"
|
|
41687
|
+
}
|
|
41688
|
+
}, caption.date && /*#__PURE__*/React.createElement("p", null, caption.date), caption.name && /*#__PURE__*/React.createElement("p", null, caption.name), caption.source && /*#__PURE__*/React.createElement("p", null, t("ES_COMMON_FILED_VIA_" + caption.source.toUpperCase()))));
|
|
41689
|
+
};
|
|
41597
41690
|
const CHBApplicationDetails = () => {
|
|
41598
|
-
var _chb_details$addition, _chb_details$bookingS, _chb_details$applican, _chb_details$applican2, _chb_details$applican3, _chb_details$specialC, _chb_details$purpose, _docs, _docs2;
|
|
41691
|
+
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _chb_details$addition, _reciept_data$Payment, _reciept_data$Payment4, _chb_details$bookingS, _chb_details$applican, _chb_details$applican2, _chb_details$applican3, _chb_details$specialC, _chb_details$purpose, _docs, _docs2, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0;
|
|
41599
41692
|
const {
|
|
41600
41693
|
t
|
|
41601
41694
|
} = useTranslation();
|
|
@@ -41611,6 +41704,9 @@ const CHBApplicationDetails = () => {
|
|
|
41611
41704
|
const {
|
|
41612
41705
|
data: storeData
|
|
41613
41706
|
} = Digit.Hooks.useStore.getInitData();
|
|
41707
|
+
const {
|
|
41708
|
+
tenants
|
|
41709
|
+
} = storeData || {};
|
|
41614
41710
|
const {
|
|
41615
41711
|
isLoading,
|
|
41616
41712
|
isError,
|
|
@@ -41631,6 +41727,22 @@ const CHBApplicationDetails = () => {
|
|
|
41631
41727
|
const application = chb_details;
|
|
41632
41728
|
sessionStorage.setItem("chb", JSON.stringify(application));
|
|
41633
41729
|
const [loading, setLoading] = useState(false);
|
|
41730
|
+
const workflowDetails = Digit.Hooks.useWorkflowDetails({
|
|
41731
|
+
tenantId: tenantId,
|
|
41732
|
+
id: acknowledgementIds,
|
|
41733
|
+
moduleCode: "chb-services",
|
|
41734
|
+
role: "EMPLOYEE"
|
|
41735
|
+
});
|
|
41736
|
+
if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data = workflowDetails.data) !== null && _workflowDetails$data !== void 0 && (_workflowDetails$data2 = _workflowDetails$data.actionState) !== null && _workflowDetails$data2 !== void 0 && _workflowDetails$data2.nextActions && !workflowDetails.isLoading) workflowDetails.data.actionState.nextActions = [...(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data3 = workflowDetails.data) === null || _workflowDetails$data3 === void 0 ? void 0 : _workflowDetails$data3.nextActions)];
|
|
41737
|
+
if (workflowDetails && workflowDetails.data && !workflowDetails.isLoading) {
|
|
41738
|
+
var _workflowDetails$data4, _workflowDetails$data5;
|
|
41739
|
+
workflowDetails.data.initialActionState = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data4 = workflowDetails.data) === null || _workflowDetails$data4 === void 0 ? void 0 : _workflowDetails$data4.initialActionState) || {
|
|
41740
|
+
...(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data5 = workflowDetails.data) === null || _workflowDetails$data5 === void 0 ? void 0 : _workflowDetails$data5.actionState)
|
|
41741
|
+
} || {};
|
|
41742
|
+
workflowDetails.data.actionState = {
|
|
41743
|
+
...workflowDetails.data
|
|
41744
|
+
};
|
|
41745
|
+
}
|
|
41634
41746
|
const fetchBillData = async () => {
|
|
41635
41747
|
setLoading(true);
|
|
41636
41748
|
const result = await Digit.PaymentService.fetchBill(tenantId, {
|
|
@@ -41656,6 +41768,7 @@ const CHBApplicationDetails = () => {
|
|
|
41656
41768
|
}, {
|
|
41657
41769
|
enabled: true
|
|
41658
41770
|
});
|
|
41771
|
+
console.log("auditResponse", auditResponse);
|
|
41659
41772
|
const {
|
|
41660
41773
|
data: reciept_data,
|
|
41661
41774
|
isLoading: recieptDataLoading
|
|
@@ -41672,6 +41785,14 @@ const CHBApplicationDetails = () => {
|
|
|
41672
41785
|
if (isLoading || auditDataLoading) {
|
|
41673
41786
|
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
41674
41787
|
}
|
|
41788
|
+
const getChbAcknowledgement = async () => {
|
|
41789
|
+
const applications = application || {};
|
|
41790
|
+
const tenantInfo = tenants.find(tenant => tenant.code === applications.tenantId);
|
|
41791
|
+
const acknowldgementDataAPI = await getChbAcknowledgementData({
|
|
41792
|
+
...applications
|
|
41793
|
+
}, tenantInfo, t);
|
|
41794
|
+
Digit.Utils.pdf.generate(acknowldgementDataAPI);
|
|
41795
|
+
};
|
|
41675
41796
|
let documentDate = t("CS_NA");
|
|
41676
41797
|
if (chb_details !== null && chb_details !== void 0 && (_chb_details$addition = chb_details.additionalDetails) !== null && _chb_details$addition !== void 0 && _chb_details$addition.documentDate) {
|
|
41677
41798
|
var _chb_details$addition2;
|
|
@@ -41740,12 +41861,16 @@ const CHBApplicationDetails = () => {
|
|
|
41740
41861
|
window.open(fileStore[fileStoreId], "_blank");
|
|
41741
41862
|
}
|
|
41742
41863
|
let dowloadOptions = [];
|
|
41864
|
+
if ((reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments[0]) === null || _reciept_data$Payment === void 0 ? void 0 : _reciept_data$Payment.paymentStatus) !== "DEPOSITED") dowloadOptions.push({
|
|
41865
|
+
label: t("CHB_DOWNLOAD_ACK_FORM"),
|
|
41866
|
+
onClick: () => getChbAcknowledgement()
|
|
41867
|
+
});
|
|
41743
41868
|
if (reciept_data && (reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments.length) > 0 && recieptDataLoading == false) dowloadOptions.push({
|
|
41744
41869
|
label: t("CHB_FEE_RECEIPT"),
|
|
41745
41870
|
onClick: () => {
|
|
41746
|
-
var _reciept_data$
|
|
41871
|
+
var _reciept_data$Payment2;
|
|
41747
41872
|
return getRecieptSearch({
|
|
41748
|
-
tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$
|
|
41873
|
+
tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment2 = reciept_data.Payments[0]) === null || _reciept_data$Payment2 === void 0 ? void 0 : _reciept_data$Payment2.tenantId,
|
|
41749
41874
|
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0]
|
|
41750
41875
|
});
|
|
41751
41876
|
}
|
|
@@ -41753,16 +41878,23 @@ const CHBApplicationDetails = () => {
|
|
|
41753
41878
|
if (reciept_data && (reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments.length) > 0 && recieptDataLoading == false) dowloadOptions.push({
|
|
41754
41879
|
label: t("CHB_PERMISSION_LETTER"),
|
|
41755
41880
|
onClick: () => {
|
|
41756
|
-
var _reciept_data$
|
|
41881
|
+
var _reciept_data$Payment3;
|
|
41757
41882
|
return getPermissionLetter({
|
|
41758
|
-
tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$
|
|
41883
|
+
tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment3 = reciept_data.Payments[0]) === null || _reciept_data$Payment3 === void 0 ? void 0 : _reciept_data$Payment3.tenantId,
|
|
41759
41884
|
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0]
|
|
41760
41885
|
});
|
|
41761
41886
|
}
|
|
41762
41887
|
});
|
|
41888
|
+
if ((reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment4 = reciept_data.Payments[0]) === null || _reciept_data$Payment4 === void 0 ? void 0 : _reciept_data$Payment4.paymentStatus) === "DEPOSITED") dowloadOptions.push({
|
|
41889
|
+
label: t("CHB_CERTIFICATE"),
|
|
41890
|
+
onClick: () => printCertificate()
|
|
41891
|
+
});
|
|
41763
41892
|
const columns = [{
|
|
41764
41893
|
Header: `${t("CHB_HALL_NUMBER")}`,
|
|
41765
41894
|
accessor: "communityHallCode"
|
|
41895
|
+
}, {
|
|
41896
|
+
Header: `${t("CHB_COMMUNITY_HALL_NAME")}`,
|
|
41897
|
+
accessor: "hallName"
|
|
41766
41898
|
}, {
|
|
41767
41899
|
Header: `${t("CHB_HALL_CODE")}`,
|
|
41768
41900
|
accessor: "hallCode"
|
|
@@ -41773,8 +41905,10 @@ const CHBApplicationDetails = () => {
|
|
|
41773
41905
|
Header: `${t("PT_COMMON_TABLE_COL_STATUS_LABEL")}`,
|
|
41774
41906
|
accessor: "bookingStatus"
|
|
41775
41907
|
}];
|
|
41908
|
+
console.log("chb_details?.bookingSlotDetails", chb_details);
|
|
41776
41909
|
const slotlistRows = (chb_details === null || chb_details === void 0 ? void 0 : (_chb_details$bookingS = chb_details.bookingSlotDetails) === null || _chb_details$bookingS === void 0 ? void 0 : _chb_details$bookingS.map(slot => ({
|
|
41777
41910
|
communityHallCode: `${t(chb_details === null || chb_details === void 0 ? void 0 : chb_details.communityHallCode)}`,
|
|
41911
|
+
hallName: chb_details === null || chb_details === void 0 ? void 0 : chb_details.communityHallName,
|
|
41778
41912
|
hallCode: t(slot.hallCode) + " - " + slot.capacity,
|
|
41779
41913
|
bookingDate: slot.bookingDate,
|
|
41780
41914
|
bookingStatus: t(`WF_NEWTL_${slot === null || slot === void 0 ? void 0 : slot.status}`)
|
|
@@ -41871,7 +42005,23 @@ const CHBApplicationDetails = () => {
|
|
|
41871
42005
|
marginTop: "10px",
|
|
41872
42006
|
fontSize: "15px"
|
|
41873
42007
|
}
|
|
41874
|
-
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED")))))))
|
|
42008
|
+
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data6 = workflowDetails.data) === null || _workflowDetails$data6 === void 0 ? void 0 : _workflowDetails$data6.timeline) && /*#__PURE__*/React.createElement(Card, {
|
|
42009
|
+
style: {
|
|
42010
|
+
marginTop: "20px"
|
|
42011
|
+
}
|
|
42012
|
+
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
42013
|
+
style: {
|
|
42014
|
+
fontSize: "24px"
|
|
42015
|
+
}
|
|
42016
|
+
}, t("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data7 = workflowDetails.data) === null || _workflowDetails$data7 === void 0 ? void 0 : _workflowDetails$data7.timeline.length) === 1 ? /*#__PURE__*/React.createElement(CheckPoint, {
|
|
42017
|
+
isCompleted: true,
|
|
42018
|
+
label: t(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data8 = workflowDetails.data) === null || _workflowDetails$data8 === void 0 ? void 0 : (_workflowDetails$data9 = _workflowDetails$data8.timeline[0]) === null || _workflowDetails$data9 === void 0 ? void 0 : _workflowDetails$data9.status)
|
|
42019
|
+
}) : /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data0 = workflowDetails.data) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.timeline.map((checkpoint, index, arr) => /*#__PURE__*/React.createElement(CheckPoint, {
|
|
42020
|
+
keyValue: index,
|
|
42021
|
+
isCompleted: index === 0,
|
|
42022
|
+
label: t(checkpoint.status),
|
|
42023
|
+
customChild: getTimelineCaptions(checkpoint, index, arr, t)
|
|
42024
|
+
}))))));
|
|
41875
42025
|
};
|
|
41876
42026
|
|
|
41877
42027
|
function _extends() {
|
|
@@ -43381,78 +43531,56 @@ const TableConfig = t => ({
|
|
|
43381
43531
|
}
|
|
43382
43532
|
});
|
|
43383
43533
|
|
|
43384
|
-
const
|
|
43385
|
-
|
|
43386
|
-
|
|
43387
|
-
|
|
43388
|
-
|
|
43389
|
-
|
|
43390
|
-
|
|
43391
|
-
|
|
43392
|
-
|
|
43393
|
-
|
|
43394
|
-
|
|
43395
|
-
|
|
43396
|
-
|
|
43397
|
-
|
|
43398
|
-
|
|
43399
|
-
|
|
43400
|
-
|
|
43401
|
-
|
|
43402
|
-
}
|
|
43403
|
-
const {
|
|
43404
|
-
|
|
43405
|
-
|
|
43406
|
-
|
|
43407
|
-
|
|
43408
|
-
|
|
43409
|
-
|
|
43410
|
-
|
|
43411
|
-
|
|
43412
|
-
|
|
43413
|
-
|
|
43414
|
-
|
|
43415
|
-
|
|
43416
|
-
|
|
43417
|
-
const documents = value !== null && value !== void 0 && value.documents ? value.documents.documents.filter(doc => doc.documentType === Code).map(doc => ({
|
|
43418
|
-
...doc,
|
|
43419
|
-
documentType: doc.documentType.replace(/\./g, "_")
|
|
43420
|
-
})) : value.filter(doc => doc.documentType === Code).map(doc => ({
|
|
43421
|
-
...doc,
|
|
43422
|
-
documentType: doc.documentType.replace(/\./g, "_")
|
|
43423
|
-
}));
|
|
43424
|
-
if (isLoading) {
|
|
43425
|
-
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
43426
|
-
}
|
|
43534
|
+
const Loader = ({
|
|
43535
|
+
page: _page = false
|
|
43536
|
+
}) => {
|
|
43537
|
+
const baseStyle = {
|
|
43538
|
+
display: "flex",
|
|
43539
|
+
justifyContent: "center",
|
|
43540
|
+
alignItems: "center"
|
|
43541
|
+
};
|
|
43542
|
+
const pageStyle = {
|
|
43543
|
+
...baseStyle,
|
|
43544
|
+
position: "fixed",
|
|
43545
|
+
top: 0,
|
|
43546
|
+
left: 0,
|
|
43547
|
+
width: "100vw",
|
|
43548
|
+
height: "100vh",
|
|
43549
|
+
background: "rgba(255,255,255,0.6)",
|
|
43550
|
+
backdropFilter: "blur(4px)",
|
|
43551
|
+
zIndex: 9999
|
|
43552
|
+
};
|
|
43553
|
+
const moduleStyle = {
|
|
43554
|
+
...baseStyle,
|
|
43555
|
+
minHeight: "100px",
|
|
43556
|
+
width: "100%",
|
|
43557
|
+
position: "relative"
|
|
43558
|
+
};
|
|
43559
|
+
const spinnerStyle = {
|
|
43560
|
+
width: "64px",
|
|
43561
|
+
height: "64px",
|
|
43562
|
+
border: "8px solid #1976d2",
|
|
43563
|
+
borderTop: "8px solid transparent",
|
|
43564
|
+
borderRadius: "50%",
|
|
43565
|
+
animation: "spin 1.2s linear infinite"
|
|
43566
|
+
};
|
|
43427
43567
|
return /*#__PURE__*/React.createElement("div", {
|
|
43428
|
-
style:
|
|
43429
|
-
|
|
43430
|
-
|
|
43431
|
-
}, /*#__PURE__*/React.createElement(
|
|
43432
|
-
|
|
43433
|
-
|
|
43434
|
-
|
|
43435
|
-
|
|
43436
|
-
|
|
43437
|
-
|
|
43438
|
-
|
|
43439
|
-
|
|
43440
|
-
|
|
43441
|
-
|
|
43442
|
-
|
|
43443
|
-
|
|
43444
|
-
},
|
|
43445
|
-
key: index
|
|
43446
|
-
}, /*#__PURE__*/React.createElement(PDFSvg, {
|
|
43447
|
-
width: 85,
|
|
43448
|
-
height: 100,
|
|
43449
|
-
style: {
|
|
43450
|
-
background: "#f6f6f6",
|
|
43451
|
-
padding: "8px"
|
|
43452
|
-
}
|
|
43453
|
-
}));
|
|
43454
|
-
}))));
|
|
43455
|
-
}
|
|
43568
|
+
style: _page ? pageStyle : moduleStyle
|
|
43569
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
43570
|
+
style: spinnerStyle
|
|
43571
|
+
}), /*#__PURE__*/React.createElement("style", null, `
|
|
43572
|
+
@keyframes spin {
|
|
43573
|
+
0% { transform: rotate(0deg); }
|
|
43574
|
+
100% { transform: rotate(360deg); }
|
|
43575
|
+
}
|
|
43576
|
+
`));
|
|
43577
|
+
};
|
|
43578
|
+
Loader.propTypes = {
|
|
43579
|
+
page: propTypes.bool
|
|
43580
|
+
};
|
|
43581
|
+
Loader.defaultProps = {
|
|
43582
|
+
page: false
|
|
43583
|
+
};
|
|
43456
43584
|
|
|
43457
43585
|
const ModalConfig = ({
|
|
43458
43586
|
t,
|
|
@@ -43550,9 +43678,9 @@ const NDCModal = ({
|
|
|
43550
43678
|
errors,
|
|
43551
43679
|
showErrorToast,
|
|
43552
43680
|
errorOne,
|
|
43553
|
-
closeToastOne
|
|
43681
|
+
closeToastOne,
|
|
43682
|
+
getEmployees
|
|
43554
43683
|
}) => {
|
|
43555
|
-
var _action$state;
|
|
43556
43684
|
const [config, setConfig] = useState({});
|
|
43557
43685
|
const [defaultValues, setDefaultValues] = useState({});
|
|
43558
43686
|
const [approvers, setApprovers] = useState([]);
|
|
@@ -43562,13 +43690,14 @@ const NDCModal = ({
|
|
|
43562
43690
|
const [error, setError] = useState(null);
|
|
43563
43691
|
const [financialYears, setFinancialYears] = useState([]);
|
|
43564
43692
|
const [selectedFinancialYear, setSelectedFinancialYear] = useState(null);
|
|
43565
|
-
const
|
|
43566
|
-
|
|
43693
|
+
const allRolesNew = [...new Set(getEmployees === null || getEmployees === void 0 ? void 0 : getEmployees.flatMap(a => a.roles))];
|
|
43694
|
+
console.log("allRolesNew", allRolesNew);
|
|
43695
|
+
console.log("getEmployees", getEmployees);
|
|
43567
43696
|
const {
|
|
43568
43697
|
data: approverData,
|
|
43569
43698
|
isLoading: PTALoading
|
|
43570
43699
|
} = Digit.Hooks.useEmployeeSearch(tenantId, {
|
|
43571
|
-
roles:
|
|
43700
|
+
roles: allRolesNew === null || allRolesNew === void 0 ? void 0 : allRolesNew.map(role => ({
|
|
43572
43701
|
code: role
|
|
43573
43702
|
})),
|
|
43574
43703
|
isActive: true
|
|
@@ -43673,7 +43802,8 @@ const NDCModal = ({
|
|
|
43673
43802
|
}));
|
|
43674
43803
|
}
|
|
43675
43804
|
}, [action, approvers, financialYears, selectedFinancialYear, uploadedFile]);
|
|
43676
|
-
|
|
43805
|
+
if (!action || !config.form) return null;
|
|
43806
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
43677
43807
|
headerBarMain: /*#__PURE__*/React.createElement(Heading$1, {
|
|
43678
43808
|
label: t(config.label.heading)
|
|
43679
43809
|
}),
|
|
@@ -43702,11 +43832,13 @@ const NDCModal = ({
|
|
|
43702
43832
|
label: errorOne,
|
|
43703
43833
|
isDleteBtn: true,
|
|
43704
43834
|
onClose: closeToastOne
|
|
43705
|
-
})
|
|
43835
|
+
}), PTALoading && /*#__PURE__*/React.createElement(Loader, {
|
|
43836
|
+
page: true
|
|
43837
|
+
}));
|
|
43706
43838
|
};
|
|
43707
43839
|
|
|
43708
|
-
const getTimelineCaptions = (checkpoint, index, arr, t) => {
|
|
43709
|
-
var _checkpoint$auditDeta, _checkpoint$assigner, _checkpoint$assigner2,
|
|
43840
|
+
const getTimelineCaptions$1 = (checkpoint, index, arr, t) => {
|
|
43841
|
+
var _checkpoint$auditDeta, _checkpoint$assigner, _checkpoint$assigner2, _thumbnailsToShow$thu;
|
|
43710
43842
|
console.log("checkpoint", checkpoint);
|
|
43711
43843
|
const {
|
|
43712
43844
|
wfComment: comment,
|
|
@@ -43716,8 +43848,7 @@ const getTimelineCaptions = (checkpoint, index, arr, t) => {
|
|
|
43716
43848
|
const caption = {
|
|
43717
43849
|
date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModified,
|
|
43718
43850
|
name: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name,
|
|
43719
|
-
|
|
43720
|
-
source: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner3 = checkpoint.assigner) === null || _checkpoint$assigner3 === void 0 ? void 0 : _checkpoint$assigner3.source
|
|
43851
|
+
source: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner2 = checkpoint.assigner) === null || _checkpoint$assigner2 === void 0 ? void 0 : _checkpoint$assigner2.source
|
|
43721
43852
|
};
|
|
43722
43853
|
return /*#__PURE__*/React.createElement("div", null, (comment === null || comment === void 0 ? void 0 : comment.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
43723
43854
|
className: "TLComments"
|
|
@@ -43742,7 +43873,7 @@ const getTimelineCaptions = (checkpoint, index, arr, t) => {
|
|
|
43742
43873
|
style: {
|
|
43743
43874
|
marginTop: "8px"
|
|
43744
43875
|
}
|
|
43745
|
-
}, caption.date && /*#__PURE__*/React.createElement("p", null, caption.date), caption.name && /*#__PURE__*/React.createElement("p", null, caption.name), caption.
|
|
43876
|
+
}, caption.date && /*#__PURE__*/React.createElement("p", null, caption.date), caption.name && /*#__PURE__*/React.createElement("p", null, caption.name), caption.source && /*#__PURE__*/React.createElement("p", null, t("ES_COMMON_FILED_VIA_" + caption.source.toUpperCase()))));
|
|
43746
43877
|
};
|
|
43747
43878
|
const CHBApplicationDetails$1 = () => {
|
|
43748
43879
|
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user$info, _user$info$roles, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetailsTemp$, _workflowDetailsTemp$2, _chb_details$addition, _chb_details$bookingS, _chb_details$applican, _chb_details$applican2, _chb_details$applican3, _chb_details$specialC, _chb_details$purpose, _docs, _docs2, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data12, _workflowDetails$data13, _workflowDetails$data14, _workflowDetails$data15;
|
|
@@ -43756,8 +43887,11 @@ const CHBApplicationDetails$1 = () => {
|
|
|
43756
43887
|
const [acknowldgementData, setAcknowldgementData] = useState([]);
|
|
43757
43888
|
const [showOptions, setShowOptions] = useState(false);
|
|
43758
43889
|
const [popup, setpopup] = useState(false);
|
|
43890
|
+
const [getEmployees, setEmployees] = useState([]);
|
|
43891
|
+
const [getWorkflowService, setWorkflowService] = useState([]);
|
|
43759
43892
|
const [showToast, setShowToast] = useState(null);
|
|
43760
43893
|
const [error, setError] = useState(null);
|
|
43894
|
+
const [getLoader, setLoader] = useState(false);
|
|
43761
43895
|
const {
|
|
43762
43896
|
data: storeData
|
|
43763
43897
|
} = Digit.Hooks.useStore.getInitData();
|
|
@@ -43899,11 +44033,29 @@ const CHBApplicationDetails$1 = () => {
|
|
|
43899
44033
|
});
|
|
43900
44034
|
}
|
|
43901
44035
|
}, [data === null || data === void 0 ? void 0 : data.hallsBookingApplication]);
|
|
44036
|
+
useEffect(() => {
|
|
44037
|
+
let WorkflowService = null;
|
|
44038
|
+
(async (_WorkflowService, _WorkflowService$Busi, _WorkflowService$Busi2, _WorkflowService2, _WorkflowService2$Bus, _WorkflowService2$Bus2) => {
|
|
44039
|
+
setLoader(true);
|
|
44040
|
+
WorkflowService = await Digit.WorkflowService.init(tenantId, "chb-services");
|
|
44041
|
+
setLoader(false);
|
|
44042
|
+
console.log("WorkflowService====", (_WorkflowService = WorkflowService) === null || _WorkflowService === void 0 ? void 0 : (_WorkflowService$Busi = _WorkflowService.BusinessServices) === null || _WorkflowService$Busi === void 0 ? void 0 : (_WorkflowService$Busi2 = _WorkflowService$Busi[0]) === null || _WorkflowService$Busi2 === void 0 ? void 0 : _WorkflowService$Busi2.states);
|
|
44043
|
+
setWorkflowService((_WorkflowService2 = WorkflowService) === null || _WorkflowService2 === void 0 ? void 0 : (_WorkflowService2$Bus = _WorkflowService2.BusinessServices) === null || _WorkflowService2$Bus === void 0 ? void 0 : (_WorkflowService2$Bus2 = _WorkflowService2$Bus[0]) === null || _WorkflowService2$Bus2 === void 0 ? void 0 : _WorkflowService2$Bus2.states);
|
|
44044
|
+
})();
|
|
44045
|
+
}, [tenantId]);
|
|
43902
44046
|
function onActionSelect(action) {
|
|
43903
|
-
var _displayData$applican;
|
|
44047
|
+
var _action$state, _action$state$actions, _filterRoles$, _displayData$applican;
|
|
43904
44048
|
const payload = {
|
|
43905
44049
|
Licenses: [action]
|
|
43906
44050
|
};
|
|
44051
|
+
const filterNexState = action === null || action === void 0 ? void 0 : (_action$state = action.state) === null || _action$state === void 0 ? void 0 : (_action$state$actions = _action$state.actions) === null || _action$state$actions === void 0 ? void 0 : _action$state$actions.filter(item => item.action == (action === null || action === void 0 ? void 0 : action.action));
|
|
44052
|
+
const filterRoles = getWorkflowService === null || getWorkflowService === void 0 ? void 0 : getWorkflowService.filter(item => {
|
|
44053
|
+
var _filterNexState$;
|
|
44054
|
+
return (item === null || item === void 0 ? void 0 : item.uuid) == ((_filterNexState$ = filterNexState[0]) === null || _filterNexState$ === void 0 ? void 0 : _filterNexState$.nextState);
|
|
44055
|
+
});
|
|
44056
|
+
console.log("filterNexState", filterNexState);
|
|
44057
|
+
console.log("getWorkflowService", getWorkflowService);
|
|
44058
|
+
setEmployees(filterRoles === null || filterRoles === void 0 ? void 0 : (_filterRoles$ = filterRoles[0]) === null || _filterRoles$ === void 0 ? void 0 : _filterRoles$.actions);
|
|
43907
44059
|
const appNo = displayData === null || displayData === void 0 ? void 0 : (_displayData$applican = displayData.applicantData) === null || _displayData$applican === void 0 ? void 0 : _displayData$applican.applicationNo;
|
|
43908
44060
|
if ((action === null || action === void 0 ? void 0 : action.action) == "APPLY") {
|
|
43909
44061
|
submitAction(payload);
|
|
@@ -43954,9 +44106,6 @@ const CHBApplicationDetails$1 = () => {
|
|
|
43954
44106
|
});
|
|
43955
44107
|
let docs = [];
|
|
43956
44108
|
docs = application === null || application === void 0 ? void 0 : application.documents;
|
|
43957
|
-
if (isLoading || auditDataLoading) {
|
|
43958
|
-
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
43959
|
-
}
|
|
43960
44109
|
let documentDate = t("CS_NA");
|
|
43961
44110
|
if (chb_details !== null && chb_details !== void 0 && (_chb_details$addition = chb_details.additionalDetails) !== null && _chb_details$addition !== void 0 && _chb_details$addition.documentDate) {
|
|
43962
44111
|
var _chb_details$addition2;
|
|
@@ -44048,6 +44197,9 @@ const CHBApplicationDetails$1 = () => {
|
|
|
44048
44197
|
const columns = [{
|
|
44049
44198
|
Header: `${t("CHB_HALL_NUMBER")}`,
|
|
44050
44199
|
accessor: "communityHallCode"
|
|
44200
|
+
}, {
|
|
44201
|
+
Header: `${t("CHB_COMMUNITY_HALL_NAME")}`,
|
|
44202
|
+
accessor: "hallName"
|
|
44051
44203
|
}, {
|
|
44052
44204
|
Header: `${t("CHB_HALL_CODE")}`,
|
|
44053
44205
|
accessor: "hallCode"
|
|
@@ -44060,9 +44212,10 @@ const CHBApplicationDetails$1 = () => {
|
|
|
44060
44212
|
}];
|
|
44061
44213
|
const slotlistRows = (chb_details === null || chb_details === void 0 ? void 0 : (_chb_details$bookingS = chb_details.bookingSlotDetails) === null || _chb_details$bookingS === void 0 ? void 0 : _chb_details$bookingS.map(slot => ({
|
|
44062
44214
|
communityHallCode: `${t(chb_details === null || chb_details === void 0 ? void 0 : chb_details.communityHallCode)}`,
|
|
44215
|
+
hallName: chb_details === null || chb_details === void 0 ? void 0 : chb_details.communityHallName,
|
|
44063
44216
|
hallCode: t(slot.hallCode) + " - " + slot.capacity,
|
|
44064
44217
|
bookingDate: slot.bookingDate,
|
|
44065
|
-
bookingStatus: t(`
|
|
44218
|
+
bookingStatus: t(`WF_CHB_${slot === null || slot === void 0 ? void 0 : slot.status}`)
|
|
44066
44219
|
}))) || [];
|
|
44067
44220
|
const submitAction = async modalData => {
|
|
44068
44221
|
var _modalData$Licenses;
|
|
@@ -44119,22 +44272,8 @@ const CHBApplicationDetails$1 = () => {
|
|
|
44119
44272
|
setShowErrorToastt(true);
|
|
44120
44273
|
}
|
|
44121
44274
|
};
|
|
44122
|
-
|
|
44123
|
-
|
|
44124
|
-
style: {
|
|
44125
|
-
marginRight: "auto",
|
|
44126
|
-
maxWidth: "960px"
|
|
44127
|
-
}
|
|
44128
|
-
}, /*#__PURE__*/React.createElement(Header, {
|
|
44129
|
-
styles: {
|
|
44130
|
-
fontSize: "32px"
|
|
44131
|
-
}
|
|
44132
|
-
}, t("CHB_BOOKING_DETAILS")), dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
|
|
44133
|
-
className: "multilinkWrapper",
|
|
44134
|
-
onHeadClick: () => setShowOptions(!showOptions),
|
|
44135
|
-
displayOptions: showOptions,
|
|
44136
|
-
options: dowloadOptions
|
|
44137
|
-
})), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
44275
|
+
const filteredActions = actions === null || actions === void 0 ? void 0 : actions.filter(a => a.action !== "SUBMIT" && a.action !== "EDIT");
|
|
44276
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
44138
44277
|
style: {
|
|
44139
44278
|
fontSize: "24px"
|
|
44140
44279
|
}
|
|
@@ -44222,10 +44361,10 @@ const CHBApplicationDetails$1 = () => {
|
|
|
44222
44361
|
keyValue: index,
|
|
44223
44362
|
isCompleted: index === 0,
|
|
44224
44363
|
label: t(checkpoint.status),
|
|
44225
|
-
customChild: getTimelineCaptions(checkpoint, index, arr, t)
|
|
44226
|
-
})))), actions && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data12 = workflowDetails.data) !== null && _workflowDetails$data12 !== void 0 && (_workflowDetails$data13 = _workflowDetails$data12.actionState) !== null && _workflowDetails$data13 !== void 0 && _workflowDetails$data13.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data14 = workflowDetails.data) !== null && _workflowDetails$data14 !== void 0 && _workflowDetails$data14.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
|
|
44364
|
+
customChild: getTimelineCaptions$1(checkpoint, index, arr, t)
|
|
44365
|
+
})))), actions && actions.length > 0 && !actions.some(a => a.action === "SUBMIT") && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data12 = workflowDetails.data) !== null && _workflowDetails$data12 !== void 0 && (_workflowDetails$data13 = _workflowDetails$data12.actionState) !== null && _workflowDetails$data13 !== void 0 && _workflowDetails$data13.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data14 = workflowDetails.data) !== null && _workflowDetails$data14 !== void 0 && _workflowDetails$data14.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
|
|
44227
44366
|
localeKeyPrefix: `WF_EDITRENEWAL`,
|
|
44228
|
-
options:
|
|
44367
|
+
options: filteredActions,
|
|
44229
44368
|
optionKey: "action",
|
|
44230
44369
|
t: t,
|
|
44231
44370
|
onSelect: onActionSelect
|
|
@@ -44246,6 +44385,7 @@ const CHBApplicationDetails$1 = () => {
|
|
|
44246
44385
|
actionData: workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data15 = workflowDetails.data) === null || _workflowDetails$data15 === void 0 ? void 0 : _workflowDetails$data15.timeline,
|
|
44247
44386
|
workflowDetails: workflowDetails,
|
|
44248
44387
|
showToast: showToast,
|
|
44388
|
+
getEmployees: getEmployees,
|
|
44249
44389
|
closeToast: closeToast,
|
|
44250
44390
|
errors: error,
|
|
44251
44391
|
showErrorToast: showErrorToast,
|
|
@@ -44256,6 +44396,8 @@ const CHBApplicationDetails$1 = () => {
|
|
|
44256
44396
|
label: error,
|
|
44257
44397
|
isDleteBtn: true,
|
|
44258
44398
|
onClose: closeToast
|
|
44399
|
+
}), (isLoading || auditDataLoading || getLoader) && /*#__PURE__*/React.createElement(Loader, {
|
|
44400
|
+
page: true
|
|
44259
44401
|
})));
|
|
44260
44402
|
};
|
|
44261
44403
|
|
|
@@ -45149,57 +45291,6 @@ const NewADSStepperForm = () => {
|
|
|
45149
45291
|
}));
|
|
45150
45292
|
};
|
|
45151
45293
|
|
|
45152
|
-
const Loader = ({
|
|
45153
|
-
page: _page = false
|
|
45154
|
-
}) => {
|
|
45155
|
-
const baseStyle = {
|
|
45156
|
-
display: "flex",
|
|
45157
|
-
justifyContent: "center",
|
|
45158
|
-
alignItems: "center"
|
|
45159
|
-
};
|
|
45160
|
-
const pageStyle = {
|
|
45161
|
-
...baseStyle,
|
|
45162
|
-
position: "fixed",
|
|
45163
|
-
top: 0,
|
|
45164
|
-
left: 0,
|
|
45165
|
-
width: "100vw",
|
|
45166
|
-
height: "100vh",
|
|
45167
|
-
background: "rgba(255,255,255,0.6)",
|
|
45168
|
-
backdropFilter: "blur(4px)",
|
|
45169
|
-
zIndex: 9999
|
|
45170
|
-
};
|
|
45171
|
-
const moduleStyle = {
|
|
45172
|
-
...baseStyle,
|
|
45173
|
-
minHeight: "100px",
|
|
45174
|
-
width: "100%",
|
|
45175
|
-
position: "relative"
|
|
45176
|
-
};
|
|
45177
|
-
const spinnerStyle = {
|
|
45178
|
-
width: "64px",
|
|
45179
|
-
height: "64px",
|
|
45180
|
-
border: "8px solid #1976d2",
|
|
45181
|
-
borderTop: "8px solid transparent",
|
|
45182
|
-
borderRadius: "50%",
|
|
45183
|
-
animation: "spin 1.2s linear infinite"
|
|
45184
|
-
};
|
|
45185
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
45186
|
-
style: _page ? pageStyle : moduleStyle
|
|
45187
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
45188
|
-
style: spinnerStyle
|
|
45189
|
-
}), /*#__PURE__*/React.createElement("style", null, `
|
|
45190
|
-
@keyframes spin {
|
|
45191
|
-
0% { transform: rotate(0deg); }
|
|
45192
|
-
100% { transform: rotate(360deg); }
|
|
45193
|
-
}
|
|
45194
|
-
`));
|
|
45195
|
-
};
|
|
45196
|
-
Loader.propTypes = {
|
|
45197
|
-
page: propTypes.bool
|
|
45198
|
-
};
|
|
45199
|
-
Loader.defaultProps = {
|
|
45200
|
-
page: false
|
|
45201
|
-
};
|
|
45202
|
-
|
|
45203
45294
|
const CHBCitizenSecond = ({
|
|
45204
45295
|
onGoBack,
|
|
45205
45296
|
goNext,
|
|
@@ -45272,14 +45363,15 @@ const CHBCitizenSecond = ({
|
|
|
45272
45363
|
setHallCodes(getHallCodesData);
|
|
45273
45364
|
};
|
|
45274
45365
|
const slotsSearch = async data => {
|
|
45275
|
-
var _getValues,
|
|
45366
|
+
var _getValues, _getValues2;
|
|
45276
45367
|
setLoader(true);
|
|
45368
|
+
console.log("data", data);
|
|
45277
45369
|
const payload = {
|
|
45278
45370
|
tenantId: tenantId,
|
|
45279
|
-
communityHallCode:
|
|
45371
|
+
communityHallCode: data.communityHallId,
|
|
45280
45372
|
hallCode: data === null || data === void 0 ? void 0 : data.HallCode,
|
|
45281
|
-
bookingStartDate: (
|
|
45282
|
-
bookingEndDate: (
|
|
45373
|
+
bookingStartDate: (_getValues = getValues()) === null || _getValues === void 0 ? void 0 : _getValues.startDate,
|
|
45374
|
+
bookingEndDate: (_getValues2 = getValues()) === null || _getValues2 === void 0 ? void 0 : _getValues2.startDate,
|
|
45283
45375
|
isTimerRequired: false
|
|
45284
45376
|
};
|
|
45285
45377
|
try {
|
|
@@ -45294,7 +45386,7 @@ const CHBCitizenSecond = ({
|
|
|
45294
45386
|
}
|
|
45295
45387
|
};
|
|
45296
45388
|
const onSubmit = data => {
|
|
45297
|
-
var _Digit$UserService$ge, _data$slots, _getHallDetails$, _data$purpose, _data$specialCategory;
|
|
45389
|
+
var _Digit$UserService$ge, _data$slots, _getHallDetails$, _data$siteId, _data$purpose, _data$specialCategory;
|
|
45298
45390
|
console.log("data==??", data);
|
|
45299
45391
|
const userInfo = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
45300
45392
|
const now = Date.now();
|
|
@@ -45318,6 +45410,7 @@ const CHBCitizenSecond = ({
|
|
|
45318
45410
|
bookingStatus: "INITIATED",
|
|
45319
45411
|
applicationDate: now,
|
|
45320
45412
|
communityHallCode: (getHallDetails === null || getHallDetails === void 0 ? void 0 : (_getHallDetails$ = getHallDetails[0]) === null || _getHallDetails$ === void 0 ? void 0 : _getHallDetails$.communityHallId) || "",
|
|
45413
|
+
communityHallName: data === null || data === void 0 ? void 0 : (_data$siteId = data.siteId) === null || _data$siteId === void 0 ? void 0 : _data$siteId.name,
|
|
45321
45414
|
purpose: {
|
|
45322
45415
|
purpose: data === null || data === void 0 ? void 0 : (_data$purpose = data.purpose) === null || _data$purpose === void 0 ? void 0 : _data$purpose.code
|
|
45323
45416
|
},
|
|
@@ -45535,7 +45628,9 @@ const CHBCitizenSecond = ({
|
|
|
45535
45628
|
}, /*#__PURE__*/React.createElement("input", {
|
|
45536
45629
|
type: "checkbox",
|
|
45537
45630
|
checked: isChecked,
|
|
45631
|
+
disabled: !isAvailable,
|
|
45538
45632
|
onChange: e => {
|
|
45633
|
+
if (!isAvailable) return;
|
|
45539
45634
|
if (e.target.checked) {
|
|
45540
45635
|
field.onChange([...(field.value || []), slot]);
|
|
45541
45636
|
} else {
|
|
@@ -46137,7 +46232,7 @@ function CHBSummary({
|
|
|
46137
46232
|
goNext,
|
|
46138
46233
|
onGoBack
|
|
46139
46234
|
}) {
|
|
46140
|
-
var _formData$documents, _formData$documents$d, _formData$apiData, _formData$apiData$App, _formData$apiData$App2, _formData$venueDetail, _formData$venueDetail2, _user$info, _user$info$roles, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _formData$venueDetail3, _formData$venueDetail4, _formData$venueDetail5, _formData$
|
|
46235
|
+
var _formData$documents, _formData$documents$d, _formData$apiData, _formData$apiData$App, _formData$apiData$App2, _formData$venueDetail, _formData$venueDetail2, _user$info, _user$info$roles, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _formData$venueDetail3, _formData$venueDetail4, _formData$venueDetail5, _formData$venueDetail0, _formData$venueDetail1, _formData$venueDetail10, _formData$venueDetail11, _formData$venueDetail12, _formData$venueDetail13, _formData$venueDetail14, _formData$venueDetail15, _formData$venueDetail16, _formData$venueDetail17, _formData$venueDetail18, _formData$venueDetail19, _formData$venueDetail20, _formData$venueDetail21, _formData$venueDetail22, _formData$venueDetail23, _formData$venueDetail24, _formData$venueDetail25, _formData$venueDetail26, _formData$venueDetail27, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8;
|
|
46141
46236
|
const {
|
|
46142
46237
|
pathname: url
|
|
46143
46238
|
} = useLocation();
|
|
@@ -46152,6 +46247,9 @@ function CHBSummary({
|
|
|
46152
46247
|
const columns = [{
|
|
46153
46248
|
Header: `${t("CHB_HALL_NUMBER")}`,
|
|
46154
46249
|
accessor: "communityHallCode"
|
|
46250
|
+
}, {
|
|
46251
|
+
Header: `${t("CHB_COMMUNITY_HALL_NAME")}`,
|
|
46252
|
+
accessor: "hallName"
|
|
46155
46253
|
}, {
|
|
46156
46254
|
Header: `${t("CHB_HALL_CODE")}`,
|
|
46157
46255
|
accessor: "hallCode"
|
|
@@ -46230,9 +46328,10 @@ function CHBSummary({
|
|
|
46230
46328
|
style: boldLabelStyle
|
|
46231
46329
|
}, label), /*#__PURE__*/React.createElement("div", null, t(value) || "NA"));
|
|
46232
46330
|
const slotlistRows = (formData === null || formData === void 0 ? void 0 : (_formData$venueDetail3 = formData.venueDetails) === null || _formData$venueDetail3 === void 0 ? void 0 : (_formData$venueDetail4 = _formData$venueDetail3[0]) === null || _formData$venueDetail4 === void 0 ? void 0 : (_formData$venueDetail5 = _formData$venueDetail4.bookingSlotDetails) === null || _formData$venueDetail5 === void 0 ? void 0 : _formData$venueDetail5.map(slot => {
|
|
46233
|
-
var _formData$venueDetail6, _formData$venueDetail7;
|
|
46331
|
+
var _formData$venueDetail6, _formData$venueDetail7, _formData$venueDetail8, _formData$venueDetail9;
|
|
46234
46332
|
return {
|
|
46235
46333
|
communityHallCode: `${t(formData === null || formData === void 0 ? void 0 : (_formData$venueDetail6 = formData.venueDetails) === null || _formData$venueDetail6 === void 0 ? void 0 : (_formData$venueDetail7 = _formData$venueDetail6[0]) === null || _formData$venueDetail7 === void 0 ? void 0 : _formData$venueDetail7.communityHallCode)}`,
|
|
46334
|
+
hallName: formData === null || formData === void 0 ? void 0 : (_formData$venueDetail8 = formData.venueDetails) === null || _formData$venueDetail8 === void 0 ? void 0 : (_formData$venueDetail9 = _formData$venueDetail8[0]) === null || _formData$venueDetail9 === void 0 ? void 0 : _formData$venueDetail9.communityHallName,
|
|
46236
46335
|
hallCode: slot.hallCode + " - " + slot.capacity,
|
|
46237
46336
|
bookingDate: slot.bookingDate,
|
|
46238
46337
|
bookingStatus: `${t(slot.status)}`
|
|
@@ -46248,13 +46347,13 @@ function CHBSummary({
|
|
|
46248
46347
|
style: {
|
|
46249
46348
|
fontSize: "24px"
|
|
46250
46349
|
}
|
|
46251
|
-
}, t("CHB_APPLICANT_DETAILS")), renderLabel(t("BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL"), formData === null || formData === void 0 ? void 0 : (_formData$
|
|
46350
|
+
}, t("CHB_APPLICANT_DETAILS")), renderLabel(t("BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail0 = formData.venueDetails) === null || _formData$venueDetail0 === void 0 ? void 0 : (_formData$venueDetail1 = _formData$venueDetail0[0]) === null || _formData$venueDetail1 === void 0 ? void 0 : (_formData$venueDetail10 = _formData$venueDetail1.applicantDetail) === null || _formData$venueDetail10 === void 0 ? void 0 : _formData$venueDetail10.applicantName), renderLabel(t("NOC_APPLICANT_MOBILE_NO_LABEL"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail11 = formData.venueDetails) === null || _formData$venueDetail11 === void 0 ? void 0 : (_formData$venueDetail12 = _formData$venueDetail11[0]) === null || _formData$venueDetail12 === void 0 ? void 0 : (_formData$venueDetail13 = _formData$venueDetail12.applicantDetail) === null || _formData$venueDetail13 === void 0 ? void 0 : _formData$venueDetail13.applicantMobileNo), renderLabel(t("NOC_APPLICANT_EMAIL_LABEL"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail14 = formData.venueDetails) === null || _formData$venueDetail14 === void 0 ? void 0 : (_formData$venueDetail15 = _formData$venueDetail14[0]) === null || _formData$venueDetail15 === void 0 ? void 0 : (_formData$venueDetail16 = _formData$venueDetail15.applicantDetail) === null || _formData$venueDetail16 === void 0 ? void 0 : _formData$venueDetail16.applicantEmailId), renderLabel(t("PT_COMMON_COL_ADDRESS"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail17 = formData.venueDetails) === null || _formData$venueDetail17 === void 0 ? void 0 : (_formData$venueDetail18 = _formData$venueDetail17[0]) === null || _formData$venueDetail18 === void 0 ? void 0 : (_formData$venueDetail19 = _formData$venueDetail18.address) === null || _formData$venueDetail19 === void 0 ? void 0 : _formData$venueDetail19.addressLine1)), /*#__PURE__*/React.createElement("div", {
|
|
46252
46351
|
style: sectionStyle
|
|
46253
46352
|
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
46254
46353
|
style: {
|
|
46255
46354
|
fontSize: "24px"
|
|
46256
46355
|
}
|
|
46257
|
-
}, t("CHB_EVENT_DETAILS")), renderLabel(t("CHB_SPECIAL_CATEGORY"), formData === null || formData === void 0 ? void 0 : (_formData$
|
|
46356
|
+
}, t("CHB_EVENT_DETAILS")), renderLabel(t("CHB_SPECIAL_CATEGORY"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail20 = formData.venueDetails) === null || _formData$venueDetail20 === void 0 ? void 0 : (_formData$venueDetail21 = _formData$venueDetail20[0]) === null || _formData$venueDetail21 === void 0 ? void 0 : (_formData$venueDetail22 = _formData$venueDetail21.specialCategory) === null || _formData$venueDetail22 === void 0 ? void 0 : _formData$venueDetail22.category), renderLabel(t("CHB_PURPOSE"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail23 = formData.venueDetails) === null || _formData$venueDetail23 === void 0 ? void 0 : (_formData$venueDetail24 = _formData$venueDetail23[0]) === null || _formData$venueDetail24 === void 0 ? void 0 : (_formData$venueDetail25 = _formData$venueDetail24.purpose) === null || _formData$venueDetail25 === void 0 ? void 0 : _formData$venueDetail25.purpose), renderLabel(t("CHB_PURPOSE_DESCRIPTION"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail26 = formData.venueDetails) === null || _formData$venueDetail26 === void 0 ? void 0 : (_formData$venueDetail27 = _formData$venueDetail26[0]) === null || _formData$venueDetail27 === void 0 ? void 0 : _formData$venueDetail27.purposeDescription)), /*#__PURE__*/React.createElement(ApplicationTable, {
|
|
46258
46357
|
t: t,
|
|
46259
46358
|
data: slotlistRows,
|
|
46260
46359
|
columns: columns,
|