@djb25/digit-ui-module-vendor 1.0.17 → 1.0.19
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 +76 -93
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, { useEffect, useMemo, useCallback, useState
|
|
1
|
+
import React, { useEffect, useMemo, useCallback, useState } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { useParams, useLocation, Switch, Link, useHistory, useRouteMatch, Route, Redirect } from 'react-router-dom';
|
|
4
|
-
import { Header, SearchForm, SearchField, Dropdown as Dropdown$2, MobileNumber, CardLabelError, DatePicker as DatePicker$3, SubmitBar, Card, Table, Loader, Toast, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, HomeIcon, PropertyHouse, EmployeeModuleCard, VerticalTimeline, FormComposer, FormStep, CardLabel, Tooltip, TextInput,
|
|
4
|
+
import { Header, SearchForm, SearchField, Dropdown as Dropdown$2, MobileNumber, CardLabelError, DatePicker as DatePicker$3, SubmitBar, Card, Table, Loader, Toast, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, HomeIcon, PropertyHouse, EmployeeModuleCard, VerticalTimeline, FormComposer, FormStep, LabelFieldPair, CardLabel, Tooltip, TextInput, UploadFile, CardSubHeader, CardText, RadioOrSelect, ShippingTruck, CheckBox, RadioButtons, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, AddIcon, Menu, LinkLabel, ToggleSwitch, CardSectionHeader, Row, EditIcon, DeleteIcon, Modal, InfoIcon, CardHeader, StatusTable, LinkButton, Banner } from '@djb25/digit-ui-react-components';
|
|
5
5
|
import { useForm, Controller } from 'react-hook-form';
|
|
6
6
|
import { useQueryClient } from 'react-query';
|
|
7
7
|
|
|
@@ -1095,8 +1095,9 @@ const VendorDetails = ({
|
|
|
1095
1095
|
}, /*#__PURE__*/React.createElement(FormStep, {
|
|
1096
1096
|
config: config,
|
|
1097
1097
|
onSelect: goNext,
|
|
1098
|
-
t: t
|
|
1099
|
-
|
|
1098
|
+
t: t,
|
|
1099
|
+
className: "formcomposer-grid-container-form"
|
|
1100
|
+
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
1100
1101
|
className: "card-label-smaller"
|
|
1101
1102
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
1102
1103
|
label: `${t("IFSC_CODE")}`,
|
|
@@ -1121,7 +1122,7 @@ const VendorDetails = ({
|
|
|
1121
1122
|
pattern: "^[A-Z]{4}0[A-Z0-9]{6}$",
|
|
1122
1123
|
type: "text",
|
|
1123
1124
|
title: t("INVALID_IFSC_CODE_ERROR_MESSAGE")
|
|
1124
|
-
}))), /*#__PURE__*/React.createElement(
|
|
1125
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_BANK_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1125
1126
|
className: "check-page-link-button"
|
|
1126
1127
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
1127
1128
|
t: t,
|
|
@@ -1136,7 +1137,7 @@ const VendorDetails = ({
|
|
|
1136
1137
|
value: Bank,
|
|
1137
1138
|
onChange: setvendorbank,
|
|
1138
1139
|
disabled: true
|
|
1139
|
-
})), /*#__PURE__*/React.createElement(
|
|
1140
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_BANK_BRANCH_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1140
1141
|
className: "check-page-link-button"
|
|
1141
1142
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
1142
1143
|
t: t,
|
|
@@ -1151,7 +1152,7 @@ const VendorDetails = ({
|
|
|
1151
1152
|
placeholder: "Bank Branch Name Auto Select",
|
|
1152
1153
|
onChange: setBankbranch,
|
|
1153
1154
|
disabled: false
|
|
1154
|
-
})), /*#__PURE__*/React.createElement(
|
|
1155
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_MICR_NO")}`, " ", /*#__PURE__*/React.createElement("span", {
|
|
1155
1156
|
className: "check-page-link-button"
|
|
1156
1157
|
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
1157
1158
|
t: t,
|
|
@@ -1166,7 +1167,7 @@ const VendorDetails = ({
|
|
|
1166
1167
|
placeholder: "MICR No",
|
|
1167
1168
|
onChange: setmicrNo,
|
|
1168
1169
|
disabled: false
|
|
1169
|
-
})), /*#__PURE__*/React.createElement(
|
|
1170
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("ACCOUNT_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1170
1171
|
t: t,
|
|
1171
1172
|
type: "text",
|
|
1172
1173
|
isMandatory: false,
|
|
@@ -1183,14 +1184,14 @@ const VendorDetails = ({
|
|
|
1183
1184
|
pattern: "[0-9]{9,18}",
|
|
1184
1185
|
type: "text",
|
|
1185
1186
|
title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
|
|
1186
|
-
}))), /*#__PURE__*/React.createElement(
|
|
1187
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PHONE_NO")}`), /*#__PURE__*/React.createElement(MobileNumber, {
|
|
1187
1188
|
value: PhoneNo,
|
|
1188
1189
|
name: "PhoneNo",
|
|
1189
1190
|
onChange: setPhoneNo,
|
|
1190
1191
|
style: {
|
|
1191
1192
|
width: "100%"
|
|
1192
1193
|
}
|
|
1193
|
-
})), /*#__PURE__*/React.createElement(
|
|
1194
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("CONTACT_PERSON")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1194
1195
|
t: t,
|
|
1195
1196
|
type: "text",
|
|
1196
1197
|
isMandatory: false,
|
|
@@ -1207,7 +1208,7 @@ const VendorDetails = ({
|
|
|
1207
1208
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1208
1209
|
type: "text",
|
|
1209
1210
|
title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
|
|
1210
|
-
}))), /*#__PURE__*/React.createElement(
|
|
1211
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PAN_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1211
1212
|
t: t,
|
|
1212
1213
|
type: "text",
|
|
1213
1214
|
isMandatory: false,
|
|
@@ -1224,7 +1225,7 @@ const VendorDetails = ({
|
|
|
1224
1225
|
pattern: "[A-Z]{5}[0-9]{4}[A-Z]{1}",
|
|
1225
1226
|
type: "text",
|
|
1226
1227
|
title: t("INVALID_PAN_NO_ERROR_MESSAGE")
|
|
1227
|
-
}))), /*#__PURE__*/React.createElement(
|
|
1228
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("GST_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1228
1229
|
t: t,
|
|
1229
1230
|
type: "text",
|
|
1230
1231
|
isMandatory: false,
|
|
@@ -1241,7 +1242,7 @@ const VendorDetails = ({
|
|
|
1241
1242
|
pattern: "^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[A-Z0-9]{1}[Z]{1}[A-Z0-9]{1}$",
|
|
1242
1243
|
type: "text",
|
|
1243
1244
|
title: t("INVALID_GST_NO_ERROR_MESSAGE")
|
|
1244
|
-
}))), /*#__PURE__*/React.createElement(
|
|
1245
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("GST_REGISTERED_STATE/UT")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1245
1246
|
t: t,
|
|
1246
1247
|
type: "text",
|
|
1247
1248
|
isMandatory: false,
|
|
@@ -1258,7 +1259,7 @@ const VendorDetails = ({
|
|
|
1258
1259
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1259
1260
|
type: "text",
|
|
1260
1261
|
title: t("PT_NAME_ERROR_MESSAGE")
|
|
1261
|
-
}))), /*#__PURE__*/React.createElement(
|
|
1262
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("REGISTRATION_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1262
1263
|
t: t,
|
|
1263
1264
|
type: "text",
|
|
1264
1265
|
isMandatory: false,
|
|
@@ -1275,7 +1276,7 @@ const VendorDetails = ({
|
|
|
1275
1276
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1276
1277
|
type: "text",
|
|
1277
1278
|
title: t("INVALID_REGISTRATION_NO_ERROR_MESSAGE")
|
|
1278
|
-
}))), /*#__PURE__*/React.createElement(
|
|
1279
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("EPF_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1279
1280
|
t: t,
|
|
1280
1281
|
type: "text",
|
|
1281
1282
|
isMandatory: false,
|
|
@@ -1292,7 +1293,7 @@ const VendorDetails = ({
|
|
|
1292
1293
|
pattern: "^[a-zA-Z0-9/-]{1,15}$",
|
|
1293
1294
|
type: "text",
|
|
1294
1295
|
title: t("INVALID_EPF_NO_ERROR_MESSAGE")
|
|
1295
|
-
}))), /*#__PURE__*/React.createElement(
|
|
1296
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("ESI_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
1296
1297
|
t: t,
|
|
1297
1298
|
type: "text",
|
|
1298
1299
|
isMandatory: false,
|
|
@@ -1309,7 +1310,7 @@ const VendorDetails = ({
|
|
|
1309
1310
|
pattern: "^[a-zA-Z0-9/-]{1,20}$",
|
|
1310
1311
|
type: "text",
|
|
1311
1312
|
title: t("INVALID_ESI_NO_ERROR_MESSAGE")
|
|
1312
|
-
}))), /*#__PURE__*/React.createElement(
|
|
1313
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", null, t("VENDOR_TYPE"), /*#__PURE__*/React.createElement("div", {
|
|
1313
1314
|
className: "tooltip",
|
|
1314
1315
|
style: {
|
|
1315
1316
|
width: "12px",
|
|
@@ -1349,7 +1350,7 @@ const VendorDetails = ({
|
|
|
1349
1350
|
placeholder: "Select",
|
|
1350
1351
|
t: t
|
|
1351
1352
|
})
|
|
1352
|
-
})), /*#__PURE__*/React.createElement(
|
|
1353
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", null, t("VENOR_CATEGORY"), /*#__PURE__*/React.createElement("div", {
|
|
1353
1354
|
className: "tooltip",
|
|
1354
1355
|
style: {
|
|
1355
1356
|
width: "12px",
|
|
@@ -1389,11 +1390,7 @@ const VendorDetails = ({
|
|
|
1389
1390
|
placeholder: "Select",
|
|
1390
1391
|
t: t
|
|
1391
1392
|
})
|
|
1392
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
1393
|
-
style: {
|
|
1394
|
-
paddingBottom: "10px"
|
|
1395
|
-
}
|
|
1396
|
-
}, /*#__PURE__*/React.createElement("div", null, t("STATUS"), /*#__PURE__*/React.createElement("div", {
|
|
1393
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", null, t("STATUS"), /*#__PURE__*/React.createElement("div", {
|
|
1397
1394
|
className: "tooltip",
|
|
1398
1395
|
style: {
|
|
1399
1396
|
width: "12px",
|
|
@@ -8131,29 +8128,27 @@ const SearchApplication = ({
|
|
|
8131
8128
|
}))), /*#__PURE__*/React.createElement("form", {
|
|
8132
8129
|
onSubmit: handleSubmit(onSubmitInput)
|
|
8133
8130
|
}, /*#__PURE__*/React.createElement("div", {
|
|
8134
|
-
className: FSTP ? "
|
|
8131
|
+
className: FSTP ? "for-pt for-search flex-box" : "flex-box",
|
|
8135
8132
|
style: {
|
|
8136
|
-
display: "grid",
|
|
8137
|
-
width: "100%",
|
|
8138
|
-
gridTemplateColumns: "33.33% 66.66% 0%",
|
|
8139
8133
|
gap: "16px"
|
|
8140
8134
|
}
|
|
8141
8135
|
}, searchFields === null || searchFields === void 0 ? void 0 : searchFields.map((input, index) => /*#__PURE__*/React.createElement("span", {
|
|
8142
8136
|
key: index,
|
|
8143
|
-
className: index === 0 ? "complaint-input" : "mobile-input"
|
|
8144
|
-
},
|
|
8137
|
+
className: index === 0 ? "finance-mainlayout-col2 complaint-input" : "finance-mainlayout-col2 mobile-input"
|
|
8138
|
+
}, getFields(input))), /*#__PURE__*/React.createElement("div", {
|
|
8145
8139
|
style: {
|
|
8146
8140
|
display: "flex",
|
|
8147
|
-
|
|
8148
|
-
gap: "16px"
|
|
8141
|
+
justifyContent: "end",
|
|
8142
|
+
gap: "16px",
|
|
8143
|
+
alignItems: "center"
|
|
8149
8144
|
}
|
|
8150
|
-
}, type === "desktop" && !mobileView && /*#__PURE__*/React.createElement(
|
|
8145
|
+
}, type === "desktop" && !mobileView && /*#__PURE__*/React.createElement("span", {
|
|
8146
|
+
className: "clear-search generic-button"
|
|
8147
|
+
}, clearAll()), type === "desktop" && !mobileView && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
8151
8148
|
className: "submit-bar-search",
|
|
8152
8149
|
label: t("ES_COMMON_SEARCH"),
|
|
8153
8150
|
submit: true
|
|
8154
|
-
}),
|
|
8155
|
-
className: "clear-search generic-button"
|
|
8156
|
-
}, clearAll()))), error ? /*#__PURE__*/React.createElement(CardLabelError, {
|
|
8151
|
+
}))), error ? /*#__PURE__*/React.createElement(CardLabelError, {
|
|
8157
8152
|
className: "search-error-label"
|
|
8158
8153
|
}, t("ES_SEARCH_APPLICATION_ERROR")) : null))));
|
|
8159
8154
|
};
|
|
@@ -9325,7 +9320,7 @@ const SelectServiceType = ({
|
|
|
9325
9320
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
9326
9321
|
}
|
|
9327
9322
|
if (userType === "employee") {
|
|
9328
|
-
return /*#__PURE__*/React.createElement(
|
|
9323
|
+
return /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t(config.label)), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
9329
9324
|
className: "payment-form-text-input-correction",
|
|
9330
9325
|
isMandatory: config.isMandatory,
|
|
9331
9326
|
selected: serviceTypes,
|
|
@@ -9975,21 +9970,11 @@ const EditVendorDetails = props => {
|
|
|
9975
9970
|
className: "additional-value"
|
|
9976
9971
|
}, safeVal));
|
|
9977
9972
|
})), /*#__PURE__*/React.createElement("div", {
|
|
9978
|
-
|
|
9979
|
-
marginTop: "16px",
|
|
9980
|
-
color: "#a82227",
|
|
9981
|
-
cursor: "pointer",
|
|
9982
|
-
textDecoration: "underline"
|
|
9983
|
-
},
|
|
9973
|
+
className: "add-details-link hover-button",
|
|
9984
9974
|
onClick: () => history.push(`/digit-ui/employee/vendor/registry/additionaldetails/info?vendorId=${dsoId}`)
|
|
9985
9975
|
}, t("Edit Details"))) : /*#__PURE__*/React.createElement("div", {
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
color: "#a82227",
|
|
9989
|
-
cursor: "pointer",
|
|
9990
|
-
textDecoration: "underline"
|
|
9991
|
-
},
|
|
9992
|
-
onClick: () => history.push(`/digit-ui/employee/vendor/registry/additionaldetails/vendor-details?vendorId=${dsoId}`)
|
|
9976
|
+
onClick: () => history.push(`/digit-ui/employee/vendor/registry/additionaldetails/vendor-details?vendorId=${dsoId}`),
|
|
9977
|
+
className: "add-details-link hover-button"
|
|
9993
9978
|
}, t("Add Additional Details")));
|
|
9994
9979
|
}
|
|
9995
9980
|
return /*#__PURE__*/React.createElement(Row, {
|
|
@@ -10043,11 +10028,7 @@ const EditVendorDetails = props => {
|
|
|
10043
10028
|
});
|
|
10044
10029
|
}));
|
|
10045
10030
|
}), detail.type && /*#__PURE__*/React.createElement("div", {
|
|
10046
|
-
|
|
10047
|
-
color: "#a82227",
|
|
10048
|
-
cursor: "pointer",
|
|
10049
|
-
marginLeft: "16px"
|
|
10050
|
-
},
|
|
10031
|
+
className: "add-details-link hover-button",
|
|
10051
10032
|
onClick: () => onActionSelect(detail.type === "ES_FSM_REGISTRY_DETAILS_TYPE_DRIVER" ? "ADD_DRIVER" : "ADD_VEHICLE")
|
|
10052
10033
|
}, t(`${detail.type}_ADD`))));
|
|
10053
10034
|
})), showModal && /*#__PURE__*/React.createElement(Modal, {
|
|
@@ -10841,11 +10822,13 @@ const CheckPage = ({
|
|
|
10841
10822
|
height: "auto"
|
|
10842
10823
|
},
|
|
10843
10824
|
checked: agree
|
|
10844
|
-
})), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(
|
|
10825
|
+
})), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("div", {
|
|
10826
|
+
className: "formcomposer-section-button"
|
|
10827
|
+
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
10845
10828
|
label: t("COMMON_BUTTON_SUBMIT"),
|
|
10846
10829
|
onSubmit: onSubmit,
|
|
10847
10830
|
disabled: !agree
|
|
10848
|
-
}))));
|
|
10831
|
+
})))));
|
|
10849
10832
|
};
|
|
10850
10833
|
|
|
10851
10834
|
const GetActionMessage = props => {
|
|
@@ -11060,6 +11043,7 @@ const DriverDetails = props => {
|
|
|
11060
11043
|
});
|
|
11061
11044
|
queryClient.invalidateQueries("DSO_SEARCH");
|
|
11062
11045
|
setTimeout(() => {
|
|
11046
|
+
closeToast();
|
|
11063
11047
|
history.push(`/digit-ui/employee/fsm/registry`);
|
|
11064
11048
|
}, 5000);
|
|
11065
11049
|
}
|
|
@@ -11224,7 +11208,6 @@ const DriverDetails = props => {
|
|
|
11224
11208
|
}));
|
|
11225
11209
|
}
|
|
11226
11210
|
};
|
|
11227
|
-
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
11228
11211
|
if (isLoading) {
|
|
11229
11212
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
11230
11213
|
}
|
|
@@ -11232,7 +11215,8 @@ const DriverDetails = props => {
|
|
|
11232
11215
|
className: "employee-form-content"
|
|
11233
11216
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
11234
11217
|
style: {
|
|
11235
|
-
position: "relative"
|
|
11218
|
+
position: "relative",
|
|
11219
|
+
backgroundColor: "#fff"
|
|
11236
11220
|
}
|
|
11237
11221
|
}, driverData === null || driverData === void 0 ? void 0 : (_driverData$5 = driverData[0]) === null || _driverData$5 === void 0 ? void 0 : (_driverData$5$employe = _driverData$5.employeeResponse) === null || _driverData$5$employe === void 0 ? void 0 : _driverData$5$employe.map((detail, index) => {
|
|
11238
11222
|
var _detail$values;
|
|
@@ -11253,33 +11237,35 @@ const DriverDetails = props => {
|
|
|
11253
11237
|
className: "value",
|
|
11254
11238
|
style: {
|
|
11255
11239
|
color: "#a82227",
|
|
11256
|
-
display: "flex"
|
|
11240
|
+
display: "flex",
|
|
11241
|
+
gap: "20px",
|
|
11242
|
+
alignItems: "center"
|
|
11257
11243
|
}
|
|
11258
11244
|
}, t(value.value) || "N/A", value.value === "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("span", {
|
|
11245
|
+
className: "add-details-link hover-button hover-button-round",
|
|
11259
11246
|
onClick: () => onActionSelect("ADD_VENDOR")
|
|
11260
11247
|
}, /*#__PURE__*/React.createElement(AddIcon, {
|
|
11261
11248
|
className: "",
|
|
11262
11249
|
fill: "#a82227",
|
|
11263
11250
|
styles: {
|
|
11264
11251
|
cursor: "pointer",
|
|
11265
|
-
marginLeft: "20px",
|
|
11266
11252
|
height: "24px"
|
|
11267
11253
|
}
|
|
11268
|
-
})), value.value
|
|
11254
|
+
})), value.value !== "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("div", {
|
|
11255
|
+
className: "add-details-link hover-button hover-button-round",
|
|
11269
11256
|
onClick: () => onActionSelect("EDIT_VENDOR")
|
|
11270
11257
|
}, /*#__PURE__*/React.createElement(EditIcon, {
|
|
11271
11258
|
style: {
|
|
11272
|
-
cursor: "pointer"
|
|
11273
|
-
marginLeft: "20px"
|
|
11259
|
+
cursor: "pointer"
|
|
11274
11260
|
}
|
|
11275
|
-
})), value.value
|
|
11261
|
+
})), value.value !== "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("div", {
|
|
11262
|
+
className: "add-details-link hover-button hover-button-round",
|
|
11276
11263
|
onClick: () => onActionSelect("DELETE_VENDOR")
|
|
11277
11264
|
}, /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
11278
11265
|
className: "delete",
|
|
11279
11266
|
fill: "#a82227",
|
|
11280
11267
|
style: {
|
|
11281
|
-
cursor: "pointer"
|
|
11282
|
-
marginLeft: "20px"
|
|
11268
|
+
cursor: "pointer"
|
|
11283
11269
|
}
|
|
11284
11270
|
}))))) : /*#__PURE__*/React.createElement(Row, {
|
|
11285
11271
|
key: t(value.title),
|
|
@@ -11349,7 +11335,6 @@ const CloseBtn$2 = props => {
|
|
|
11349
11335
|
const VehicleDetails = props => {
|
|
11350
11336
|
var _vehicleData$6, _vehicleData$6$employ;
|
|
11351
11337
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
11352
|
-
const state = Digit.ULBService.getStateId();
|
|
11353
11338
|
const {
|
|
11354
11339
|
t
|
|
11355
11340
|
} = useTranslation();
|
|
@@ -11360,7 +11345,6 @@ const VehicleDetails = props => {
|
|
|
11360
11345
|
} = useParams();
|
|
11361
11346
|
const [displayMenu, setDisplayMenu] = useState(false);
|
|
11362
11347
|
const [selectedAction, setSelectedAction] = useState(null);
|
|
11363
|
-
const [config, setCurrentConfig] = useState({});
|
|
11364
11348
|
const [showModal, setShowModal] = useState(false);
|
|
11365
11349
|
const [showToast, setShowToast] = useState(null);
|
|
11366
11350
|
const [vendors, setVendors] = useState([]);
|
|
@@ -11590,6 +11574,7 @@ const VehicleDetails = props => {
|
|
|
11590
11574
|
});
|
|
11591
11575
|
queryClient.invalidateQueries("FSM_VEICLES_SEARCH");
|
|
11592
11576
|
setTimeout(() => {
|
|
11577
|
+
closeToast();
|
|
11593
11578
|
history.push(`/digit-ui/employee/fsm/registry`);
|
|
11594
11579
|
}, 5000);
|
|
11595
11580
|
}
|
|
@@ -11604,7 +11589,7 @@ const VehicleDetails = props => {
|
|
|
11604
11589
|
});
|
|
11605
11590
|
}
|
|
11606
11591
|
if (selectedAction === "ADD_VENDOR") {
|
|
11607
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11592
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11608
11593
|
t: t,
|
|
11609
11594
|
option: vendors,
|
|
11610
11595
|
value: selectedOption,
|
|
@@ -11614,7 +11599,7 @@ const VehicleDetails = props => {
|
|
|
11614
11599
|
}));
|
|
11615
11600
|
}
|
|
11616
11601
|
if (selectedAction === "EDIT_VENDOR") {
|
|
11617
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11602
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
|
|
11618
11603
|
t: t,
|
|
11619
11604
|
option: vendors,
|
|
11620
11605
|
value: selectedOption,
|
|
@@ -11656,40 +11641,38 @@ const VehicleDetails = props => {
|
|
|
11656
11641
|
}
|
|
11657
11642
|
}, t(detail.title)), /*#__PURE__*/React.createElement(StatusTable, null, detail === null || detail === void 0 ? void 0 : (_detail$values = detail.values) === null || _detail$values === void 0 ? void 0 : _detail$values.map((value, index) => {
|
|
11658
11643
|
var _detail$values2, _detail$values3;
|
|
11659
|
-
return (value === null || value === void 0 ? void 0 : value.type) === "custom" ? /*#__PURE__*/React.createElement(
|
|
11644
|
+
return (value === null || value === void 0 ? void 0 : value.type) === "custom" ? /*#__PURE__*/React.createElement(React.Fragment, {
|
|
11645
|
+
key: index
|
|
11646
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11660
11647
|
className: `${index === (detail === null || detail === void 0 ? void 0 : (_detail$values2 = detail.values) === null || _detail$values2 === void 0 ? void 0 : _detail$values2.length) - 1 ? "row last" : "row"} border-none`
|
|
11661
11648
|
}, /*#__PURE__*/React.createElement("h2", null, t(value.title)), /*#__PURE__*/React.createElement("div", {
|
|
11662
|
-
className: "value",
|
|
11649
|
+
className: "value add-details-link hover-button",
|
|
11663
11650
|
style: {
|
|
11664
11651
|
color: "#a82227",
|
|
11665
|
-
display: "flex"
|
|
11652
|
+
display: "flex",
|
|
11653
|
+
alignItems: "center",
|
|
11654
|
+
gap: "8px"
|
|
11655
|
+
}
|
|
11656
|
+
}, value.value === "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("div", {
|
|
11657
|
+
onClick: () => onActionSelect("ADD_VENDOR"),
|
|
11658
|
+
style: {
|
|
11659
|
+
color: "#a82227",
|
|
11660
|
+
display: "flex",
|
|
11661
|
+
alignItems: "center",
|
|
11662
|
+
gap: "8px"
|
|
11666
11663
|
}
|
|
11667
|
-
}, t(value.value) || "N/A", value.value === "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("span", {
|
|
11668
|
-
onClick: () => onActionSelect("ADD_VENDOR")
|
|
11669
11664
|
}, /*#__PURE__*/React.createElement(AddIcon, {
|
|
11670
11665
|
className: "",
|
|
11671
|
-
fill: "#a82227"
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
marginLeft: "20px",
|
|
11675
|
-
height: "24px"
|
|
11676
|
-
}
|
|
11677
|
-
})), value.value != "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("span", {
|
|
11666
|
+
fill: "#a82227"
|
|
11667
|
+
}), " ", t(value.value) || "N/A"), value.value !== "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("div", {
|
|
11668
|
+
className: "add-details-link hover-button",
|
|
11678
11669
|
onClick: () => onActionSelect("EDIT_VENDOR")
|
|
11679
|
-
}, /*#__PURE__*/React.createElement(EditIcon, {
|
|
11680
|
-
|
|
11681
|
-
cursor: "pointer",
|
|
11682
|
-
marginLeft: "20px"
|
|
11683
|
-
}
|
|
11684
|
-
})), value.value != "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("span", {
|
|
11670
|
+
}, /*#__PURE__*/React.createElement(EditIcon, null)), value.value !== "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("div", {
|
|
11671
|
+
className: "add-details-link hover-button",
|
|
11685
11672
|
onClick: () => onActionSelect("DELETE_VENDOR")
|
|
11686
11673
|
}, /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
11687
11674
|
className: "delete",
|
|
11688
|
-
fill: "#a82227"
|
|
11689
|
-
style: {
|
|
11690
|
-
cursor: "pointer",
|
|
11691
|
-
marginLeft: "20px"
|
|
11692
|
-
}
|
|
11675
|
+
fill: "#a82227"
|
|
11693
11676
|
}))))) : /*#__PURE__*/React.createElement(Row, {
|
|
11694
11677
|
key: t(value.title),
|
|
11695
11678
|
label: t(value.title),
|