@mseva/upyog-ui-module-chb 1.0.72 → 1.0.74

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.
@@ -18521,6 +18521,7 @@ const ChbApplication = ({
18521
18521
  } = useTranslation();
18522
18522
  const history = useHistory();
18523
18523
  const [showToast, setShowToast] = useState(null);
18524
+ console.log("application", application);
18524
18525
  const {
18525
18526
  data: slotSearchData,
18526
18527
  refetch
@@ -18550,41 +18551,7 @@ const ChbApplication = ({
18550
18551
  }
18551
18552
  };
18552
18553
  const handleMakePayment = async () => {
18553
- try {
18554
- var _application$bookingS7, _application$bookingS8, _application$bookingS9, _application$bookingS0, _application$bookingS1, _application$bookingS10, _result$data, _result$data$hallSlot;
18555
- const result = await refetch();
18556
- let SlotSearchData = {
18557
- tenantId: application === null || application === void 0 ? void 0 : application.tenantId,
18558
- bookingId: application === null || application === void 0 ? void 0 : application.bookingId,
18559
- communityHallCode: application === null || application === void 0 ? void 0 : application.communityHallCode,
18560
- bookingStartDate: application === null || application === void 0 ? void 0 : (_application$bookingS7 = application.bookingSlotDetails) === null || _application$bookingS7 === void 0 ? void 0 : (_application$bookingS8 = _application$bookingS7[0]) === null || _application$bookingS8 === void 0 ? void 0 : _application$bookingS8.bookingDate,
18561
- bookingEndDate: application === null || application === void 0 ? void 0 : (_application$bookingS9 = application.bookingSlotDetails) === null || _application$bookingS9 === void 0 ? void 0 : (_application$bookingS0 = _application$bookingS9[application.bookingSlotDetails.length - 1]) === null || _application$bookingS0 === void 0 ? void 0 : _application$bookingS0.bookingDate,
18562
- hallCode: application === null || application === void 0 ? void 0 : (_application$bookingS1 = application.bookingSlotDetails) === null || _application$bookingS1 === void 0 ? void 0 : (_application$bookingS10 = _application$bookingS1[0]) === null || _application$bookingS10 === void 0 ? void 0 : _application$bookingS10.hallCode,
18563
- isTimerRequired: true
18564
- };
18565
- const isSlotBooked = result === null || result === void 0 ? void 0 : (_result$data = result.data) === null || _result$data === void 0 ? void 0 : (_result$data$hallSlot = _result$data.hallSlotAvailabiltityDetails) === null || _result$data$hallSlot === void 0 ? void 0 : _result$data$hallSlot.some(slot => slot.slotStaus === "BOOKED");
18566
- if (isSlotBooked) {
18567
- setShowToast({
18568
- error: true,
18569
- label: t("CHB_COMMUNITY_HALL_ALREADY_BOOKED")
18570
- });
18571
- } else {
18572
- history.push({
18573
- pathname: `/digit-ui/citizen/payment/my-bills/${"chb-services"}/${application === null || application === void 0 ? void 0 : application.bookingNo}`,
18574
- state: {
18575
- tenantId: application === null || application === void 0 ? void 0 : application.tenantId,
18576
- bookingNo: application === null || application === void 0 ? void 0 : application.bookingNo,
18577
- timerValue: result === null || result === void 0 ? void 0 : result.data.timerValue,
18578
- SlotSearchData: SlotSearchData
18579
- }
18580
- });
18581
- }
18582
- } catch (error) {
18583
- setShowToast({
18584
- error: true,
18585
- label: t("CS_SOMETHING_WENT_WRONG")
18586
- });
18587
- }
18554
+ history.push(`/digit-ui/citizen/payment/collect/chb-services/${application === null || application === void 0 ? void 0 : application.bookingNo}/${tenantId}?tenantId=${tenantId}`);
18588
18555
  };
18589
18556
  useEffect(() => {
18590
18557
  if (showToast) {
@@ -18606,17 +18573,17 @@ const ChbApplication = ({
18606
18573
  }), /*#__PURE__*/React.createElement(KeyNote, {
18607
18574
  keyValue: t("PT_COMMON_TABLE_COL_STATUS_LABEL"),
18608
18575
  note: t(`${application === null || application === void 0 ? void 0 : application.bookingStatus}`)
18609
- }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Link, {
18610
- to: `/digit-ui/citizen/chb/application/${application === null || application === void 0 ? void 0 : application.bookingNo}/${application === null || application === void 0 ? void 0 : application.tenantId}`
18611
- }, /*#__PURE__*/React.createElement(SubmitBar, {
18612
- label: buttonLabel
18613
- })), (application.bookingStatus === "BOOKING_CREATED" || application.bookingStatus === "PAYMENT_FAILED" || application.bookingStatus === "PENDING_FOR_PAYMENT") && /*#__PURE__*/React.createElement(SubmitBar, {
18576
+ }), /*#__PURE__*/React.createElement("div", null, application.bookingStatus === "PENDING_PAYMENT" ? /*#__PURE__*/React.createElement(SubmitBar, {
18614
18577
  label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT"),
18615
18578
  onSubmit: handleMakePayment,
18616
18579
  style: {
18617
18580
  margin: "20px"
18618
18581
  }
18619
- })), showToast && /*#__PURE__*/React.createElement(Toast, {
18582
+ }) : /*#__PURE__*/React.createElement(Link, {
18583
+ to: `/digit-ui/citizen/chb/application/${application === null || application === void 0 ? void 0 : application.bookingNo}/${application === null || application === void 0 ? void 0 : application.tenantId}`
18584
+ }, /*#__PURE__*/React.createElement(SubmitBar, {
18585
+ label: buttonLabel
18586
+ }))), showToast && /*#__PURE__*/React.createElement(Toast, {
18620
18587
  error: showToast.error,
18621
18588
  warning: showToast.warning,
18622
18589
  label: t(showToast.label),
@@ -18630,8 +18597,8 @@ const CHBMyApplications = () => {
18630
18597
  const {
18631
18598
  t
18632
18599
  } = useTranslation();
18633
- const tenantId = Digit.ULBService.getCitizenCurrentTenant(true) || Digit.ULBService.getCurrentTenantId();
18634
18600
  const user = Digit.UserService.getUser().info;
18601
+ const tenantId = window.localStorage.getItem("CITIZEN.CITY");
18635
18602
  const [searchTerm, setSearchTerm] = useState("");
18636
18603
  const [status, setStatus] = useState(null);
18637
18604
  const [filters, setFilters] = useState(null);
@@ -18687,7 +18654,7 @@ const CHBMyApplications = () => {
18687
18654
  key: index
18688
18655
  }, /*#__PURE__*/React.createElement(ChbApplication, {
18689
18656
  application: application,
18690
- tenantId: user === null || user === void 0 ? void 0 : user.permanentCity,
18657
+ tenantId: tenantId,
18691
18658
  buttonLabel: t("CHB_SUMMARY")
18692
18659
  }))), filteredApplications.length === 0 && !isLoading && /*#__PURE__*/React.createElement("p", {
18693
18660
  style: {
@@ -43941,7 +43908,7 @@ const CHBApplicationDetails$1 = () => {
43941
43908
  if ((action === null || action === void 0 ? void 0 : action.action) == "APPLY") {
43942
43909
  submitAction(payload);
43943
43910
  } else if ((action === null || action === void 0 ? void 0 : action.action) == "PAY") {
43944
- history.push(`/digit-ui/employee/payment/collect/NDC/${appNo}/${tenantId}?tenantId=${tenantId}`);
43911
+ history.push(`/digit-ui/employee/payment/collect/chb-services/${appNo}/${tenantId}?tenantId=${tenantId}`);
43945
43912
  } else if ((action === null || action === void 0 ? void 0 : action.action) == "EDIT") {
43946
43913
  history.push(`/digit-ui/employee/ndc/create/${appNo}`);
43947
43914
  } else {
@@ -44233,21 +44200,18 @@ const CHBApplicationDetails$1 = () => {
44233
44200
  flexDirection: "row",
44234
44201
  gap: "30px"
44235
44202
  }
44236
- }, ((_docs = docs) === null || _docs === void 0 ? void 0 : _docs.length) > 0 ? (_docs2 = docs) === null || _docs2 === void 0 ? void 0 : _docs2.map((doc, index) => {
44237
- var _doc$documentType;
44238
- return /*#__PURE__*/React.createElement(React.Fragment, {
44239
- key: index
44240
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CHBDocument, {
44241
- value: docs,
44242
- Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
44243
- index: index
44244
- }), /*#__PURE__*/React.createElement(CardSectionHeader, {
44245
- style: {
44246
- marginTop: "10px",
44247
- fontSize: "15px"
44248
- }
44249
- }, t(doc === null || doc === void 0 ? void 0 : (_doc$documentType = doc.documentType) === null || _doc$documentType === void 0 ? void 0 : _doc$documentType.split(".").slice(0, 2).join("_")))));
44250
- }) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : _workflowDetails$data9.timeline) && /*#__PURE__*/React.createElement(Card, {
44203
+ }, ((_docs = docs) === null || _docs === void 0 ? void 0 : _docs.length) > 0 ? (_docs2 = docs) === null || _docs2 === void 0 ? void 0 : _docs2.map((doc, index) => /*#__PURE__*/React.createElement(React.Fragment, {
44204
+ key: index
44205
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CHBDocument, {
44206
+ value: docs,
44207
+ Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
44208
+ index: index
44209
+ }), /*#__PURE__*/React.createElement(CardSectionHeader, {
44210
+ style: {
44211
+ marginTop: "10px",
44212
+ fontSize: "15px"
44213
+ }
44214
+ }, 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$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : _workflowDetails$data9.timeline) && /*#__PURE__*/React.createElement(Card, {
44251
44215
  style: {
44252
44216
  marginTop: "20px"
44253
44217
  }