@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.
package/dist/index.js CHANGED
@@ -18586,6 +18586,7 @@ const ChbApplication = _ref => {
18586
18586
  } = reactI18next.useTranslation();
18587
18587
  const history = reactRouterDom.useHistory();
18588
18588
  const [showToast, setShowToast] = React.useState(null);
18589
+ console.log("application", application);
18589
18590
  const {
18590
18591
  data: slotSearchData,
18591
18592
  refetch
@@ -18616,43 +18617,8 @@ const ChbApplication = _ref => {
18616
18617
  };
18617
18618
  const handleMakePayment = function () {
18618
18619
  try {
18619
- const _temp = _catch(function () {
18620
- return Promise.resolve(refetch()).then(function (result) {
18621
- var _application$bookingS7, _application$bookingS8, _application$bookingS9, _application$bookingS0, _application$bookingS1, _application$bookingS10, _result$data, _result$data$hallSlot;
18622
- let SlotSearchData = {
18623
- tenantId: application === null || application === void 0 ? void 0 : application.tenantId,
18624
- bookingId: application === null || application === void 0 ? void 0 : application.bookingId,
18625
- communityHallCode: application === null || application === void 0 ? void 0 : application.communityHallCode,
18626
- 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,
18627
- 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,
18628
- 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,
18629
- isTimerRequired: true
18630
- };
18631
- 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");
18632
- if (isSlotBooked) {
18633
- setShowToast({
18634
- error: true,
18635
- label: t("CHB_COMMUNITY_HALL_ALREADY_BOOKED")
18636
- });
18637
- } else {
18638
- history.push({
18639
- pathname: "/digit-ui/citizen/payment/my-bills/" + "chb-services" + "/" + (application === null || application === void 0 ? void 0 : application.bookingNo),
18640
- state: {
18641
- tenantId: application === null || application === void 0 ? void 0 : application.tenantId,
18642
- bookingNo: application === null || application === void 0 ? void 0 : application.bookingNo,
18643
- timerValue: result === null || result === void 0 ? void 0 : result.data.timerValue,
18644
- SlotSearchData: SlotSearchData
18645
- }
18646
- });
18647
- }
18648
- });
18649
- }, function () {
18650
- setShowToast({
18651
- error: true,
18652
- label: t("CS_SOMETHING_WENT_WRONG")
18653
- });
18654
- });
18655
- return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
18620
+ history.push("/digit-ui/citizen/payment/collect/chb-services/" + (application === null || application === void 0 ? void 0 : application.bookingNo) + "/" + tenantId + "?tenantId=" + tenantId);
18621
+ return Promise.resolve();
18656
18622
  } catch (e) {
18657
18623
  return Promise.reject(e);
18658
18624
  }
@@ -18677,17 +18643,17 @@ const ChbApplication = _ref => {
18677
18643
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.KeyNote, {
18678
18644
  keyValue: t("PT_COMMON_TABLE_COL_STATUS_LABEL"),
18679
18645
  note: t("" + (application === null || application === void 0 ? void 0 : application.bookingStatus))
18680
- }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
18681
- to: "/digit-ui/citizen/chb/application/" + (application === null || application === void 0 ? void 0 : application.bookingNo) + "/" + (application === null || application === void 0 ? void 0 : application.tenantId)
18682
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
18683
- label: buttonLabel
18684
- })), (application.bookingStatus === "BOOKING_CREATED" || application.bookingStatus === "PAYMENT_FAILED" || application.bookingStatus === "PENDING_FOR_PAYMENT") && /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
18646
+ }), /*#__PURE__*/React__default.createElement("div", null, application.bookingStatus === "PENDING_PAYMENT" ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
18685
18647
  label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT"),
18686
18648
  onSubmit: handleMakePayment,
18687
18649
  style: {
18688
18650
  margin: "20px"
18689
18651
  }
18690
- })), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
18652
+ }) : /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
18653
+ to: "/digit-ui/citizen/chb/application/" + (application === null || application === void 0 ? void 0 : application.bookingNo) + "/" + (application === null || application === void 0 ? void 0 : application.tenantId)
18654
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
18655
+ label: buttonLabel
18656
+ }))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
18691
18657
  error: showToast.error,
18692
18658
  warning: showToast.warning,
18693
18659
  label: t(showToast.label),
@@ -18701,8 +18667,8 @@ const CHBMyApplications = () => {
18701
18667
  const {
18702
18668
  t
18703
18669
  } = reactI18next.useTranslation();
18704
- const tenantId = Digit.ULBService.getCitizenCurrentTenant(true) || Digit.ULBService.getCurrentTenantId();
18705
18670
  const user = Digit.UserService.getUser().info;
18671
+ const tenantId = window.localStorage.getItem("CITIZEN.CITY");
18706
18672
  const [searchTerm, setSearchTerm] = React.useState("");
18707
18673
  const [status, setStatus] = React.useState(null);
18708
18674
  const [filters, setFilters] = React.useState(null);
@@ -18758,7 +18724,7 @@ const CHBMyApplications = () => {
18758
18724
  key: index
18759
18725
  }, /*#__PURE__*/React__default.createElement(ChbApplication, {
18760
18726
  application: application,
18761
- tenantId: user === null || user === void 0 ? void 0 : user.permanentCity,
18727
+ tenantId: tenantId,
18762
18728
  buttonLabel: t("CHB_SUMMARY")
18763
18729
  }))), filteredApplications.length === 0 && !isLoading && /*#__PURE__*/React__default.createElement("p", {
18764
18730
  style: {
@@ -44303,7 +44269,7 @@ const CHBApplicationDetails$1 = () => {
44303
44269
  if ((action === null || action === void 0 ? void 0 : action.action) == "APPLY") {
44304
44270
  submitAction(payload);
44305
44271
  } else if ((action === null || action === void 0 ? void 0 : action.action) == "PAY") {
44306
- history.push("/digit-ui/employee/payment/collect/NDC/" + appNo + "/" + tenantId + "?tenantId=" + tenantId);
44272
+ history.push("/digit-ui/employee/payment/collect/chb-services/" + appNo + "/" + tenantId + "?tenantId=" + tenantId);
44307
44273
  } else if ((action === null || action === void 0 ? void 0 : action.action) == "EDIT") {
44308
44274
  history.push("/digit-ui/employee/ndc/create/" + appNo);
44309
44275
  } else {
@@ -44544,21 +44510,18 @@ const CHBApplicationDetails$1 = () => {
44544
44510
  flexDirection: "row",
44545
44511
  gap: "30px"
44546
44512
  }
44547
- }, ((_docs = docs) === null || _docs === void 0 ? void 0 : _docs.length) > 0 ? (_docs2 = docs) === null || _docs2 === void 0 ? void 0 : _docs2.map((doc, index) => {
44548
- var _doc$documentType;
44549
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
44550
- key: index
44551
- }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(CHBDocument, {
44552
- value: docs,
44553
- Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
44554
- index: index
44555
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
44556
- style: {
44557
- marginTop: "10px",
44558
- fontSize: "15px"
44559
- }
44560
- }, 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("_")))));
44561
- }) : /*#__PURE__*/React__default.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__default.createElement(digitUiReactComponents.Card, {
44513
+ }, ((_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__default.createElement(React__default.Fragment, {
44514
+ key: index
44515
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(CHBDocument, {
44516
+ value: docs,
44517
+ Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
44518
+ index: index
44519
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
44520
+ style: {
44521
+ marginTop: "10px",
44522
+ fontSize: "15px"
44523
+ }
44524
+ }, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React__default.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__default.createElement(digitUiReactComponents.Card, {
44562
44525
  style: {
44563
44526
  marginTop: "20px"
44564
44527
  }