@mseva/upyog-ui-module-chb 1.0.65 → 1.0.66

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.
@@ -25372,7 +25372,7 @@ const CHBApplicationDetails = () => {
25372
25372
  communityHallCode: `${t(chb_details === null || chb_details === void 0 ? void 0 : chb_details.communityHallCode)}`,
25373
25373
  hallCode: slot.hallCode + " - " + slot.capacity,
25374
25374
  bookingDate: slot.bookingDate + " (" + slot.bookingFromTime + " - " + slot.bookingToTime + ")",
25375
- bookingStatus: `${t(slot.status)}`
25375
+ bookingStatus: t(`WF_NEWTL_${slot === null || slot === void 0 ? void 0 : slot.status}`)
25376
25376
  }))) || [];
25377
25377
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
25378
25378
  className: "cardHeaderWithOptions",
@@ -25389,11 +25389,7 @@ const CHBApplicationDetails = () => {
25389
25389
  onHeadClick: () => setShowOptions(!showOptions),
25390
25390
  displayOptions: showOptions,
25391
25391
  options: dowloadOptions
25392
- })), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
25393
- className: "border-none",
25394
- label: t("CHB_BOOKING_NO"),
25395
- text: chb_details === null || chb_details === void 0 ? void 0 : chb_details.bookingNo
25396
- })), /*#__PURE__*/React.createElement(CardSubHeader, {
25392
+ })), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, {
25397
25393
  style: {
25398
25394
  fontSize: "24px"
25399
25395
  }
@@ -25409,6 +25405,10 @@ const CHBApplicationDetails = () => {
25409
25405
  className: "border-none",
25410
25406
  label: t("CHB_EMAIL_ID"),
25411
25407
  text: (chb_details === null || chb_details === void 0 ? void 0 : (_chb_details$applican3 = chb_details.applicantDetail) === null || _chb_details$applican3 === void 0 ? void 0 : _chb_details$applican3.applicantEmailId) || t("CS_NA")
25408
+ }), /*#__PURE__*/React.createElement(Row, {
25409
+ className: "border-none",
25410
+ label: t("CHB_BOOKING_NO"),
25411
+ text: chb_details === null || chb_details === void 0 ? void 0 : chb_details.bookingNo
25412
25412
  })), /*#__PURE__*/React.createElement(CardSubHeader, {
25413
25413
  style: {
25414
25414
  fontSize: "24px"
@@ -25416,18 +25416,19 @@ const CHBApplicationDetails = () => {
25416
25416
  }, t("CHB_EVENT_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
25417
25417
  className: "border-none",
25418
25418
  label: t("CHB_SPECIAL_CATEGORY"),
25419
- text: (chb_details === null || chb_details === void 0 ? void 0 : (_chb_details$specialC = chb_details.specialCategory) === null || _chb_details$specialC === void 0 ? void 0 : _chb_details$specialC.category) || t("CS_NA")
25419
+ text: t(chb_details === null || chb_details === void 0 ? void 0 : (_chb_details$specialC = chb_details.specialCategory) === null || _chb_details$specialC === void 0 ? void 0 : _chb_details$specialC.category) || t("CS_NA")
25420
25420
  }), /*#__PURE__*/React.createElement(Row, {
25421
25421
  className: "border-none",
25422
25422
  label: t("CHB_PURPOSE"),
25423
- text: (chb_details === null || chb_details === void 0 ? void 0 : (_chb_details$purpose = chb_details.purpose) === null || _chb_details$purpose === void 0 ? void 0 : _chb_details$purpose.purpose) || t("CS_NA")
25423
+ text: t(chb_details === null || chb_details === void 0 ? void 0 : (_chb_details$purpose = chb_details.purpose) === null || _chb_details$purpose === void 0 ? void 0 : _chb_details$purpose.purpose) || t("CS_NA")
25424
25424
  }), /*#__PURE__*/React.createElement(Row, {
25425
25425
  className: "border-none",
25426
25426
  label: t("CHB_PURPOSE_DESCRIPTION"),
25427
25427
  text: (chb_details === null || chb_details === void 0 ? void 0 : chb_details.purposeDescription) || t("CS_NA")
25428
25428
  })), /*#__PURE__*/React.createElement(CardSubHeader, {
25429
25429
  style: {
25430
- fontSize: "24px"
25430
+ fontSize: "24px",
25431
+ marginTop: "30px"
25431
25432
  }
25432
25433
  }, t("SLOT_DETAILS")), /*#__PURE__*/React.createElement(ApplicationTable, {
25433
25434
  t: t,
@@ -25443,28 +25444,30 @@ const CHBApplicationDetails = () => {
25443
25444
  }),
25444
25445
  isPaginationRequired: false,
25445
25446
  totalRecords: slotlistRows.length
25446
- }), (_docs = docs) === null || _docs === void 0 ? void 0 : _docs.map((doc, index) => {
25447
+ }), /*#__PURE__*/React.createElement(CardSubHeader, {
25448
+ style: {
25449
+ fontSize: "24px",
25450
+ marginTop: "30px"
25451
+ }
25452
+ }, t("CS_COMMON_DOCUMENTS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Card, {
25453
+ style: {
25454
+ display: "flex",
25455
+ flexDirection: "row",
25456
+ gap: "30px"
25457
+ }
25458
+ }, (_docs = docs) === null || _docs === void 0 ? void 0 : _docs.map((doc, index) => {
25447
25459
  var _doc$documentType;
25448
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardSubHeader, {
25449
- style: {
25450
- fontSize: "24px"
25451
- }
25452
- }, t("CHB_DOCUMENTS_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Card, {
25453
- style: {
25454
- display: "flex",
25455
- flexDirection: "row"
25456
- }
25457
- }, /*#__PURE__*/React.createElement("div", {
25458
- key: `doc-${index}`,
25459
- style: {
25460
- marginRight: "25px"
25461
- }
25462
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardSectionHeader, null, t("CHB_" + (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("_")))), /*#__PURE__*/React.createElement(CHBDocument, {
25460
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CHBDocument, {
25463
25461
  value: docs,
25464
25462
  Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
25465
25463
  index: index
25466
- }))))));
25467
- }))));
25464
+ }), /*#__PURE__*/React.createElement(CardSectionHeader, {
25465
+ style: {
25466
+ marginTop: "10px",
25467
+ fontSize: "15px"
25468
+ }
25469
+ }, t("CHB_MESSAGE_" + (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("_"))))));
25470
+ }))))));
25468
25471
  };
25469
25472
 
25470
25473
  const InboxLinks = ({
@@ -35945,6 +35948,7 @@ const CHBCitizenSecond = ({
35945
35948
  const [getHallCodes, setHallCodes] = useState([]);
35946
35949
  const [getSlots, setSlots] = useState([]);
35947
35950
  const [loader, setLoader] = useState(false);
35951
+ const [showInfo, setShowInfo] = useState(false);
35948
35952
  const tenantId = window.location.href.includes("employee") ? Digit.ULBService.getCurrentPermanentCity() : localStorage.getItem("CITIZEN.CITY");
35949
35953
  const {
35950
35954
  control,
@@ -35957,6 +35961,7 @@ const CHBCitizenSecond = ({
35957
35961
  getValues
35958
35962
  } = useForm({
35959
35963
  defaultValues: {
35964
+ shouldUnregister: false,
35960
35965
  halls: [{
35961
35966
  startDate: "",
35962
35967
  endDate: "",
@@ -35995,21 +36000,18 @@ const CHBCitizenSecond = ({
35995
36000
  } = Digit.Hooks.useCustomMDMS("pb", "CHB", [{
35996
36001
  name: "HallCode"
35997
36002
  }]);
36003
+ console.log("CHBHallCode", CHBHallCode);
35998
36004
  const fiterHalls = selected => {
35999
36005
  var _CHBDetails$CHB, _CHBDetails$CHB$Commu, _CHBHallCode$CHB;
36000
- console.log("selected", selected);
36001
- const filteredHalls = (CHBDetails === null || CHBDetails === void 0 ? void 0 : (_CHBDetails$CHB = CHBDetails.CHB) === null || _CHBDetails$CHB === void 0 ? void 0 : (_CHBDetails$CHB$Commu = _CHBDetails$CHB.CommunityHalls) === null || _CHBDetails$CHB$Commu === void 0 ? void 0 : _CHBDetails$CHB$Commu.filter(hall => hall.locationCode === selected.code)) || [];
36006
+ const filteredHalls = (CHBDetails === null || CHBDetails === void 0 ? void 0 : (_CHBDetails$CHB = CHBDetails.CHB) === null || _CHBDetails$CHB === void 0 ? void 0 : (_CHBDetails$CHB$Commu = _CHBDetails$CHB.CommunityHalls) === null || _CHBDetails$CHB$Commu === void 0 ? void 0 : _CHBDetails$CHB$Commu.filter(hall => hall.locationCode === (selected === null || selected === void 0 ? void 0 : selected.code))) || [];
36002
36007
  setHallDetails(filteredHalls);
36003
36008
  const hallInfo = CHBHallCode === null || CHBHallCode === void 0 ? void 0 : (_CHBHallCode$CHB = CHBHallCode.CHB) === null || _CHBHallCode$CHB === void 0 ? void 0 : _CHBHallCode$CHB.HallCode;
36004
36009
  const getHallCodesData = hallInfo === null || hallInfo === void 0 ? void 0 : hallInfo.filter(item => (item === null || item === void 0 ? void 0 : item.communityHallId) == (selected === null || selected === void 0 ? void 0 : selected.communityHallId));
36005
- console.log("getHallCodesData", getHallCodesData);
36006
36010
  setHallCodes(getHallCodesData);
36007
36011
  };
36008
36012
  const slotsSearch = async data => {
36009
36013
  var _getValues, _getValues$siteId, _getValues2, _getValues3;
36010
36014
  setLoader(true);
36011
- console.log("data", data);
36012
- console.log("getValues", getValues());
36013
36015
  const payload = {
36014
36016
  tenantId: tenantId,
36015
36017
  communityHallCode: (_getValues = getValues()) === null || _getValues === void 0 ? void 0 : (_getValues$siteId = _getValues.siteId) === null || _getValues$siteId === void 0 ? void 0 : _getValues$siteId.code,
@@ -36018,85 +36020,108 @@ const CHBCitizenSecond = ({
36018
36020
  bookingEndDate: (_getValues3 = getValues()) === null || _getValues3 === void 0 ? void 0 : _getValues3.startDate,
36019
36021
  isTimerRequired: false
36020
36022
  };
36021
- console.log("payload", payload);
36022
- const response = await Digit.CHBServices.slot_search({
36023
- filters: payload
36024
- });
36025
- setLoader(false);
36026
- setSlots(response === null || response === void 0 ? void 0 : response.hallSlotAvailabiltityDetails);
36027
- console.log("res", response === null || response === void 0 ? void 0 : response.hallSlotAvailabiltityDetails);
36028
- };
36029
- const updateHall = (idx, updates) => {
36030
- setHallDetails(prev => {
36031
- const updated = [...prev];
36032
- updated[idx] = {
36033
- ...updated[idx],
36034
- ...updates
36035
- };
36036
- return updated;
36037
- });
36023
+ try {
36024
+ const response = await Digit.CHBServices.slot_search({
36025
+ filters: payload
36026
+ });
36027
+ setLoader(false);
36028
+ setSlots(response === null || response === void 0 ? void 0 : response.hallSlotAvailabiltityDetails);
36029
+ return response;
36030
+ } catch (error) {
36031
+ setLoader(false);
36032
+ }
36038
36033
  };
36039
36034
  const onSubmit = data => {
36040
- var _Digit$UserService$ge;
36041
- console.log("data===", data);
36035
+ var _Digit$UserService$ge, _data$slots, _getHallDetails$, _data$purpose, _data$specialCategory;
36036
+ console.log("data==??", data);
36042
36037
  const userInfo = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
36043
- const bookingSlotDetails = getHallDetails === null || getHallDetails === void 0 ? void 0 : getHallDetails.map((hall, idx) => {
36044
- var _data$halls, _data$halls$idx, _data$halls2, _data$halls2$idx, _data$halls3, _data$halls3$idx, _data$halls4, _data$halls4$idx;
36038
+ const now = Date.now();
36039
+ const bookingSlotDetails = data === null || data === void 0 ? void 0 : (_data$slots = data.slots) === null || _data$slots === void 0 ? void 0 : _data$slots.map(slot => {
36040
+ var _CHBHallCode$CHB2, _CHBHallCode$CHB2$Hal;
36041
+ const hallInfo = CHBHallCode === null || CHBHallCode === void 0 ? void 0 : (_CHBHallCode$CHB2 = CHBHallCode.CHB) === null || _CHBHallCode$CHB2 === void 0 ? void 0 : (_CHBHallCode$CHB2$Hal = _CHBHallCode$CHB2.HallCode) === null || _CHBHallCode$CHB2$Hal === void 0 ? void 0 : _CHBHallCode$CHB2$Hal.find(h => h.HallCode === slot.hallCode);
36042
+ const formattedDate = slot !== null && slot !== void 0 && slot.bookingDate ? format(parse(slot.bookingDate, "dd-MM-yyyy", new Date()), "yyyy-MM-dd") : null;
36045
36043
  return {
36046
- bookingDate: data === null || data === void 0 ? void 0 : (_data$halls = data.halls) === null || _data$halls === void 0 ? void 0 : (_data$halls$idx = _data$halls[idx]) === null || _data$halls$idx === void 0 ? void 0 : _data$halls$idx.startDate,
36047
- bookingEndDate: data === null || data === void 0 ? void 0 : (_data$halls2 = data.halls) === null || _data$halls2 === void 0 ? void 0 : (_data$halls2$idx = _data$halls2[idx]) === null || _data$halls2$idx === void 0 ? void 0 : _data$halls2$idx.endDate,
36048
- bookingFromTime: data === null || data === void 0 ? void 0 : (_data$halls3 = data.halls) === null || _data$halls3 === void 0 ? void 0 : (_data$halls3$idx = _data$halls3[idx]) === null || _data$halls3$idx === void 0 ? void 0 : _data$halls3$idx.startTime,
36049
- bookingToTime: data === null || data === void 0 ? void 0 : (_data$halls4 = data.halls) === null || _data$halls4 === void 0 ? void 0 : (_data$halls4$idx = _data$halls4[idx]) === null || _data$halls4$idx === void 0 ? void 0 : _data$halls4$idx.endTime,
36050
- hallCode: (hall === null || hall === void 0 ? void 0 : hall.code) || (hall === null || hall === void 0 ? void 0 : hall.communityHallId),
36044
+ bookingDate: formattedDate,
36045
+ bookingEndDate: formattedDate,
36046
+ bookingFromTime: (slot === null || slot === void 0 ? void 0 : slot.fromTime) || "13:47",
36047
+ bookingToTime: (slot === null || slot === void 0 ? void 0 : slot.toTime) || "14:54",
36048
+ hallCode: slot === null || slot === void 0 ? void 0 : slot.hallCode,
36051
36049
  status: "INITIATE",
36052
- capacity: "50"
36050
+ capacity: (hallInfo === null || hallInfo === void 0 ? void 0 : hallInfo.capacity) || null
36053
36051
  };
36054
36052
  });
36055
- return;
36053
+ const payload = {
36054
+ hallsBookingApplication: {
36055
+ tenantId,
36056
+ bookingStatus: "INITIATED",
36057
+ applicationDate: now,
36058
+ communityHallCode: (getHallDetails === null || getHallDetails === void 0 ? void 0 : (_getHallDetails$ = getHallDetails[0]) === null || _getHallDetails$ === void 0 ? void 0 : _getHallDetails$.communityHallId) || "",
36059
+ purpose: {
36060
+ purpose: data === null || data === void 0 ? void 0 : (_data$purpose = data.purpose) === null || _data$purpose === void 0 ? void 0 : _data$purpose.code
36061
+ },
36062
+ specialCategory: {
36063
+ category: data === null || data === void 0 ? void 0 : (_data$specialCategory = data.specialCategory) === null || _data$specialCategory === void 0 ? void 0 : _data$specialCategory.code
36064
+ },
36065
+ purposeDescription: data === null || data === void 0 ? void 0 : data.purposeDescription,
36066
+ bookingSlotDetails,
36067
+ owners: [{
36068
+ name: userInfo === null || userInfo === void 0 ? void 0 : userInfo.name,
36069
+ mobileNumber: userInfo === null || userInfo === void 0 ? void 0 : userInfo.mobileNumber,
36070
+ emailId: userInfo === null || userInfo === void 0 ? void 0 : userInfo.emailId,
36071
+ type: userInfo === null || userInfo === void 0 ? void 0 : userInfo.type
36072
+ }],
36073
+ workflow: {
36074
+ action: "INITIATE",
36075
+ businessService: "CommunityHallBooking",
36076
+ moduleName: "CommunityHallModule"
36077
+ }
36078
+ }
36079
+ };
36080
+ console.log("payload", payload);
36081
+ goNext(payload);
36056
36082
  };
36057
36083
  useEffect(() => {
36058
36084
  var _currentStepData$owne;
36059
36085
  const formattedData = currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$owne = currentStepData.ownerDetails) === null || _currentStepData$owne === void 0 ? void 0 : _currentStepData$owne.hallsBookingApplication;
36060
36086
  if (formattedData) {
36061
- var _formattedData$bookin3;
36062
- const locationOptions = CHBLocations.CHB.Location || [];
36087
+ var _CHBHallCode$CHB3, _formattedData$bookin3, _formattedData$bookin4;
36088
+ const communityHallsOptions = CHBLocations.CHB.CommunityHalls || [];
36063
36089
  const purposeOptions = CHBPurpose.CHB.Purpose || [];
36064
36090
  const specialCategoryOptions = SpecialCategory.CHB.SpecialCategory || [];
36065
- const selectedLoc = locationOptions === null || locationOptions === void 0 ? void 0 : locationOptions.find(item => {
36066
- var _formattedData$bookin, _formattedData$bookin2;
36067
- return item.code == (formattedData === null || formattedData === void 0 ? void 0 : (_formattedData$bookin = formattedData.bookingSlotDetails) === null || _formattedData$bookin === void 0 ? void 0 : (_formattedData$bookin2 = _formattedData$bookin[0]) === null || _formattedData$bookin2 === void 0 ? void 0 : _formattedData$bookin2.hallCode);
36068
- });
36091
+ const hallCodeOptions = CHBHallCode === null || CHBHallCode === void 0 ? void 0 : (_CHBHallCode$CHB3 = CHBHallCode.CHB) === null || _CHBHallCode$CHB3 === void 0 ? void 0 : _CHBHallCode$CHB3.HallCode;
36092
+ const selectedCommHall = communityHallsOptions === null || communityHallsOptions === void 0 ? void 0 : communityHallsOptions.find(item => (item === null || item === void 0 ? void 0 : item.communityHallId) == (formattedData === null || formattedData === void 0 ? void 0 : formattedData.communityHallCode));
36069
36093
  const selectedPurpose = purposeOptions === null || purposeOptions === void 0 ? void 0 : purposeOptions.find(item => {
36070
36094
  var _formattedData$purpos;
36071
- return item.code == (formattedData === null || formattedData === void 0 ? void 0 : (_formattedData$purpos = formattedData.purpose) === null || _formattedData$purpos === void 0 ? void 0 : _formattedData$purpos.purpose);
36095
+ return (item === null || item === void 0 ? void 0 : item.code) == (formattedData === null || formattedData === void 0 ? void 0 : (_formattedData$purpos = formattedData.purpose) === null || _formattedData$purpos === void 0 ? void 0 : _formattedData$purpos.purpose);
36072
36096
  });
36073
36097
  const selectedSpecialCat = specialCategoryOptions === null || specialCategoryOptions === void 0 ? void 0 : specialCategoryOptions.find(item => {
36074
36098
  var _formattedData$specia;
36075
- return item.code == (formattedData === null || formattedData === void 0 ? void 0 : (_formattedData$specia = formattedData.specialCategory) === null || _formattedData$specia === void 0 ? void 0 : _formattedData$specia.category);
36099
+ return (item === null || item === void 0 ? void 0 : item.code) == (formattedData === null || formattedData === void 0 ? void 0 : (_formattedData$specia = formattedData.specialCategory) === null || _formattedData$specia === void 0 ? void 0 : _formattedData$specia.category);
36076
36100
  });
36077
- fiterHalls(selectedLoc);
36078
- formattedData === null || formattedData === void 0 ? void 0 : (_formattedData$bookin3 = formattedData.bookingSlotDetails) === null || _formattedData$bookin3 === void 0 ? void 0 : _formattedData$bookin3.forEach((slot, idx) => {
36079
- reset({
36080
- siteId: selectedLoc || null,
36081
- purpose: selectedPurpose || null,
36082
- specialCategory: selectedSpecialCat || null,
36083
- purposeDescription: formattedData.purposeDescription || "",
36084
- halls: [{
36085
- startDate: slot.bookingDate,
36086
- endDate: slot.bookingEndDate,
36087
- startTime: slot.bookingFromTime,
36088
- endTime: slot.bookingToTime
36089
- }]
36090
- });
36091
- updateHall(idx, {
36092
- startDate: slot.bookingDate,
36093
- endDate: slot.bookingEndDate,
36094
- startTime: slot.bookingFromTime,
36095
- endTime: slot.bookingToTime
36096
- });
36101
+ const selectHallCode = hallCodeOptions === null || hallCodeOptions === void 0 ? void 0 : hallCodeOptions.find(item => {
36102
+ var _formattedData$bookin, _formattedData$bookin2;
36103
+ return (item === null || item === void 0 ? void 0 : item.HallCode) == (formattedData === null || formattedData === void 0 ? void 0 : (_formattedData$bookin = formattedData.bookingSlotDetails) === null || _formattedData$bookin === void 0 ? void 0 : (_formattedData$bookin2 = _formattedData$bookin[0]) === null || _formattedData$bookin2 === void 0 ? void 0 : _formattedData$bookin2.hallCode);
36104
+ });
36105
+ console.log("formattedData", formattedData);
36106
+ setValue("siteId", selectedCommHall || null);
36107
+ setValue("hallCode", selectHallCode || null);
36108
+ setValue("startDate", formattedData === null || formattedData === void 0 ? void 0 : (_formattedData$bookin3 = formattedData.bookingSlotDetails) === null || _formattedData$bookin3 === void 0 ? void 0 : (_formattedData$bookin4 = _formattedData$bookin3[0]) === null || _formattedData$bookin4 === void 0 ? void 0 : _formattedData$bookin4.bookingDate);
36109
+ setShowInfo(true);
36110
+ fiterHalls(selectedCommHall);
36111
+ slotsSearch(selectHallCode).then(response => {
36112
+ console.log("response", response);
36113
+ const slotsData = (response === null || response === void 0 ? void 0 : response.hallSlotAvailabiltityDetails) || [];
36114
+ setSlots(slotsData);
36115
+ setValue("slots", slotsData);
36097
36116
  });
36117
+ setValue("purpose", selectedPurpose || null);
36118
+ setValue("specialCategory", selectedSpecialCat || null);
36119
+ setValue("purposeDescription", formattedData.purposeDescription || "");
36098
36120
  }
36099
36121
  }, [currentStepData, setValue]);
36122
+ useEffect(() => {
36123
+ console.log("getSlots", getSlots);
36124
+ }, [getSlots]);
36100
36125
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("form", {
36101
36126
  onSubmit: handleSubmit(onSubmit)
36102
36127
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, "Select Hall Name ", /*#__PURE__*/React.createElement("span", {
@@ -36107,7 +36132,7 @@ const CHBCitizenSecond = ({
36107
36132
  control: control,
36108
36133
  name: "siteId",
36109
36134
  rules: {
36110
- required: "Hall Name is Required"
36135
+ required: t("HALL_NAME_REQ")
36111
36136
  },
36112
36137
  render: props => {
36113
36138
  var _CHBLocations$CHB;
@@ -36147,7 +36172,7 @@ const CHBCitizenSecond = ({
36147
36172
  control: control,
36148
36173
  name: "startDate",
36149
36174
  rules: {
36150
- required: "Start Date is Required"
36175
+ required: t("START_DATE_REQ")
36151
36176
  },
36152
36177
  render: props => /*#__PURE__*/React.createElement(TextInput, {
36153
36178
  style: {
@@ -36180,7 +36205,7 @@ const CHBCitizenSecond = ({
36180
36205
  control: control,
36181
36206
  name: "hallCode",
36182
36207
  rules: {
36183
- required: "Hall Code is Required"
36208
+ required: t("HALL_CODE_REQ")
36184
36209
  },
36185
36210
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
36186
36211
  style: {
@@ -36188,8 +36213,10 @@ const CHBCitizenSecond = ({
36188
36213
  },
36189
36214
  className: "form-field",
36190
36215
  select: e => {
36216
+ console.log("e", e);
36191
36217
  props.onChange(e);
36192
36218
  slotsSearch(e);
36219
+ setShowInfo(true);
36193
36220
  },
36194
36221
  selected: props.value,
36195
36222
  option: getHallCodes,
@@ -36208,24 +36235,36 @@ const CHBCitizenSecond = ({
36208
36235
  style: {
36209
36236
  color: "red"
36210
36237
  }
36211
- }, "*")), /*#__PURE__*/React.createElement("div", {
36212
- style: {
36213
- display: "flex",
36214
- flexDirection: "column",
36215
- gap: "8px"
36216
- }
36217
- }, getSlots === null || getSlots === void 0 ? void 0 : getSlots.map((slot, idx) => /*#__PURE__*/React.createElement(Controller, {
36218
- key: idx,
36238
+ }, "*")), /*#__PURE__*/React.createElement(Controller, {
36219
36239
  control: control,
36220
- name: `slots`,
36221
- render: field => {
36240
+ name: "slots",
36241
+ rules: {
36242
+ validate: value => {
36243
+ if (!value || value.length === 0) {
36244
+ return t("PLEASE_SELECT_AT_LEAST_ONE_SLOT");
36245
+ }
36246
+ return true;
36247
+ }
36248
+ },
36249
+ render: field => /*#__PURE__*/React.createElement("div", {
36250
+ style: {
36251
+ display: "flex",
36252
+ flexDirection: "column",
36253
+ gap: "8px"
36254
+ }
36255
+ }, getSlots === null || getSlots === void 0 ? void 0 : getSlots.map((slot, idx) => {
36222
36256
  var _field$value;
36223
36257
  const isChecked = (_field$value = field.value) === null || _field$value === void 0 ? void 0 : _field$value.some(s => s.hallCode === slot.hallCode);
36258
+ console.log("isChecked", isChecked);
36259
+ console.log("field.value", field);
36260
+ console.log("slot", slot);
36224
36261
  return /*#__PURE__*/React.createElement("label", {
36262
+ key: idx,
36225
36263
  style: {
36226
36264
  display: "flex",
36227
36265
  alignItems: "center",
36228
- gap: "8px"
36266
+ gap: "8px",
36267
+ cursor: "pointer"
36229
36268
  }
36230
36269
  }, /*#__PURE__*/React.createElement("input", {
36231
36270
  type: "checkbox",
@@ -36238,8 +36277,16 @@ const CHBCitizenSecond = ({
36238
36277
  }
36239
36278
  }
36240
36279
  }), /*#__PURE__*/React.createElement("span", null, slot.bookingDate, " (", slot.hallCode, ") \u2013 ", slot.slotStaus));
36280
+ }))
36281
+ }), errors.slots && /*#__PURE__*/React.createElement("p", {
36282
+ style: {
36283
+ color: "red"
36241
36284
  }
36242
- })))), (getSlots === null || getSlots === void 0 ? void 0 : getSlots.length) > 0 && /*#__PURE__*/React.createElement("div", null, " ", /*#__PURE__*/React.createElement("div", {
36285
+ }, errors.slots.message)), /*#__PURE__*/React.createElement("div", {
36286
+ style: {
36287
+ display: showInfo ? "block" : "none"
36288
+ }
36289
+ }, " ", /*#__PURE__*/React.createElement("div", {
36243
36290
  style: {
36244
36291
  marginTop: "20px",
36245
36292
  marginBottom: "20px"
@@ -36251,8 +36298,9 @@ const CHBCitizenSecond = ({
36251
36298
  }, "*")), /*#__PURE__*/React.createElement(Controller, {
36252
36299
  control: control,
36253
36300
  name: "purpose",
36301
+ defaultValue: null,
36254
36302
  rules: {
36255
- required: "CHB_PURPOSE_REQUIRED"
36303
+ required: t("CHB_PURPOSE_REQUIRED")
36256
36304
  },
36257
36305
  render: props => {
36258
36306
  var _CHBPurpose$CHB;
@@ -36282,8 +36330,9 @@ const CHBCitizenSecond = ({
36282
36330
  }, "*")), /*#__PURE__*/React.createElement(Controller, {
36283
36331
  control: control,
36284
36332
  name: "specialCategory",
36333
+ defaultValue: null,
36285
36334
  rules: {
36286
- required: "CHB_SPECIAL_CATEGORY_REQUIRED"
36335
+ required: t("CHB_SPECIAL_CATEGORY_REQUIRED")
36287
36336
  },
36288
36337
  render: props => {
36289
36338
  var _SpecialCategory$CHB;
@@ -36313,11 +36362,12 @@ const CHBCitizenSecond = ({
36313
36362
  }, /*#__PURE__*/React.createElement(Controller, {
36314
36363
  control: control,
36315
36364
  name: "purposeDescription",
36365
+ defaultValue: "",
36316
36366
  rules: {
36317
- required: "CHB_PURPOSE_DESCRIPTION_REQUIRED",
36367
+ required: t("CHB_PURPOSE_DESCRIPTION_REQUIRED"),
36318
36368
  minLength: {
36319
36369
  value: 5,
36320
- message: "CHB_PURPOSE_DESCRIPTION_REQUIRED_MIN"
36370
+ message: t("CHB_PURPOSE_DESCRIPTION_REQUIRED_MIN")
36321
36371
  }
36322
36372
  },
36323
36373
  render: props => /*#__PURE__*/React.createElement(TextArea, {
@@ -36394,6 +36444,7 @@ const CHBCitizenDetailsNew = ({
36394
36444
  const tenantId = Digit.ULBService.getCurrentTenantId();
36395
36445
  const stateId = Digit.ULBService.getStateId();
36396
36446
  const user = Digit.UserService.getUser();
36447
+ const [loader, setLoader] = useState(false);
36397
36448
  const {
36398
36449
  control,
36399
36450
  handleSubmit,
@@ -36411,6 +36462,7 @@ const CHBCitizenDetailsNew = ({
36411
36462
  });
36412
36463
  const onSubmit = async data => {
36413
36464
  var _currentStepData$venu, _currentStepData$venu2;
36465
+ setLoader(true);
36414
36466
  console.log("data", data);
36415
36467
  console.log("user", user);
36416
36468
  console.log("currentStepData", currentStepData);
@@ -36437,9 +36489,14 @@ const CHBCitizenDetailsNew = ({
36437
36489
  }
36438
36490
  };
36439
36491
  console.log("final payload", payload);
36440
- const response = await Digit.CHBServices.create(payload);
36441
- console.log("response", response);
36442
- goNext(response === null || response === void 0 ? void 0 : response.hallsBookingApplication);
36492
+ try {
36493
+ const response = await Digit.CHBServices.create(payload);
36494
+ console.log("response", response);
36495
+ setLoader(false);
36496
+ goNext(response === null || response === void 0 ? void 0 : response.hallsBookingApplication);
36497
+ } catch (error) {
36498
+ setLoader(false);
36499
+ }
36443
36500
  }
36444
36501
  };
36445
36502
  useEffect(() => {
@@ -36606,7 +36663,9 @@ const CHBCitizenDetailsNew = ({
36606
36663
  }), /*#__PURE__*/React.createElement(SubmitBar, {
36607
36664
  label: "Next",
36608
36665
  submit: "submit"
36609
- }))));
36666
+ }))), loader && /*#__PURE__*/React.createElement(Loader, {
36667
+ page: true
36668
+ }));
36610
36669
  };
36611
36670
 
36612
36671
  const NewADSStepFormTwo = ({
@@ -36803,7 +36862,7 @@ function CHBSummary({
36803
36862
  goNext,
36804
36863
  onGoBack
36805
36864
  }) {
36806
- 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, _workflowDetails$data6, _formData$venueDetail3, _formData$venueDetail4, _formData$venueDetail5, _formData$venueDetail6, _formData$venueDetail7, _formData$venueDetail8, _formData$venueDetail9, _formData$venueDetail0, _formData$venueDetail1, _formData$venueDetail10, _formData$venueDetail11, _formData$venueDetail12, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9;
36865
+ 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, _workflowDetails$data6, _formData$venueDetail3, _formData$venueDetail4, _formData$venueDetail5, _formData$venueDetail8, _formData$venueDetail9, _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, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9;
36807
36866
  const {
36808
36867
  pathname: url
36809
36868
  } = useLocation();
@@ -36816,6 +36875,19 @@ function CHBSummary({
36816
36875
  const mutateScreen = url.includes("/property-mutate/");
36817
36876
  let user = Digit.UserService.getUser();
36818
36877
  console.log("formData", formData);
36878
+ const columns = [{
36879
+ Header: `${t("CHB_HALL_NUMBER")}`,
36880
+ accessor: "communityHallCode"
36881
+ }, {
36882
+ Header: `${t("CHB_HALL_CODE")}`,
36883
+ accessor: "hallCode"
36884
+ }, {
36885
+ Header: `${t("CHB_BOOKING_DATE")}`,
36886
+ accessor: "bookingDate"
36887
+ }, {
36888
+ Header: `${t("PT_COMMON_TABLE_COL_STATUS_LABEL")}`,
36889
+ accessor: "bookingStatus"
36890
+ }];
36819
36891
  let docs = formData === null || formData === void 0 ? void 0 : (_formData$documents = formData.documents) === null || _formData$documents === void 0 ? void 0 : (_formData$documents$d = _formData$documents.documents) === null || _formData$documents$d === void 0 ? void 0 : _formData$documents$d.documents;
36820
36892
  const appId = (formData === null || formData === void 0 ? void 0 : (_formData$apiData = formData.apiData) === null || _formData$apiData === void 0 ? void 0 : (_formData$apiData$App = _formData$apiData.Applications) === null || _formData$apiData$App === void 0 ? void 0 : (_formData$apiData$App2 = _formData$apiData$App[0]) === null || _formData$apiData$App2 === void 0 ? void 0 : _formData$apiData$App2.uuid) || (formData === null || formData === void 0 ? void 0 : (_formData$venueDetail = formData.venueDetails) === null || _formData$venueDetail === void 0 ? void 0 : (_formData$venueDetail2 = _formData$venueDetail[0]) === null || _formData$venueDetail2 === void 0 ? void 0 : _formData$venueDetail2.bookingNo);
36821
36893
  const tenantId = window.location.href.includes("citizen") ? window.localStorage.getItem("CITIZEN.CITY") : window.localStorage.getItem("Employee.tenant-id");
@@ -36876,21 +36948,6 @@ function CHBSummary({
36876
36948
  padding: "0.5rem 0",
36877
36949
  color: "#333"
36878
36950
  };
36879
- const documentsContainerStyle = {
36880
- display: "flex",
36881
- flexWrap: "wrap",
36882
- gap: "1rem"
36883
- };
36884
- const documentCardStyle = {
36885
- flex: isCitizen ? "1 1 18%" : "1 1 22%",
36886
- minWidth: "200px",
36887
- maxWidth: "250px",
36888
- backgroundColor: "#fdfdfd",
36889
- padding: "0.75rem",
36890
- border: "1px solid #e0e0e0",
36891
- borderRadius: "6px",
36892
- boxShadow: "0 1px 3px rgba(0,0,0,0.05)"
36893
- };
36894
36951
  const boldLabelStyle = {
36895
36952
  fontWeight: "bold",
36896
36953
  color: "#555"
@@ -36899,28 +36956,70 @@ function CHBSummary({
36899
36956
  style: labelFieldPairStyle
36900
36957
  }, /*#__PURE__*/React.createElement(CardLabel, {
36901
36958
  style: boldLabelStyle
36902
- }, label), /*#__PURE__*/React.createElement("div", null, value || "NA"));
36959
+ }, label), /*#__PURE__*/React.createElement("div", null, t(value) || "NA"));
36960
+ 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 => {
36961
+ var _formData$venueDetail6, _formData$venueDetail7;
36962
+ return {
36963
+ 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)}`,
36964
+ hallCode: slot.hallCode + " - " + slot.capacity,
36965
+ bookingDate: slot.bookingDate + " (" + slot.bookingFromTime + " - " + slot.bookingToTime + ")",
36966
+ bookingStatus: `${t(slot.status)}`
36967
+ };
36968
+ })) || [];
36903
36969
  return /*#__PURE__*/React.createElement("div", {
36904
36970
  style: pageStyle
36905
36971
  }, /*#__PURE__*/React.createElement("h2", {
36906
36972
  style: headingStyle
36907
36973
  }, t("Application Summary")), /*#__PURE__*/React.createElement("div", {
36908
36974
  style: sectionStyle
36909
- }, renderLabel(t("Full Name"), 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.applicantDetail) === null || _formData$venueDetail5 === void 0 ? void 0 : _formData$venueDetail5.applicantName), renderLabel(t("Mobile Number"), 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$venueDetail8 = _formData$venueDetail7.applicantDetail) === null || _formData$venueDetail8 === void 0 ? void 0 : _formData$venueDetail8.applicantMobileNo), renderLabel(t("Email ID"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail9 = formData.venueDetails) === null || _formData$venueDetail9 === void 0 ? void 0 : (_formData$venueDetail0 = _formData$venueDetail9[0]) === null || _formData$venueDetail0 === void 0 ? void 0 : (_formData$venueDetail1 = _formData$venueDetail0.applicantDetail) === null || _formData$venueDetail1 === void 0 ? void 0 : _formData$venueDetail1.applicantEmailId), renderLabel(t("Address"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail10 = formData.venueDetails) === null || _formData$venueDetail10 === void 0 ? void 0 : (_formData$venueDetail11 = _formData$venueDetail10[0]) === null || _formData$venueDetail11 === void 0 ? void 0 : (_formData$venueDetail12 = _formData$venueDetail11.address) === null || _formData$venueDetail12 === void 0 ? void 0 : _formData$venueDetail12.addressLine1)), /*#__PURE__*/React.createElement("h2", {
36910
- style: headingStyle
36911
- }, t("Documents Uploaded")), /*#__PURE__*/React.createElement("div", {
36975
+ }, /*#__PURE__*/React.createElement(CardSubHeader, {
36976
+ style: {
36977
+ fontSize: "24px"
36978
+ }
36979
+ }, t("CHB_APPLICANT_DETAILS")), renderLabel(t("BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL"), 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$venueDetail0 = _formData$venueDetail9.applicantDetail) === null || _formData$venueDetail0 === void 0 ? void 0 : _formData$venueDetail0.applicantName), renderLabel(t("NOC_APPLICANT_MOBILE_NO_LABEL"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail1 = formData.venueDetails) === null || _formData$venueDetail1 === void 0 ? void 0 : (_formData$venueDetail10 = _formData$venueDetail1[0]) === null || _formData$venueDetail10 === void 0 ? void 0 : (_formData$venueDetail11 = _formData$venueDetail10.applicantDetail) === null || _formData$venueDetail11 === void 0 ? void 0 : _formData$venueDetail11.applicantMobileNo), renderLabel(t("NOC_APPLICANT_EMAIL_LABEL"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail12 = formData.venueDetails) === null || _formData$venueDetail12 === void 0 ? void 0 : (_formData$venueDetail13 = _formData$venueDetail12[0]) === null || _formData$venueDetail13 === void 0 ? void 0 : (_formData$venueDetail14 = _formData$venueDetail13.applicantDetail) === null || _formData$venueDetail14 === void 0 ? void 0 : _formData$venueDetail14.applicantEmailId), renderLabel(t("PT_COMMON_COL_ADDRESS"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail15 = formData.venueDetails) === null || _formData$venueDetail15 === void 0 ? void 0 : (_formData$venueDetail16 = _formData$venueDetail15[0]) === null || _formData$venueDetail16 === void 0 ? void 0 : (_formData$venueDetail17 = _formData$venueDetail16.address) === null || _formData$venueDetail17 === void 0 ? void 0 : _formData$venueDetail17.addressLine1)), /*#__PURE__*/React.createElement("div", {
36912
36980
  style: sectionStyle
36913
- }, (docs === null || docs === void 0 ? void 0 : docs.length) > 0 ? /*#__PURE__*/React.createElement("div", {
36914
- style: documentsContainerStyle
36915
- }, docs === null || docs === void 0 ? void 0 : docs.map((doc, index) => /*#__PURE__*/React.createElement("div", {
36916
- key: index,
36917
- style: documentCardStyle
36918
- }, /*#__PURE__*/React.createElement(CHBDocument$1, {
36919
- value: docs,
36920
- Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
36921
- index: index,
36922
- formData: formData
36923
- })))) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG"))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
36981
+ }, /*#__PURE__*/React.createElement(CardSubHeader, {
36982
+ style: {
36983
+ fontSize: "24px"
36984
+ }
36985
+ }, t("CHB_EVENT_DETAILS")), renderLabel(t("CHB_SPECIAL_CATEGORY"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail18 = formData.venueDetails) === null || _formData$venueDetail18 === void 0 ? void 0 : (_formData$venueDetail19 = _formData$venueDetail18[0]) === null || _formData$venueDetail19 === void 0 ? void 0 : (_formData$venueDetail20 = _formData$venueDetail19.specialCategory) === null || _formData$venueDetail20 === void 0 ? void 0 : _formData$venueDetail20.category), renderLabel(t("CHB_PURPOSE"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail21 = formData.venueDetails) === null || _formData$venueDetail21 === void 0 ? void 0 : (_formData$venueDetail22 = _formData$venueDetail21[0]) === null || _formData$venueDetail22 === void 0 ? void 0 : (_formData$venueDetail23 = _formData$venueDetail22.purpose) === null || _formData$venueDetail23 === void 0 ? void 0 : _formData$venueDetail23.purpose), renderLabel(t("CHB_PURPOSE_DESCRIPTION"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail24 = formData.venueDetails) === null || _formData$venueDetail24 === void 0 ? void 0 : (_formData$venueDetail25 = _formData$venueDetail24[0]) === null || _formData$venueDetail25 === void 0 ? void 0 : _formData$venueDetail25.purposeDescription)), /*#__PURE__*/React.createElement(ApplicationTable, {
36986
+ t: t,
36987
+ data: slotlistRows,
36988
+ columns: columns,
36989
+ getCellProps: cellInfo => ({
36990
+ style: {
36991
+ minWidth: "150px",
36992
+ padding: "10px",
36993
+ fontSize: "16px",
36994
+ paddingLeft: "20px"
36995
+ }
36996
+ }),
36997
+ isPaginationRequired: false,
36998
+ totalRecords: slotlistRows.length
36999
+ }), /*#__PURE__*/React.createElement(CardSubHeader, {
37000
+ style: {
37001
+ fontSize: "24px",
37002
+ marginTop: "30px"
37003
+ }
37004
+ }, t("CS_COMMON_DOCUMENTS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Card, {
37005
+ style: {
37006
+ display: "flex",
37007
+ flexDirection: "row",
37008
+ gap: "30px"
37009
+ }
37010
+ }, docs === null || docs === void 0 ? void 0 : docs.map((doc, index) => {
37011
+ var _doc$documentType;
37012
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CHBDocument$1, {
37013
+ value: docs,
37014
+ Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
37015
+ index: index
37016
+ }), /*#__PURE__*/React.createElement(CardSectionHeader, {
37017
+ style: {
37018
+ marginTop: "10px",
37019
+ fontSize: "15px"
37020
+ }
37021
+ }, t("CHB_MESSAGE_" + (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("_"))))));
37022
+ }))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
36924
37023
  style: {
36925
37024
  background: " white",
36926
37025
  color: "black",
@@ -37110,7 +37209,7 @@ const CHBSelectProofIdentity = ({
37110
37209
  label: error,
37111
37210
  onClose: () => setError(null),
37112
37211
  error: true
37113
- })) : /*#__PURE__*/React.createElement(Loader$1, null));
37212
+ })) : /*#__PURE__*/React.createElement(Loader, null));
37114
37213
  };
37115
37214
  function PTRSelectDocument({
37116
37215
  t,
@@ -37243,7 +37342,7 @@ function PTRSelectDocument({
37243
37342
  style: {
37244
37343
  marginBottom: "24px"
37245
37344
  }
37246
- }, getLoading && /*#__PURE__*/React.createElement(Loader$1, null), doc !== null && doc !== void 0 && doc.hasDropdown ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
37345
+ }, doc !== null && doc !== void 0 && doc.hasDropdown ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
37247
37346
  className: "card-label-smaller"
37248
37347
  }, t(doc === null || doc === void 0 ? void 0 : doc.code), " ", (doc === null || doc === void 0 ? void 0 : doc.required) && " *"), /*#__PURE__*/React.createElement(Dropdown, {
37249
37348
  className: "form-field",
@@ -37283,7 +37382,9 @@ function PTRSelectDocument({
37283
37382
  accept: ".pdf, .jpeg, .jpg, .png",
37284
37383
  buttonType: "button",
37285
37384
  error: !uploadedFile
37286
- }))));
37385
+ }))), getLoading && /*#__PURE__*/React.createElement(Loader, {
37386
+ page: true
37387
+ }));
37287
37388
  }
37288
37389
 
37289
37390
  const initialState = {