@djb25/digit-ui-module-fsm 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +104 -220
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddNewIcon, ShippingTruck, EmployeeModuleCard, TickMark, FormStep as FormStep$1, RadioOrSelect, LabelFieldPair, CardLabel as CardLabel$1, Dropdown as Dropdown$
|
|
1
|
+
import { AddNewIcon, ShippingTruck, EmployeeModuleCard, TickMark, FormStep as FormStep$1, RadioOrSelect, LabelFieldPair, CardLabel as CardLabel$1, Dropdown as Dropdown$1, TextInput as TextInput$1, RadioButtons, Loader, LocationSearchCard, TextArea as TextArea$1, CardLabelError as CardLabelError$1, CitizenInfoLabel, CardText as CardText$1, WrapUnMaskComponent, PitDimension, ImageUploadHandler, KeyNote, BackButton, PrivateRoute, LayoutWrapper, TelePhone, CardSectionHeader, CheckPoint, ConnectingCheckPoints, LinkButton as LinkButton$1, ActionLinks, Rating, SubmitBar as SubmitBar$1, Header, Card, CardHeader as CardHeader$1, CardSubHeader, StatusTable, Row, Banner, RatingCard, ULBHomeCard, ViewReportIcon, InboxIcon, Table, CheckBox, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, Label, LinkLabel, DatePicker as DatePicker$2, DetailsCard, SearchAction, FilterAction, PopUp, BreadCrumb, ModuleHeader, ArrowLeft, HomeIcon, Modal, FormComposer, UploadPitPhoto, ImageViewer, BreakLine, Toast, Menu, MultiUploadWrapper, AddIcon, ToggleSwitch, InfoIcon, EditIcon, DeleteIcon, VerticalTimeline, CustomTooltip, MobileNumber, CitizenHomeCard, CitizenTruck } from '@djb25/digit-ui-react-components';
|
|
2
2
|
import React, { useState, useEffect, Fragment as Fragment$1, forwardRef, useCallback, useMemo, useRef } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useLocation, useParams, Switch, Redirect, Link, useHistory, useRouteMatch, Route } from 'react-router-dom';
|
|
@@ -409,7 +409,7 @@ const FSMSelectAddress = ({
|
|
|
409
409
|
var _formData$address7, _formData$address7$lo;
|
|
410
410
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
411
411
|
className: "card-label-smaller"
|
|
412
|
-
}, t("MYCITY_CODE_LABEL"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$
|
|
412
|
+
}, t("MYCITY_CODE_LABEL"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
413
413
|
className: "form-field",
|
|
414
414
|
isMandatory: true,
|
|
415
415
|
selected: (cities === null || cities === void 0 ? void 0 : cities.length) === 1 ? cities[0] : selectedCity,
|
|
@@ -420,7 +420,7 @@ const FSMSelectAddress = ({
|
|
|
420
420
|
t: t
|
|
421
421
|
})), !isUrcEnable || isNewVendor || isEditVendor ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
422
422
|
className: "card-label-smaller"
|
|
423
|
-
}, t("ES_NEW_APPLICATION_LOCATION_MOHALLA"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$
|
|
423
|
+
}, t("ES_NEW_APPLICATION_LOCATION_MOHALLA"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
424
424
|
className: "form-field",
|
|
425
425
|
isMandatory: true,
|
|
426
426
|
selected: selectedLocality,
|
|
@@ -497,7 +497,7 @@ const SelectChannel = ({
|
|
|
497
497
|
setChannel(value);
|
|
498
498
|
onSelect(config.key, value);
|
|
499
499
|
}
|
|
500
|
-
return channelMenu ? /*#__PURE__*/React.createElement(Dropdown$
|
|
500
|
+
return channelMenu ? /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
501
501
|
option: channelMenu,
|
|
502
502
|
optionKey: "i18nKey",
|
|
503
503
|
id: "channel",
|
|
@@ -549,7 +549,7 @@ const SelectGender = ({
|
|
|
549
549
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
550
550
|
}
|
|
551
551
|
if (userType === "employee") {
|
|
552
|
-
return /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, null, t(config.label)), /*#__PURE__*/React.createElement(Dropdown$
|
|
552
|
+
return /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, null, t(config.label)), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
553
553
|
className: "payment-form-text-input-correction",
|
|
554
554
|
isMandatory: config.isMandatory,
|
|
555
555
|
selected: genderType,
|
|
@@ -887,7 +887,7 @@ const SelectName = ({
|
|
|
887
887
|
className: "card-label-smaller"
|
|
888
888
|
}, t(input.label), input.isMandatory ? " * " : null), /*#__PURE__*/React.createElement("div", {
|
|
889
889
|
className: "field"
|
|
890
|
-
}, /*#__PURE__*/React.createElement(Dropdown$
|
|
890
|
+
}, /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
891
891
|
option: (_input$options = input.options) === null || _input$options === void 0 ? void 0 : _input$options.sort((a, b) => a.code.localeCompare(b.code)),
|
|
892
892
|
optionKey: "i18nKey",
|
|
893
893
|
id: "dropdown",
|
|
@@ -1080,7 +1080,7 @@ const SelectPitType = ({
|
|
|
1080
1080
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
1081
1081
|
}
|
|
1082
1082
|
if (userType === "employee") {
|
|
1083
|
-
return /*#__PURE__*/React.createElement(Dropdown$
|
|
1083
|
+
return /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
1084
1084
|
isMandatory: true,
|
|
1085
1085
|
option: sanitationMenu === null || sanitationMenu === void 0 ? void 0 : sanitationMenu.sort((a, b) => a.name.localeCompare(b.name)),
|
|
1086
1086
|
optionKey: "i18nKey",
|
|
@@ -2046,17 +2046,10 @@ const CardLabelError = props => {
|
|
|
2046
2046
|
const TextInput = props => {
|
|
2047
2047
|
var _props$validation, _props$validation2, _props$validation3, _props$validation4, _props$validation5, _props$validation6, _props$validation7;
|
|
2048
2048
|
const user_type = Digit.SessionStorage.get("userType");
|
|
2049
|
-
const [date, setDate] = useState();
|
|
2050
2049
|
const data = props !== null && props !== void 0 && props.watch ? {
|
|
2051
2050
|
fromDate: props === null || props === void 0 ? void 0 : props.watch("fromDate"),
|
|
2052
2051
|
toDate: props === null || props === void 0 ? void 0 : props.watch("toDate")
|
|
2053
2052
|
} : {};
|
|
2054
|
-
const handleDate = event => {
|
|
2055
|
-
const {
|
|
2056
|
-
value
|
|
2057
|
-
} = event.target;
|
|
2058
|
-
setDate(getDDMMYYYY(value));
|
|
2059
|
-
};
|
|
2060
2053
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2061
2054
|
className: `text-input ${user_type === "employee" ? "" : "text-input-width"} ${props.className}`,
|
|
2062
2055
|
style: props !== null && props !== void 0 && props.textInputStyle ? {
|
|
@@ -2072,9 +2065,6 @@ const TextInput = props => {
|
|
|
2072
2065
|
if (props !== null && props !== void 0 && props.onChange) {
|
|
2073
2066
|
props === null || props === void 0 ? void 0 : props.onChange(event);
|
|
2074
2067
|
}
|
|
2075
|
-
if (props.type === "date") {
|
|
2076
|
-
handleDate(event);
|
|
2077
|
-
}
|
|
2078
2068
|
},
|
|
2079
2069
|
ref: props.inputRef,
|
|
2080
2070
|
value: props.value !== undefined ? props.value : undefined,
|
|
@@ -2104,9 +2094,6 @@ const TextInput = props => {
|
|
|
2104
2094
|
if (props !== null && props !== void 0 && props.onChange) {
|
|
2105
2095
|
props === null || props === void 0 ? void 0 : props.onChange(event);
|
|
2106
2096
|
}
|
|
2107
|
-
if (props.type === "date") {
|
|
2108
|
-
handleDate(event);
|
|
2109
|
-
}
|
|
2110
2097
|
},
|
|
2111
2098
|
ref: props.inputRef,
|
|
2112
2099
|
value: props.value !== undefined ? props.value : undefined,
|
|
@@ -2142,10 +2129,6 @@ TextInput.propTypes = {
|
|
|
2142
2129
|
TextInput.defaultProps = {
|
|
2143
2130
|
isMandatory: false
|
|
2144
2131
|
};
|
|
2145
|
-
function getDDMMYYYY(date) {
|
|
2146
|
-
if (!date) return "";
|
|
2147
|
-
return new Date(date).toLocaleString("en-In").split(",")[0];
|
|
2148
|
-
}
|
|
2149
2132
|
|
|
2150
2133
|
const CardHeader = props => {
|
|
2151
2134
|
return /*#__PURE__*/React.createElement("header", {
|
|
@@ -2351,7 +2334,6 @@ const FormStep = ({
|
|
|
2351
2334
|
var _config$inputs, _config$texts;
|
|
2352
2335
|
const {
|
|
2353
2336
|
register,
|
|
2354
|
-
watch,
|
|
2355
2337
|
errors,
|
|
2356
2338
|
handleSubmit
|
|
2357
2339
|
} = useForm({
|
|
@@ -8488,7 +8470,7 @@ const SelectPropertySubtype = ({
|
|
|
8488
8470
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
8489
8471
|
}
|
|
8490
8472
|
if (userType === "employee") {
|
|
8491
|
-
return /*#__PURE__*/React.createElement(Dropdown$
|
|
8473
|
+
return /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
8492
8474
|
option: subtypeOptions === null || subtypeOptions === void 0 ? void 0 : subtypeOptions.sort((a, b) => a.name.localeCompare(b.name)),
|
|
8493
8475
|
optionKey: "i18nKey",
|
|
8494
8476
|
id: "propertySubType",
|
|
@@ -8594,7 +8576,7 @@ const SelectPropertyType = ({
|
|
|
8594
8576
|
}
|
|
8595
8577
|
if (userType === "employee") {
|
|
8596
8578
|
var _propertyTypesData$da;
|
|
8597
|
-
return /*#__PURE__*/React.createElement(Dropdown$
|
|
8579
|
+
return /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
8598
8580
|
option: (_propertyTypesData$da = propertyTypesData.data) === null || _propertyTypesData$da === void 0 ? void 0 : _propertyTypesData$da.sort((a, b) => a.name.localeCompare(b.name)),
|
|
8599
8581
|
optionKey: "i18nKey",
|
|
8600
8582
|
id: "propertyType",
|
|
@@ -8913,7 +8895,7 @@ const SelectSlumName = ({
|
|
|
8913
8895
|
if (slumDataLoading) return /*#__PURE__*/React.createElement(Loader, null);
|
|
8914
8896
|
return userType === "employee" ? (formData === null || formData === void 0 ? void 0 : (_formData$address0 = formData.address) === null || _formData$address0 === void 0 ? void 0 : _formData$address0.propertyLocation) !== "FROM_GRAM_PANCHAYAT" && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
8915
8897
|
className: "card-label-smaller"
|
|
8916
|
-
}, t("ES_NEW_APPLICATION_SLUM_NAME")), /*#__PURE__*/React.createElement(Dropdown$
|
|
8898
|
+
}, t("ES_NEW_APPLICATION_SLUM_NAME")), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
8917
8899
|
t: t,
|
|
8918
8900
|
option: slumMenu,
|
|
8919
8901
|
className: "form-field",
|
|
@@ -8929,7 +8911,7 @@ const SelectSlumName = ({
|
|
|
8929
8911
|
config: config,
|
|
8930
8912
|
onSelect: goNext,
|
|
8931
8913
|
onSkip: onSkip
|
|
8932
|
-
}, /*#__PURE__*/React.createElement(Dropdown$
|
|
8914
|
+
}, /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
8933
8915
|
t: t,
|
|
8934
8916
|
option: slumMenu,
|
|
8935
8917
|
optionKey: "i18nKey",
|
|
@@ -9692,7 +9674,7 @@ const SelectVehicleType = ({
|
|
|
9692
9674
|
type: type
|
|
9693
9675
|
});
|
|
9694
9676
|
};
|
|
9695
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, null, t("ES_FSM_REGISTRY_VEHICLE_MODEL"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$
|
|
9677
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, null, t("ES_FSM_REGISTRY_VEHICLE_MODEL"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
9696
9678
|
className: "form-field",
|
|
9697
9679
|
isMandatory: true,
|
|
9698
9680
|
selected: selectedModal,
|
|
@@ -9701,7 +9683,7 @@ const SelectVehicleType = ({
|
|
|
9701
9683
|
select: selectModal,
|
|
9702
9684
|
optionKey: "name",
|
|
9703
9685
|
t: t
|
|
9704
|
-
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, null, t("ES_FSM_REGISTRY_VEHICLE_TYPE"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$
|
|
9686
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, null, t("ES_FSM_REGISTRY_VEHICLE_TYPE"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
9705
9687
|
className: "form-field",
|
|
9706
9688
|
isMandatory: true,
|
|
9707
9689
|
selected: selectedType,
|
|
@@ -11652,7 +11634,7 @@ const DropdownStatus = ({
|
|
|
11652
11634
|
applicationStatuses,
|
|
11653
11635
|
areApplicationStatus
|
|
11654
11636
|
}) => {
|
|
11655
|
-
return areApplicationStatus ? /*#__PURE__*/React.createElement(Dropdown$
|
|
11637
|
+
return areApplicationStatus ? /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
11656
11638
|
option: applicationStatuses,
|
|
11657
11639
|
optionKey: "name",
|
|
11658
11640
|
selected: value,
|
|
@@ -11734,7 +11716,7 @@ const SearchApplication = ({
|
|
|
11734
11716
|
switch (input.type) {
|
|
11735
11717
|
case "date":
|
|
11736
11718
|
return /*#__PURE__*/React.createElement(Controller, {
|
|
11737
|
-
render: props => /*#__PURE__*/React.createElement(DatePicker$
|
|
11719
|
+
render: props => /*#__PURE__*/React.createElement(DatePicker$2, {
|
|
11738
11720
|
date: props.value,
|
|
11739
11721
|
onChange: props.onChange
|
|
11740
11722
|
}),
|
|
@@ -13147,7 +13129,7 @@ const configAssignDso = ({
|
|
|
13147
13129
|
label: t("ES_FSM_ACTION_DSO_NAME"),
|
|
13148
13130
|
isMandatory: true,
|
|
13149
13131
|
type: "dropdown",
|
|
13150
|
-
populators: /*#__PURE__*/React.createElement(React.Fragment, null, getFilteredDsoData(dsoData, vehicle, vehicleCapacity) && !getFilteredDsoData(dsoData, vehicle, vehicleCapacity).length ? /*#__PURE__*/React.createElement(CardLabelError$1, null, t("ES_COMMON_NO_DSO_AVAILABLE_WITH_SUCH_VEHICLE")) : null, /*#__PURE__*/React.createElement(Dropdown$
|
|
13132
|
+
populators: /*#__PURE__*/React.createElement(React.Fragment, null, getFilteredDsoData(dsoData, vehicle, vehicleCapacity) && !getFilteredDsoData(dsoData, vehicle, vehicleCapacity).length ? /*#__PURE__*/React.createElement(CardLabelError$1, null, t("ES_COMMON_NO_DSO_AVAILABLE_WITH_SUCH_VEHICLE")) : null, /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
13151
13133
|
option: getFilteredDsoData(dsoData, vehicle, vehicleCapacity),
|
|
13152
13134
|
autoComplete: "off",
|
|
13153
13135
|
optionKey: "displayName",
|
|
@@ -13181,7 +13163,7 @@ const configAssignDso = ({
|
|
|
13181
13163
|
max: Digit.Utils.date.getDate(Date.now() + 10 * 24 * 60 * 60 * 1000)
|
|
13182
13164
|
},
|
|
13183
13165
|
defaultValue: Digit.Utils.date.getDate(),
|
|
13184
|
-
component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$
|
|
13166
|
+
component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$2, Object.assign({
|
|
13185
13167
|
onChange: props.onChange,
|
|
13186
13168
|
date: props.value
|
|
13187
13169
|
}, customProps))
|
|
@@ -13219,7 +13201,7 @@ const configCompleteApplication = ({
|
|
|
13219
13201
|
min: Digit.Utils.date.getDate(_applicationCreatedTime),
|
|
13220
13202
|
max: Digit.Utils.date.getDate()
|
|
13221
13203
|
},
|
|
13222
|
-
component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$
|
|
13204
|
+
component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$2, Object.assign({
|
|
13223
13205
|
disabled: true,
|
|
13224
13206
|
onChange: props.onChange,
|
|
13225
13207
|
date: props.value
|
|
@@ -13433,7 +13415,7 @@ const configReassignDSO = ({
|
|
|
13433
13415
|
label: t("ES_FSM_ACTION_REASSIGN_REASON"),
|
|
13434
13416
|
type: "dropdown",
|
|
13435
13417
|
isMandatory: true,
|
|
13436
|
-
populators: /*#__PURE__*/React.createElement(Dropdown$
|
|
13418
|
+
populators: /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
13437
13419
|
option: reassignReasonMenu,
|
|
13438
13420
|
optionKey: "i18nKey",
|
|
13439
13421
|
id: "reassign-reason",
|
|
@@ -13445,7 +13427,7 @@ const configReassignDSO = ({
|
|
|
13445
13427
|
label: t("ES_FSM_ACTION_DSO_NAME"),
|
|
13446
13428
|
isMandatory: true,
|
|
13447
13429
|
type: "dropdown",
|
|
13448
|
-
populators: /*#__PURE__*/React.createElement(React.Fragment, null, getFilteredDsoData$1(dsoData, vehicle, vehicleCapacity) && !getFilteredDsoData$1(dsoData, vehicle, vehicleCapacity).length ? /*#__PURE__*/React.createElement(CardLabelError$1, null, t("ES_COMMON_NO_DSO_AVAILABLE_WITH_SUCH_VEHICLE")) : null, /*#__PURE__*/React.createElement(Dropdown$
|
|
13430
|
+
populators: /*#__PURE__*/React.createElement(React.Fragment, null, getFilteredDsoData$1(dsoData, vehicle, vehicleCapacity) && !getFilteredDsoData$1(dsoData, vehicle, vehicleCapacity).length ? /*#__PURE__*/React.createElement(CardLabelError$1, null, t("ES_COMMON_NO_DSO_AVAILABLE_WITH_SUCH_VEHICLE")) : null, /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
13449
13431
|
option: getFilteredDsoData$1(dsoData, vehicle, vehicleCapacity),
|
|
13450
13432
|
autoComplete: "off",
|
|
13451
13433
|
optionKey: "displayName",
|
|
@@ -13476,7 +13458,7 @@ const configReassignDSO = ({
|
|
|
13476
13458
|
min: Digit.Utils.date.getDate()
|
|
13477
13459
|
},
|
|
13478
13460
|
defaultValue: Digit.Utils.date.getDate(),
|
|
13479
|
-
component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$
|
|
13461
|
+
component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$2, Object.assign({
|
|
13480
13462
|
onChange: props.onChange,
|
|
13481
13463
|
date: props.value
|
|
13482
13464
|
}, customProps))
|
|
@@ -13502,7 +13484,7 @@ const configRejectApplication = ({
|
|
|
13502
13484
|
body: [{
|
|
13503
13485
|
label: t(`ES_FSM_ACTION_${action.toUpperCase()}_REASON`),
|
|
13504
13486
|
type: "dropdown",
|
|
13505
|
-
populators: /*#__PURE__*/React.createElement(Dropdown$
|
|
13487
|
+
populators: /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
13506
13488
|
t: t,
|
|
13507
13489
|
option: rejectMenu === null || rejectMenu === void 0 ? void 0 : rejectMenu.sort((a, b) => a.name.localeCompare(b.name)),
|
|
13508
13490
|
id: "reason",
|
|
@@ -13544,7 +13526,7 @@ const configAcceptDso = ({
|
|
|
13544
13526
|
label: t("ES_FSM_ACTION_VEHICLE_REGISTRATION_NO"),
|
|
13545
13527
|
isMandatory: true,
|
|
13546
13528
|
type: "dropdown",
|
|
13547
|
-
populators: /*#__PURE__*/React.createElement(React.Fragment, null, !(vehicleNoList !== null && vehicleNoList !== void 0 && vehicleNoList.length) ? /*#__PURE__*/React.createElement(CardLabelError$1, null, t("ES_FSM_NO_VEHICLE_AVAILABLE")) : null, /*#__PURE__*/React.createElement(Dropdown$
|
|
13529
|
+
populators: /*#__PURE__*/React.createElement(React.Fragment, null, !(vehicleNoList !== null && vehicleNoList !== void 0 && vehicleNoList.length) ? /*#__PURE__*/React.createElement(CardLabelError$1, null, t("ES_FSM_NO_VEHICLE_AVAILABLE")) : null, /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
13548
13530
|
option: vehicleNoList,
|
|
13549
13531
|
autoComplete: "off",
|
|
13550
13532
|
optionKey: "registrationNumber",
|
|
@@ -13599,7 +13581,7 @@ const configRejectFstpo = ({
|
|
|
13599
13581
|
label: t("ES_FSM_ACTION_DECLINE_REASON"),
|
|
13600
13582
|
isMandatory: true,
|
|
13601
13583
|
type: "dropdown",
|
|
13602
|
-
populators: /*#__PURE__*/React.createElement(Dropdown$
|
|
13584
|
+
populators: /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
13603
13585
|
option: rejectMenu === null || rejectMenu === void 0 ? void 0 : rejectMenu.sort((a, b) => a.name.localeCompare(b.name)),
|
|
13604
13586
|
autoComplete: "off",
|
|
13605
13587
|
optionKey: "i18nKey",
|
|
@@ -16005,7 +15987,7 @@ const FstpOperatorDetails = () => {
|
|
|
16005
15987
|
} : {},
|
|
16006
15988
|
key: t("CS_GRAM_PANCHAYAT"),
|
|
16007
15989
|
label: `${t("CS_GRAM_PANCHAYAT")} * `,
|
|
16008
|
-
text: tripDetails && tripDetails.length > 0 ? (_tripDetails$5 = tripDetails[0]) === null || _tripDetails$5 === void 0 ? void 0 : (_tripDetails$5$addres = _tripDetails$5.address) === null || _tripDetails$5$addres === void 0 ? void 0 : (_tripDetails$5$addres2 = _tripDetails$5$addres.additionalDetails) === null || _tripDetails$5$addres2 === void 0 ? void 0 : (_tripDetails$5$addres3 = _tripDetails$5$addres2.gramPanchayat) === null || _tripDetails$5$addres3 === void 0 ? void 0 : _tripDetails$5$addres3.name : /*#__PURE__*/React.createElement(Dropdown$
|
|
15990
|
+
text: tripDetails && tripDetails.length > 0 ? (_tripDetails$5 = tripDetails[0]) === null || _tripDetails$5 === void 0 ? void 0 : (_tripDetails$5$addres = _tripDetails$5.address) === null || _tripDetails$5$addres === void 0 ? void 0 : (_tripDetails$5$addres2 = _tripDetails$5$addres.additionalDetails) === null || _tripDetails$5$addres2 === void 0 ? void 0 : (_tripDetails$5$addres3 = _tripDetails$5$addres2.gramPanchayat) === null || _tripDetails$5$addres3 === void 0 ? void 0 : _tripDetails$5$addres3.name : /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
16009
15991
|
className: "form-field",
|
|
16010
15992
|
isMandatory: true,
|
|
16011
15993
|
selected: selectedGp,
|
|
@@ -16070,7 +16052,7 @@ const FstpOperatorDetails = () => {
|
|
|
16070
16052
|
} : {},
|
|
16071
16053
|
key: t("CS_VILLAGE_NAME"),
|
|
16072
16054
|
label: `${t("CS_VILLAGE_NAME")}`,
|
|
16073
|
-
text: tripDetails && tripDetails.length > 0 ? (_tripDetails$8 = tripDetails[0]) !== null && _tripDetails$8 !== void 0 && (_tripDetails$8$addres = _tripDetails$8.address) !== null && _tripDetails$8$addres !== void 0 && (_tripDetails$8$addres2 = _tripDetails$8$addres.additionalDetails) !== null && _tripDetails$8$addres2 !== void 0 && (_tripDetails$8$addres3 = _tripDetails$8$addres2.village) !== null && _tripDetails$8$addres3 !== void 0 && _tripDetails$8$addres3.name ? (_tripDetails$9 = tripDetails[0]) === null || _tripDetails$9 === void 0 ? void 0 : (_tripDetails$9$addres = _tripDetails$9.address) === null || _tripDetails$9$addres === void 0 ? void 0 : (_tripDetails$9$addres2 = _tripDetails$9$addres.additionalDetails) === null || _tripDetails$9$addres2 === void 0 ? void 0 : (_tripDetails$9$addres3 = _tripDetails$9$addres2.village) === null || _tripDetails$9$addres3 === void 0 ? void 0 : _tripDetails$9$addres3.name : "N/A" : villages.length > 0 ? /*#__PURE__*/React.createElement(Dropdown$
|
|
16055
|
+
text: tripDetails && tripDetails.length > 0 ? (_tripDetails$8 = tripDetails[0]) !== null && _tripDetails$8 !== void 0 && (_tripDetails$8$addres = _tripDetails$8.address) !== null && _tripDetails$8$addres !== void 0 && (_tripDetails$8$addres2 = _tripDetails$8$addres.additionalDetails) !== null && _tripDetails$8$addres2 !== void 0 && (_tripDetails$8$addres3 = _tripDetails$8$addres2.village) !== null && _tripDetails$8$addres3 !== void 0 && _tripDetails$8$addres3.name ? (_tripDetails$9 = tripDetails[0]) === null || _tripDetails$9 === void 0 ? void 0 : (_tripDetails$9$addres = _tripDetails$9.address) === null || _tripDetails$9$addres === void 0 ? void 0 : (_tripDetails$9$addres2 = _tripDetails$9$addres.additionalDetails) === null || _tripDetails$9$addres2 === void 0 ? void 0 : (_tripDetails$9$addres3 = _tripDetails$9$addres2.village) === null || _tripDetails$9$addres3 === void 0 ? void 0 : _tripDetails$9$addres3.name : "N/A" : villages.length > 0 ? /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
16074
16056
|
className: "form-field",
|
|
16075
16057
|
isMandatory: true,
|
|
16076
16058
|
selected: selectedVillage,
|
|
@@ -16119,7 +16101,7 @@ const FstpOperatorDetails = () => {
|
|
|
16119
16101
|
} : {},
|
|
16120
16102
|
key: t("ES_INBOX_LOCALITY"),
|
|
16121
16103
|
label: `${t("ES_INBOX_LOCALITY")} * `,
|
|
16122
|
-
text: tripDetails && tripDetails.length > 0 ? (_tripDetails$10 = tripDetails[0]) === null || _tripDetails$10 === void 0 ? void 0 : (_tripDetails$10$addre = _tripDetails$10.address) === null || _tripDetails$10$addre === void 0 ? void 0 : (_tripDetails$10$addre2 = _tripDetails$10$addre.locality) === null || _tripDetails$10$addre2 === void 0 ? void 0 : _tripDetails$10$addre2.name : /*#__PURE__*/React.createElement(Dropdown$
|
|
16104
|
+
text: tripDetails && tripDetails.length > 0 ? (_tripDetails$10 = tripDetails[0]) === null || _tripDetails$10 === void 0 ? void 0 : (_tripDetails$10$addre = _tripDetails$10.address) === null || _tripDetails$10$addre === void 0 ? void 0 : (_tripDetails$10$addre2 = _tripDetails$10$addre.locality) === null || _tripDetails$10$addre2 === void 0 ? void 0 : _tripDetails$10$addre2.name : /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
16123
16105
|
className: "form-field",
|
|
16124
16106
|
isMandatory: true,
|
|
16125
16107
|
selected: selectedLocality,
|
|
@@ -17381,7 +17363,7 @@ const SearchApplication$1 = ({
|
|
|
17381
17363
|
switch (input.type) {
|
|
17382
17364
|
case "date":
|
|
17383
17365
|
return /*#__PURE__*/React.createElement(Controller, {
|
|
17384
|
-
render: props => /*#__PURE__*/React.createElement(DatePicker$
|
|
17366
|
+
render: props => /*#__PURE__*/React.createElement(DatePicker$2, {
|
|
17385
17367
|
date: props.value,
|
|
17386
17368
|
onChange: props.onChange
|
|
17387
17369
|
}),
|
|
@@ -17962,7 +17944,7 @@ const RegisryInbox = props => {
|
|
|
17962
17944
|
Cell: ({
|
|
17963
17945
|
row
|
|
17964
17946
|
}) => {
|
|
17965
|
-
return /*#__PURE__*/React.createElement(Dropdown$
|
|
17947
|
+
return /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
17966
17948
|
className: "fsm-registry-dropdown",
|
|
17967
17949
|
selected: row.original.vendor,
|
|
17968
17950
|
option: vendors,
|
|
@@ -18647,7 +18629,7 @@ const VehicleDetails = props => {
|
|
|
18647
18629
|
});
|
|
18648
18630
|
}
|
|
18649
18631
|
if (selectedAction === "ADD_VENDOR" || selectedAction === "EDIT_VENDOR") {
|
|
18650
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText$1, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$
|
|
18632
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText$1, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
18651
18633
|
t: t,
|
|
18652
18634
|
option: vendors,
|
|
18653
18635
|
value: selectedOption,
|
|
@@ -19607,7 +19589,7 @@ const DriverDetails = props => {
|
|
|
19607
19589
|
});
|
|
19608
19590
|
}
|
|
19609
19591
|
if (selectedAction === "ADD_VENDOR") {
|
|
19610
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText$1, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$
|
|
19592
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText$1, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
19611
19593
|
t: t,
|
|
19612
19594
|
option: vendors,
|
|
19613
19595
|
value: selectedOption,
|
|
@@ -19617,7 +19599,7 @@ const DriverDetails = props => {
|
|
|
19617
19599
|
}));
|
|
19618
19600
|
}
|
|
19619
19601
|
if (selectedAction === "EDIT_VENDOR") {
|
|
19620
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText$1, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$
|
|
19602
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText$1, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
19621
19603
|
t: t,
|
|
19622
19604
|
option: vendors,
|
|
19623
19605
|
value: selectedOption,
|
|
@@ -20419,7 +20401,7 @@ const SelectTrips = ({
|
|
|
20419
20401
|
}, [_formData === null || _formData === void 0 ? void 0 : _formData.propertyType, _formData === null || _formData === void 0 ? void 0 : _formData.subtype, _formData === null || _formData === void 0 ? void 0 : _formData.address, _formData === null || _formData === void 0 ? void 0 : (_formData$tripData9 = _formData.tripData) === null || _formData$tripData9 === void 0 ? void 0 : (_formData$tripData9$v = _formData$tripData9.vehicleType) === null || _formData$tripData9$v === void 0 ? void 0 : _formData$tripData9$v.capacity, _formData === null || _formData === void 0 ? void 0 : (_formData$tripData0 = _formData.tripData) === null || _formData$tripData0 === void 0 ? void 0 : _formData$tripData0.noOfTrips, _formData === null || _formData === void 0 ? void 0 : (_formData$address3 = _formData.address) === null || _formData$address3 === void 0 ? void 0 : (_formData$address3$pr = _formData$address3.propertyLocation) === null || _formData$address3$pr === void 0 ? void 0 : _formData$address3$pr.code]);
|
|
20420
20402
|
return isVehicleMenuLoading && isDsoLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
20421
20403
|
className: "card-label-smaller"
|
|
20422
|
-
}, t("ES_NEW_APPLICATION_LOCATION_VEHICLE_REQUESTED") + " * "), /*#__PURE__*/React.createElement(Dropdown$
|
|
20404
|
+
}, t("ES_NEW_APPLICATION_LOCATION_VEHICLE_REQUESTED") + " * "), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
20423
20405
|
className: "form-field",
|
|
20424
20406
|
style: styles,
|
|
20425
20407
|
isMandatory: true,
|
|
@@ -20687,7 +20669,7 @@ const SelectLocalityOrGramPanchayat = ({
|
|
|
20687
20669
|
var _formData$address18, _formData$address18$l;
|
|
20688
20670
|
return /*#__PURE__*/React.createElement("div", null, (propertyLocation === null || propertyLocation === void 0 ? void 0 : propertyLocation.code) === "FROM_GRAM_PANCHAYAT" ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
20689
20671
|
className: "card-label-smaller"
|
|
20690
|
-
}, t("CS_GRAM_PANCHAYAT"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$
|
|
20672
|
+
}, t("CS_GRAM_PANCHAYAT"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
20691
20673
|
className: "form-field",
|
|
20692
20674
|
isMandatory: true,
|
|
20693
20675
|
selected: selectedGp,
|
|
@@ -20706,7 +20688,7 @@ const SelectLocalityOrGramPanchayat = ({
|
|
|
20706
20688
|
onChange: e => onNewGpChange(e.target.value)
|
|
20707
20689
|
}))), villages.length > 0 && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
20708
20690
|
className: "card-label-smaller"
|
|
20709
|
-
}, t("CS_VILLAGE_NAME")), /*#__PURE__*/React.createElement(Dropdown$
|
|
20691
|
+
}, t("CS_VILLAGE_NAME")), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
20710
20692
|
className: "form-field",
|
|
20711
20693
|
isMandatory: true,
|
|
20712
20694
|
selected: selectedVillage,
|
|
@@ -20725,7 +20707,7 @@ const SelectLocalityOrGramPanchayat = ({
|
|
|
20725
20707
|
onChange: e => onChangeVillage(e.target.value)
|
|
20726
20708
|
})))) : isUrcEnable && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
20727
20709
|
className: "card-label-smaller"
|
|
20728
|
-
}, t("CS_CREATECOMPLAINT_MOHALLA"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$
|
|
20710
|
+
}, t("CS_CREATECOMPLAINT_MOHALLA"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
20729
20711
|
className: "form-field",
|
|
20730
20712
|
isMandatory: true,
|
|
20731
20713
|
selected: selectedLocality,
|
|
@@ -20754,7 +20736,7 @@ const SelectLocalityOrGramPanchayat = ({
|
|
|
20754
20736
|
t: t
|
|
20755
20737
|
}, (propertyLocation === null || propertyLocation === void 0 ? void 0 : propertyLocation.code) === "WITHIN_ULB_LIMITS" ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
20756
20738
|
className: "card-label-smaller"
|
|
20757
|
-
}, `${t("CS_CREATECOMPLAINT_MOHALLA")} *`), /*#__PURE__*/React.createElement(Dropdown$
|
|
20739
|
+
}, `${t("CS_CREATECOMPLAINT_MOHALLA")} *`), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
20758
20740
|
className: "form-field",
|
|
20759
20741
|
isMandatory: true,
|
|
20760
20742
|
selected: selectedLocality,
|
|
@@ -20775,7 +20757,7 @@ const SelectLocalityOrGramPanchayat = ({
|
|
|
20775
20757
|
onChange: e => onNewLocality(e.target.value)
|
|
20776
20758
|
}))) : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
20777
20759
|
className: "card-label-smaller"
|
|
20778
|
-
}, `${t("CS_GRAM_PANCHAYAT")} *`), /*#__PURE__*/React.createElement(Dropdown$
|
|
20760
|
+
}, `${t("CS_GRAM_PANCHAYAT")} *`), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
20779
20761
|
className: "form-field",
|
|
20780
20762
|
isMandatory: true,
|
|
20781
20763
|
selected: selectedGp,
|
|
@@ -20796,7 +20778,7 @@ const SelectLocalityOrGramPanchayat = ({
|
|
|
20796
20778
|
onChange: e => onNewGpChange(e.target.value)
|
|
20797
20779
|
})), villages.length > 0 && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, {
|
|
20798
20780
|
className: "card-label-smaller"
|
|
20799
|
-
}, t("CS_VILLAGE_NAME")), /*#__PURE__*/React.createElement(Dropdown$
|
|
20781
|
+
}, t("CS_VILLAGE_NAME")), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
20800
20782
|
className: "form-field",
|
|
20801
20783
|
isMandatory: true,
|
|
20802
20784
|
selected: selectedVillage,
|
|
@@ -20832,15 +20814,13 @@ const convertEpochToDate$1 = (dateEpoch, businessService) => {
|
|
|
20832
20814
|
}
|
|
20833
20815
|
};
|
|
20834
20816
|
|
|
20835
|
-
const {
|
|
20836
|
-
DatePicker: DatePicker$2,
|
|
20837
|
-
Dropdown: Dropdown$1
|
|
20838
|
-
} = require("@djb25/digit-ui-react-components");
|
|
20839
20817
|
const VendorConfig = (t, disabled = false, formData = {}) => {
|
|
20840
20818
|
var _formData$serviceType;
|
|
20841
20819
|
const isEkyc = (formData === null || formData === void 0 ? void 0 : (_formData$serviceType = formData.serviceType) === null || _formData$serviceType === void 0 ? void 0 : _formData$serviceType.code) === "EKYC";
|
|
20842
20820
|
return [{
|
|
20843
20821
|
head: "ES_VRNDOR_NEW_VENDOR_DETAILS",
|
|
20822
|
+
isCollapsible: true,
|
|
20823
|
+
isDefaultOpen: true,
|
|
20844
20824
|
body: [{
|
|
20845
20825
|
label: "ES_FSM_REGISTRY_NEW_VENDOR_NAME",
|
|
20846
20826
|
isMandatory: true,
|
|
@@ -20946,12 +20926,6 @@ const VendorConfig = (t, disabled = false, formData = {}) => {
|
|
|
20946
20926
|
type: "component",
|
|
20947
20927
|
key: "zoneIds",
|
|
20948
20928
|
component: "SelectEkycZones"
|
|
20949
|
-
}, {
|
|
20950
|
-
label: "ES_VENDOR_CLUSTER",
|
|
20951
|
-
isMandatory: true,
|
|
20952
|
-
type: "component",
|
|
20953
|
-
key: "clusterIds",
|
|
20954
|
-
component: "SelectEkycClusters"
|
|
20955
20929
|
}, {
|
|
20956
20930
|
label: "ES_FSM_REGISTRY_NEW_OWNER_NAME",
|
|
20957
20931
|
isMandatory: true,
|
|
@@ -20965,17 +20939,6 @@ const VendorConfig = (t, disabled = false, formData = {}) => {
|
|
|
20965
20939
|
error: t("FSM_REGISTRY_INVALID_NAME"),
|
|
20966
20940
|
className: "payment-form-text-input-correction"
|
|
20967
20941
|
}
|
|
20968
|
-
}, {
|
|
20969
|
-
label: "ES_FSM_REGISTRY_NEW_FATHER_NAME",
|
|
20970
|
-
isMandatory: true,
|
|
20971
|
-
type: "text",
|
|
20972
|
-
populators: {
|
|
20973
|
-
name: "fatherOrHusbandName",
|
|
20974
|
-
validation: {
|
|
20975
|
-
required: true
|
|
20976
|
-
},
|
|
20977
|
-
className: "payment-form-text-input-correction"
|
|
20978
|
-
}
|
|
20979
20942
|
}, {
|
|
20980
20943
|
label: "ES_FSM_REGISTRY_NEW_GENDER",
|
|
20981
20944
|
isMandatory: true,
|
|
@@ -21013,106 +20976,18 @@ const VendorConfig = (t, disabled = false, formData = {}) => {
|
|
|
21013
20976
|
max: convertEpochToDate$1(new Date().setFullYear(new Date().getFullYear()))
|
|
21014
20977
|
}))
|
|
21015
20978
|
}
|
|
21016
|
-
}, {
|
|
21017
|
-
label: "ES_FSM_REGISTRY_NEW_RELATIONSHIP",
|
|
21018
|
-
isMandatory: true,
|
|
21019
|
-
type: "component",
|
|
21020
|
-
key: "relationship",
|
|
21021
|
-
component: "SelectEkycDropdown",
|
|
21022
|
-
populators: {
|
|
21023
|
-
name: "relationship",
|
|
21024
|
-
options: [{
|
|
21025
|
-
code: "FATHER",
|
|
21026
|
-
name: "ES_COMMON_RELATION_FATHER"
|
|
21027
|
-
}, {
|
|
21028
|
-
code: "HUSBAND",
|
|
21029
|
-
name: "ES_COMMON_RELATION_HUSBAND"
|
|
21030
|
-
}, {
|
|
21031
|
-
code: "OTHER",
|
|
21032
|
-
name: "ES_COMMON_RELATION_OTHER"
|
|
21033
|
-
}],
|
|
21034
|
-
optionsKey: "name"
|
|
21035
|
-
}
|
|
21036
20979
|
}] : [])]
|
|
21037
20980
|
}, {
|
|
21038
|
-
|
|
20981
|
+
isCreateConnection: true,
|
|
20982
|
+
className: "new-application-card",
|
|
21039
20983
|
body: [{
|
|
21040
|
-
|
|
21041
|
-
|
|
21042
|
-
|
|
21043
|
-
key: "doorNo",
|
|
21044
|
-
populators: {
|
|
21045
|
-
name: "doorNo",
|
|
21046
|
-
defaultValue: "",
|
|
21047
|
-
className: "payment-form-text-input-correction"
|
|
21048
|
-
}
|
|
21049
|
-
}, {
|
|
21050
|
-
label: "ES_FSM_REGISTRY_NEW_PLOT",
|
|
21051
|
-
isMandatory: false,
|
|
21052
|
-
type: "text",
|
|
21053
|
-
key: "plotNo",
|
|
21054
|
-
populators: {
|
|
21055
|
-
name: "plotNo",
|
|
21056
|
-
defaultValue: "",
|
|
21057
|
-
className: "payment-form-text-input-correction"
|
|
21058
|
-
}
|
|
21059
|
-
}, {
|
|
21060
|
-
label: "ES_FSM_REGISTRY_NEW_BUILDING_NAME",
|
|
21061
|
-
isMandatory: false,
|
|
21062
|
-
type: "text",
|
|
21063
|
-
key: "buildingName",
|
|
21064
|
-
populators: {
|
|
21065
|
-
name: "buildingName",
|
|
21066
|
-
defaultValue: "",
|
|
21067
|
-
className: "payment-form-text-input-correction"
|
|
21068
|
-
}
|
|
21069
|
-
}, {
|
|
21070
|
-
label: "ES_FSM_REGISTRY_NEW_STREET",
|
|
21071
|
-
isMandatory: false,
|
|
21072
|
-
type: "text",
|
|
21073
|
-
key: "street",
|
|
21074
|
-
populators: {
|
|
21075
|
-
name: "street",
|
|
21076
|
-
defaultValue: "",
|
|
21077
|
-
className: "payment-form-text-input-correction"
|
|
21078
|
-
}
|
|
21079
|
-
}, {
|
|
21080
|
-
label: "ES_FSM_REGISTRY_NEW_PINCODE",
|
|
21081
|
-
isMandatory: false,
|
|
21082
|
-
type: "text",
|
|
21083
|
-
key: "pincode",
|
|
21084
|
-
populators: {
|
|
21085
|
-
name: "pincode",
|
|
21086
|
-
validation: {
|
|
21087
|
-
required: false,
|
|
21088
|
-
pattern: /^[1-9][0-9]{5}$/
|
|
21089
|
-
},
|
|
21090
|
-
error: t("FSM_REGISTRY_INVALID_PINCODE"),
|
|
21091
|
-
defaultValue: "",
|
|
21092
|
-
className: "payment-form-text-input-correction"
|
|
21093
|
-
}
|
|
21094
|
-
}, {
|
|
21095
|
-
route: "address",
|
|
21096
|
-
component: "VendorSelectAddress",
|
|
20984
|
+
type: "component",
|
|
20985
|
+
key: "propertyAddress",
|
|
20986
|
+
component: "CPTPropertyLocationDetails",
|
|
21097
20987
|
withoutLabel: true,
|
|
21098
|
-
|
|
21099
|
-
|
|
21100
|
-
|
|
21101
|
-
cardText: "CS_FILE_APPLICATION_PROPERTY_LOCATION_CITY_MOHALLA_TEXT",
|
|
21102
|
-
submitBarLabel: "CS_COMMON_NEXT"
|
|
21103
|
-
},
|
|
21104
|
-
key: "address",
|
|
21105
|
-
isMandatory: true,
|
|
21106
|
-
type: "component"
|
|
21107
|
-
}, {
|
|
21108
|
-
label: "ES_FSM_REGISTRY_NEW_LANDMARK",
|
|
21109
|
-
isMandatory: false,
|
|
21110
|
-
type: "text",
|
|
21111
|
-
key: "landmark",
|
|
21112
|
-
populators: {
|
|
21113
|
-
name: "landmark",
|
|
21114
|
-
defaultValue: "",
|
|
21115
|
-
className: "payment-form-text-input-correction"
|
|
20988
|
+
props: {
|
|
20989
|
+
hidePropertySearch: true,
|
|
20990
|
+
hideZRO: true
|
|
21116
20991
|
}
|
|
21117
20992
|
}]
|
|
21118
20993
|
}];
|
|
@@ -21753,7 +21628,7 @@ const VendorDetails = ({
|
|
|
21753
21628
|
rules: {
|
|
21754
21629
|
required: t("CORE_COMMON_REQUIRED_ERRMSG")
|
|
21755
21630
|
},
|
|
21756
|
-
render: props => /*#__PURE__*/React.createElement(Dropdown$
|
|
21631
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
21757
21632
|
selected: VendorType,
|
|
21758
21633
|
select: setVendorType,
|
|
21759
21634
|
option: [{
|
|
@@ -21793,7 +21668,7 @@ const VendorDetails = ({
|
|
|
21793
21668
|
rules: {
|
|
21794
21669
|
required: t("CORE_COMMON_REQUIRED_ERRMSG")
|
|
21795
21670
|
},
|
|
21796
|
-
render: props => /*#__PURE__*/React.createElement(Dropdown$
|
|
21671
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
21797
21672
|
selected: VendorCategory,
|
|
21798
21673
|
select: setVendorCategory,
|
|
21799
21674
|
option: [{
|
|
@@ -21833,7 +21708,7 @@ const VendorDetails = ({
|
|
|
21833
21708
|
rules: {
|
|
21834
21709
|
required: t("CORE_COMMON_REQUIRED_ERRMSG")
|
|
21835
21710
|
},
|
|
21836
|
-
render: props => /*#__PURE__*/React.createElement(Dropdown$
|
|
21711
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
21837
21712
|
selected: Status,
|
|
21838
21713
|
select: setStatus,
|
|
21839
21714
|
option: [{
|
|
@@ -21855,14 +21730,12 @@ const AddVendor = ({
|
|
|
21855
21730
|
heading
|
|
21856
21731
|
}) => {
|
|
21857
21732
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
21858
|
-
const stateId = Digit.ULBService.getStateId();
|
|
21859
21733
|
const {
|
|
21860
21734
|
t
|
|
21861
21735
|
} = useTranslation();
|
|
21862
21736
|
const history = useHistory();
|
|
21863
21737
|
const [currentStep, setCurrentStep] = useState(1);
|
|
21864
21738
|
const [showToast, setShowToast] = useState(null);
|
|
21865
|
-
const [canSubmit, setCanSubmit] = useState(false);
|
|
21866
21739
|
const [, setMutationHappened] = Digit.Hooks.useSessionStorage("FSM_MUTATION_HAPPENED", false);
|
|
21867
21740
|
const [,, clearError] = Digit.Hooks.useSessionStorage("FSM_ERROR_DATA", false);
|
|
21868
21741
|
const [,, clearSuccessData] = Digit.Hooks.useSessionStorage("FSM_MUTATION_SUCCESS_DATA", false);
|
|
@@ -21889,23 +21762,26 @@ const AddVendor = ({
|
|
|
21889
21762
|
const [formData, setFormData] = useState(defaultValues);
|
|
21890
21763
|
const Config = VendorConfig(t, false, formData);
|
|
21891
21764
|
const onFormValueChange = (setValue, data) => {
|
|
21892
|
-
var _data$serviceType, _formData$serviceType, _data$serviceType2
|
|
21893
|
-
|
|
21894
|
-
|
|
21895
|
-
|
|
21896
|
-
|
|
21897
|
-
const
|
|
21898
|
-
const
|
|
21899
|
-
|
|
21900
|
-
|
|
21901
|
-
|
|
21902
|
-
|
|
21765
|
+
var _data$zoneIds, _data$serviceType, _formData$serviceType, _data$serviceType2;
|
|
21766
|
+
const currentZoneCodes = (data === null || data === void 0 ? void 0 : (_data$zoneIds = data.zoneIds) === null || _data$zoneIds === void 0 ? void 0 : _data$zoneIds.map(item => {
|
|
21767
|
+
var _item$;
|
|
21768
|
+
return item === null || item === void 0 ? void 0 : (_item$ = item[1]) === null || _item$ === void 0 ? void 0 : _item$.code;
|
|
21769
|
+
})) || [];
|
|
21770
|
+
const previousZoneCodes = (formData === null || formData === void 0 ? void 0 : formData.zoneIds) || [];
|
|
21771
|
+
const zoneChanged = currentZoneCodes.join(",") !== previousZoneCodes.join(",");
|
|
21772
|
+
if ((data === null || data === void 0 ? void 0 : (_data$serviceType = data.serviceType) === null || _data$serviceType === void 0 ? void 0 : _data$serviceType.code) !== (formData === null || formData === void 0 ? void 0 : (_formData$serviceType = formData.serviceType) === null || _formData$serviceType === void 0 ? void 0 : _formData$serviceType.code) || zoneChanged) {
|
|
21773
|
+
setFormData(prev => ({
|
|
21774
|
+
...prev,
|
|
21775
|
+
serviceType: data === null || data === void 0 ? void 0 : data.serviceType
|
|
21776
|
+
}));
|
|
21903
21777
|
}
|
|
21904
|
-
if (
|
|
21905
|
-
|
|
21906
|
-
|
|
21907
|
-
|
|
21778
|
+
if (zoneChanged) {
|
|
21779
|
+
setFormData(prev => ({
|
|
21780
|
+
...prev,
|
|
21781
|
+
zoneIds: currentZoneCodes
|
|
21782
|
+
}));
|
|
21908
21783
|
}
|
|
21784
|
+
const isVendorDetailsFilled = (data === null || data === void 0 ? void 0 : data.vendorName) && (data === null || data === void 0 ? void 0 : data.phone) && (data === null || data === void 0 ? void 0 : (_data$serviceType2 = data.serviceType) === null || _data$serviceType2 === void 0 ? void 0 : _data$serviceType2.code);
|
|
21909
21785
|
if (isVendorDetailsFilled) {
|
|
21910
21786
|
if (currentStep === 1) {
|
|
21911
21787
|
setCurrentStep(2);
|
|
@@ -21940,22 +21816,25 @@ const AddVendor = ({
|
|
|
21940
21816
|
setShowToast(null);
|
|
21941
21817
|
};
|
|
21942
21818
|
const onSubmit = data => {
|
|
21943
|
-
var
|
|
21819
|
+
var _address$city, _address$city2, _address$city3, _address$city4, _address$locality, _address$locality2, _address$ward, _address$ward2, _mergedData$plotNo, _mergedData$buildingN, _mergedData$serviceTy, _mergedData$address, _mergedData$address2, _mergedData$relations, _mergedData$gender, _mergedData$serviceTy2;
|
|
21944
21820
|
const mergedData = data;
|
|
21821
|
+
const address = mergedData === null || mergedData === void 0 ? void 0 : mergedData.propertyAddress;
|
|
21822
|
+
const pincode = address === null || address === void 0 ? void 0 : address.pincode;
|
|
21823
|
+
const street = address === null || address === void 0 ? void 0 : address.streetName;
|
|
21824
|
+
const doorNo = address === null || address === void 0 ? void 0 : address.houseNo;
|
|
21825
|
+
const landmark = address === null || address === void 0 ? void 0 : address.landmark;
|
|
21826
|
+
const city = address === null || address === void 0 ? void 0 : (_address$city = address.city) === null || _address$city === void 0 ? void 0 : _address$city.name;
|
|
21827
|
+
const state = address === null || address === void 0 ? void 0 : (_address$city2 = address.city) === null || _address$city2 === void 0 ? void 0 : _address$city2.name;
|
|
21828
|
+
const district = address === null || address === void 0 ? void 0 : (_address$city3 = address.city) === null || _address$city3 === void 0 ? void 0 : _address$city3.name;
|
|
21829
|
+
const region = address === null || address === void 0 ? void 0 : (_address$city4 = address.city) === null || _address$city4 === void 0 ? void 0 : _address$city4.name;
|
|
21830
|
+
const localityCode = address === null || address === void 0 ? void 0 : (_address$locality = address.locality) === null || _address$locality === void 0 ? void 0 : _address$locality.code;
|
|
21831
|
+
const localityName = address === null || address === void 0 ? void 0 : (_address$locality2 = address.locality) === null || _address$locality2 === void 0 ? void 0 : _address$locality2.name;
|
|
21832
|
+
const localityArea = address === null || address === void 0 ? void 0 : address.subLocality;
|
|
21833
|
+
const wardCode = address === null || address === void 0 ? void 0 : (_address$ward = address.ward) === null || _address$ward === void 0 ? void 0 : _address$ward.code;
|
|
21834
|
+
const wardName = address === null || address === void 0 ? void 0 : (_address$ward2 = address.ward) === null || _address$ward2 === void 0 ? void 0 : _address$ward2.name;
|
|
21945
21835
|
const name = mergedData === null || mergedData === void 0 ? void 0 : mergedData.vendorName;
|
|
21946
|
-
const pincode = mergedData === null || mergedData === void 0 ? void 0 : mergedData.pincode;
|
|
21947
|
-
const street = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$street = mergedData.street) === null || _mergedData$street === void 0 ? void 0 : _mergedData$street.trim();
|
|
21948
|
-
const doorNo = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$doorNo = mergedData.doorNo) === null || _mergedData$doorNo === void 0 ? void 0 : _mergedData$doorNo.trim();
|
|
21949
21836
|
const plotNo = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$plotNo = mergedData.plotNo) === null || _mergedData$plotNo === void 0 ? void 0 : _mergedData$plotNo.trim();
|
|
21950
|
-
const landmark = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$landmark = mergedData.landmark) === null || _mergedData$landmark === void 0 ? void 0 : _mergedData$landmark.trim();
|
|
21951
|
-
const city = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address = mergedData.address) === null || _mergedData$address === void 0 ? void 0 : (_mergedData$address$c = _mergedData$address.city) === null || _mergedData$address$c === void 0 ? void 0 : _mergedData$address$c.name;
|
|
21952
|
-
const state = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address2 = mergedData.address) === null || _mergedData$address2 === void 0 ? void 0 : (_mergedData$address2$ = _mergedData$address2.city) === null || _mergedData$address2$ === void 0 ? void 0 : _mergedData$address2$.state;
|
|
21953
|
-
const district = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address3 = mergedData.address) === null || _mergedData$address3 === void 0 ? void 0 : (_mergedData$address3$ = _mergedData$address3.city) === null || _mergedData$address3$ === void 0 ? void 0 : _mergedData$address3$.name;
|
|
21954
|
-
const region = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address4 = mergedData.address) === null || _mergedData$address4 === void 0 ? void 0 : (_mergedData$address4$ = _mergedData$address4.city) === null || _mergedData$address4$ === void 0 ? void 0 : _mergedData$address4$.name;
|
|
21955
21837
|
const buildingName = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$buildingN = mergedData.buildingName) === null || _mergedData$buildingN === void 0 ? void 0 : _mergedData$buildingN.trim();
|
|
21956
|
-
const localityCode = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address5 = mergedData.address) === null || _mergedData$address5 === void 0 ? void 0 : (_mergedData$address5$ = _mergedData$address5.locality) === null || _mergedData$address5$ === void 0 ? void 0 : _mergedData$address5$.code;
|
|
21957
|
-
const localityName = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address6 = mergedData.address) === null || _mergedData$address6 === void 0 ? void 0 : (_mergedData$address6$ = _mergedData$address6.locality) === null || _mergedData$address6$ === void 0 ? void 0 : _mergedData$address6$.name;
|
|
21958
|
-
const localityArea = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address7 = mergedData.address) === null || _mergedData$address7 === void 0 ? void 0 : (_mergedData$address7$ = _mergedData$address7.locality) === null || _mergedData$address7$ === void 0 ? void 0 : _mergedData$address7$.area;
|
|
21959
21838
|
const emailId = mergedData === null || mergedData === void 0 ? void 0 : mergedData.emailId;
|
|
21960
21839
|
const phone = mergedData === null || mergedData === void 0 ? void 0 : mergedData.phone;
|
|
21961
21840
|
const isEkyc = (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$serviceTy = mergedData.serviceType) === null || _mergedData$serviceTy === void 0 ? void 0 : _mergedData$serviceTy.code) === "EKYC";
|
|
@@ -21983,9 +21862,13 @@ const AddVendor = ({
|
|
|
21983
21862
|
label: "Locality",
|
|
21984
21863
|
area: localityArea || ""
|
|
21985
21864
|
},
|
|
21865
|
+
ward: wardCode ? {
|
|
21866
|
+
code: wardCode,
|
|
21867
|
+
name: wardName
|
|
21868
|
+
} : undefined,
|
|
21986
21869
|
geoLocation: {
|
|
21987
|
-
latitude: (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$
|
|
21988
|
-
longitude: (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$
|
|
21870
|
+
latitude: (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address = mergedData.address) === null || _mergedData$address === void 0 ? void 0 : _mergedData$address.latitude) || 28.6139,
|
|
21871
|
+
longitude: (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address2 = mergedData.address) === null || _mergedData$address2 === void 0 ? void 0 : _mergedData$address2.longitude) || 77.209
|
|
21989
21872
|
}
|
|
21990
21873
|
},
|
|
21991
21874
|
owner: {
|
|
@@ -21994,7 +21877,7 @@ const AddVendor = ({
|
|
|
21994
21877
|
fatherOrHusbandName: (mergedData === null || mergedData === void 0 ? void 0 : mergedData.fatherOrHusbandName) || name,
|
|
21995
21878
|
relationship: (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$relations = mergedData.relationship) === null || _mergedData$relations === void 0 ? void 0 : _mergedData$relations.code) || "OTHER",
|
|
21996
21879
|
gender: (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$gender = mergedData.gender) === null || _mergedData$gender === void 0 ? void 0 : _mergedData$gender.code) || "MALE",
|
|
21997
|
-
dob: mergedData !== null && mergedData !== void 0 && mergedData.dob ?
|
|
21880
|
+
dob: mergedData !== null && mergedData !== void 0 && mergedData.dob ? new Date(mergedData.dob).getTime() : new Date(`1/1/1970`).getTime(),
|
|
21998
21881
|
emailId: emailId || "",
|
|
21999
21882
|
mobileNumber: phone
|
|
22000
21883
|
},
|
|
@@ -22009,8 +21892,14 @@ const AddVendor = ({
|
|
|
22009
21892
|
var _mergedData$zoneIds, _mergedData$clusterId;
|
|
22010
21893
|
vendorData = {
|
|
22011
21894
|
...vendorData,
|
|
22012
|
-
zoneIds: (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$zoneIds = mergedData.zoneIds) === null || _mergedData$zoneIds === void 0 ? void 0 : _mergedData$zoneIds.map(z =>
|
|
22013
|
-
|
|
21895
|
+
zoneIds: (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$zoneIds = mergedData.zoneIds) === null || _mergedData$zoneIds === void 0 ? void 0 : _mergedData$zoneIds.map(z => {
|
|
21896
|
+
var _z$;
|
|
21897
|
+
return z === null || z === void 0 ? void 0 : (_z$ = z[1]) === null || _z$ === void 0 ? void 0 : _z$.code;
|
|
21898
|
+
})) || [],
|
|
21899
|
+
clusterIds: (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$clusterId = mergedData.clusterIds) === null || _mergedData$clusterId === void 0 ? void 0 : _mergedData$clusterId.map(c => {
|
|
21900
|
+
var _c$;
|
|
21901
|
+
return c === null || c === void 0 ? void 0 : (_c$ = c[1]) === null || _c$ === void 0 ? void 0 : _c$.code;
|
|
21902
|
+
})) || [],
|
|
22014
21903
|
contractStartDate: mergedData.contractStartDate ? new Date(mergedData.contractStartDate).getTime() : null,
|
|
22015
21904
|
contractEndDate: mergedData.contractEndDate ? new Date(mergedData.contractEndDate).getTime() : null
|
|
22016
21905
|
};
|
|
@@ -22066,19 +21955,14 @@ const AddVendor = ({
|
|
|
22066
21955
|
overflowY: "auto"
|
|
22067
21956
|
}
|
|
22068
21957
|
}, /*#__PURE__*/React.createElement(FormComposer, {
|
|
21958
|
+
config: Config,
|
|
21959
|
+
userType: "employee",
|
|
21960
|
+
onFormValueChange: onFormValueChange,
|
|
22069
21961
|
label: t("ES_COMMON_APPLICATION_SUBMIT"),
|
|
22070
|
-
config: Config.filter(i => !i.hideInEmployee).map(config => ({
|
|
22071
|
-
...config,
|
|
22072
|
-
isCollapsible: true,
|
|
22073
|
-
isDefaultOpen: true,
|
|
22074
|
-
body: config.body.filter(a => !a.hideInEmployee)
|
|
22075
|
-
})),
|
|
22076
21962
|
onSubmit: onSubmit,
|
|
22077
21963
|
defaultValues: defaultValues,
|
|
22078
|
-
onFormValueChange: onFormValueChange,
|
|
22079
|
-
noBreakLine: true,
|
|
22080
21964
|
noCard: true,
|
|
22081
|
-
|
|
21965
|
+
noBreakLine: true
|
|
22082
21966
|
}), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
22083
21967
|
error: showToast.key === "error",
|
|
22084
21968
|
label: t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_SUCCESS` : showToast.action),
|