@djb25/digit-ui-module-ws 1.0.23 → 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.
@@ -31112,9 +31112,158 @@ const createOption = (code, name) => ({
31112
31112
  code,
31113
31113
  name
31114
31114
  });
31115
- 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")];
31116
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")];
31117
- 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
+ };
31118
31267
  const DEFAULT_SECTION_STATE = {
31119
31268
  application: true,
31120
31269
  applicant: true,
@@ -31158,7 +31307,13 @@ const DEFAULT_FORM_VALUES = {
31158
31307
  code: "INDIVIDUAL",
31159
31308
  name: "Individual"
31160
31309
  },
31161
- commercialType: null
31310
+ commercialType: null,
31311
+ departmentType: null,
31312
+ govtOrganization: {
31313
+ organizationName: "",
31314
+ natureOfWork: "",
31315
+ organizationDocument: null
31316
+ }
31162
31317
  },
31163
31318
  djbEmployee: {
31164
31319
  isDjbEmployee: false,
@@ -31188,8 +31343,9 @@ const DEFAULT_FORM_VALUES = {
31188
31343
  ward: null
31189
31344
  },
31190
31345
  useDetails: {
31346
+ propertyCategory: null,
31191
31347
  propertyType: null,
31192
- noOfFloors: "",
31348
+ noOfFloors: null,
31193
31349
  hospitalBeds: "",
31194
31350
  plotArea: "",
31195
31351
  builtUpArea: "",
@@ -31209,10 +31365,15 @@ const DEFAULT_FORM_VALUES = {
31209
31365
  applyForAdequacyCertificate: false
31210
31366
  },
31211
31367
  documents: {
31368
+ applicantPhoto: null,
31212
31369
  proofOfIdentity: null,
31370
+ identityProofNumber: "",
31213
31371
  identityProofFile: null,
31214
31372
  ownershipStatus: null,
31373
+ ownershipDocumentNumber: "",
31215
31374
  ownershipDocumentFile: null,
31375
+ otherDocument: null,
31376
+ otherDocumentNumber: "",
31216
31377
  otherDocumentFile: null
31217
31378
  },
31218
31379
  declaration: {
@@ -31286,115 +31447,6 @@ const ProfileImagePreview = ({
31286
31447
  }
31287
31448
  });
31288
31449
  };
31289
- const ProfileImageUpload = ({
31290
- value,
31291
- onUpload,
31292
- isUploading,
31293
- error,
31294
- t,
31295
- label,
31296
- required
31297
- }) => {
31298
- const fileInputRef = React.useRef(null);
31299
- const fileStoreId = value === null || value === void 0 ? void 0 : value.fileStoreId;
31300
- const [imageUrl, setImageUrl] = useState(null);
31301
- useEffect(() => {
31302
- const fetchImageUrl = async () => {
31303
- if (fileStoreId) {
31304
- try {
31305
- var _response$data2, _response$data2$fileS, _response$data2$fileS2;
31306
- const tenantId = Digit.ULBService.getStateId();
31307
- const response = await Digit.UploadServices.Filefetch([fileStoreId], tenantId);
31308
- 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;
31309
- if (url) {
31310
- let differentFormats = (url === null || url === void 0 ? void 0 : url.split(",")) || [];
31311
- let fileURL = "";
31312
- differentFormats.map(link => {
31313
- if (!link.includes("large") && !link.includes("medium") && !link.includes("small")) {
31314
- fileURL = link;
31315
- }
31316
- });
31317
- setImageUrl(fileURL || differentFormats[0]);
31318
- }
31319
- } catch (err) {
31320
- console.error("Error fetching image URL:", err);
31321
- setImageUrl(null);
31322
- }
31323
- } else {
31324
- setImageUrl(null);
31325
- }
31326
- };
31327
- fetchImageUrl();
31328
- }, [fileStoreId]);
31329
- const handleEditClick = () => {
31330
- fileInputRef.current.click();
31331
- };
31332
- return /*#__PURE__*/React.createElement("div", {
31333
- className: "avatar-upload-container"
31334
- }, label && /*#__PURE__*/React.createElement(CardLabel, {
31335
- style: {
31336
- textAlign: "center",
31337
- marginBottom: "16px",
31338
- fontWeight: "700"
31339
- }
31340
- }, `${t(label)}${required ? "*" : ""}`), /*#__PURE__*/React.createElement("div", {
31341
- className: "avatar-wrapper"
31342
- }, /*#__PURE__*/React.createElement("div", {
31343
- className: "avatar-circle",
31344
- onClick: handleEditClick
31345
- }, imageUrl ? /*#__PURE__*/React.createElement("img", {
31346
- src: imageUrl,
31347
- alt: "Profile"
31348
- }) : /*#__PURE__*/React.createElement("div", {
31349
- className: "avatar-placeholder"
31350
- }, /*#__PURE__*/React.createElement("svg", {
31351
- width: "40",
31352
- height: "40",
31353
- viewBox: "0 0 24 24",
31354
- fill: "none",
31355
- stroke: "#9CA3AF",
31356
- strokeWidth: "1.5"
31357
- }, /*#__PURE__*/React.createElement("path", {
31358
- d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"
31359
- }), /*#__PURE__*/React.createElement("circle", {
31360
- cx: "12",
31361
- cy: "7",
31362
- r: "4"
31363
- })))), /*#__PURE__*/React.createElement("div", {
31364
- className: "avatar-edit-icon",
31365
- onClick: handleEditClick
31366
- }, /*#__PURE__*/React.createElement("svg", {
31367
- width: "18",
31368
- height: "18",
31369
- viewBox: "0 0 24 24",
31370
- fill: "none",
31371
- stroke: "#0B4B66",
31372
- strokeWidth: "2.5",
31373
- strokeLinecap: "round",
31374
- strokeLinejoin: "round"
31375
- }, /*#__PURE__*/React.createElement("path", {
31376
- d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"
31377
- })))), /*#__PURE__*/React.createElement("input", {
31378
- type: "file",
31379
- ref: fileInputRef,
31380
- style: {
31381
- display: "none"
31382
- },
31383
- accept: "image/*",
31384
- onChange: onUpload
31385
- }), isUploading && /*#__PURE__*/React.createElement("div", {
31386
- style: {
31387
- fontSize: "14px",
31388
- marginTop: "8px",
31389
- color: "#505A5F"
31390
- }
31391
- }, "Uploading..."), error && /*#__PURE__*/React.createElement(CardLabelError, {
31392
- style: {
31393
- textAlign: "center",
31394
- marginTop: "8px"
31395
- }
31396
- }, error));
31397
- };
31398
31450
  const linkButtonStyle = {
31399
31451
  background: "transparent",
31400
31452
  border: "none",
@@ -31547,9 +31599,9 @@ const SectionCard = ({
31547
31599
  };
31548
31600
  const handleView = async (fileStoreId, tenantId) => {
31549
31601
  try {
31550
- var _response$data3, _response$data3$fileS, _response$data3$fileS2;
31602
+ var _response$data2, _response$data2$fileS, _response$data2$fileS2;
31551
31603
  const response = await Digit.UploadServices.Filefetch([fileStoreId], tenantId);
31552
- 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;
31553
31605
  if (url) {
31554
31606
  const differentFormats = (url === null || url === void 0 ? void 0 : url.split(",")) || [];
31555
31607
  let fileURL = "";
@@ -31647,15 +31699,61 @@ const FileUploadField = ({
31647
31699
  message: value !== null && value !== void 0 && value.fileStoreId ? "1 file uploaded" : "No file uploaded",
31648
31700
  onDelete: onDelete,
31649
31701
  onUpload: onUpload
31650
- }), /*#__PURE__*/React.createElement(CardText, {
31702
+ }), isUploading && /*#__PURE__*/React.createElement(CardText, {
31651
31703
  style: {
31652
- marginBottom: "0px",
31653
- marginTop: "0px"
31704
+ marginTop: "8px"
31654
31705
  }
31655
- }, 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
+ })))));
31656
31754
  };
31657
31755
  const NewApplication = () => {
31658
- 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;
31659
31757
  const {
31660
31758
  t
31661
31759
  } = useTranslation();
@@ -31672,6 +31770,7 @@ const NewApplication = () => {
31672
31770
  const [collapsedSections, setCollapsedSections] = useState(DEFAULT_SECTION_STATE);
31673
31771
  const [showToast, setShowToast] = useState(null);
31674
31772
  const [uploadingFields, setUploadingFields] = useState({});
31773
+ const [showCamera, setShowCamera] = useState(false);
31675
31774
  const [isOtpSent, setIsOtpSent] = useState(false);
31676
31775
  const [otpError, setOtpError] = useState(null);
31677
31776
  const [isEnableLoader, setIsEnableLoader] = useState(false);
@@ -31983,6 +32082,18 @@ const NewApplication = () => {
31983
32082
  clearErrors("applicationSelection.domesticType");
31984
32083
  }
31985
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]);
31986
32097
  useEffect(() => {
31987
32098
  if (!connectionTypeIsTemporary) {
31988
32099
  setValue("applicationSelection.temporaryConnection", null);
@@ -32012,7 +32123,7 @@ const NewApplication = () => {
32012
32123
  }));
32013
32124
  clearErrors(fieldName);
32014
32125
  try {
32015
- var _response$data4, _response$data4$files, _response$data4$files2;
32126
+ var _response$data3, _response$data3$files, _response$data3$files2;
32016
32127
  if (file.size > MAX_FILE_SIZE) {
32017
32128
  throw new Error("File size should be 5 MB or less.");
32018
32129
  }
@@ -32020,7 +32131,7 @@ const NewApplication = () => {
32020
32131
  throw new Error("Only PDF, PNG, JPG and JPEG files are supported.");
32021
32132
  }
32022
32133
  const response = await Digit.UploadServices.Filestorage("WS", file, stateId);
32023
- 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;
32024
32135
  if (!fileStoreId) {
32025
32136
  throw new Error("File upload failed. Please try again.");
32026
32137
  }
@@ -32048,6 +32159,37 @@ const NewApplication = () => {
32048
32159
  }));
32049
32160
  }
32050
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
+ };
32051
32193
  const clearUploadedFile = (fieldName, onChange) => {
32052
32194
  onChange(null);
32053
32195
  clearErrors(fieldName);
@@ -32388,26 +32530,31 @@ const NewApplication = () => {
32388
32530
  align-items: center;
32389
32531
  }
32390
32532
 
32391
- .avatar-edit-icon {
32392
- position: absolute;
32393
- bottom: 4px;
32394
- right: 4px;
32395
- background: white;
32396
- width: 36px;
32397
- height: 36px;
32398
- 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;
32399
32543
  display: flex;
32400
- justify-content: center;
32401
32544
  align-items: center;
32402
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
32403
- border: 1px solid #E5E7EB;
32545
+ justify-content: center;
32546
+ gap: 8px;
32547
+ width: 100%;
32404
32548
  cursor: pointer;
32405
- transition: all 0.2s ease;
32549
+ font-weight: 500;
32550
+ min-height: 40px;
32406
32551
  }
32407
-
32408
- .avatar-edit-icon:hover {
32409
- transform: scale(1.1);
32410
- 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;
32411
32558
  }
32412
32559
  `), /*#__PURE__*/React.createElement("div", {
32413
32560
  className: "employee-form-section-wrapper"
@@ -32433,28 +32580,6 @@ const NewApplication = () => {
32433
32580
  sectionRef: sectionRefs.application
32434
32581
  }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32435
32582
  className: "card-label-smaller"
32436
- }, t("WS_ZRO_LOCATION")), /*#__PURE__*/React.createElement("div", {
32437
- className: "field"
32438
- }, /*#__PURE__*/React.createElement(Controller, {
32439
- control: control,
32440
- name: "zro",
32441
- rules: {
32442
- required: t("REQUIRED_FIELD")
32443
- },
32444
- isMandatory: true,
32445
- render: props => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Dropdown, {
32446
- className: "form-field",
32447
- selected: props.value,
32448
- disable: false,
32449
- option: mappedZROLocation,
32450
- errorStyle: !!getFieldError("zro"),
32451
- select: props.onChange,
32452
- optionKey: "i18nKey",
32453
- onBlur: props.onBlur,
32454
- t: t
32455
- }))
32456
- }))), 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, {
32457
- className: "card-label-smaller"
32458
32583
  }, t("WS_SERVICE_TYPE")), /*#__PURE__*/React.createElement("div", {
32459
32584
  className: "field"
32460
32585
  }, /*#__PURE__*/React.createElement(Controller, {
@@ -32475,7 +32600,7 @@ const NewApplication = () => {
32475
32600
  onBlur: props.onBlur,
32476
32601
  t: t
32477
32602
  })
32478
- }))), 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, {
32479
32604
  className: "card-label-smaller"
32480
32605
  }, t("WS_APPLICANT_TYPE")), /*#__PURE__*/React.createElement("div", {
32481
32606
  className: "field"
@@ -32497,7 +32622,7 @@ const NewApplication = () => {
32497
32622
  onBlur: props.onBlur,
32498
32623
  t: t
32499
32624
  })
32500
- }))), 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, {
32501
32626
  className: "card-label-smaller"
32502
32627
  }, t("WS_OWNER_AUTHORIZATION")), /*#__PURE__*/React.createElement("div", {
32503
32628
  className: "field"
@@ -32561,7 +32686,7 @@ const NewApplication = () => {
32561
32686
  fontSize: "14px",
32562
32687
  fontWeight: "600"
32563
32688
  }
32564
- }, 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, {
32565
32690
  className: "card-label-smaller"
32566
32691
  }, t("WS_OTP_VERIFICATION")), /*#__PURE__*/React.createElement("div", {
32567
32692
  className: "field",
@@ -32595,7 +32720,7 @@ const NewApplication = () => {
32595
32720
  setOtpError("Enter 6 digit OTP");
32596
32721
  }
32597
32722
  }
32598
- }, 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, {
32599
32724
  className: "card-label-smaller"
32600
32725
  }, t("WS_CONNECTION_TYPE")), /*#__PURE__*/React.createElement("div", {
32601
32726
  className: "field"
@@ -32617,7 +32742,7 @@ const NewApplication = () => {
32617
32742
  onBlur: props.onBlur,
32618
32743
  t: t
32619
32744
  })
32620
- }))), 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, {
32621
32746
  className: "card-label-smaller"
32622
32747
  }, t("WS_TEMPORARY_CONNECTION")), /*#__PURE__*/React.createElement("div", {
32623
32748
  className: "field"
@@ -32639,7 +32764,7 @@ const NewApplication = () => {
32639
32764
  onBlur: props.onBlur,
32640
32765
  t: t
32641
32766
  })
32642
- }))), 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, {
32643
32768
  className: "card-label-smaller"
32644
32769
  }, t("WS_CATEGORY_TYPE")), /*#__PURE__*/React.createElement("div", {
32645
32770
  className: "field"
@@ -32661,7 +32786,7 @@ const NewApplication = () => {
32661
32786
  onBlur: props.onBlur,
32662
32787
  t: t
32663
32788
  })
32664
- }))), 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, {
32665
32790
  className: "card-label-smaller"
32666
32791
  }, t("WS_WATER_DEMAND_TYPE")), /*#__PURE__*/React.createElement("div", {
32667
32792
  className: "field"
@@ -32683,7 +32808,7 @@ const NewApplication = () => {
32683
32808
  onBlur: props.onBlur,
32684
32809
  t: t
32685
32810
  })
32686
- }))), 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, {
32687
32812
  className: "card-label-smaller"
32688
32813
  }, t("WS_DOMESTIC_TYPE")), /*#__PURE__*/React.createElement("div", {
32689
32814
  className: "field"
@@ -32706,7 +32831,7 @@ const NewApplication = () => {
32706
32831
  }],
32707
32832
  t: t
32708
32833
  })
32709
- }))), 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, {
32710
32835
  className: "card-label-smaller"
32711
32836
  }, t("WS_COMMERCIAL_TYPE")), /*#__PURE__*/React.createElement("div", {
32712
32837
  className: "field"
@@ -32730,62 +32855,82 @@ const NewApplication = () => {
32730
32855
  optionsKey: "name",
32731
32856
  t: t
32732
32857
  })
32733
- }))))), /*#__PURE__*/React.createElement(SectionCard, {
32734
- description: t("WS_GOVT_CONNECTION_DESC"),
32735
- isOpen: collapsedSections.governmentEmployee,
32736
- onToggle: toggleSection,
32737
- sectionKey: "governmentEmployee",
32738
- title: t("WS_GOVERNMENT_CONNECTION"),
32739
- sectionRef: sectionRefs.governmentEmployee
32740
- }, /*#__PURE__*/React.createElement(FieldBlock, {
32741
- 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"
32742
32862
  }, /*#__PURE__*/React.createElement(Controller, {
32743
32863
  control: control,
32744
- name: "governmentEmployee.isGovernmentEmployee",
32745
- render: props => /*#__PURE__*/React.createElement(CheckBox, {
32746
- checked: !!props.value,
32747
- label: t("WS_APPLICANT_IS_GOVT_CONNECTION"),
32748
- 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
32749
32880
  })
32750
- })), 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, {
32751
32894
  className: "card-label-smaller"
32752
- }, t("WS_ORGANIZATION_NAME")), /*#__PURE__*/React.createElement("div", {
32895
+ }, t("WS_ORGANIZATION_DEPARTMENT_NAME")), /*#__PURE__*/React.createElement("div", {
32753
32896
  className: "field"
32754
32897
  }, /*#__PURE__*/React.createElement(TextInput, {
32755
- name: "governmentEmployee.organizationName",
32898
+ name: "applicationSelection.govtOrganization.organizationName",
32756
32899
  inputRef: register({
32757
- 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
32758
32901
  }),
32759
- errorStyle: !!getFieldError("governmentEmployee.organizationName")
32760
- }))), 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, {
32761
32905
  className: "card-label-smaller"
32762
32906
  }, t("WS_NATURE_OF_WORK")), /*#__PURE__*/React.createElement("div", {
32763
32907
  className: "field"
32764
32908
  }, /*#__PURE__*/React.createElement(TextInput, {
32765
- name: "governmentEmployee.natureOfWork",
32909
+ name: "applicationSelection.govtOrganization.natureOfWork",
32766
32910
  inputRef: register({
32767
- 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
32768
32912
  }),
32769
- errorStyle: !!getFieldError("governmentEmployee.natureOfWork")
32770
- }))), 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, {
32771
32916
  className: "card-label-smaller"
32772
- }, t("WS_UPLOAD_DOCUMENT")), /*#__PURE__*/React.createElement("div", {
32917
+ }, t("WS_ORG_DEPT_DOCUMENT")), /*#__PURE__*/React.createElement("div", {
32773
32918
  className: "field"
32774
32919
  }, /*#__PURE__*/React.createElement(Controller, {
32775
32920
  control: control,
32776
- name: "governmentEmployee.organizationDocument",
32921
+ name: "applicationSelection.govtOrganization.organizationDocument",
32777
32922
  rules: {
32778
- required: isGovernmentEmployee ? "Document is required" : false
32923
+ required: (activeType === null || activeType === void 0 ? void 0 : activeType.code) === "ORGANIZATION" ? "Document is required" : false
32779
32924
  },
32780
32925
  render: props => /*#__PURE__*/React.createElement(FileUploadField, {
32781
- error: getFieldError("governmentEmployee.organizationDocument"),
32782
- id: "govt-org-doc",
32783
- isUploading: !!uploadingFields["governmentEmployee.organizationDocument"],
32784
- onDelete: () => clearUploadedFile("governmentEmployee.organizationDocument", props.onChange),
32785
- 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),
32786
32931
  value: props.value
32787
32932
  })
32788
- }))))), /*#__PURE__*/React.createElement("div", {
32933
+ })))))), /*#__PURE__*/React.createElement("div", {
32789
32934
  style: {
32790
32935
  display: previewMode ? "none" : "block"
32791
32936
  }
@@ -32796,25 +32941,7 @@ const NewApplication = () => {
32796
32941
  sectionKey: "applicant",
32797
32942
  title: t(applicantSectionTitle),
32798
32943
  sectionRef: sectionRefs.applicant
32799
- }, /*#__PURE__*/React.createElement(Controller, {
32800
- control: control,
32801
- name: "applicant.UploadPicture",
32802
- rules: {
32803
- validate: value => !!value || "Applicant Picture is required."
32804
- },
32805
- render: props => {
32806
- var _getFieldError11;
32807
- return /*#__PURE__*/React.createElement(ProfileImageUpload, {
32808
- error: (_getFieldError11 = getFieldError("applicant.UploadPicture")) === null || _getFieldError11 === void 0 ? void 0 : _getFieldError11.message,
32809
- isUploading: !!uploadingFields["applicant.UploadPicture"],
32810
- label: "WS_UPLOAD_PICTURE",
32811
- onUpload: event => uploadFile(event, "applicant.UploadPicture", props.onChange),
32812
- required: true,
32813
- t: t,
32814
- value: props.value
32815
- });
32816
- }
32817
- }), /*#__PURE__*/React.createElement(FieldBlock, {
32944
+ }, /*#__PURE__*/React.createElement(FieldBlock, {
32818
32945
  error: getFieldError("applicant.firstName"),
32819
32946
  label: t("WS_FIRST_NAME"),
32820
32947
  required: true
@@ -32997,7 +33124,29 @@ const NewApplication = () => {
32997
33124
  sectionKey: "propertyAddress",
32998
33125
  title: t("WS_PROPERTY_ADDRESS"),
32999
33126
  sectionRef: sectionRefs.propertyAddress
33000
- }, /*#__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, {
33001
33150
  error: getFieldError("propertyAddress.pinCode"),
33002
33151
  label: t("WS_PIN_CODE"),
33003
33152
  required: true
@@ -33094,6 +33243,13 @@ const NewApplication = () => {
33094
33243
  errorStyle: !!getFieldError("propertyAddress.houseNo"),
33095
33244
  inputRef: register(),
33096
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"
33097
33253
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33098
33254
  error: getFieldError("propertyAddress.block"),
33099
33255
  label: t("WS_BLOCK")
@@ -33115,6 +33271,20 @@ const NewApplication = () => {
33115
33271
  errorStyle: !!getFieldError("propertyAddress.landmark"),
33116
33272
  inputRef: register(),
33117
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"
33118
33288
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33119
33289
  error: getFieldError("propertyAddress.address"),
33120
33290
  isFullWidth: true,
@@ -33136,6 +33306,23 @@ const NewApplication = () => {
33136
33306
  title: t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS"),
33137
33307
  sectionRef: sectionRefs.useDetails
33138
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, {
33139
33326
  error: getFieldError("useDetails.propertyType"),
33140
33327
  label: t("WS_PROPERTY_TYPE"),
33141
33328
  required: true
@@ -33146,7 +33333,41 @@ const NewApplication = () => {
33146
33333
  required: "Property Type is required."
33147
33334
  },
33148
33335
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
33149
- 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,
33150
33371
  optionKey: "name",
33151
33372
  selected: props.value,
33152
33373
  select: props.onChange,
@@ -33181,25 +33402,42 @@ const NewApplication = () => {
33181
33402
  }),
33182
33403
  name: "useDetails.builtUpArea"
33183
33404
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33184
- error: getFieldError("useDetails.noOfFloors"),
33185
- 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"),
33186
33424
  required: true
33187
33425
  }, /*#__PURE__*/React.createElement(TextInput, {
33188
- errorStyle: !!getFieldError("useDetails.noOfFloors"),
33426
+ errorStyle: !!getFieldError("useDetails.NumberofDwellingUnits"),
33189
33427
  inputRef: register({
33190
33428
  pattern: {
33191
- value: NUMBER_PATTERN,
33192
- message: "Enter a valid whole number."
33429
+ value: DECIMAL_PATTERN,
33430
+ message: "Enter a valid numeric value."
33193
33431
  },
33194
- required: "No. of Floors is required."
33432
+ required: "Built Up Area is required."
33195
33433
  }),
33196
- name: "useDetails.noOfFloors"
33434
+ name: "useDetails.NumberofDwellingUnits"
33197
33435
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33198
- error: getFieldError("useDetails.NumberofDwellingUnits"),
33199
- label: t("WS_NUMBER_OF_DWELLING_UNITS"),
33436
+ error: getFieldError("useDetails.NumberofRooms"),
33437
+ label: t("WS_NUMBER_OF_ROOMS"),
33200
33438
  required: true
33201
33439
  }, /*#__PURE__*/React.createElement(TextInput, {
33202
- errorStyle: !!getFieldError("useDetails.NumberofDwellingUnits"),
33440
+ errorStyle: !!getFieldError("useDetails.NumberofRooms"),
33203
33441
  inputRef: register({
33204
33442
  pattern: {
33205
33443
  value: DECIMAL_PATTERN,
@@ -33207,7 +33445,7 @@ const NewApplication = () => {
33207
33445
  },
33208
33446
  required: "Built Up Area is required."
33209
33447
  }),
33210
- name: "useDetails.NumberofDwellingUnits"
33448
+ name: "useDetails.NumberofRooms"
33211
33449
  })), isHospitalProperty ? /*#__PURE__*/React.createElement(FieldBlock, {
33212
33450
  error: getFieldError("useDetails.hospitalBeds"),
33213
33451
  label: t("WS_NUMBER_OF_BEDS"),
@@ -33222,41 +33460,7 @@ const NewApplication = () => {
33222
33460
  required: isHospitalProperty ? "No. of Beds is required for Hospital / Nursing Home." : false
33223
33461
  }),
33224
33462
  name: "useDetails.hospitalBeds"
33225
- })) : null, /*#__PURE__*/React.createElement(FieldBlock, {
33226
- error: getFieldError("useDetails.SelectYearofConstruction"),
33227
- label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
33228
- required: true
33229
- }, /*#__PURE__*/React.createElement(Controller, {
33230
- control: control,
33231
- name: "useDetails.SelectYearofConstruction",
33232
- rules: {
33233
- required: "Select Year of Construction is required."
33234
- },
33235
- render: props => /*#__PURE__*/React.createElement(Dropdown, {
33236
- option: yearOptions,
33237
- optionKey: "value",
33238
- selected: props.value,
33239
- select: props.onChange,
33240
- t: t
33241
- })
33242
- })), /*#__PURE__*/React.createElement(FieldBlock, {
33243
- error: getFieldError("useDetails.WaterConnectionUsageType"),
33244
- label: t("WS_WATER_CONNECTION_USAGE_TYPE"),
33245
- required: true
33246
- }, /*#__PURE__*/React.createElement(Controller, {
33247
- control: control,
33248
- name: "useDetails.WaterConnectionUsageType",
33249
- rules: {
33250
- required: "Water Connection Usage Type is required."
33251
- },
33252
- render: props => /*#__PURE__*/React.createElement(Dropdown, {
33253
- option: WATER_CONNECTION_USED_BY_OPTIONS,
33254
- optionKey: "name",
33255
- selected: props.value,
33256
- select: props.onChange,
33257
- t: t
33258
- })
33259
- }))), /*#__PURE__*/React.createElement(SectionCard, {
33463
+ })) : null), /*#__PURE__*/React.createElement(SectionCard, {
33260
33464
  description: "Refund or payment-linked bank account details.",
33261
33465
  isOpen: collapsedSections.bank,
33262
33466
  onToggle: toggleSection,
@@ -33321,9 +33525,90 @@ const NewApplication = () => {
33321
33525
  sectionKey: "documents",
33322
33526
  title: "Documents to be Attached",
33323
33527
  sectionRef: sectionRefs.documents
33324
- }, /*#__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, {
33325
33610
  error: getFieldError("documents.proofOfIdentity"),
33326
- label: "Proof of Identity",
33611
+ label: "Proof of Identity *",
33327
33612
  required: true
33328
33613
  }, /*#__PURE__*/React.createElement(Controller, {
33329
33614
  control: control,
@@ -33339,13 +33624,12 @@ const NewApplication = () => {
33339
33624
  t: t
33340
33625
  })
33341
33626
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33342
- error: getFieldError("propertyAddress.proofOfIdentity"),
33343
- label: "Proof of Identity Document",
33344
- required: true
33627
+ error: getFieldError("documents.identityProofNumber"),
33628
+ label: "Proof of Identity Document"
33345
33629
  }, /*#__PURE__*/React.createElement(TextInput, {
33346
- errorStyle: !!getFieldError("propertyAddress.proofOfIdentity"),
33630
+ name: "documents.identityProofNumber",
33347
33631
  inputRef: register(),
33348
- name: "propertyAddress.proofOfIdentity"
33632
+ placeholder: "Identity No."
33349
33633
  })), /*#__PURE__*/React.createElement(Controller, {
33350
33634
  control: control,
33351
33635
  name: "documents.identityProofFile",
@@ -33354,42 +33638,48 @@ const NewApplication = () => {
33354
33638
  },
33355
33639
  render: props => /*#__PURE__*/React.createElement(FileUploadField, {
33356
33640
  error: getFieldError("documents.identityProofFile"),
33357
- helperText: "Max size 5 MB. Allowed types: PDF, PNG, JPG, JPEG.",
33358
33641
  id: "identity-proof-file",
33359
33642
  isUploading: !!uploadingFields["documents.identityProofFile"],
33360
- label: "Upload Identity Proof",
33643
+ label: "Proof of Identity Upload Document *",
33361
33644
  onDelete: () => clearUploadedFile("documents.identityProofFile", props.onChange),
33362
33645
  onUpload: event => uploadFile(event, "documents.identityProofFile", props.onChange),
33363
33646
  required: true,
33364
33647
  value: props.value
33365
33648
  })
33366
33649
  }), /*#__PURE__*/React.createElement(FieldBlock, {
33367
- error: getFieldError("propertyAddress.otherDocument")
33368
- }), /*#__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, {
33369
33660
  error: getFieldError("documents.ownershipStatus"),
33370
- label: "Ownership Proof",
33661
+ label: "Proof of Ownership *",
33371
33662
  required: true
33372
33663
  }, /*#__PURE__*/React.createElement(Controller, {
33373
33664
  control: control,
33374
33665
  name: "documents.ownershipStatus",
33375
33666
  rules: {
33376
- required: "Ownership Status is required."
33667
+ required: "Ownership Proof is required."
33377
33668
  },
33378
33669
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
33379
- option: OWNERSHIP_STATUS_OPTIONS,
33670
+ option: OWNERSHIP_DOCUMENTS_OPTIONS,
33380
33671
  optionKey: "name",
33381
33672
  selected: props.value,
33382
33673
  select: props.onChange,
33383
33674
  t: t
33384
33675
  })
33385
33676
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33386
- error: getFieldError("propertyAddress.ownershipStatus"),
33387
- label: "Proof of Identity Ownership Document",
33388
- required: true
33677
+ error: getFieldError("documents.ownershipDocumentNumber"),
33678
+ label: "Proof of Ownership Document"
33389
33679
  }, /*#__PURE__*/React.createElement(TextInput, {
33390
- errorStyle: !!getFieldError("propertyAddress.ownershipStatus"),
33680
+ name: "documents.ownershipDocumentNumber",
33391
33681
  inputRef: register(),
33392
- name: "propertyAddress.ownershipStatus"
33682
+ placeholder: "Ownership No."
33393
33683
  })), /*#__PURE__*/React.createElement(Controller, {
33394
33684
  control: control,
33395
33685
  name: "documents.ownershipDocumentFile",
@@ -33398,56 +33688,71 @@ const NewApplication = () => {
33398
33688
  },
33399
33689
  render: props => /*#__PURE__*/React.createElement(FileUploadField, {
33400
33690
  error: getFieldError("documents.ownershipDocumentFile"),
33401
- helperText: "Max size 5 MB. Allowed types: PDF, PNG, JPG, JPEG.",
33402
33691
  id: "ownership-document-file",
33403
33692
  isUploading: !!uploadingFields["documents.ownershipDocumentFile"],
33404
- label: "Upload Ownership Document",
33693
+ label: "Proof of Ownership Upload Document *",
33405
33694
  onDelete: () => clearUploadedFile("documents.ownershipDocumentFile", props.onChange),
33406
33695
  onUpload: event => uploadFile(event, "documents.ownershipDocumentFile", props.onChange),
33407
33696
  required: true,
33408
33697
  value: props.value
33409
33698
  })
33410
33699
  }), /*#__PURE__*/React.createElement(FieldBlock, {
33411
- error: getFieldError("propertyAddress.otherDocument")
33412
- }), /*#__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, {
33413
33710
  error: getFieldError("documents.otherDocument"),
33414
- label: "Other Document",
33415
- required: true
33711
+ label: "Other"
33416
33712
  }, /*#__PURE__*/React.createElement(Controller, {
33417
33713
  control: control,
33418
33714
  name: "documents.otherDocument",
33419
- rules: {
33420
- required: "Other Document is required."
33421
- },
33422
33715
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
33423
- option: OWNERSHIP_STATUS_OPTIONS,
33716
+ option: OTHER_DOCUMENTS_OPTIONS,
33424
33717
  optionKey: "name",
33425
33718
  selected: props.value,
33426
33719
  select: props.onChange,
33427
33720
  t: t
33428
33721
  })
33429
33722
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33430
- error: getFieldError("propertyAddress.otherDocument"),
33431
- label: "Other Document",
33432
- required: true
33723
+ error: getFieldError("documents.otherDocumentNumber"),
33724
+ label: "Other Document"
33433
33725
  }, /*#__PURE__*/React.createElement(TextInput, {
33434
- errorStyle: !!getFieldError("propertyAddress.otherDocument"),
33726
+ name: "documents.otherDocumentNumber",
33435
33727
  inputRef: register(),
33436
- name: "propertyAddress.otherDocument"
33728
+ placeholder: "Other Document No."
33437
33729
  })), /*#__PURE__*/React.createElement(Controller, {
33438
33730
  control: control,
33439
33731
  name: "documents.otherDocumentFile",
33732
+ rules: {
33733
+ validate: value => !!value || "Other Upload Document is required."
33734
+ },
33440
33735
  render: props => /*#__PURE__*/React.createElement(FileUploadField, {
33441
33736
  error: getFieldError("documents.otherDocumentFile"),
33442
- helperText: "Optional. Max size 5 MB. Allowed types: PDF, PNG, JPG, JPEG.",
33443
33737
  id: "other-document-file",
33444
33738
  isUploading: !!uploadingFields["documents.otherDocumentFile"],
33445
- label: "Other Document",
33739
+ label: "Other Upload Document *",
33446
33740
  onDelete: () => clearUploadedFile("documents.otherDocumentFile", props.onChange),
33447
33741
  onUpload: event => uploadFile(event, "documents.otherDocumentFile", props.onChange),
33742
+ required: true,
33448
33743
  value: props.value
33449
33744
  })
33450
- })), /*#__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, {
33451
33756
  description: "Declaration and undertaking to be signed by the applicant.",
33452
33757
  isOpen: collapsedSections.declaration,
33453
33758
  onToggle: toggleSection,
@@ -33537,16 +33842,19 @@ const NewApplication = () => {
33537
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, {
33538
33843
  label: "Commercial Type",
33539
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
33540
33848
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33541
33849
  label: "Organization Name",
33542
- 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
33543
33851
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33544
33852
  label: "Nature of Work",
33545
- 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
33546
33854
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33547
33855
  label: "Organization Document",
33548
- 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
33549
- }))), /*#__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, {
33550
33858
  description: "Applicant identity and organization information.",
33551
33859
  isOpen: collapsedSections.applicant,
33552
33860
  onToggle: toggleSection,
@@ -33750,20 +34058,35 @@ const NewApplication = () => {
33750
34058
  title: "Documents to be Attached",
33751
34059
  onEditClick: () => handleSectionEdit("documents")
33752
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, {
33753
34064
  label: "Proof of Identity",
33754
- 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
33755
34069
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33756
34070
  label: "Upload Identity Proof",
33757
- 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
33758
34072
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33759
34073
  label: "Ownership Status",
33760
- 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
33761
34078
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33762
34079
  label: "Upload Ownership Document",
33763
- 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
33764
34081
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33765
- label: "Other Document",
33766
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents6 = formValues.documents) === null || _formValues$documents6 === void 0 ? void 0 : _formValues$documents6.otherDocumentFile
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
34087
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
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
33767
34090
  })), /*#__PURE__*/React.createElement(SectionCard, {
33768
34091
  description: "Applicant declaration details.",
33769
34092
  isOpen: collapsedSections.declaration,
@@ -33804,7 +34127,11 @@ const NewApplication = () => {
33804
34127
  label: showToast === null || showToast === void 0 ? void 0 : showToast.message,
33805
34128
  onClose: closeToast,
33806
34129
  warning: showToast === null || showToast === void 0 ? void 0 : showToast.warning
33807
- }) : null);
34130
+ }) : null, showCamera && /*#__PURE__*/React.createElement(CameraCaptureModal, {
34131
+ onCapture: handleCapture,
34132
+ onClose: () => setShowCamera(false),
34133
+ t: t
34134
+ }));
33808
34135
  };
33809
34136
 
33810
34137
  const configPTApproverApplication = ({
@@ -36811,7 +37138,11 @@ const ActionModal$b = ({
36811
37138
  applicationData.vehicleId = selectVehicle === null || selectVehicle === void 0 ? void 0 : selectVehicle.vehicleId;
36812
37139
  applicationData.driverId = selectVehicle === null || selectVehicle === void 0 ? void 0 : selectVehicle.driverId;
36813
37140
  }
36814
- 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" ? {
36815
37146
  waterTankerBookingDetail: {
36816
37147
  ...applicationData,
36817
37148
  workflow
@@ -39870,7 +40201,7 @@ function ApplicationDetailsContent({
39870
40201
  fontSize: "24px"
39871
40202
  } : {
39872
40203
  marginBottom: "16px",
39873
- marginTop: "32px",
40204
+ marginTop: "16px",
39874
40205
  fontSize: "24px"
39875
40206
  }
39876
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", {