@djb25/digit-ui-module-ws 1.0.22 → 1.0.24

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.
@@ -442,7 +442,6 @@ const getFiles = async (filesArray, tenant) => {
442
442
  };
443
443
  const createPayloadOfWS = async data => {
444
444
  var _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$applicationSele, _data$applicationSele2, _data$ConnectionHolde, _data$useDetails, _data$useDetails2, _data$useDetails3, _data$useDetails3$pro, _connectionDetailsObj, _connectionDetailsObj2, _data$useDetails4, _data$useDetails4$pro, _connectionDetailsObj3, _connectionDetailsObj4, _data$useDetails5, _data$useDetails6, _data$useDetails7, _data$useDetails8, _connectionHolder$gen, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2, _connectionHolder$own, _connectionHolder$rel, _data$propertyAddress, _data$applicant, _data$useDetails9, _data$useDetails9$gen, _data$contact, _data$applicant2, _data$applicant3, _data$applicant4, _data$applicationSele3, _data$applicationSele4, _data$contact2, _data$cpt3, _data$cpt4, _data$cpt4$details, _data$roadCuttingDeta, _data$plumberDetails, _data$zro, _data$propertyAddress2, _data$propertyAddress3, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$cpt5$details$ad2, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _data$plumberDetails6, _data$applicationSele5, _data$applicationSele6, _data$applicationSele7, _data$applicationSele8, _connectionDetailsObj5, _data$applicationSele9, _data$applicationSele0, _connectionHolder$own2, _data$applicationSele1, _data$applicationSele10, _data$applicationSele11, _data$applicationSele12, _data$applicationSele13, _data$applicationSele14, _data$applicationSele15, _data$applicationSele16, _data$applicationSele17, _data$applicationSele18, _data$applicationSele19, _data$applicationSele20, _data$applicationSele21, _data$applicationSele22, _data$applicationSele23, _data$contact3, _data$documents, _data$documents2, _data$documents3, _data$cpt6, _Digit, _Digit$Customizations, _Digit$Customizations2, _Digit2, _Digit2$Customization, _Digit2$Customization2;
445
- console.log(data, "yuyu");
446
445
  data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : (_data$cpt$details = _data$cpt.details) === null || _data$cpt$details === void 0 ? void 0 : (_data$cpt$details$own = _data$cpt$details.owners) === null || _data$cpt$details$own === void 0 ? void 0 : _data$cpt$details$own.forEach(owner => {
447
446
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
448
447
  });
@@ -11750,6 +11749,7 @@ const WSPropertyDetails = ({
11750
11749
  clearErrors
11751
11750
  }) => {
11752
11751
  var _Digit$SessionStorage, _formData$cptId, _formData$cptId2, _propertyDetails$Prop2, _propertyDetails$Prop3, _propertyDetails$Prop4;
11752
+ const redirectBackUrl = `/digit-ui/${userType}/ws/new-application`;
11753
11753
  const [propertyId, setPropertyId] = React.useState("");
11754
11754
  const tenantId = (_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code;
11755
11755
  const {
@@ -11811,7 +11811,7 @@ const WSPropertyDetails = ({
11811
11811
  type: "button",
11812
11812
  onClick: () => setPropertyId(propertyId)
11813
11813
  }, `${t("PT_SEARCH")}`))), /*#__PURE__*/React.createElement(Link, {
11814
- to: `/digit-ui/employee/pt/search`
11814
+ to: `/digit-ui/${userType}/commonpt/search?redirectToUrl=${redirectBackUrl}`
11815
11815
  }, /*#__PURE__*/React.createElement(LinkButton, {
11816
11816
  label: t("CPT_SEARCH_PROPERTY"),
11817
11817
  style: {
@@ -11819,7 +11819,7 @@ const WSPropertyDetails = ({
11819
11819
  display: "inline-block"
11820
11820
  }
11821
11821
  })), "\xA0 | \xA0", /*#__PURE__*/React.createElement(Link, {
11822
- to: `/digit-ui/employee/pt/new-application`
11822
+ to: `/digit-ui/${userType}/commonpt/new-application?redirectToUrl=${redirectBackUrl}`
11823
11823
  }, /*#__PURE__*/React.createElement(LinkButton, {
11824
11824
  label: t("CPT_CREATE_PROPERTY"),
11825
11825
  style: {
@@ -11845,7 +11845,7 @@ const WSPropertyDetails = ({
11845
11845
  }, `${t(`PROPERTY_ADDRESS`)}`), /*#__PURE__*/React.createElement("div", {
11846
11846
  className: "field"
11847
11847
  }, /*#__PURE__*/React.createElement("p", null, getPropertyAddress()))), /*#__PURE__*/React.createElement(Link, {
11848
- to: `/digit-ui/employee/commonpt/view-property?propertyId=${propertyId}&tenantId=${tenantId}`
11848
+ to: `/digit-ui/${userType}/commonpt/view-property?propertyId=${propertyId}&tenantId=${tenantId}`
11849
11849
  }, /*#__PURE__*/React.createElement(LinkButton, {
11850
11850
  label: t("CPT_COMPLETE_PROPERTY_DETAILS"),
11851
11851
  style: {
@@ -12133,15 +12133,15 @@ const ConnectionDetails$1 = _props => {
12133
12133
  const errors = sessionStorage.getItem("FORMSTATE_ERRORS");
12134
12134
  let formStateErros = typeof errors === "string" ? JSON.parse(errors) : {};
12135
12135
  if (emailPattern.test(value)) {
12136
- var _formStateErros$Conne, _formStateErros$Conne2, _formStateErros$Conne3;
12136
+ var _formStateErros$Conne, _formStateErros$Conne2, _formStateErros$Conne3, _formStateErros$Conne4;
12137
12137
  clearErrors("emailId");
12138
12138
  if (formStateErros["ConnectionHolderDetails"] && (_formStateErros$Conne = formStateErros["ConnectionHolderDetails"]) !== null && _formStateErros$Conne !== void 0 && _formStateErros$Conne.type && (_formStateErros$Conne2 = formStateErros["ConnectionHolderDetails"]) !== null && _formStateErros$Conne2 !== void 0 && (_formStateErros$Conne3 = _formStateErros$Conne2.type) !== null && _formStateErros$Conne3 !== void 0 && _formStateErros$Conne3.emailId) {
12139
12139
  delete formStateErros["ConnectionHolderDetails"].type.emailId;
12140
12140
  }
12141
- if (Object.keys(formStateErros["ConnectionHolderDetails"].type).length === 0) {
12141
+ if ((_formStateErros$Conne4 = formStateErros["ConnectionHolderDetails"]) !== null && _formStateErros$Conne4 !== void 0 && _formStateErros$Conne4.type && Object.keys(formStateErros["ConnectionHolderDetails"].type).length === 0) {
12142
12142
  delete formStateErros["ConnectionHolderDetails"].type;
12143
12143
  }
12144
- if (Object.keys(formStateErros["ConnectionHolderDetails"]).length === 0) {
12144
+ if (formStateErros["ConnectionHolderDetails"] && Object.keys(formStateErros["ConnectionHolderDetails"]).length === 0) {
12145
12145
  delete formStateErros["ConnectionHolderDetails"];
12146
12146
  }
12147
12147
  sessionStorage.setItem("FORMSTATE_ERRORS", JSON.stringify(formStateErros));
@@ -12336,6 +12336,7 @@ const ConnectionDetails$1 = _props => {
12336
12336
  autoFocus: focusIndex.index === (connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key) && focusIndex.type === "mobileNumber",
12337
12337
  errorStyle: localFormState.touched.mobileNumber && (errors === null || errors === void 0 ? void 0 : (_errors$mobileNumber = errors.mobileNumber) === null || _errors$mobileNumber === void 0 ? void 0 : _errors$mobileNumber.message),
12338
12338
  onChange: val => {
12339
+ setMobileNumber(val);
12339
12340
  props.onChange(val);
12340
12341
  setFocusIndex({
12341
12342
  index: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key,
@@ -31111,9 +31112,158 @@ const createOption = (code, name) => ({
31111
31112
  code,
31112
31113
  name
31113
31114
  });
31114
- const WATER_CONNECTION_USED_BY_OPTIONS = [createOption("5 Star Hotel", "5 Star Hotel"), createOption("4/5 Star Hotel", "4/5 Star Hotel"), createOption("Ex-Army Service", "Ex-Army Service"), createOption("General", "General"), createOption("Bank", "Bank"), createOption("Airport", "Airport"), createOption("Govt. College", "Govt. College")];
31115
+ const PROPERTY_CATEGORY_OPTIONS = [createOption("COMMERCIAL", "Commercial"), createOption("INDUSTRIAL", "Industrial"), createOption("INSTITUTIONAL", "Institutional"), createOption("MIXED", "Mixed")];
31116
+ const PROPERTY_TYPE_OPTIONS = [createOption("APARTMENT", "Apartment"), createOption("BANQUET_HALL", "Banquet Hall"), createOption("BUNGALOWS", "Bungalows"), createOption("DDA_FLATS", "DDA flats"), createOption("DHARAMSHALAS_HOSTELS", "Dharamshalas or Hostels"), createOption("GOVT_FLATS", "Govt. Flats"), createOption("GROUP_HOUSING_SOCIETY", "Group Housing Society"), createOption("HOTEL_GUEST_HOUSES", "Hotel or Guest Houses"), createOption("INDIVIDUAL_HOUSE", "Individual House"), createOption("MALL_CINEPLEX", "Mall or Cineplex"), createOption("OFFICE_COMPLEX", "Office complex"), createOption("SCHOOL", "School"), createOption("HOSPITAL_NURSING_HOME", "Hospital/Nursing Home")];
31117
+ const USAGE_TYPE_OPTIONS = [createOption("BSES_RAJDHANI", "B.S.E.S. RAJDHANI"), createOption("BSES_YAMUNA", "B.S.E.S. YAMUNA"), createOption("BANQUET_HALL_PARTY_HALL", "Banquet hall/ Party hall"), createOption("BEAUTY_PARLORS", "Beauty Parlors"), createOption("BLIND_SCHOOLS", "Blind Schools"), createOption("BOTTLING_PLANT", "Bottling Plant"), createOption("CPWD", "C.P.W.D."), createOption("CENTRAL_GOVT_OFFICES", "Central Govt. Offices"), createOption("CINEPLEX", "Cineplex"), createOption("CLINIC_PATHLAB", "Clinic/Pathlab"), createOption("COOP_GROUP_HOUSING", "Co-operative Group Housing Society"), createOption("COLD_STORAGE", "Cold Storage"), createOption("COLOUR_DYE_SHOP", "Colour Dye shop/factory"), createOption("COOLING_PLANT", "Cooling Plant"), createOption("COURTS", "Courts"), createOption("DSIIDC", "D.S.I.I.D.C"), createOption("DDA", "Delhi Development Authority"), createOption("DELHI_FIRE_SERVICE", "Delhi Fire Service (Fire Station)"), createOption("DELHI_GOVT_OFFICE", "Delhi Govt. Office")];
31118
+ const NO_OF_FLOORS_OPTIONS = [createOption("BASEMENT", "Basement"), createOption("GROUND_FLOOR", "Ground Floor"), createOption("1_FLOOR", "1 Floor"), createOption("2_FLOOR", "2 Floor"), createOption("3_FLOOR", "3 Floor"), createOption("4_FLOOR", "4 Floor"), createOption("5_FLOOR", "5 Floor"), createOption("6_FLOOR", "6 Floor")];
31115
31119
  const PROOF_OF_IDENTITY_OPTIONS = [createOption("AADHAAR", "Aadhaar"), createOption("PAN", "PAN"), createOption("VOTER_ID", "Voter ID"), createOption("PASSPORT", "Passport"), createOption("DRIVING_LICENSE", "Driving License")];
31116
- const OWNERSHIP_STATUS_OPTIONS = [createOption("SELF_OWNED", "Self Owned"), createOption("LEASED", "Leased"), createOption("RENTED", "Rented"), createOption("GOVERNMENT_ALLOTTED", "Government Allotted")];
31120
+ const OWNERSHIP_DOCUMENTS_OPTIONS = [createOption("ELECTRICITY_BILL", "Electricity bills"), createOption("PROPERTY_TAX_RECEIPT", "Property Tax Receipt"), createOption("SALE_DEED", "Sale Deed")];
31121
+ const OTHER_DOCUMENTS_OPTIONS = [createOption("NOC_FROM_OWNER", "NOC From Owner"), createOption("OTHERS", "Others")];
31122
+ const CameraIcon = () => /*#__PURE__*/React.createElement("svg", {
31123
+ width: "20",
31124
+ height: "20",
31125
+ viewBox: "0 0 24 24",
31126
+ fill: "none",
31127
+ stroke: "currentColor",
31128
+ strokeWidth: "2",
31129
+ strokeLinecap: "round",
31130
+ strokeLinejoin: "round"
31131
+ }, /*#__PURE__*/React.createElement("path", {
31132
+ d: "M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"
31133
+ }), /*#__PURE__*/React.createElement("circle", {
31134
+ cx: "12",
31135
+ cy: "13",
31136
+ r: "4"
31137
+ }));
31138
+ const ViewIcon = () => /*#__PURE__*/React.createElement("svg", {
31139
+ width: "20",
31140
+ height: "20",
31141
+ viewBox: "0 0 24 24",
31142
+ fill: "none",
31143
+ stroke: "currentColor",
31144
+ strokeWidth: "2",
31145
+ strokeLinecap: "round",
31146
+ strokeLinejoin: "round"
31147
+ }, /*#__PURE__*/React.createElement("path", {
31148
+ d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
31149
+ }), /*#__PURE__*/React.createElement("circle", {
31150
+ cx: "12",
31151
+ cy: "12",
31152
+ r: "3"
31153
+ }));
31154
+ const CameraCaptureModal = ({
31155
+ onCapture,
31156
+ onClose,
31157
+ t
31158
+ }) => {
31159
+ const videoRef = useRef(null);
31160
+ const canvasRef = useRef(null);
31161
+ const [stream, setStream] = useState(null);
31162
+ const [error, setError] = useState(null);
31163
+ useEffect(() => {
31164
+ const startCamera = async () => {
31165
+ try {
31166
+ const mediaStream = await navigator.mediaDevices.getUserMedia({
31167
+ video: true
31168
+ });
31169
+ if (videoRef.current) {
31170
+ videoRef.current.srcObject = mediaStream;
31171
+ }
31172
+ setStream(mediaStream);
31173
+ } catch (err) {
31174
+ setError(t("WS_CAMERA_ACCESS_ERROR") || "Camera Access Error");
31175
+ console.error("Error accessing camera: ", err);
31176
+ }
31177
+ };
31178
+ startCamera();
31179
+ return () => {
31180
+ if (stream) {
31181
+ stream.getTracks().forEach(track => track.stop());
31182
+ }
31183
+ };
31184
+ }, []);
31185
+ const capturePhoto = () => {
31186
+ if (videoRef.current && canvasRef.current) {
31187
+ const context = canvasRef.current.getContext("2d");
31188
+ canvasRef.current.width = videoRef.current.videoWidth;
31189
+ canvasRef.current.height = videoRef.current.videoHeight;
31190
+ context.translate(canvasRef.current.width, 0);
31191
+ context.scale(-1, 1);
31192
+ context.drawImage(videoRef.current, 0, 0, canvasRef.current.width, canvasRef.current.height);
31193
+ canvasRef.current.toBlob(blob => {
31194
+ const file = new File([blob], `applicant_photo_${Date.now()}.jpg`, {
31195
+ type: "image/jpeg"
31196
+ });
31197
+ onCapture(file);
31198
+ }, "image/jpeg");
31199
+ }
31200
+ };
31201
+ return /*#__PURE__*/React.createElement("div", {
31202
+ style: {
31203
+ position: "fixed",
31204
+ top: 0,
31205
+ left: 0,
31206
+ width: "100%",
31207
+ height: "100%",
31208
+ backgroundColor: "rgba(0,0,0,0.8)",
31209
+ zIndex: 9999,
31210
+ display: "flex",
31211
+ flexDirection: "column",
31212
+ alignItems: "center",
31213
+ justifyContent: "center"
31214
+ }
31215
+ }, error ? /*#__PURE__*/React.createElement("div", {
31216
+ style: {
31217
+ color: "white",
31218
+ marginBottom: "20px"
31219
+ }
31220
+ }, error) : /*#__PURE__*/React.createElement("video", {
31221
+ ref: videoRef,
31222
+ autoPlay: true,
31223
+ playsInline: true,
31224
+ style: {
31225
+ maxWidth: "100%",
31226
+ maxHeight: "80%",
31227
+ backgroundColor: "black",
31228
+ transform: "scaleX(-1)"
31229
+ }
31230
+ }), /*#__PURE__*/React.createElement("canvas", {
31231
+ ref: canvasRef,
31232
+ style: {
31233
+ display: "none"
31234
+ }
31235
+ }), /*#__PURE__*/React.createElement("div", {
31236
+ style: {
31237
+ marginTop: "20px",
31238
+ display: "flex",
31239
+ gap: "20px"
31240
+ }
31241
+ }, !error && /*#__PURE__*/React.createElement("button", {
31242
+ type: "button",
31243
+ onClick: capturePhoto,
31244
+ style: {
31245
+ padding: "10px 20px",
31246
+ background: "#f47738",
31247
+ color: "white",
31248
+ border: "none",
31249
+ borderRadius: "4px",
31250
+ cursor: "pointer",
31251
+ fontWeight: "bold"
31252
+ }
31253
+ }, t("WS_CAPTURE_PHOTO") || "Capture"), /*#__PURE__*/React.createElement("button", {
31254
+ type: "button",
31255
+ onClick: onClose,
31256
+ style: {
31257
+ padding: "10px 20px",
31258
+ background: "white",
31259
+ color: "#f47738",
31260
+ border: "1px solid #f47738",
31261
+ borderRadius: "4px",
31262
+ cursor: "pointer",
31263
+ fontWeight: "bold"
31264
+ }
31265
+ }, t("CS_COMMON_CANCEL") || "Cancel")));
31266
+ };
31117
31267
  const DEFAULT_SECTION_STATE = {
31118
31268
  application: true,
31119
31269
  applicant: true,
@@ -31157,7 +31307,13 @@ const DEFAULT_FORM_VALUES = {
31157
31307
  code: "INDIVIDUAL",
31158
31308
  name: "Individual"
31159
31309
  },
31160
- commercialType: null
31310
+ commercialType: null,
31311
+ departmentType: null,
31312
+ govtOrganization: {
31313
+ organizationName: "",
31314
+ natureOfWork: "",
31315
+ organizationDocument: null
31316
+ }
31161
31317
  },
31162
31318
  djbEmployee: {
31163
31319
  isDjbEmployee: false,
@@ -31187,8 +31343,9 @@ const DEFAULT_FORM_VALUES = {
31187
31343
  ward: null
31188
31344
  },
31189
31345
  useDetails: {
31346
+ propertyCategory: null,
31190
31347
  propertyType: null,
31191
- noOfFloors: "",
31348
+ noOfFloors: null,
31192
31349
  hospitalBeds: "",
31193
31350
  plotArea: "",
31194
31351
  builtUpArea: "",
@@ -31208,10 +31365,15 @@ const DEFAULT_FORM_VALUES = {
31208
31365
  applyForAdequacyCertificate: false
31209
31366
  },
31210
31367
  documents: {
31368
+ applicantPhoto: null,
31211
31369
  proofOfIdentity: null,
31370
+ identityProofNumber: "",
31212
31371
  identityProofFile: null,
31213
31372
  ownershipStatus: null,
31373
+ ownershipDocumentNumber: "",
31214
31374
  ownershipDocumentFile: null,
31375
+ otherDocument: null,
31376
+ otherDocumentNumber: "",
31215
31377
  otherDocumentFile: null
31216
31378
  },
31217
31379
  declaration: {
@@ -31285,115 +31447,6 @@ const ProfileImagePreview = ({
31285
31447
  }
31286
31448
  });
31287
31449
  };
31288
- const ProfileImageUpload = ({
31289
- value,
31290
- onUpload,
31291
- isUploading,
31292
- error,
31293
- t,
31294
- label,
31295
- required
31296
- }) => {
31297
- const fileInputRef = React.useRef(null);
31298
- const fileStoreId = value === null || value === void 0 ? void 0 : value.fileStoreId;
31299
- const [imageUrl, setImageUrl] = useState(null);
31300
- useEffect(() => {
31301
- const fetchImageUrl = async () => {
31302
- if (fileStoreId) {
31303
- try {
31304
- var _response$data2, _response$data2$fileS, _response$data2$fileS2;
31305
- const tenantId = Digit.ULBService.getStateId();
31306
- const response = await Digit.UploadServices.Filefetch([fileStoreId], tenantId);
31307
- const url = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$fileS = _response$data2.fileStoreIds) === null || _response$data2$fileS === void 0 ? void 0 : (_response$data2$fileS2 = _response$data2$fileS[0]) === null || _response$data2$fileS2 === void 0 ? void 0 : _response$data2$fileS2.url;
31308
- if (url) {
31309
- let differentFormats = (url === null || url === void 0 ? void 0 : url.split(",")) || [];
31310
- let fileURL = "";
31311
- differentFormats.map(link => {
31312
- if (!link.includes("large") && !link.includes("medium") && !link.includes("small")) {
31313
- fileURL = link;
31314
- }
31315
- });
31316
- setImageUrl(fileURL || differentFormats[0]);
31317
- }
31318
- } catch (err) {
31319
- console.error("Error fetching image URL:", err);
31320
- setImageUrl(null);
31321
- }
31322
- } else {
31323
- setImageUrl(null);
31324
- }
31325
- };
31326
- fetchImageUrl();
31327
- }, [fileStoreId]);
31328
- const handleEditClick = () => {
31329
- fileInputRef.current.click();
31330
- };
31331
- return /*#__PURE__*/React.createElement("div", {
31332
- className: "avatar-upload-container"
31333
- }, label && /*#__PURE__*/React.createElement(CardLabel, {
31334
- style: {
31335
- textAlign: "center",
31336
- marginBottom: "16px",
31337
- fontWeight: "700"
31338
- }
31339
- }, `${t(label)}${required ? "*" : ""}`), /*#__PURE__*/React.createElement("div", {
31340
- className: "avatar-wrapper"
31341
- }, /*#__PURE__*/React.createElement("div", {
31342
- className: "avatar-circle",
31343
- onClick: handleEditClick
31344
- }, imageUrl ? /*#__PURE__*/React.createElement("img", {
31345
- src: imageUrl,
31346
- alt: "Profile"
31347
- }) : /*#__PURE__*/React.createElement("div", {
31348
- className: "avatar-placeholder"
31349
- }, /*#__PURE__*/React.createElement("svg", {
31350
- width: "40",
31351
- height: "40",
31352
- viewBox: "0 0 24 24",
31353
- fill: "none",
31354
- stroke: "#9CA3AF",
31355
- strokeWidth: "1.5"
31356
- }, /*#__PURE__*/React.createElement("path", {
31357
- d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"
31358
- }), /*#__PURE__*/React.createElement("circle", {
31359
- cx: "12",
31360
- cy: "7",
31361
- r: "4"
31362
- })))), /*#__PURE__*/React.createElement("div", {
31363
- className: "avatar-edit-icon",
31364
- onClick: handleEditClick
31365
- }, /*#__PURE__*/React.createElement("svg", {
31366
- width: "18",
31367
- height: "18",
31368
- viewBox: "0 0 24 24",
31369
- fill: "none",
31370
- stroke: "#0B4B66",
31371
- strokeWidth: "2.5",
31372
- strokeLinecap: "round",
31373
- strokeLinejoin: "round"
31374
- }, /*#__PURE__*/React.createElement("path", {
31375
- d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"
31376
- })))), /*#__PURE__*/React.createElement("input", {
31377
- type: "file",
31378
- ref: fileInputRef,
31379
- style: {
31380
- display: "none"
31381
- },
31382
- accept: "image/*",
31383
- onChange: onUpload
31384
- }), isUploading && /*#__PURE__*/React.createElement("div", {
31385
- style: {
31386
- fontSize: "14px",
31387
- marginTop: "8px",
31388
- color: "#505A5F"
31389
- }
31390
- }, "Uploading..."), error && /*#__PURE__*/React.createElement(CardLabelError, {
31391
- style: {
31392
- textAlign: "center",
31393
- marginTop: "8px"
31394
- }
31395
- }, error));
31396
- };
31397
31450
  const linkButtonStyle = {
31398
31451
  background: "transparent",
31399
31452
  border: "none",
@@ -31546,9 +31599,9 @@ const SectionCard = ({
31546
31599
  };
31547
31600
  const handleView = async (fileStoreId, tenantId) => {
31548
31601
  try {
31549
- var _response$data3, _response$data3$fileS, _response$data3$fileS2;
31602
+ var _response$data2, _response$data2$fileS, _response$data2$fileS2;
31550
31603
  const response = await Digit.UploadServices.Filefetch([fileStoreId], tenantId);
31551
- const url = response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : (_response$data3$fileS = _response$data3.fileStoreIds) === null || _response$data3$fileS === void 0 ? void 0 : (_response$data3$fileS2 = _response$data3$fileS[0]) === null || _response$data3$fileS2 === void 0 ? void 0 : _response$data3$fileS2.url;
31604
+ const url = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$fileS = _response$data2.fileStoreIds) === null || _response$data2$fileS === void 0 ? void 0 : (_response$data2$fileS2 = _response$data2$fileS[0]) === null || _response$data2$fileS2 === void 0 ? void 0 : _response$data2$fileS2.url;
31552
31605
  if (url) {
31553
31606
  const differentFormats = (url === null || url === void 0 ? void 0 : url.split(",")) || [];
31554
31607
  let fileURL = "";
@@ -31646,15 +31699,61 @@ const FileUploadField = ({
31646
31699
  message: value !== null && value !== void 0 && value.fileStoreId ? "1 file uploaded" : "No file uploaded",
31647
31700
  onDelete: onDelete,
31648
31701
  onUpload: onUpload
31649
- }), /*#__PURE__*/React.createElement(CardText, {
31702
+ }), isUploading && /*#__PURE__*/React.createElement(CardText, {
31650
31703
  style: {
31651
- marginBottom: "0px",
31652
- marginTop: "0px"
31704
+ marginTop: "8px"
31653
31705
  }
31654
- }, isUploading ? "Uploading file..." : (value === null || value === void 0 ? void 0 : value.fileName) || "No file selected"));
31706
+ }, "Uploading file..."), (value === null || value === void 0 ? void 0 : value.fileStoreId) && !isUploading && /*#__PURE__*/React.createElement("div", {
31707
+ style: {
31708
+ marginTop: "8px",
31709
+ display: "flex",
31710
+ alignItems: "center",
31711
+ gap: "8px",
31712
+ background: "#F3F4F6",
31713
+ padding: "4px 12px",
31714
+ borderRadius: "20px",
31715
+ width: "fit-content",
31716
+ border: "1px solid #E5E7EB"
31717
+ }
31718
+ }, /*#__PURE__*/React.createElement(CardText, {
31719
+ style: {
31720
+ margin: 0,
31721
+ fontSize: "14px",
31722
+ color: "#374151",
31723
+ fontWeight: "500"
31724
+ }
31725
+ }, value.fileName), /*#__PURE__*/React.createElement("div", {
31726
+ onClick: onDelete,
31727
+ style: {
31728
+ cursor: "pointer",
31729
+ display: "flex",
31730
+ alignItems: "center",
31731
+ color: "#6B7280"
31732
+ },
31733
+ title: "Remove File"
31734
+ }, /*#__PURE__*/React.createElement("svg", {
31735
+ width: "16",
31736
+ height: "16",
31737
+ viewBox: "0 0 24 24",
31738
+ fill: "none",
31739
+ stroke: "currentColor",
31740
+ strokeWidth: "3",
31741
+ strokeLinecap: "round",
31742
+ strokeLinejoin: "round"
31743
+ }, /*#__PURE__*/React.createElement("line", {
31744
+ x1: "18",
31745
+ y1: "6",
31746
+ x2: "6",
31747
+ y2: "18"
31748
+ }), /*#__PURE__*/React.createElement("line", {
31749
+ x1: "6",
31750
+ y1: "6",
31751
+ x2: "18",
31752
+ y2: "18"
31753
+ })))));
31655
31754
  };
31656
31755
  const NewApplication = () => {
31657
- var _Digit$SessionStorage, _getFieldError, _getFieldError2, _getFieldError3, _getFieldError4, _getFieldError5, _getFieldError6, _getFieldError7, _getFieldError8, _getFieldError9, _getFieldError0, _getFieldError1, _getFieldError10, _formValues$applicati, _formValues$applicati2, _formValues$applicati3, _formValues$applicati4, _formValues$applicati5, _formValues$applicati6, _formValues$applicati7, _formValues$applicati8, _formValues$applicati9, _formValues$applicati0, _formValues$applicati1, _formValues$applicati10, _formValues$applicati11, _formValues$applicati12, _formValues$applicati13, _formValues$applicati14, _formValues$applicati15, _formValues$applicati16, _formValues$applicati17, _formValues$applicati18, _formValues$applicati19, _formValues$applicati20, _formValues$applicant, _formValues$applicant2, _formValues$applicant3, _formValues$applicant4, _formValues$applicant5, _formValues$applicant6, _formValues$applicant7, _formValues$useDetail, _formValues$applicant8, _formValues$contact, _formValues$contact2, _formValues$contact3, _formValues$documents, _formValues$djbEmploy, _formValues$djbEmploy2, _formValues$djbEmploy3, _formValues$djbEmploy4, _formValues$djbEmploy5, _formValues$governmen, _formValues$governmen2, _formValues$governmen3, _formValues$governmen4, _formValues$propertyA, _formValues$propertyA2, _formValues$propertyA3, _formValues$propertyA4, _formValues$propertyA5, _formValues$propertyA6, _formValues$propertyA7, _formValues$propertyA8, _formValues$propertyA9, _formValues$propertyA0, _formValues$propertyA1, _formValues$useDetail2, _formValues$useDetail3, _formValues$useDetail4, _formValues$useDetail5, _formValues$useDetail6, _formValues$useDetail7, _formValues$useDetail8, _formValues$useDetail9, _formValues$useDetail0, _formValues$useDetail1, _formValues$useDetail10, _formValues$useDetail11, _formValues$bankDetai, _formValues$bankDetai2, _formValues$bankDetai3, _formValues$bankDetai4, _formValues$documents2, _formValues$documents3, _formValues$documents4, _formValues$documents5, _formValues$documents6, _formValues$declarati, _formValues$declarati2, _formValues$declarati3;
31756
+ var _Digit$SessionStorage, _getFieldError, _getFieldError2, _getFieldError3, _getFieldError4, _getFieldError5, _getFieldError6, _getFieldError7, _getFieldError8, _getFieldError9, _getFieldError0, _getFieldError1, _getFieldError10, _getFieldError11, _watch, _watch3, _watch5, _watch7, _watch9, _formValues$applicati, _formValues$applicati2, _formValues$applicati3, _formValues$applicati4, _formValues$applicati5, _formValues$applicati6, _formValues$applicati7, _formValues$applicati8, _formValues$applicati9, _formValues$applicati0, _formValues$applicati1, _formValues$applicati10, _formValues$applicati11, _formValues$applicati12, _formValues$applicati13, _formValues$applicati14, _formValues$applicati15, _formValues$applicati16, _formValues$applicati17, _formValues$applicati18, _formValues$applicati19, _formValues$applicati20, _formValues$applicati21, _formValues$applicati22, _formValues$applicati23, _formValues$applicant, _formValues$applicant2, _formValues$applicant3, _formValues$applicant4, _formValues$applicant5, _formValues$applicant6, _formValues$applicant7, _formValues$useDetail, _formValues$applicant8, _formValues$contact, _formValues$contact2, _formValues$contact3, _formValues$documents, _formValues$djbEmploy, _formValues$djbEmploy2, _formValues$djbEmploy3, _formValues$djbEmploy4, _formValues$djbEmploy5, _formValues$governmen, _formValues$governmen2, _formValues$governmen3, _formValues$governmen4, _formValues$propertyA, _formValues$propertyA2, _formValues$propertyA3, _formValues$propertyA4, _formValues$propertyA5, _formValues$propertyA6, _formValues$propertyA7, _formValues$propertyA8, _formValues$propertyA9, _formValues$propertyA0, _formValues$propertyA1, _formValues$useDetail2, _formValues$useDetail3, _formValues$useDetail4, _formValues$useDetail5, _formValues$useDetail6, _formValues$useDetail7, _formValues$useDetail8, _formValues$useDetail9, _formValues$useDetail0, _formValues$useDetail1, _formValues$useDetail10, _formValues$useDetail11, _formValues$bankDetai, _formValues$bankDetai2, _formValues$bankDetai3, _formValues$bankDetai4, _formValues$documents2, _formValues$documents3, _formValues$documents4, _formValues$documents5, _formValues$documents6, _formValues$documents7, _formValues$documents8, _formValues$documents9, _formValues$documents0, _formValues$documents1, _formValues$declarati, _formValues$declarati2, _formValues$declarati3;
31658
31757
  const {
31659
31758
  t
31660
31759
  } = useTranslation();
@@ -31671,6 +31770,7 @@ const NewApplication = () => {
31671
31770
  const [collapsedSections, setCollapsedSections] = useState(DEFAULT_SECTION_STATE);
31672
31771
  const [showToast, setShowToast] = useState(null);
31673
31772
  const [uploadingFields, setUploadingFields] = useState({});
31773
+ const [showCamera, setShowCamera] = useState(false);
31674
31774
  const [isOtpSent, setIsOtpSent] = useState(false);
31675
31775
  const [otpError, setOtpError] = useState(null);
31676
31776
  const [isEnableLoader, setIsEnableLoader] = useState(false);
@@ -31982,6 +32082,18 @@ const NewApplication = () => {
31982
32082
  clearErrors("applicationSelection.domesticType");
31983
32083
  }
31984
32084
  }, [subCategoryIsDomestic, setValue, clearErrors]);
32085
+ useEffect(() => {
32086
+ if ((activeType === null || activeType === void 0 ? void 0 : activeType.code) !== "ORGANIZATION") {
32087
+ setValue("applicationSelection.departmentType", null);
32088
+ setValue("applicationSelection.govtOrganization.organizationName", "");
32089
+ setValue("applicationSelection.govtOrganization.natureOfWork", "");
32090
+ setValue("applicationSelection.govtOrganization.organizationDocument", null);
32091
+ clearErrors("applicationSelection.departmentType");
32092
+ clearErrors("applicationSelection.govtOrganization.organizationName");
32093
+ clearErrors("applicationSelection.govtOrganization.natureOfWork");
32094
+ clearErrors("applicationSelection.govtOrganization.organizationDocument");
32095
+ }
32096
+ }, [activeType === null || activeType === void 0 ? void 0 : activeType.code, setValue, clearErrors]);
31985
32097
  useEffect(() => {
31986
32098
  if (!connectionTypeIsTemporary) {
31987
32099
  setValue("applicationSelection.temporaryConnection", null);
@@ -32011,7 +32123,7 @@ const NewApplication = () => {
32011
32123
  }));
32012
32124
  clearErrors(fieldName);
32013
32125
  try {
32014
- var _response$data4, _response$data4$files, _response$data4$files2;
32126
+ var _response$data3, _response$data3$files, _response$data3$files2;
32015
32127
  if (file.size > MAX_FILE_SIZE) {
32016
32128
  throw new Error("File size should be 5 MB or less.");
32017
32129
  }
@@ -32019,7 +32131,7 @@ const NewApplication = () => {
32019
32131
  throw new Error("Only PDF, PNG, JPG and JPEG files are supported.");
32020
32132
  }
32021
32133
  const response = await Digit.UploadServices.Filestorage("WS", file, stateId);
32022
- const fileStoreId = response === null || response === void 0 ? void 0 : (_response$data4 = response.data) === null || _response$data4 === void 0 ? void 0 : (_response$data4$files = _response$data4.files) === null || _response$data4$files === void 0 ? void 0 : (_response$data4$files2 = _response$data4$files[0]) === null || _response$data4$files2 === void 0 ? void 0 : _response$data4$files2.fileStoreId;
32134
+ const fileStoreId = response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : (_response$data3$files = _response$data3.files) === null || _response$data3$files === void 0 ? void 0 : (_response$data3$files2 = _response$data3$files[0]) === null || _response$data3$files2 === void 0 ? void 0 : _response$data3$files2.fileStoreId;
32023
32135
  if (!fileStoreId) {
32024
32136
  throw new Error("File upload failed. Please try again.");
32025
32137
  }
@@ -32047,6 +32159,37 @@ const NewApplication = () => {
32047
32159
  }));
32048
32160
  }
32049
32161
  };
32162
+ const handleCapture = async file => {
32163
+ setShowCamera(false);
32164
+ setUploadingFields(prev => ({
32165
+ ...prev,
32166
+ "documents.applicantPhoto": true
32167
+ }));
32168
+ try {
32169
+ var _response$data4, _response$data4$files, _response$data4$files2;
32170
+ const response = await Digit.UploadServices.Filestorage("WS", file, stateId);
32171
+ const fileStoreId = response === null || response === void 0 ? void 0 : (_response$data4 = response.data) === null || _response$data4 === void 0 ? void 0 : (_response$data4$files = _response$data4.files) === null || _response$data4$files === void 0 ? void 0 : (_response$data4$files2 = _response$data4$files[0]) === null || _response$data4$files2 === void 0 ? void 0 : _response$data4$files2.fileStoreId;
32172
+ if (fileStoreId) {
32173
+ setValue("documents.applicantPhoto", {
32174
+ fileName: file.name,
32175
+ fileSize: file.size,
32176
+ fileStoreId,
32177
+ fileType: file.type
32178
+ });
32179
+ clearErrors("documents.applicantPhoto");
32180
+ }
32181
+ } catch (error) {
32182
+ setShowToast({
32183
+ key: "error",
32184
+ message: "Failed to upload photo"
32185
+ });
32186
+ } finally {
32187
+ setUploadingFields(prev => ({
32188
+ ...prev,
32189
+ "documents.applicantPhoto": false
32190
+ }));
32191
+ }
32192
+ };
32050
32193
  const clearUploadedFile = (fieldName, onChange) => {
32051
32194
  onChange(null);
32052
32195
  clearErrors(fieldName);
@@ -32387,26 +32530,31 @@ const NewApplication = () => {
32387
32530
  align-items: center;
32388
32531
  }
32389
32532
 
32390
- .avatar-edit-icon {
32391
- position: absolute;
32392
- bottom: 4px;
32393
- right: 4px;
32394
- background: white;
32395
- width: 36px;
32396
- height: 36px;
32397
- border-radius: 50%;
32533
+ .avatar-edit-icon:hover {
32534
+ transform: scale(1.1);
32535
+ background-color: #F9FAFB;
32536
+ }
32537
+
32538
+ .document-action-btn {
32539
+ background: #E5E7EB;
32540
+ border: 1px solid #9CA3AF;
32541
+ border-radius: 4px;
32542
+ padding: 8px 16px;
32398
32543
  display: flex;
32399
- justify-content: center;
32400
32544
  align-items: center;
32401
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
32402
- border: 1px solid #E5E7EB;
32545
+ justify-content: center;
32546
+ gap: 8px;
32547
+ width: 100%;
32403
32548
  cursor: pointer;
32404
- transition: all 0.2s ease;
32549
+ font-weight: 500;
32550
+ min-height: 40px;
32405
32551
  }
32406
-
32407
- .avatar-edit-icon:hover {
32408
- transform: scale(1.1);
32409
- background-color: #F9FAFB;
32552
+ .document-action-btn:hover {
32553
+ background: #D1D5DB;
32554
+ }
32555
+ .document-action-btn:disabled {
32556
+ opacity: 0.5;
32557
+ cursor: not-allowed;
32410
32558
  }
32411
32559
  `), /*#__PURE__*/React.createElement("div", {
32412
32560
  className: "employee-form-section-wrapper"
@@ -32432,28 +32580,6 @@ const NewApplication = () => {
32432
32580
  sectionRef: sectionRefs.application
32433
32581
  }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32434
32582
  className: "card-label-smaller"
32435
- }, t("WS_ZRO_LOCATION")), /*#__PURE__*/React.createElement("div", {
32436
- className: "field"
32437
- }, /*#__PURE__*/React.createElement(Controller, {
32438
- control: control,
32439
- name: "zro",
32440
- rules: {
32441
- required: t("REQUIRED_FIELD")
32442
- },
32443
- isMandatory: true,
32444
- render: props => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Dropdown, {
32445
- className: "form-field",
32446
- selected: props.value,
32447
- disable: false,
32448
- option: mappedZROLocation,
32449
- errorStyle: !!getFieldError("zro"),
32450
- select: props.onChange,
32451
- optionKey: "i18nKey",
32452
- onBlur: props.onBlur,
32453
- t: t
32454
- }))
32455
- }))), getFieldError("zro") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError = getFieldError("zro")) === null || _getFieldError === void 0 ? void 0 : _getFieldError.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32456
- className: "card-label-smaller"
32457
32583
  }, t("WS_SERVICE_TYPE")), /*#__PURE__*/React.createElement("div", {
32458
32584
  className: "field"
32459
32585
  }, /*#__PURE__*/React.createElement(Controller, {
@@ -32474,7 +32600,7 @@ const NewApplication = () => {
32474
32600
  onBlur: props.onBlur,
32475
32601
  t: t
32476
32602
  })
32477
- }))), getFieldError("applicationSelection.serviceType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError2 = getFieldError("applicationSelection.serviceType")) === null || _getFieldError2 === void 0 ? void 0 : _getFieldError2.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32603
+ }))), getFieldError("applicationSelection.serviceType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError = getFieldError("applicationSelection.serviceType")) === null || _getFieldError === void 0 ? void 0 : _getFieldError.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32478
32604
  className: "card-label-smaller"
32479
32605
  }, t("WS_APPLICANT_TYPE")), /*#__PURE__*/React.createElement("div", {
32480
32606
  className: "field"
@@ -32496,7 +32622,7 @@ const NewApplication = () => {
32496
32622
  onBlur: props.onBlur,
32497
32623
  t: t
32498
32624
  })
32499
- }))), getFieldError("applicationSelection.applicantType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError3 = getFieldError("applicationSelection.applicantType")) === null || _getFieldError3 === void 0 ? void 0 : _getFieldError3.message), isTenantOrRelative && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32625
+ }))), getFieldError("applicationSelection.applicantType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError2 = getFieldError("applicationSelection.applicantType")) === null || _getFieldError2 === void 0 ? void 0 : _getFieldError2.message), isTenantOrRelative && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32500
32626
  className: "card-label-smaller"
32501
32627
  }, t("WS_OWNER_AUTHORIZATION")), /*#__PURE__*/React.createElement("div", {
32502
32628
  className: "field"
@@ -32560,7 +32686,7 @@ const NewApplication = () => {
32560
32686
  fontSize: "14px",
32561
32687
  fontWeight: "600"
32562
32688
  }
32563
- }, t("WS_VERIFIED"), " \u2713"))), getFieldError("applicationSelection.ownerContactNumber") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError4 = getFieldError("applicationSelection.ownerContactNumber")) === null || _getFieldError4 === void 0 ? void 0 : _getFieldError4.message), isOtpSent && !isOwnerVerified && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32689
+ }, t("WS_VERIFIED"), " \u2713"))), getFieldError("applicationSelection.ownerContactNumber") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError3 = getFieldError("applicationSelection.ownerContactNumber")) === null || _getFieldError3 === void 0 ? void 0 : _getFieldError3.message), isOtpSent && !isOwnerVerified && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32564
32690
  className: "card-label-smaller"
32565
32691
  }, t("WS_OTP_VERIFICATION")), /*#__PURE__*/React.createElement("div", {
32566
32692
  className: "field",
@@ -32594,7 +32720,7 @@ const NewApplication = () => {
32594
32720
  setOtpError("Enter 6 digit OTP");
32595
32721
  }
32596
32722
  }
32597
- }, t("WS_CONFIRM")))), (getFieldError("applicationSelection.ownerOtp") || otpError) && /*#__PURE__*/React.createElement(CardLabelError, null, ((_getFieldError5 = getFieldError("applicationSelection.ownerOtp")) === null || _getFieldError5 === void 0 ? void 0 : _getFieldError5.message) || otpError)), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32723
+ }, t("WS_CONFIRM")))), (getFieldError("applicationSelection.ownerOtp") || otpError) && /*#__PURE__*/React.createElement(CardLabelError, null, ((_getFieldError4 = getFieldError("applicationSelection.ownerOtp")) === null || _getFieldError4 === void 0 ? void 0 : _getFieldError4.message) || otpError)), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32598
32724
  className: "card-label-smaller"
32599
32725
  }, t("WS_CONNECTION_TYPE")), /*#__PURE__*/React.createElement("div", {
32600
32726
  className: "field"
@@ -32616,7 +32742,7 @@ const NewApplication = () => {
32616
32742
  onBlur: props.onBlur,
32617
32743
  t: t
32618
32744
  })
32619
- }))), getFieldError("applicationSelection.connectionType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError6 = getFieldError("applicationSelection.connectionType")) === null || _getFieldError6 === void 0 ? void 0 : _getFieldError6.message), connectionTypeIsTemporary && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32745
+ }))), getFieldError("applicationSelection.connectionType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError5 = getFieldError("applicationSelection.connectionType")) === null || _getFieldError5 === void 0 ? void 0 : _getFieldError5.message), connectionTypeIsTemporary && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32620
32746
  className: "card-label-smaller"
32621
32747
  }, t("WS_TEMPORARY_CONNECTION")), /*#__PURE__*/React.createElement("div", {
32622
32748
  className: "field"
@@ -32638,7 +32764,7 @@ const NewApplication = () => {
32638
32764
  onBlur: props.onBlur,
32639
32765
  t: t
32640
32766
  })
32641
- }))), connectionTypeIsTemporary && getFieldError("applicationSelection.temporaryConnection") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError7 = getFieldError("applicationSelection.temporaryConnection")) === null || _getFieldError7 === void 0 ? void 0 : _getFieldError7.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32767
+ }))), connectionTypeIsTemporary && getFieldError("applicationSelection.temporaryConnection") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError6 = getFieldError("applicationSelection.temporaryConnection")) === null || _getFieldError6 === void 0 ? void 0 : _getFieldError6.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32642
32768
  className: "card-label-smaller"
32643
32769
  }, t("WS_CATEGORY_TYPE")), /*#__PURE__*/React.createElement("div", {
32644
32770
  className: "field"
@@ -32660,7 +32786,7 @@ const NewApplication = () => {
32660
32786
  onBlur: props.onBlur,
32661
32787
  t: t
32662
32788
  })
32663
- }))), getFieldError("applicationSelection.subCategory") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError8 = getFieldError("applicationSelection.subCategory")) === null || _getFieldError8 === void 0 ? void 0 : _getFieldError8.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32789
+ }))), getFieldError("applicationSelection.subCategory") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError7 = getFieldError("applicationSelection.subCategory")) === null || _getFieldError7 === void 0 ? void 0 : _getFieldError7.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32664
32790
  className: "card-label-smaller"
32665
32791
  }, t("WS_WATER_DEMAND_TYPE")), /*#__PURE__*/React.createElement("div", {
32666
32792
  className: "field"
@@ -32682,7 +32808,7 @@ const NewApplication = () => {
32682
32808
  onBlur: props.onBlur,
32683
32809
  t: t
32684
32810
  })
32685
- }))), getFieldError("applicationSelection.categoryType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError9 = getFieldError("applicationSelection.categoryType")) === null || _getFieldError9 === void 0 ? void 0 : _getFieldError9.message), subCategoryIsDomestic && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32811
+ }))), getFieldError("applicationSelection.categoryType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError8 = getFieldError("applicationSelection.categoryType")) === null || _getFieldError8 === void 0 ? void 0 : _getFieldError8.message), subCategoryIsDomestic && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32686
32812
  className: "card-label-smaller"
32687
32813
  }, t("WS_DOMESTIC_TYPE")), /*#__PURE__*/React.createElement("div", {
32688
32814
  className: "field"
@@ -32705,7 +32831,7 @@ const NewApplication = () => {
32705
32831
  }],
32706
32832
  t: t
32707
32833
  })
32708
- }))), subCategoryIsDomestic && getFieldError("applicationSelection.domesticType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError0 = getFieldError("applicationSelection.domesticType")) === null || _getFieldError0 === void 0 ? void 0 : _getFieldError0.message), subCategoryIsCommercial && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32834
+ }))), subCategoryIsDomestic && getFieldError("applicationSelection.domesticType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError9 = getFieldError("applicationSelection.domesticType")) === null || _getFieldError9 === void 0 ? void 0 : _getFieldError9.message), subCategoryIsCommercial && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32709
32835
  className: "card-label-smaller"
32710
32836
  }, t("WS_COMMERCIAL_TYPE")), /*#__PURE__*/React.createElement("div", {
32711
32837
  className: "field"
@@ -32729,62 +32855,82 @@ const NewApplication = () => {
32729
32855
  optionsKey: "name",
32730
32856
  t: t
32731
32857
  })
32732
- }))))), /*#__PURE__*/React.createElement(SectionCard, {
32733
- description: t("WS_GOVT_CONNECTION_DESC"),
32734
- isOpen: collapsedSections.governmentEmployee,
32735
- onToggle: toggleSection,
32736
- sectionKey: "governmentEmployee",
32737
- title: t("WS_GOVERNMENT_CONNECTION"),
32738
- sectionRef: sectionRefs.governmentEmployee
32739
- }, /*#__PURE__*/React.createElement(FieldBlock, {
32740
- label: t("WS_GOVERNMENT_CONNECTION")
32858
+ }))), (activeType === null || activeType === void 0 ? void 0 : activeType.code) === "ORGANIZATION" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32859
+ className: "card-label-smaller"
32860
+ }, `${t("WS_DEPARTMENT_TYPE")} *`), /*#__PURE__*/React.createElement("div", {
32861
+ className: "field"
32741
32862
  }, /*#__PURE__*/React.createElement(Controller, {
32742
32863
  control: control,
32743
- name: "governmentEmployee.isGovernmentEmployee",
32744
- render: props => /*#__PURE__*/React.createElement(CheckBox, {
32745
- checked: !!props.value,
32746
- label: t("WS_APPLICANT_IS_GOVT_CONNECTION"),
32747
- onChange: event => props.onChange(event.target.checked)
32864
+ name: "applicationSelection.departmentType",
32865
+ rules: {
32866
+ required: (activeType === null || activeType === void 0 ? void 0 : activeType.code) === "ORGANIZATION" ? t("REQUIRED_FIELD") : false
32867
+ },
32868
+ render: props => /*#__PURE__*/React.createElement(RadioButtons, {
32869
+ onSelect: props.onChange,
32870
+ selectedOption: props.value,
32871
+ options: [{
32872
+ code: "GOVERNMENT",
32873
+ name: "Government"
32874
+ }, {
32875
+ code: "NON_GOVERNMENT",
32876
+ name: "Non-Government"
32877
+ }],
32878
+ optionsKey: "name",
32879
+ t: t
32748
32880
  })
32749
- })), isGovernmentEmployee && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32881
+ }))), getFieldError("applicationSelection.departmentType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError0 = getFieldError("applicationSelection.departmentType")) === null || _getFieldError0 === void 0 ? void 0 : _getFieldError0.message), /*#__PURE__*/React.createElement("div", {
32882
+ style: {
32883
+ gridColumn: "1 / -1",
32884
+ marginTop: "16px",
32885
+ marginBottom: "16px"
32886
+ }
32887
+ }, /*#__PURE__*/React.createElement("h2", {
32888
+ style: {
32889
+ color: "#0B4B66",
32890
+ fontSize: "18px",
32891
+ fontWeight: "700"
32892
+ }
32893
+ }, t("WS_DEPARTMENT_ORGANIZATION_DETAILS"))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32750
32894
  className: "card-label-smaller"
32751
- }, t("WS_ORGANIZATION_NAME")), /*#__PURE__*/React.createElement("div", {
32895
+ }, t("WS_ORGANIZATION_DEPARTMENT_NAME")), /*#__PURE__*/React.createElement("div", {
32752
32896
  className: "field"
32753
32897
  }, /*#__PURE__*/React.createElement(TextInput, {
32754
- name: "governmentEmployee.organizationName",
32898
+ name: "applicationSelection.govtOrganization.organizationName",
32755
32899
  inputRef: register({
32756
- required: isGovernmentEmployee ? "Organization Name is required" : false
32900
+ required: (activeType === null || activeType === void 0 ? void 0 : activeType.code) === "ORGANIZATION" ? "Organization/Department Name is required" : false
32757
32901
  }),
32758
- errorStyle: !!getFieldError("governmentEmployee.organizationName")
32759
- }))), getFieldError("governmentEmployee.organizationName") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError1 = getFieldError("governmentEmployee.organizationName")) === null || _getFieldError1 === void 0 ? void 0 : _getFieldError1.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32902
+ errorStyle: !!getFieldError("applicationSelection.govtOrganization.organizationName"),
32903
+ placeholder: t("WS_ORGANIZATION_DEPARTMENT_NAME")
32904
+ }))), getFieldError("applicationSelection.govtOrganization.organizationName") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError1 = getFieldError("applicationSelection.govtOrganization.organizationName")) === null || _getFieldError1 === void 0 ? void 0 : _getFieldError1.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32760
32905
  className: "card-label-smaller"
32761
32906
  }, t("WS_NATURE_OF_WORK")), /*#__PURE__*/React.createElement("div", {
32762
32907
  className: "field"
32763
32908
  }, /*#__PURE__*/React.createElement(TextInput, {
32764
- name: "governmentEmployee.natureOfWork",
32909
+ name: "applicationSelection.govtOrganization.natureOfWork",
32765
32910
  inputRef: register({
32766
- required: isGovernmentEmployee ? "Nature of Work is required" : false
32911
+ required: (activeType === null || activeType === void 0 ? void 0 : activeType.code) === "ORGANIZATION" ? "Nature of Work is required" : false
32767
32912
  }),
32768
- errorStyle: !!getFieldError("governmentEmployee.natureOfWork")
32769
- }))), getFieldError("governmentEmployee.natureOfWork") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError10 = getFieldError("governmentEmployee.natureOfWork")) === null || _getFieldError10 === void 0 ? void 0 : _getFieldError10.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32913
+ errorStyle: !!getFieldError("applicationSelection.govtOrganization.natureOfWork"),
32914
+ placeholder: t("WS_NATURE_OF_WORK")
32915
+ }))), getFieldError("applicationSelection.govtOrganization.natureOfWork") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError10 = getFieldError("applicationSelection.govtOrganization.natureOfWork")) === null || _getFieldError10 === void 0 ? void 0 : _getFieldError10.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32770
32916
  className: "card-label-smaller"
32771
- }, t("WS_UPLOAD_DOCUMENT")), /*#__PURE__*/React.createElement("div", {
32917
+ }, t("WS_ORG_DEPT_DOCUMENT")), /*#__PURE__*/React.createElement("div", {
32772
32918
  className: "field"
32773
32919
  }, /*#__PURE__*/React.createElement(Controller, {
32774
32920
  control: control,
32775
- name: "governmentEmployee.organizationDocument",
32921
+ name: "applicationSelection.govtOrganization.organizationDocument",
32776
32922
  rules: {
32777
- required: isGovernmentEmployee ? "Document is required" : false
32923
+ required: (activeType === null || activeType === void 0 ? void 0 : activeType.code) === "ORGANIZATION" ? "Document is required" : false
32778
32924
  },
32779
32925
  render: props => /*#__PURE__*/React.createElement(FileUploadField, {
32780
- error: getFieldError("governmentEmployee.organizationDocument"),
32781
- id: "govt-org-doc",
32782
- isUploading: !!uploadingFields["governmentEmployee.organizationDocument"],
32783
- onDelete: () => clearUploadedFile("governmentEmployee.organizationDocument", props.onChange),
32784
- onUpload: event => uploadFile(event, "governmentEmployee.organizationDocument", props.onChange),
32926
+ error: getFieldError("applicationSelection.govtOrganization.organizationDocument"),
32927
+ id: "org-dept-doc",
32928
+ isUploading: !!uploadingFields["applicationSelection.govtOrganization.organizationDocument"],
32929
+ onDelete: () => clearUploadedFile("applicationSelection.govtOrganization.organizationDocument", props.onChange),
32930
+ onUpload: event => uploadFile(event, "applicationSelection.govtOrganization.organizationDocument", props.onChange),
32785
32931
  value: props.value
32786
32932
  })
32787
- }))))), /*#__PURE__*/React.createElement("div", {
32933
+ })))))), /*#__PURE__*/React.createElement("div", {
32788
32934
  style: {
32789
32935
  display: previewMode ? "none" : "block"
32790
32936
  }
@@ -32795,25 +32941,7 @@ const NewApplication = () => {
32795
32941
  sectionKey: "applicant",
32796
32942
  title: t(applicantSectionTitle),
32797
32943
  sectionRef: sectionRefs.applicant
32798
- }, /*#__PURE__*/React.createElement(Controller, {
32799
- control: control,
32800
- name: "applicant.UploadPicture",
32801
- rules: {
32802
- validate: value => !!value || "Applicant Picture is required."
32803
- },
32804
- render: props => {
32805
- var _getFieldError11;
32806
- return /*#__PURE__*/React.createElement(ProfileImageUpload, {
32807
- error: (_getFieldError11 = getFieldError("applicant.UploadPicture")) === null || _getFieldError11 === void 0 ? void 0 : _getFieldError11.message,
32808
- isUploading: !!uploadingFields["applicant.UploadPicture"],
32809
- label: "WS_UPLOAD_PICTURE",
32810
- onUpload: event => uploadFile(event, "applicant.UploadPicture", props.onChange),
32811
- required: true,
32812
- t: t,
32813
- value: props.value
32814
- });
32815
- }
32816
- }), /*#__PURE__*/React.createElement(FieldBlock, {
32944
+ }, /*#__PURE__*/React.createElement(FieldBlock, {
32817
32945
  error: getFieldError("applicant.firstName"),
32818
32946
  label: t("WS_FIRST_NAME"),
32819
32947
  required: true
@@ -32996,7 +33124,29 @@ const NewApplication = () => {
32996
33124
  sectionKey: "propertyAddress",
32997
33125
  title: t("WS_PROPERTY_ADDRESS"),
32998
33126
  sectionRef: sectionRefs.propertyAddress
32999
- }, /*#__PURE__*/React.createElement(FieldBlock, {
33127
+ }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
33128
+ className: "card-label-smaller"
33129
+ }, t("WS_ZRO_LOCATION")), /*#__PURE__*/React.createElement("div", {
33130
+ className: "field"
33131
+ }, /*#__PURE__*/React.createElement(Controller, {
33132
+ control: control,
33133
+ name: "zro",
33134
+ rules: {
33135
+ required: t("REQUIRED_FIELD")
33136
+ },
33137
+ isMandatory: true,
33138
+ render: props => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Dropdown, {
33139
+ className: "form-field",
33140
+ selected: props.value,
33141
+ disable: false,
33142
+ option: mappedZROLocation,
33143
+ errorStyle: !!getFieldError("zro"),
33144
+ select: props.onChange,
33145
+ optionKey: "i18nKey",
33146
+ onBlur: props.onBlur,
33147
+ t: t
33148
+ }))
33149
+ }))), getFieldError("zro") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError11 = getFieldError("zro")) === null || _getFieldError11 === void 0 ? void 0 : _getFieldError11.message), /*#__PURE__*/React.createElement(FieldBlock, {
33000
33150
  error: getFieldError("propertyAddress.pinCode"),
33001
33151
  label: t("WS_PIN_CODE"),
33002
33152
  required: true
@@ -33093,6 +33243,13 @@ const NewApplication = () => {
33093
33243
  errorStyle: !!getFieldError("propertyAddress.houseNo"),
33094
33244
  inputRef: register(),
33095
33245
  name: "propertyAddress.houseNo"
33246
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33247
+ error: getFieldError("propertyAddress.Assembly"),
33248
+ label: t("WS_ASSEMBLY")
33249
+ }, /*#__PURE__*/React.createElement(TextInput, {
33250
+ errorStyle: !!getFieldError("propertyAddress.Assembly"),
33251
+ inputRef: register(),
33252
+ name: "propertyAddress.Assembly"
33096
33253
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33097
33254
  error: getFieldError("propertyAddress.block"),
33098
33255
  label: t("WS_BLOCK")
@@ -33114,6 +33271,20 @@ const NewApplication = () => {
33114
33271
  errorStyle: !!getFieldError("propertyAddress.landmark"),
33115
33272
  inputRef: register(),
33116
33273
  name: "propertyAddress.landmark"
33274
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33275
+ error: getFieldError("propertyAddress.Latitude"),
33276
+ label: t("WS_LATITUDE")
33277
+ }, /*#__PURE__*/React.createElement(TextInput, {
33278
+ errorStyle: !!getFieldError("propertyAddress.Latitude"),
33279
+ inputRef: register(),
33280
+ name: "propertyAddress.Latitude"
33281
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33282
+ error: getFieldError("propertyAddress.Longitude"),
33283
+ label: t("WS_LONGITUDE")
33284
+ }, /*#__PURE__*/React.createElement(TextInput, {
33285
+ errorStyle: !!getFieldError("propertyAddress.Longitude"),
33286
+ inputRef: register(),
33287
+ name: "propertyAddress.Longitude"
33117
33288
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33118
33289
  error: getFieldError("propertyAddress.address"),
33119
33290
  isFullWidth: true,
@@ -33135,6 +33306,23 @@ const NewApplication = () => {
33135
33306
  title: t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS"),
33136
33307
  sectionRef: sectionRefs.useDetails
33137
33308
  }, /*#__PURE__*/React.createElement(FieldBlock, {
33309
+ error: getFieldError("useDetails.propertyCategory"),
33310
+ label: t("WS_PROPERTY_CATEGORY"),
33311
+ required: true
33312
+ }, /*#__PURE__*/React.createElement(Controller, {
33313
+ control: control,
33314
+ name: "useDetails.propertyCategory",
33315
+ rules: {
33316
+ required: "Property Category is required."
33317
+ },
33318
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
33319
+ option: PROPERTY_CATEGORY_OPTIONS,
33320
+ optionKey: "name",
33321
+ selected: props.value,
33322
+ select: props.onChange,
33323
+ t: t
33324
+ })
33325
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33138
33326
  error: getFieldError("useDetails.propertyType"),
33139
33327
  label: t("WS_PROPERTY_TYPE"),
33140
33328
  required: true
@@ -33145,7 +33333,41 @@ const NewApplication = () => {
33145
33333
  required: "Property Type is required."
33146
33334
  },
33147
33335
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
33148
- option: dropdownData.propertyTypes,
33336
+ option: PROPERTY_TYPE_OPTIONS,
33337
+ optionKey: "name",
33338
+ selected: props.value,
33339
+ select: props.onChange,
33340
+ t: t
33341
+ })
33342
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33343
+ error: getFieldError("useDetails.WaterConnectionUsageType"),
33344
+ label: t("WS_WATER_CONNECTION_USAGE_TYPE"),
33345
+ required: true
33346
+ }, /*#__PURE__*/React.createElement(Controller, {
33347
+ control: control,
33348
+ name: "useDetails.WaterConnectionUsageType",
33349
+ rules: {
33350
+ required: "Usage Type is required."
33351
+ },
33352
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
33353
+ option: USAGE_TYPE_OPTIONS,
33354
+ optionKey: "name",
33355
+ selected: props.value,
33356
+ select: props.onChange,
33357
+ t: t
33358
+ })
33359
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33360
+ error: getFieldError("useDetails.noOfFloors"),
33361
+ label: t("WS_NUMBER_OF_FLOORS"),
33362
+ required: true
33363
+ }, /*#__PURE__*/React.createElement(Controller, {
33364
+ control: control,
33365
+ name: "useDetails.noOfFloors",
33366
+ rules: {
33367
+ required: "No. of Floors is required."
33368
+ },
33369
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
33370
+ option: NO_OF_FLOORS_OPTIONS,
33149
33371
  optionKey: "name",
33150
33372
  selected: props.value,
33151
33373
  select: props.onChange,
@@ -33180,25 +33402,42 @@ const NewApplication = () => {
33180
33402
  }),
33181
33403
  name: "useDetails.builtUpArea"
33182
33404
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33183
- error: getFieldError("useDetails.noOfFloors"),
33184
- label: t("WS_NUMBER_OF_FLOORS"),
33405
+ error: getFieldError("useDetails.SelectYearofConstruction"),
33406
+ label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
33407
+ required: true
33408
+ }, /*#__PURE__*/React.createElement(Controller, {
33409
+ control: control,
33410
+ name: "useDetails.SelectYearofConstruction",
33411
+ rules: {
33412
+ required: "Select Year of Construction is required."
33413
+ },
33414
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
33415
+ option: yearOptions,
33416
+ optionKey: "value",
33417
+ selected: props.value,
33418
+ select: props.onChange,
33419
+ t: t
33420
+ })
33421
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33422
+ error: getFieldError("useDetails.NumberofDwellingUnits"),
33423
+ label: t("WS_NUMBER_OF_DWELLING_UNITS"),
33185
33424
  required: true
33186
33425
  }, /*#__PURE__*/React.createElement(TextInput, {
33187
- errorStyle: !!getFieldError("useDetails.noOfFloors"),
33426
+ errorStyle: !!getFieldError("useDetails.NumberofDwellingUnits"),
33188
33427
  inputRef: register({
33189
33428
  pattern: {
33190
- value: NUMBER_PATTERN,
33191
- message: "Enter a valid whole number."
33429
+ value: DECIMAL_PATTERN,
33430
+ message: "Enter a valid numeric value."
33192
33431
  },
33193
- required: "No. of Floors is required."
33432
+ required: "Built Up Area is required."
33194
33433
  }),
33195
- name: "useDetails.noOfFloors"
33434
+ name: "useDetails.NumberofDwellingUnits"
33196
33435
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33197
- error: getFieldError("useDetails.NumberofDwellingUnits"),
33198
- label: t("WS_NUMBER_OF_DWELLING_UNITS"),
33436
+ error: getFieldError("useDetails.NumberofRooms"),
33437
+ label: t("WS_NUMBER_OF_ROOMS"),
33199
33438
  required: true
33200
33439
  }, /*#__PURE__*/React.createElement(TextInput, {
33201
- errorStyle: !!getFieldError("useDetails.NumberofDwellingUnits"),
33440
+ errorStyle: !!getFieldError("useDetails.NumberofRooms"),
33202
33441
  inputRef: register({
33203
33442
  pattern: {
33204
33443
  value: DECIMAL_PATTERN,
@@ -33206,7 +33445,7 @@ const NewApplication = () => {
33206
33445
  },
33207
33446
  required: "Built Up Area is required."
33208
33447
  }),
33209
- name: "useDetails.NumberofDwellingUnits"
33448
+ name: "useDetails.NumberofRooms"
33210
33449
  })), isHospitalProperty ? /*#__PURE__*/React.createElement(FieldBlock, {
33211
33450
  error: getFieldError("useDetails.hospitalBeds"),
33212
33451
  label: t("WS_NUMBER_OF_BEDS"),
@@ -33221,41 +33460,7 @@ const NewApplication = () => {
33221
33460
  required: isHospitalProperty ? "No. of Beds is required for Hospital / Nursing Home." : false
33222
33461
  }),
33223
33462
  name: "useDetails.hospitalBeds"
33224
- })) : null, /*#__PURE__*/React.createElement(FieldBlock, {
33225
- error: getFieldError("useDetails.SelectYearofConstruction"),
33226
- label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
33227
- required: true
33228
- }, /*#__PURE__*/React.createElement(Controller, {
33229
- control: control,
33230
- name: "useDetails.SelectYearofConstruction",
33231
- rules: {
33232
- required: "Select Year of Construction is required."
33233
- },
33234
- render: props => /*#__PURE__*/React.createElement(Dropdown, {
33235
- option: yearOptions,
33236
- optionKey: "value",
33237
- selected: props.value,
33238
- select: props.onChange,
33239
- t: t
33240
- })
33241
- })), /*#__PURE__*/React.createElement(FieldBlock, {
33242
- error: getFieldError("useDetails.WaterConnectionUsageType"),
33243
- label: t("WS_WATER_CONNECTION_USAGE_TYPE"),
33244
- required: true
33245
- }, /*#__PURE__*/React.createElement(Controller, {
33246
- control: control,
33247
- name: "useDetails.WaterConnectionUsageType",
33248
- rules: {
33249
- required: "Water Connection Usage Type is required."
33250
- },
33251
- render: props => /*#__PURE__*/React.createElement(Dropdown, {
33252
- option: WATER_CONNECTION_USED_BY_OPTIONS,
33253
- optionKey: "name",
33254
- selected: props.value,
33255
- select: props.onChange,
33256
- t: t
33257
- })
33258
- }))), /*#__PURE__*/React.createElement(SectionCard, {
33463
+ })) : null), /*#__PURE__*/React.createElement(SectionCard, {
33259
33464
  description: "Refund or payment-linked bank account details.",
33260
33465
  isOpen: collapsedSections.bank,
33261
33466
  onToggle: toggleSection,
@@ -33320,9 +33525,90 @@ const NewApplication = () => {
33320
33525
  sectionKey: "documents",
33321
33526
  title: "Documents to be Attached",
33322
33527
  sectionRef: sectionRefs.documents
33323
- }, /*#__PURE__*/React.createElement(FieldBlock, {
33528
+ }, /*#__PURE__*/React.createElement(Controller, {
33529
+ control: control,
33530
+ name: "documents.applicantPhoto",
33531
+ render: props => /*#__PURE__*/React.createElement(FileUploadField, {
33532
+ error: getFieldError("documents.applicantPhoto"),
33533
+ id: "applicant-photo",
33534
+ isUploading: !!uploadingFields["documents.applicantPhoto"],
33535
+ label: "Upload Applicant Photo",
33536
+ onDelete: () => clearUploadedFile("documents.applicantPhoto", props.onChange),
33537
+ onUpload: event => uploadFile(event, "documents.applicantPhoto", props.onChange),
33538
+ value: props.value
33539
+ })
33540
+ }), /*#__PURE__*/React.createElement(FieldBlock, {
33541
+ label: "Click Applicant Photo"
33542
+ }, /*#__PURE__*/React.createElement("div", {
33543
+ style: {
33544
+ display: "flex",
33545
+ gap: "8px"
33546
+ }
33547
+ }, /*#__PURE__*/React.createElement("button", {
33548
+ type: "button",
33549
+ className: "document-action-btn",
33550
+ onClick: () => setShowCamera(true)
33551
+ }, /*#__PURE__*/React.createElement(CameraIcon, null), " Click Photo"), ((_watch = watch("documents.applicantPhoto")) === null || _watch === void 0 ? void 0 : _watch.fileStoreId) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
33552
+ type: "button",
33553
+ className: "document-action-btn",
33554
+ style: {
33555
+ width: "50px"
33556
+ },
33557
+ onClick: () => {
33558
+ var _watch2;
33559
+ return handleView((_watch2 = watch("documents.applicantPhoto")) === null || _watch2 === void 0 ? void 0 : _watch2.fileStoreId, stateId);
33560
+ },
33561
+ title: "View Photo"
33562
+ }, /*#__PURE__*/React.createElement(ViewIcon, null)))), ((_watch3 = watch("documents.applicantPhoto")) === null || _watch3 === void 0 ? void 0 : _watch3.fileStoreId) && /*#__PURE__*/React.createElement("div", {
33563
+ style: {
33564
+ marginTop: "8px",
33565
+ display: "flex",
33566
+ alignItems: "center",
33567
+ gap: "8px",
33568
+ background: "#F3F4F6",
33569
+ padding: "4px 12px",
33570
+ borderRadius: "20px",
33571
+ width: "fit-content",
33572
+ border: "1px solid #E5E7EB"
33573
+ }
33574
+ }, /*#__PURE__*/React.createElement(CardText, {
33575
+ style: {
33576
+ margin: 0,
33577
+ fontSize: "14px",
33578
+ color: "#374151",
33579
+ fontWeight: "500"
33580
+ }
33581
+ }, watch("documents.applicantPhoto").fileName), /*#__PURE__*/React.createElement("div", {
33582
+ onClick: () => clearUploadedFile("documents.applicantPhoto", val => setValue("documents.applicantPhoto", val)),
33583
+ style: {
33584
+ cursor: "pointer",
33585
+ display: "flex",
33586
+ alignItems: "center",
33587
+ color: "#6B7280"
33588
+ },
33589
+ title: "Remove Photo"
33590
+ }, /*#__PURE__*/React.createElement("svg", {
33591
+ width: "16",
33592
+ height: "16",
33593
+ viewBox: "0 0 24 24",
33594
+ fill: "none",
33595
+ stroke: "currentColor",
33596
+ strokeWidth: "3",
33597
+ strokeLinecap: "round",
33598
+ strokeLinejoin: "round"
33599
+ }, /*#__PURE__*/React.createElement("line", {
33600
+ x1: "18",
33601
+ y1: "6",
33602
+ x2: "6",
33603
+ y2: "18"
33604
+ }), /*#__PURE__*/React.createElement("line", {
33605
+ x1: "6",
33606
+ y1: "6",
33607
+ x2: "18",
33608
+ y2: "18"
33609
+ }))))), /*#__PURE__*/React.createElement(FieldBlock, {
33324
33610
  error: getFieldError("documents.proofOfIdentity"),
33325
- label: "Proof of Identity",
33611
+ label: "Proof of Identity *",
33326
33612
  required: true
33327
33613
  }, /*#__PURE__*/React.createElement(Controller, {
33328
33614
  control: control,
@@ -33338,13 +33624,12 @@ const NewApplication = () => {
33338
33624
  t: t
33339
33625
  })
33340
33626
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33341
- error: getFieldError("propertyAddress.proofOfIdentity"),
33342
- label: "Proof of Identity Document",
33343
- required: true
33627
+ error: getFieldError("documents.identityProofNumber"),
33628
+ label: "Proof of Identity Document"
33344
33629
  }, /*#__PURE__*/React.createElement(TextInput, {
33345
- errorStyle: !!getFieldError("propertyAddress.proofOfIdentity"),
33630
+ name: "documents.identityProofNumber",
33346
33631
  inputRef: register(),
33347
- name: "propertyAddress.proofOfIdentity"
33632
+ placeholder: "Identity No."
33348
33633
  })), /*#__PURE__*/React.createElement(Controller, {
33349
33634
  control: control,
33350
33635
  name: "documents.identityProofFile",
@@ -33353,42 +33638,48 @@ const NewApplication = () => {
33353
33638
  },
33354
33639
  render: props => /*#__PURE__*/React.createElement(FileUploadField, {
33355
33640
  error: getFieldError("documents.identityProofFile"),
33356
- helperText: "Max size 5 MB. Allowed types: PDF, PNG, JPG, JPEG.",
33357
33641
  id: "identity-proof-file",
33358
33642
  isUploading: !!uploadingFields["documents.identityProofFile"],
33359
- label: "Upload Identity Proof",
33643
+ label: "Proof of Identity Upload Document *",
33360
33644
  onDelete: () => clearUploadedFile("documents.identityProofFile", props.onChange),
33361
33645
  onUpload: event => uploadFile(event, "documents.identityProofFile", props.onChange),
33362
33646
  required: true,
33363
33647
  value: props.value
33364
33648
  })
33365
33649
  }), /*#__PURE__*/React.createElement(FieldBlock, {
33366
- error: getFieldError("propertyAddress.otherDocument")
33367
- }), /*#__PURE__*/React.createElement(FieldBlock, {
33650
+ label: "View Document"
33651
+ }, /*#__PURE__*/React.createElement("button", {
33652
+ type: "button",
33653
+ className: "document-action-btn",
33654
+ onClick: () => {
33655
+ var _watch4;
33656
+ return handleView((_watch4 = watch("documents.identityProofFile")) === null || _watch4 === void 0 ? void 0 : _watch4.fileStoreId, stateId);
33657
+ },
33658
+ disabled: !((_watch5 = watch("documents.identityProofFile")) !== null && _watch5 !== void 0 && _watch5.fileStoreId)
33659
+ }, /*#__PURE__*/React.createElement(ViewIcon, null), " View")), /*#__PURE__*/React.createElement(FieldBlock, {
33368
33660
  error: getFieldError("documents.ownershipStatus"),
33369
- label: "Ownership Proof",
33661
+ label: "Proof of Ownership *",
33370
33662
  required: true
33371
33663
  }, /*#__PURE__*/React.createElement(Controller, {
33372
33664
  control: control,
33373
33665
  name: "documents.ownershipStatus",
33374
33666
  rules: {
33375
- required: "Ownership Status is required."
33667
+ required: "Ownership Proof is required."
33376
33668
  },
33377
33669
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
33378
- option: OWNERSHIP_STATUS_OPTIONS,
33670
+ option: OWNERSHIP_DOCUMENTS_OPTIONS,
33379
33671
  optionKey: "name",
33380
33672
  selected: props.value,
33381
33673
  select: props.onChange,
33382
33674
  t: t
33383
33675
  })
33384
33676
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33385
- error: getFieldError("propertyAddress.ownershipStatus"),
33386
- label: "Proof of Identity Ownership Document",
33387
- required: true
33677
+ error: getFieldError("documents.ownershipDocumentNumber"),
33678
+ label: "Proof of Ownership Document"
33388
33679
  }, /*#__PURE__*/React.createElement(TextInput, {
33389
- errorStyle: !!getFieldError("propertyAddress.ownershipStatus"),
33680
+ name: "documents.ownershipDocumentNumber",
33390
33681
  inputRef: register(),
33391
- name: "propertyAddress.ownershipStatus"
33682
+ placeholder: "Ownership No."
33392
33683
  })), /*#__PURE__*/React.createElement(Controller, {
33393
33684
  control: control,
33394
33685
  name: "documents.ownershipDocumentFile",
@@ -33397,56 +33688,71 @@ const NewApplication = () => {
33397
33688
  },
33398
33689
  render: props => /*#__PURE__*/React.createElement(FileUploadField, {
33399
33690
  error: getFieldError("documents.ownershipDocumentFile"),
33400
- helperText: "Max size 5 MB. Allowed types: PDF, PNG, JPG, JPEG.",
33401
33691
  id: "ownership-document-file",
33402
33692
  isUploading: !!uploadingFields["documents.ownershipDocumentFile"],
33403
- label: "Upload Ownership Document",
33693
+ label: "Proof of Ownership Upload Document *",
33404
33694
  onDelete: () => clearUploadedFile("documents.ownershipDocumentFile", props.onChange),
33405
33695
  onUpload: event => uploadFile(event, "documents.ownershipDocumentFile", props.onChange),
33406
33696
  required: true,
33407
33697
  value: props.value
33408
33698
  })
33409
33699
  }), /*#__PURE__*/React.createElement(FieldBlock, {
33410
- error: getFieldError("propertyAddress.otherDocument")
33411
- }), /*#__PURE__*/React.createElement(FieldBlock, {
33700
+ label: "View Document"
33701
+ }, /*#__PURE__*/React.createElement("button", {
33702
+ type: "button",
33703
+ className: "document-action-btn",
33704
+ onClick: () => {
33705
+ var _watch6;
33706
+ return handleView((_watch6 = watch("documents.ownershipDocumentFile")) === null || _watch6 === void 0 ? void 0 : _watch6.fileStoreId, stateId);
33707
+ },
33708
+ disabled: !((_watch7 = watch("documents.ownershipDocumentFile")) !== null && _watch7 !== void 0 && _watch7.fileStoreId)
33709
+ }, /*#__PURE__*/React.createElement(ViewIcon, null), " View")), /*#__PURE__*/React.createElement(FieldBlock, {
33412
33710
  error: getFieldError("documents.otherDocument"),
33413
- label: "Other Document",
33414
- required: true
33711
+ label: "Other"
33415
33712
  }, /*#__PURE__*/React.createElement(Controller, {
33416
33713
  control: control,
33417
33714
  name: "documents.otherDocument",
33418
- rules: {
33419
- required: "Other Document is required."
33420
- },
33421
33715
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
33422
- option: OWNERSHIP_STATUS_OPTIONS,
33716
+ option: OTHER_DOCUMENTS_OPTIONS,
33423
33717
  optionKey: "name",
33424
33718
  selected: props.value,
33425
33719
  select: props.onChange,
33426
33720
  t: t
33427
33721
  })
33428
33722
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33429
- error: getFieldError("propertyAddress.otherDocument"),
33430
- label: "Other Document",
33431
- required: true
33723
+ error: getFieldError("documents.otherDocumentNumber"),
33724
+ label: "Other Document"
33432
33725
  }, /*#__PURE__*/React.createElement(TextInput, {
33433
- errorStyle: !!getFieldError("propertyAddress.otherDocument"),
33726
+ name: "documents.otherDocumentNumber",
33434
33727
  inputRef: register(),
33435
- name: "propertyAddress.otherDocument"
33728
+ placeholder: "Other Document No."
33436
33729
  })), /*#__PURE__*/React.createElement(Controller, {
33437
33730
  control: control,
33438
33731
  name: "documents.otherDocumentFile",
33732
+ rules: {
33733
+ validate: value => !!value || "Other Upload Document is required."
33734
+ },
33439
33735
  render: props => /*#__PURE__*/React.createElement(FileUploadField, {
33440
33736
  error: getFieldError("documents.otherDocumentFile"),
33441
- helperText: "Optional. Max size 5 MB. Allowed types: PDF, PNG, JPG, JPEG.",
33442
33737
  id: "other-document-file",
33443
33738
  isUploading: !!uploadingFields["documents.otherDocumentFile"],
33444
- label: "Other Document",
33739
+ label: "Other Upload Document *",
33445
33740
  onDelete: () => clearUploadedFile("documents.otherDocumentFile", props.onChange),
33446
33741
  onUpload: event => uploadFile(event, "documents.otherDocumentFile", props.onChange),
33742
+ required: true,
33447
33743
  value: props.value
33448
33744
  })
33449
- })), /*#__PURE__*/React.createElement(SectionCard, {
33745
+ }), /*#__PURE__*/React.createElement(FieldBlock, {
33746
+ label: "View Document"
33747
+ }, /*#__PURE__*/React.createElement("button", {
33748
+ type: "button",
33749
+ className: "document-action-btn",
33750
+ onClick: () => {
33751
+ var _watch8;
33752
+ return handleView((_watch8 = watch("documents.otherDocumentFile")) === null || _watch8 === void 0 ? void 0 : _watch8.fileStoreId, stateId);
33753
+ },
33754
+ disabled: !((_watch9 = watch("documents.otherDocumentFile")) !== null && _watch9 !== void 0 && _watch9.fileStoreId)
33755
+ }, /*#__PURE__*/React.createElement(ViewIcon, null), " View"))), /*#__PURE__*/React.createElement(SectionCard, {
33450
33756
  description: "Declaration and undertaking to be signed by the applicant.",
33451
33757
  isOpen: collapsedSections.declaration,
33452
33758
  onToggle: toggleSection,
@@ -33536,16 +33842,19 @@ const NewApplication = () => {
33536
33842
  }), (formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati12 = formValues.applicationSelection) === null || _formValues$applicati12 === void 0 ? void 0 : (_formValues$applicati13 = _formValues$applicati12.subCategory) === null || _formValues$applicati13 === void 0 ? void 0 : _formValues$applicati13.code) === "COMMERCIAL" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PreviewItem, {
33537
33843
  label: "Commercial Type",
33538
33844
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati14 = formValues.applicationSelection) === null || _formValues$applicati14 === void 0 ? void 0 : _formValues$applicati14.commercialType
33845
+ }), (formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati15 = formValues.applicationSelection) === null || _formValues$applicati15 === void 0 ? void 0 : (_formValues$applicati16 = _formValues$applicati15.commercialType) === null || _formValues$applicati16 === void 0 ? void 0 : _formValues$applicati16.code) === "ORGANIZATION" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PreviewItem, {
33846
+ label: "Department Type",
33847
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati17 = formValues.applicationSelection) === null || _formValues$applicati17 === void 0 ? void 0 : _formValues$applicati17.departmentType
33539
33848
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33540
33849
  label: "Organization Name",
33541
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati15 = formValues.applicationSelection) === null || _formValues$applicati15 === void 0 ? void 0 : (_formValues$applicati16 = _formValues$applicati15.govtOrganization) === null || _formValues$applicati16 === void 0 ? void 0 : _formValues$applicati16.organizationName
33850
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati18 = formValues.applicationSelection) === null || _formValues$applicati18 === void 0 ? void 0 : (_formValues$applicati19 = _formValues$applicati18.govtOrganization) === null || _formValues$applicati19 === void 0 ? void 0 : _formValues$applicati19.organizationName
33542
33851
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33543
33852
  label: "Nature of Work",
33544
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati17 = formValues.applicationSelection) === null || _formValues$applicati17 === void 0 ? void 0 : (_formValues$applicati18 = _formValues$applicati17.govtOrganization) === null || _formValues$applicati18 === void 0 ? void 0 : _formValues$applicati18.natureOfWork
33853
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati20 = formValues.applicationSelection) === null || _formValues$applicati20 === void 0 ? void 0 : (_formValues$applicati21 = _formValues$applicati20.govtOrganization) === null || _formValues$applicati21 === void 0 ? void 0 : _formValues$applicati21.natureOfWork
33545
33854
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33546
33855
  label: "Organization Document",
33547
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati19 = formValues.applicationSelection) === null || _formValues$applicati19 === void 0 ? void 0 : (_formValues$applicati20 = _formValues$applicati19.govtOrganization) === null || _formValues$applicati20 === void 0 ? void 0 : _formValues$applicati20.organizationDocument
33548
- }))), /*#__PURE__*/React.createElement(SectionCard, {
33856
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati22 = formValues.applicationSelection) === null || _formValues$applicati22 === void 0 ? void 0 : (_formValues$applicati23 = _formValues$applicati22.govtOrganization) === null || _formValues$applicati23 === void 0 ? void 0 : _formValues$applicati23.organizationDocument
33857
+ })))), /*#__PURE__*/React.createElement(SectionCard, {
33549
33858
  description: "Applicant identity and organization information.",
33550
33859
  isOpen: collapsedSections.applicant,
33551
33860
  onToggle: toggleSection,
@@ -33749,20 +34058,35 @@ const NewApplication = () => {
33749
34058
  title: "Documents to be Attached",
33750
34059
  onEditClick: () => handleSectionEdit("documents")
33751
34060
  }, /*#__PURE__*/React.createElement(PreviewItem, {
34061
+ label: "Applicant Photo",
34062
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents2 = formValues.documents) === null || _formValues$documents2 === void 0 ? void 0 : _formValues$documents2.applicantPhoto
34063
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33752
34064
  label: "Proof of Identity",
33753
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents2 = formValues.documents) === null || _formValues$documents2 === void 0 ? void 0 : _formValues$documents2.proofOfIdentity
34065
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents3 = formValues.documents) === null || _formValues$documents3 === void 0 ? void 0 : _formValues$documents3.proofOfIdentity
34066
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
34067
+ label: "Identity No.",
34068
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents4 = formValues.documents) === null || _formValues$documents4 === void 0 ? void 0 : _formValues$documents4.identityProofNumber
33754
34069
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33755
34070
  label: "Upload Identity Proof",
33756
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents3 = formValues.documents) === null || _formValues$documents3 === void 0 ? void 0 : _formValues$documents3.identityProofFile
34071
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents5 = formValues.documents) === null || _formValues$documents5 === void 0 ? void 0 : _formValues$documents5.identityProofFile
33757
34072
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33758
34073
  label: "Ownership Status",
33759
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents4 = formValues.documents) === null || _formValues$documents4 === void 0 ? void 0 : _formValues$documents4.ownershipStatus
34074
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents6 = formValues.documents) === null || _formValues$documents6 === void 0 ? void 0 : _formValues$documents6.ownershipStatus
34075
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
34076
+ label: "Ownership No.",
34077
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents7 = formValues.documents) === null || _formValues$documents7 === void 0 ? void 0 : _formValues$documents7.ownershipDocumentNumber
33760
34078
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33761
34079
  label: "Upload Ownership Document",
33762
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents5 = formValues.documents) === null || _formValues$documents5 === void 0 ? void 0 : _formValues$documents5.ownershipDocumentFile
34080
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents8 = formValues.documents) === null || _formValues$documents8 === void 0 ? void 0 : _formValues$documents8.ownershipDocumentFile
34081
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
34082
+ label: "Other",
34083
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents9 = formValues.documents) === null || _formValues$documents9 === void 0 ? void 0 : _formValues$documents9.otherDocument
34084
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
34085
+ label: "Other Document No.",
34086
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents0 = formValues.documents) === null || _formValues$documents0 === void 0 ? void 0 : _formValues$documents0.otherDocumentNumber
33763
34087
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33764
- label: "Other Document",
33765
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents6 = formValues.documents) === null || _formValues$documents6 === void 0 ? void 0 : _formValues$documents6.otherDocumentFile
34088
+ label: "Other Upload Document",
34089
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents1 = formValues.documents) === null || _formValues$documents1 === void 0 ? void 0 : _formValues$documents1.otherDocumentFile
33766
34090
  })), /*#__PURE__*/React.createElement(SectionCard, {
33767
34091
  description: "Applicant declaration details.",
33768
34092
  isOpen: collapsedSections.declaration,
@@ -33803,7 +34127,11 @@ const NewApplication = () => {
33803
34127
  label: showToast === null || showToast === void 0 ? void 0 : showToast.message,
33804
34128
  onClose: closeToast,
33805
34129
  warning: showToast === null || showToast === void 0 ? void 0 : showToast.warning
33806
- }) : null);
34130
+ }) : null, showCamera && /*#__PURE__*/React.createElement(CameraCaptureModal, {
34131
+ onCapture: handleCapture,
34132
+ onClose: () => setShowCamera(false),
34133
+ t: t
34134
+ }));
33807
34135
  };
33808
34136
 
33809
34137
  const configPTApproverApplication = ({
@@ -36810,7 +37138,11 @@ const ActionModal$b = ({
36810
37138
  applicationData.vehicleId = selectVehicle === null || selectVehicle === void 0 ? void 0 : selectVehicle.vehicleId;
36811
37139
  applicationData.driverId = selectVehicle === null || selectVehicle === void 0 ? void 0 : selectVehicle.driverId;
36812
37140
  }
36813
- let requestPayload = businessService === "watertanker" ? {
37141
+ if (businessService === "watertanker-fixedpoint") {
37142
+ workflow.moduleName = "request-service.water_tanker";
37143
+ workflow.businessService = "watertanker-fixedpoint";
37144
+ }
37145
+ let requestPayload = businessService === "watertanker" || businessService === "watertanker-fixedpoint" ? {
36814
37146
  waterTankerBookingDetail: {
36815
37147
  ...applicationData,
36816
37148
  workflow
@@ -39869,7 +40201,7 @@ function ApplicationDetailsContent({
39869
40201
  fontSize: "24px"
39870
40202
  } : {
39871
40203
  marginBottom: "16px",
39872
- marginTop: "32px",
40204
+ marginTop: "16px",
39873
40205
  fontSize: "24px"
39874
40206
  }
39875
40207
  }, t(detail.title), detail !== null && detail !== void 0 && detail.Component ? /*#__PURE__*/React.createElement(detail.Component, null) : null)), (detail === null || detail === void 0 ? void 0 : detail.isTable) && /*#__PURE__*/React.createElement("table", {
@@ -45004,7 +45336,7 @@ const OLDApplication = () => {
45004
45336
  setShowToast(null);
45005
45337
  };
45006
45338
  const onSubmit = async data => {
45007
- var _data$cpt, _propertyDetails$Prop2, _formStateErros$Conne, _Object$keys2, _formStateErros$Conne2, _data$cpt3, _data$ConnectionDetai, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _propertyDetails$Prop4, _propertyDetails$Prop5, _propertyDetails$Prop6, _propertyDetails$Prop7, _data$ConnectionDetai2;
45339
+ var _data$cpt, _propertyDetails$Prop2, _formStateErros$Conne, _Object$keys2, _formStateErros$Conne2, _data$cpt3, _data$ConnectionDetai, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _propertyDetails$Prop4, _propertyDetails$Prop5, _propertyDetails$Prop6, _propertyDetails$Prop7, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$cpt4, _data$cpt4$details, _data$cpt4$details$ow, _data$cpt4$details$ow2, _data$ConnectionDetai2;
45008
45340
  console.log("[WS] onSubmit triggered", {
45009
45341
  data,
45010
45342
  propertyId,
@@ -45058,7 +45390,8 @@ const OLDApplication = () => {
45058
45390
  },
45059
45391
  categoryType: {
45060
45392
  code: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde = data.ConnectionHolderDetails) === null || _data$ConnectionHolde === void 0 ? void 0 : (_data$ConnectionHolde2 = _data$ConnectionHolde[0]) === null || _data$ConnectionHolde2 === void 0 ? void 0 : (_data$ConnectionHolde3 = _data$ConnectionHolde2.ownerType) === null || _data$ConnectionHolde3 === void 0 ? void 0 : _data$ConnectionHolde3.code) || (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde4 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde4 === void 0 ? void 0 : (_data$ConnectionHolde5 = _data$ConnectionHolde4[0]) === null || _data$ConnectionHolde5 === void 0 ? void 0 : _data$ConnectionHolde5.ownerType) || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop4 = propertyDetails.Properties) === null || _propertyDetails$Prop4 === void 0 ? void 0 : (_propertyDetails$Prop5 = _propertyDetails$Prop4[0]) === null || _propertyDetails$Prop5 === void 0 ? void 0 : (_propertyDetails$Prop6 = _propertyDetails$Prop5.owners) === null || _propertyDetails$Prop6 === void 0 ? void 0 : (_propertyDetails$Prop7 = _propertyDetails$Prop6[0]) === null || _propertyDetails$Prop7 === void 0 ? void 0 : _propertyDetails$Prop7.ownerType) || "NONE"
45061
- }
45393
+ },
45394
+ ownerContactNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde6 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde6 === void 0 ? void 0 : (_data$ConnectionHolde7 = _data$ConnectionHolde6[0]) === null || _data$ConnectionHolde7 === void 0 ? void 0 : _data$ConnectionHolde7.mobileNumber) || (data === null || data === void 0 ? void 0 : (_data$cpt4 = data.cpt) === null || _data$cpt4 === void 0 ? void 0 : (_data$cpt4$details = _data$cpt4.details) === null || _data$cpt4$details === void 0 ? void 0 : (_data$cpt4$details$ow = _data$cpt4$details.owners) === null || _data$cpt4$details$ow === void 0 ? void 0 : (_data$cpt4$details$ow2 = _data$cpt4$details$ow[0]) === null || _data$cpt4$details$ow2 === void 0 ? void 0 : _data$cpt4$details$ow2.mobileNumber)
45062
45395
  };
45063
45396
  if (data !== null && data !== void 0 && (_data$ConnectionDetai2 = data.ConnectionDetails) !== null && _data$ConnectionDetai2 !== void 0 && _data$ConnectionDetai2[0]) {
45064
45397
  data.ConnectionDetails[0].water = true;