@djb25/digit-ui-module-vendor 1.0.18 → 1.0.20

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.
@@ -1,7 +1,7 @@
1
- import React, { useEffect, useMemo, useCallback, useState, Fragment } from 'react';
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, LabelFieldPair, UploadFile, CardSubHeader, CardText, RadioOrSelect, ShippingTruck, CheckBox, RadioButtons, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, AddIcon, Menu, Label, LinkLabel, ToggleSwitch, CardSectionHeader, Row, EditIcon, DeleteIcon, Modal, InfoIcon, CardHeader, StatusTable, LinkButton, Banner } from '@djb25/digit-ui-react-components';
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
 
@@ -699,7 +699,6 @@ const AddVendor = ({
699
699
  const [currentStep, setCurrentStep] = useState(1);
700
700
  const [showToast, setShowToast] = useState(null);
701
701
  const [canSubmit, setCanSubmit] = useState(false);
702
- const [step1Data, setStep1Data] = useState({});
703
702
  const [mutationHappened, setMutationHappened, clear] = Digit.Hooks.useSessionStorage("FSM_MUTATION_HAPPENED", false);
704
703
  const [errorInfo, setErrorInfo, clearError] = Digit.Hooks.useSessionStorage("FSM_ERROR_DATA", false);
705
704
  const [successData, setsuccessData, clearSuccessData] = Digit.Hooks.useSessionStorage("FSM_MUTATION_SUCCESS_DATA", false);
@@ -728,8 +727,6 @@ const AddVendor = ({
728
727
  amount: null
729
728
  }
730
729
  };
731
- const vendorStepConfig = Config.filter(config => config.head === "ES_VRNDOR_NEW_VENDOR_DETAILS");
732
- const addressStepConfig = Config.filter(config => config.head === "ES_FSM_REGISTRY_NEW_ADDRESS_DETAILS");
733
730
  const onFormValueChange = (setValue, formData) => {
734
731
  var _formData$serviceType;
735
732
  if (formData !== null && formData !== void 0 && formData.vendorName && formData !== null && formData !== void 0 && formData.phone && formData !== null && formData !== void 0 && (_formData$serviceType = formData.serviceType) !== null && _formData$serviceType !== void 0 && _formData$serviceType.code) {
@@ -743,15 +740,7 @@ const AddVendor = ({
743
740
  };
744
741
  const onSubmit = data => {
745
742
  var _mergedData$street, _mergedData$doorNo, _mergedData$plotNo, _mergedData$landmark, _mergedData$address, _mergedData$address$c, _mergedData$address2, _mergedData$address2$, _mergedData$address3, _mergedData$address3$, _mergedData$address4, _mergedData$address4$, _mergedData$buildingN, _mergedData$address5, _mergedData$address5$, _mergedData$address6, _mergedData$address6$, _mergedData$address7, _mergedData$address7$, _mergedData$serviceTy, _mergedData$address8, _mergedData$address9;
746
- if (currentStep === 1) {
747
- setStep1Data(data);
748
- setCurrentStep(2);
749
- return;
750
- }
751
- const mergedData = {
752
- ...step1Data,
753
- ...data
754
- };
743
+ const mergedData = data;
755
744
  const name = mergedData === null || mergedData === void 0 ? void 0 : mergedData.vendorName;
756
745
  const pincode = mergedData === null || mergedData === void 0 ? void 0 : mergedData.pincode;
757
746
  const street = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$street = mergedData.street) === null || _mergedData$street === void 0 ? void 0 : _mergedData$street.trim();
@@ -857,34 +846,19 @@ const AddVendor = ({
857
846
  flex: "1",
858
847
  overflowY: "auto"
859
848
  }
860
- }, currentStep === 1 && /*#__PURE__*/React.createElement(FormComposer, {
861
- key: "step1",
862
- isDisabled: !canSubmit,
863
- label: t("CS_COMMON_NEXT"),
864
- config: vendorStepConfig.filter(i => !i.hideInEmployee).map(config => ({
865
- ...config,
866
- body: config.body.filter(a => !a.hideInEmployee)
867
- })),
868
- onSubmit: onSubmit,
869
- defaultValues: {
870
- ...defaultValues,
871
- ...step1Data
872
- },
873
- onFormValueChange: onFormValueChange,
874
- noBreakLine: true
875
- }), currentStep === 2 && /*#__PURE__*/React.createElement(FormComposer, {
876
- key: "step2",
849
+ }, /*#__PURE__*/React.createElement(FormComposer, {
877
850
  label: t("ES_COMMON_APPLICATION_SUBMIT"),
878
- config: addressStepConfig.filter(i => !i.hideInEmployee).map(config => ({
851
+ config: Config.filter(i => !i.hideInEmployee).map(config => ({
879
852
  ...config,
853
+ isCollapsible: true,
854
+ isDefaultOpen: true,
880
855
  body: config.body.filter(a => !a.hideInEmployee)
881
856
  })),
882
857
  onSubmit: onSubmit,
883
- defaultValues: {
884
- ...defaultValues
885
- },
886
- onFormValueChange: (setValue, formData) => {},
887
- noBreakLine: true
858
+ defaultValues: defaultValues,
859
+ onFormValueChange: onFormValueChange,
860
+ noBreakLine: true,
861
+ noCard: true
888
862
  }), showToast && /*#__PURE__*/React.createElement(Toast, {
889
863
  error: showToast.key === "error",
890
864
  label: t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_SUCCESS` : showToast.action),
@@ -1095,8 +1069,9 @@ const VendorDetails = ({
1095
1069
  }, /*#__PURE__*/React.createElement(FormStep, {
1096
1070
  config: config,
1097
1071
  onSelect: goNext,
1098
- t: t
1099
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
1072
+ t: t,
1073
+ className: "formcomposer-grid-container-form"
1074
+ }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
1100
1075
  className: "card-label-smaller"
1101
1076
  }, /*#__PURE__*/React.createElement(Tooltip, {
1102
1077
  label: `${t("IFSC_CODE")}`,
@@ -1121,7 +1096,7 @@ const VendorDetails = ({
1121
1096
  pattern: "^[A-Z]{4}0[A-Z0-9]{6}$",
1122
1097
  type: "text",
1123
1098
  title: t("INVALID_IFSC_CODE_ERROR_MESSAGE")
1124
- }))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_BANK_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
1099
+ }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_BANK_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
1125
1100
  className: "check-page-link-button"
1126
1101
  }, "*")), /*#__PURE__*/React.createElement(TextInput, {
1127
1102
  t: t,
@@ -1136,7 +1111,7 @@ const VendorDetails = ({
1136
1111
  value: Bank,
1137
1112
  onChange: setvendorbank,
1138
1113
  disabled: true
1139
- })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_BANK_BRANCH_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
1114
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_BANK_BRANCH_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
1140
1115
  className: "check-page-link-button"
1141
1116
  }, "*")), /*#__PURE__*/React.createElement(TextInput, {
1142
1117
  t: t,
@@ -1151,7 +1126,7 @@ const VendorDetails = ({
1151
1126
  placeholder: "Bank Branch Name Auto Select",
1152
1127
  onChange: setBankbranch,
1153
1128
  disabled: false
1154
- })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_MICR_NO")}`, " ", /*#__PURE__*/React.createElement("span", {
1129
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("VENDOR_MICR_NO")}`, " ", /*#__PURE__*/React.createElement("span", {
1155
1130
  className: "check-page-link-button"
1156
1131
  }, "*")), /*#__PURE__*/React.createElement(TextInput, {
1157
1132
  t: t,
@@ -1166,7 +1141,7 @@ const VendorDetails = ({
1166
1141
  placeholder: "MICR No",
1167
1142
  onChange: setmicrNo,
1168
1143
  disabled: false
1169
- })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("ACCOUNT_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1144
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("ACCOUNT_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1170
1145
  t: t,
1171
1146
  type: "text",
1172
1147
  isMandatory: false,
@@ -1183,14 +1158,14 @@ const VendorDetails = ({
1183
1158
  pattern: "[0-9]{9,18}",
1184
1159
  type: "text",
1185
1160
  title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
1186
- }))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PHONE_NO")}`), /*#__PURE__*/React.createElement(MobileNumber, {
1161
+ }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PHONE_NO")}`), /*#__PURE__*/React.createElement(MobileNumber, {
1187
1162
  value: PhoneNo,
1188
1163
  name: "PhoneNo",
1189
1164
  onChange: setPhoneNo,
1190
1165
  style: {
1191
1166
  width: "100%"
1192
1167
  }
1193
- })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("CONTACT_PERSON")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1168
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("CONTACT_PERSON")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1194
1169
  t: t,
1195
1170
  type: "text",
1196
1171
  isMandatory: false,
@@ -1207,7 +1182,7 @@ const VendorDetails = ({
1207
1182
  pattern: "^[a-zA-Z0-9/-]{1,20}$",
1208
1183
  type: "text",
1209
1184
  title: t("INVALID_ACCOUNT_NO_ERROR_MESSAGE")
1210
- }))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PAN_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1185
+ }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PAN_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1211
1186
  t: t,
1212
1187
  type: "text",
1213
1188
  isMandatory: false,
@@ -1224,7 +1199,7 @@ const VendorDetails = ({
1224
1199
  pattern: "[A-Z]{5}[0-9]{4}[A-Z]{1}",
1225
1200
  type: "text",
1226
1201
  title: t("INVALID_PAN_NO_ERROR_MESSAGE")
1227
- }))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("GST_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1202
+ }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("GST_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1228
1203
  t: t,
1229
1204
  type: "text",
1230
1205
  isMandatory: false,
@@ -1241,7 +1216,7 @@ const VendorDetails = ({
1241
1216
  pattern: "^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[A-Z0-9]{1}[Z]{1}[A-Z0-9]{1}$",
1242
1217
  type: "text",
1243
1218
  title: t("INVALID_GST_NO_ERROR_MESSAGE")
1244
- }))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("GST_REGISTERED_STATE/UT")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1219
+ }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("GST_REGISTERED_STATE/UT")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1245
1220
  t: t,
1246
1221
  type: "text",
1247
1222
  isMandatory: false,
@@ -1258,7 +1233,7 @@ const VendorDetails = ({
1258
1233
  pattern: "^[a-zA-Z0-9/-]{1,20}$",
1259
1234
  type: "text",
1260
1235
  title: t("PT_NAME_ERROR_MESSAGE")
1261
- }))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("REGISTRATION_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1236
+ }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("REGISTRATION_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1262
1237
  t: t,
1263
1238
  type: "text",
1264
1239
  isMandatory: false,
@@ -1275,7 +1250,7 @@ const VendorDetails = ({
1275
1250
  pattern: "^[a-zA-Z0-9/-]{1,20}$",
1276
1251
  type: "text",
1277
1252
  title: t("INVALID_REGISTRATION_NO_ERROR_MESSAGE")
1278
- }))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("EPF_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1253
+ }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("EPF_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1279
1254
  t: t,
1280
1255
  type: "text",
1281
1256
  isMandatory: false,
@@ -1292,7 +1267,7 @@ const VendorDetails = ({
1292
1267
  pattern: "^[a-zA-Z0-9/-]{1,15}$",
1293
1268
  type: "text",
1294
1269
  title: t("INVALID_EPF_NO_ERROR_MESSAGE")
1295
- }))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("ESI_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1270
+ }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("ESI_NO")}`), /*#__PURE__*/React.createElement(TextInput, Object.assign({
1296
1271
  t: t,
1297
1272
  type: "text",
1298
1273
  isMandatory: false,
@@ -1309,7 +1284,7 @@ const VendorDetails = ({
1309
1284
  pattern: "^[a-zA-Z0-9/-]{1,20}$",
1310
1285
  type: "text",
1311
1286
  title: t("INVALID_ESI_NO_ERROR_MESSAGE")
1312
- }))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t("VENDOR_TYPE"), /*#__PURE__*/React.createElement("div", {
1287
+ }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", null, t("VENDOR_TYPE"), /*#__PURE__*/React.createElement("div", {
1313
1288
  className: "tooltip",
1314
1289
  style: {
1315
1290
  width: "12px",
@@ -1349,7 +1324,7 @@ const VendorDetails = ({
1349
1324
  placeholder: "Select",
1350
1325
  t: t
1351
1326
  })
1352
- })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t("VENOR_CATEGORY"), /*#__PURE__*/React.createElement("div", {
1327
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", null, t("VENOR_CATEGORY"), /*#__PURE__*/React.createElement("div", {
1353
1328
  className: "tooltip",
1354
1329
  style: {
1355
1330
  width: "12px",
@@ -1389,11 +1364,7 @@ const VendorDetails = ({
1389
1364
  placeholder: "Select",
1390
1365
  t: t
1391
1366
  })
1392
- })), /*#__PURE__*/React.createElement("div", {
1393
- style: {
1394
- paddingBottom: "10px"
1395
- }
1396
- }, /*#__PURE__*/React.createElement("div", null, t("STATUS"), /*#__PURE__*/React.createElement("div", {
1367
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", null, t("STATUS"), /*#__PURE__*/React.createElement("div", {
1397
1368
  className: "tooltip",
1398
1369
  style: {
1399
1370
  width: "12px",
@@ -8131,27 +8102,27 @@ const SearchApplication = ({
8131
8102
  }))), /*#__PURE__*/React.createElement("form", {
8132
8103
  onSubmit: handleSubmit(onSubmitInput)
8133
8104
  }, /*#__PURE__*/React.createElement("div", {
8134
- className: FSTP ? "complaint-input-container for-pt for-search" : "complaint-input-container",
8105
+ className: FSTP ? "for-pt for-search flex-box" : "flex-box",
8135
8106
  style: {
8136
- display: "grid",
8137
- width: "100%",
8138
- gridTemplateColumns: "33.33% 66.66% 0%",
8139
8107
  gap: "16px"
8140
8108
  }
8141
8109
  }, searchFields === null || searchFields === void 0 ? void 0 : searchFields.map((input, index) => /*#__PURE__*/React.createElement("span", {
8142
8110
  key: index,
8143
- className: index === 0 ? "complaint-input" : "mobile-input"
8144
- }, /*#__PURE__*/React.createElement(Label, null, input.label), getFields(input), " ")), /*#__PURE__*/React.createElement("div", {
8145
- className: "finance-mainlayout-col1"
8146
- }, /*#__PURE__*/React.createElement(Label, null, "\xA0"), type === "desktop" && !mobileView && /*#__PURE__*/React.createElement(SubmitBar, {
8111
+ className: index === 0 ? "finance-mainlayout-col1 complaint-input" : "finance-mainlayout-col1 mobile-input"
8112
+ }, getFields(input))), /*#__PURE__*/React.createElement("div", {
8113
+ style: {
8114
+ display: "flex",
8115
+ justifyContent: "end",
8116
+ gap: "16px",
8117
+ alignItems: "center"
8118
+ }
8119
+ }, type === "desktop" && !mobileView && /*#__PURE__*/React.createElement("span", {
8120
+ className: "clear-search generic-button"
8121
+ }, clearAll()), type === "desktop" && !mobileView && /*#__PURE__*/React.createElement(SubmitBar, {
8147
8122
  className: "submit-bar-search",
8148
8123
  label: t("ES_COMMON_SEARCH"),
8149
8124
  submit: true
8150
- })), /*#__PURE__*/React.createElement("div", {
8151
- className: "finance-mainlayout-col1"
8152
- }, /*#__PURE__*/React.createElement(Label, null, "\xA0"), type === "desktop" && !mobileView && /*#__PURE__*/React.createElement("span", {
8153
- className: "clear-search generic-button"
8154
- }, clearAll()))), error ? /*#__PURE__*/React.createElement(CardLabelError, {
8125
+ }))), error ? /*#__PURE__*/React.createElement(CardLabelError, {
8155
8126
  className: "search-error-label"
8156
8127
  }, t("ES_SEARCH_APPLICATION_ERROR")) : null))));
8157
8128
  };
@@ -8166,6 +8137,36 @@ const parseAdditionalDetails = additionalDetails => {
8166
8137
  return {};
8167
8138
  }
8168
8139
  };
8140
+ const getFillingPointIdentifiers = fillingPoint => {
8141
+ var _fillingPoint$filling;
8142
+ if (!fillingPoint) return [];
8143
+ if (typeof fillingPoint === "string" || typeof fillingPoint === "number") return [String(fillingPoint)];
8144
+ return [fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.id, fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.fillingStationId, fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.bookingId, fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.fillingPointId, fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.uuid, fillingPoint === null || fillingPoint === void 0 ? void 0 : (_fillingPoint$filling = fillingPoint.fillingpointmetadata) === null || _fillingPoint$filling === void 0 ? void 0 : _fillingPoint$filling.fillingPointId].filter(value => value !== undefined && value !== null && value !== "").map(String);
8145
+ };
8146
+ const getRowFillingPointIdentifiers = (row = {}) => {
8147
+ var _row$dsoDetails, _row$fillingpointmeta, _row$dsoDetails2;
8148
+ return Array.from(new Set([...[row === null || row === void 0 ? void 0 : row.fillingPointId, row === null || row === void 0 ? void 0 : (_row$dsoDetails = row.dsoDetails) === null || _row$dsoDetails === void 0 ? void 0 : _row$dsoDetails.fillingPointId, row === null || row === void 0 ? void 0 : (_row$fillingpointmeta = row.fillingpointmetadata) === null || _row$fillingpointmeta === void 0 ? void 0 : _row$fillingpointmeta.fillingPointId, row === null || row === void 0 ? void 0 : row.fillingPtName, row === null || row === void 0 ? void 0 : row.filling_pt_name].filter(value => value !== undefined && value !== null && value !== "").map(String), ...getFillingPointIdentifiers(row === null || row === void 0 ? void 0 : row.fillingPoint), ...getFillingPointIdentifiers(row === null || row === void 0 ? void 0 : (_row$dsoDetails2 = row.dsoDetails) === null || _row$dsoDetails2 === void 0 ? void 0 : _row$dsoDetails2.fillingPoint), ...getFillingPointIdentifiers(row === null || row === void 0 ? void 0 : row.fillingPointDetail)]));
8149
+ };
8150
+ const getSelectedFillingPointOption = (row, fillingPoints = []) => {
8151
+ const rowFillingPointIdentifiers = getRowFillingPointIdentifiers(row);
8152
+ if (!rowFillingPointIdentifiers.length) return null;
8153
+ return fillingPoints.find(fillingPoint => getFillingPointIdentifiers(fillingPoint).some(identifier => rowFillingPointIdentifiers.includes(identifier))) || null;
8154
+ };
8155
+ const getFillingPointDisplayValue = (row = {}) => {
8156
+ var _row$fillingPoint, _row$dsoDetails3, _row$dsoDetails3$fill, _row$dsoDetails4, _row$dsoDetails5, _row$dsoDetails6, _row$dsoDetails7, _row$fillingpointmeta2;
8157
+ return (row === null || row === void 0 ? void 0 : (_row$fillingPoint = row.fillingPoint) === null || _row$fillingPoint === void 0 ? void 0 : _row$fillingPoint.fillingPointName) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails3 = row.dsoDetails) === null || _row$dsoDetails3 === void 0 ? void 0 : (_row$dsoDetails3$fill = _row$dsoDetails3.fillingPoint) === null || _row$dsoDetails3$fill === void 0 ? void 0 : _row$dsoDetails3$fill.fillingPointName) || (row === null || row === void 0 ? void 0 : row.fillingPointName) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails4 = row.dsoDetails) === null || _row$dsoDetails4 === void 0 ? void 0 : _row$dsoDetails4.fillingPointName) || (row === null || row === void 0 ? void 0 : row.fillingPointId) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails5 = row.dsoDetails) === null || _row$dsoDetails5 === void 0 ? void 0 : _row$dsoDetails5.fillingPointId) || (typeof (row === null || row === void 0 ? void 0 : row.fillingPoint) === "string" ? row === null || row === void 0 ? void 0 : row.fillingPoint : null) || (typeof (row === null || row === void 0 ? void 0 : (_row$dsoDetails6 = row.dsoDetails) === null || _row$dsoDetails6 === void 0 ? void 0 : _row$dsoDetails6.fillingPoint) === "string" ? row === null || row === void 0 ? void 0 : (_row$dsoDetails7 = row.dsoDetails) === null || _row$dsoDetails7 === void 0 ? void 0 : _row$dsoDetails7.fillingPoint : null) || (row === null || row === void 0 ? void 0 : (_row$fillingpointmeta2 = row.fillingpointmetadata) === null || _row$fillingpointmeta2 === void 0 ? void 0 : _row$fillingpointmeta2.fillingPointId) || (row === null || row === void 0 ? void 0 : row.filling_pt_name) || (row === null || row === void 0 ? void 0 : row.fillingPtName) || "NA";
8158
+ };
8159
+ const normalizeFillingPointForVehicleUpdate = fillingPoint => {
8160
+ if (!fillingPoint || typeof fillingPoint !== "object") return fillingPoint;
8161
+ const {
8162
+ id,
8163
+ ...rest
8164
+ } = fillingPoint;
8165
+ return {
8166
+ ...rest,
8167
+ fillingStationId: (fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.fillingStationId) || id || (fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.bookingId) || (fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.uuid) || (fillingPoint === null || fillingPoint === void 0 ? void 0 : fillingPoint.fillingPointId)
8168
+ };
8169
+ };
8169
8170
  const VendorInbox = props => {
8170
8171
  const tenantId = Digit.ULBService.getCurrentTenantId();
8171
8172
  const {
@@ -8182,7 +8183,6 @@ const VendorInbox = props => {
8182
8183
  const [vendors, setVendors] = useState([]);
8183
8184
  const [drivers, setDrivers] = useState([]);
8184
8185
  const queryClient = useQueryClient();
8185
- const [toast, setToast] = useState(null);
8186
8186
  const {
8187
8187
  data: vendorData,
8188
8188
  isLoading: isVendorLoading,
@@ -8252,6 +8252,20 @@ const VendorInbox = props => {
8252
8252
  const closeToast = () => {
8253
8253
  setShowToast(null);
8254
8254
  };
8255
+ const getVehicleUpdatePayload = (vehicle, overrides = {}) => {
8256
+ const normalizedVehicle = {
8257
+ ...vehicle,
8258
+ ...overrides,
8259
+ driverData: (overrides === null || overrides === void 0 ? void 0 : overrides.driverData) || (vehicle === null || vehicle === void 0 ? void 0 : vehicle.driverData) || (vehicle === null || vehicle === void 0 ? void 0 : vehicle.driver),
8260
+ fillingPoint: normalizeFillingPointForVehicleUpdate(Object.prototype.hasOwnProperty.call(overrides, "fillingPoint") ? overrides.fillingPoint : vehicle === null || vehicle === void 0 ? void 0 : vehicle.fillingPoint)
8261
+ };
8262
+ delete normalizedVehicle.vendor;
8263
+ delete normalizedVehicle.popup;
8264
+ delete normalizedVehicle.driver;
8265
+ return {
8266
+ vehicle: normalizedVehicle
8267
+ };
8268
+ };
8255
8269
  const onVendorUpdate = row => {
8256
8270
  var _formDetails$owner, _formDetails$owner2, _formDetails$owner3, _formDetails$owner4;
8257
8271
  let formDetails = row.original.dsoDetails;
@@ -8288,14 +8302,10 @@ const VendorInbox = props => {
8288
8302
  });
8289
8303
  };
8290
8304
  const onVehicleUpdate = row => {
8291
- let formDetails = row.original;
8292
- delete formDetails.vendor;
8293
- const formData = {
8294
- vehicle: {
8295
- ...formDetails,
8296
- status: (formDetails === null || formDetails === void 0 ? void 0 : formDetails.status) === "ACTIVE" ? "DISABLED" : "ACTIVE"
8297
- }
8298
- };
8305
+ var _row$original;
8306
+ const formData = getVehicleUpdatePayload(row.original, {
8307
+ status: ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.status) === "ACTIVE" ? "DISABLED" : "ACTIVE"
8308
+ });
8299
8309
  mutateVehicle(formData, {
8300
8310
  onError: (error, variables) => {
8301
8311
  setShowToast({
@@ -8389,14 +8399,9 @@ const VendorInbox = props => {
8389
8399
  });
8390
8400
  };
8391
8401
  const onDriverSelect = (row, selectedOption) => {
8392
- let vehicleData = row.original;
8393
- let selectedDriver = selectedOption;
8394
- const formData = {
8395
- vehicle: {
8396
- ...vehicleData,
8397
- driverData: selectedDriver
8398
- }
8399
- };
8402
+ const formData = getVehicleUpdatePayload(row.original, {
8403
+ driverData: selectedOption
8404
+ });
8400
8405
  mutateVehicle(formData, {
8401
8406
  onError: (error, variables) => {
8402
8407
  setShowToast({
@@ -8418,6 +8423,42 @@ const VendorInbox = props => {
8418
8423
  }
8419
8424
  });
8420
8425
  };
8426
+ const onVehicleFillingPointSelect = (row, selectedOption) => {
8427
+ const formData = getVehicleUpdatePayload(row.original, {
8428
+ fillingPoint: selectedOption
8429
+ });
8430
+ mutateVehicle(formData, {
8431
+ onError: error => {
8432
+ var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
8433
+ setShowToast({
8434
+ key: "error",
8435
+ label: (error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : (_error$response$data$ = _error$response$data.Errors) === null || _error$response$data$ === void 0 ? void 0 : (_error$response$data$2 = _error$response$data$[0]) === null || _error$response$data$2 === void 0 ? void 0 : _error$response$data$2.message) || "Failed to map filling point"
8436
+ });
8437
+ setTimeout(closeToast, 5000);
8438
+ },
8439
+ onSuccess: () => {
8440
+ setTableData(currentTableData => currentTableData.map(vehicle => {
8441
+ var _row$original2;
8442
+ return (vehicle === null || vehicle === void 0 ? void 0 : vehicle.id) === ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.id) ? {
8443
+ ...vehicle,
8444
+ fillingPoint: {
8445
+ ...selectedOption,
8446
+ fillingStationId: (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.fillingStationId) || (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.id) || (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.bookingId) || (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.uuid) || (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.fillingPointId)
8447
+ }
8448
+ } : vehicle;
8449
+ }));
8450
+ setShowToast({
8451
+ key: "success",
8452
+ label: "Filling point mapped successfully"
8453
+ });
8454
+ queryClient.invalidateQueries("FSM_VEICLES_SEARCH");
8455
+ queryClient.invalidateQueries("DSO_SEARCH");
8456
+ props.refetchData();
8457
+ props.refetchVendor && props.refetchVendor();
8458
+ setTimeout(closeToast, 3000);
8459
+ }
8460
+ });
8461
+ };
8421
8462
  const onSelectAdd = () => {
8422
8463
  switch (props.selectedTab) {
8423
8464
  case "VENDOR":
@@ -8473,8 +8514,9 @@ const VendorInbox = props => {
8473
8514
  };
8474
8515
  mapFixedFilling(payload, {
8475
8516
  onSuccess: () => {
8476
- setToast({
8477
- label: t("WT_FIXED_FILLING_MAPPING_SUCCESS")
8517
+ setShowToast({
8518
+ key: "success",
8519
+ label: "WT_FIXED_FILLING_MAPPING_SUCCESS"
8478
8520
  });
8479
8521
  props.refetchData();
8480
8522
  props.refetchVendor && props.refetchVendor();
@@ -8482,9 +8524,9 @@ const VendorInbox = props => {
8482
8524
  },
8483
8525
  onError: err => {
8484
8526
  var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
8485
- setToast({
8486
- label: (err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : (_err$response$data$Er = _err$response$data.Errors) === null || _err$response$data$Er === void 0 ? void 0 : (_err$response$data$Er2 = _err$response$data$Er[0]) === null || _err$response$data$Er2 === void 0 ? void 0 : _err$response$data$Er2.message) || t("WT_FIXED_FILLING_MAPPING_FAIL"),
8487
- error: true
8527
+ setShowToast({
8528
+ key: "error",
8529
+ label: (err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : (_err$response$data$Er = _err$response$data.Errors) === null || _err$response$data$Er === void 0 ? void 0 : (_err$response$data$Er2 = _err$response$data$Er[0]) === null || _err$response$data$Er2 === void 0 ? void 0 : _err$response$data$Er2.message) || "WT_FIXED_FILLING_MAPPING_FAIL"
8488
8530
  });
8489
8531
  setTimeout(closeToast, 5000);
8490
8532
  }
@@ -8511,27 +8553,19 @@ const VendorInbox = props => {
8511
8553
  Cell: ({
8512
8554
  row
8513
8555
  }) => {
8514
- var _row$original, _row$original$auditDe, _row$original2, _row$original2$auditD;
8515
- return GetCell((_row$original = row.original) !== null && _row$original !== void 0 && (_row$original$auditDe = _row$original.auditDetails) !== null && _row$original$auditDe !== void 0 && _row$original$auditDe.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : (_row$original2$auditD = _row$original2.auditDetails) === null || _row$original2$auditD === void 0 ? void 0 : _row$original2$auditD.createdTime) : "");
8556
+ var _row$original3, _row$original3$auditD, _row$original4, _row$original4$auditD;
8557
+ return GetCell((_row$original3 = row.original) !== null && _row$original3 !== void 0 && (_row$original3$auditD = _row$original3.auditDetails) !== null && _row$original3$auditD !== void 0 && _row$original3$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : (_row$original4$auditD = _row$original4.auditDetails) === null || _row$original4$auditD === void 0 ? void 0 : _row$original4$auditD.createdTime) : "");
8516
8558
  }
8517
8559
  }, {
8518
8560
  Header: t("WT_FILLING_POINT"),
8519
- accessor: row => {
8520
- var _row$dsoDetails, _row$dsoDetails2, _row$dsoDetails$filli, _row$dsoDetails3, _row$fillingpointmeta;
8521
- return (row === null || row === void 0 ? void 0 : row.fillingPointId) || ((_row$dsoDetails = row.dsoDetails) === null || _row$dsoDetails === void 0 ? void 0 : _row$dsoDetails.fillingPointId) || ((_row$dsoDetails2 = row.dsoDetails) !== null && _row$dsoDetails2 !== void 0 && _row$dsoDetails2.fillingPoint && typeof row.dsoDetails.fillingPoint === "object" ? (_row$dsoDetails$filli = row.dsoDetails.fillingPoint) === null || _row$dsoDetails$filli === void 0 ? void 0 : _row$dsoDetails$filli.fillingPointName : (_row$dsoDetails3 = row.dsoDetails) === null || _row$dsoDetails3 === void 0 ? void 0 : _row$dsoDetails3.fillingPoint) || (row === null || row === void 0 ? void 0 : (_row$fillingpointmeta = row.fillingpointmetadata) === null || _row$fillingpointmeta === void 0 ? void 0 : _row$fillingpointmeta.fillingPointId) || (row === null || row === void 0 ? void 0 : row.filling_pt_name) || (row === null || row === void 0 ? void 0 : row.fillingPoint) || "NA";
8522
- },
8561
+ accessor: row => getFillingPointDisplayValue(row),
8523
8562
  id: "fillingPoint",
8524
8563
  Cell: ({
8525
8564
  row
8526
8565
  }) => {
8527
8566
  return /*#__PURE__*/React.createElement(Dropdown$2, {
8528
8567
  className: "fsm-registry-dropdown",
8529
- selected: allFillingPoints === null || allFillingPoints === void 0 ? void 0 : allFillingPoints.find(fp => {
8530
- var _fp$fillingpointmetad, _row$original$dsoDeta, _row$original$dsoDeta2, _row$original$dsoDeta3, _row$original$filling, _row$original$filling2, _row$original$filling3, _row$original$filling4;
8531
- const fpId = String(fp.id || fp.bookingId || fp.fillingPointId || fp.uuid || ((_fp$fillingpointmetad = fp.fillingpointmetadata) === null || _fp$fillingpointmetad === void 0 ? void 0 : _fp$fillingpointmetad.fillingPointId));
8532
- const rowFpId = String(row.original.fillingPointId || ((_row$original$dsoDeta = row.original.dsoDetails) === null || _row$original$dsoDeta === void 0 ? void 0 : _row$original$dsoDeta.fillingPointId) || ((_row$original$dsoDeta2 = row.original.dsoDetails) === null || _row$original$dsoDeta2 === void 0 ? void 0 : (_row$original$dsoDeta3 = _row$original$dsoDeta2.fillingPoint) === null || _row$original$dsoDeta3 === void 0 ? void 0 : _row$original$dsoDeta3.id) || ((_row$original$filling = row.original.fillingpointmetadata) === null || _row$original$filling === void 0 ? void 0 : _row$original$filling.fillingPointId) || row.original.filling_pt_name || (row.original.fillingPoint && typeof row.original.fillingPoint === "object" ? (_row$original$filling2 = row.original.fillingPoint) === null || _row$original$filling2 === void 0 ? void 0 : _row$original$filling2.id : row.original.fillingPoint) || ((_row$original$filling3 = row.original.fillingPointDetail) === null || _row$original$filling3 === void 0 ? void 0 : _row$original$filling3.id) || ((_row$original$filling4 = row.original.fillingPointDetail) === null || _row$original$filling4 === void 0 ? void 0 : _row$original$filling4.bookingId) || "");
8533
- return fpId === rowFpId && rowFpId !== "undefined" && rowFpId !== "null" && rowFpId !== "";
8534
- }),
8568
+ selected: getSelectedFillingPointOption(row.original, allFillingPoints),
8535
8569
  option: allFillingPoints,
8536
8570
  select: value => onFillingPointSelect(row, value),
8537
8571
  style: {
@@ -8545,8 +8579,8 @@ const VendorInbox = props => {
8545
8579
  Header: t("ES_VENDOR_INBOX_SERVICE_TYPE"),
8546
8580
  id: "serviceType",
8547
8581
  accessor: row => {
8548
- var _row$dsoDetails4, _additionalDetails;
8549
- let additionalDetails = (_row$dsoDetails4 = row.dsoDetails) === null || _row$dsoDetails4 === void 0 ? void 0 : _row$dsoDetails4.additionalDetails;
8582
+ var _row$dsoDetails8, _additionalDetails;
8583
+ let additionalDetails = (_row$dsoDetails8 = row.dsoDetails) === null || _row$dsoDetails8 === void 0 ? void 0 : _row$dsoDetails8.additionalDetails;
8550
8584
  if (typeof additionalDetails === "string") {
8551
8585
  try {
8552
8586
  additionalDetails = JSON.parse(additionalDetails);
@@ -8559,8 +8593,8 @@ const VendorInbox = props => {
8559
8593
  Cell: ({
8560
8594
  row
8561
8595
  }) => {
8562
- var _row$original$dsoDeta4, _additionalDetails2;
8563
- let additionalDetails = (_row$original$dsoDeta4 = row.original.dsoDetails) === null || _row$original$dsoDeta4 === void 0 ? void 0 : _row$original$dsoDeta4.additionalDetails;
8596
+ var _row$original$dsoDeta, _additionalDetails2;
8597
+ let additionalDetails = (_row$original$dsoDeta = row.original.dsoDetails) === null || _row$original$dsoDeta === void 0 ? void 0 : _row$original$dsoDeta.additionalDetails;
8564
8598
  if (typeof additionalDetails === "string") {
8565
8599
  try {
8566
8600
  additionalDetails = JSON.parse(additionalDetails);
@@ -8576,19 +8610,19 @@ const VendorInbox = props => {
8576
8610
  Header: t("ES_VENDOR_REGISTRY_INBOX_ENABLED"),
8577
8611
  id: "status",
8578
8612
  accessor: row => {
8579
- var _row$dsoDetails5;
8580
- return ((_row$dsoDetails5 = row.dsoDetails) === null || _row$dsoDetails5 === void 0 ? void 0 : _row$dsoDetails5.status) || "";
8613
+ var _row$dsoDetails9;
8614
+ return ((_row$dsoDetails9 = row.dsoDetails) === null || _row$dsoDetails9 === void 0 ? void 0 : _row$dsoDetails9.status) || "";
8581
8615
  },
8582
8616
  Cell: ({
8583
8617
  row
8584
8618
  }) => {
8585
- var _row$original3, _row$original3$dsoDet;
8619
+ var _row$original5, _row$original5$dsoDet;
8586
8620
  return /*#__PURE__*/React.createElement(ToggleSwitch, {
8587
8621
  style: {
8588
8622
  display: "flex",
8589
8623
  justifyContent: "left"
8590
8624
  },
8591
- value: ((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : (_row$original3$dsoDet = _row$original3.dsoDetails) === null || _row$original3$dsoDet === void 0 ? void 0 : _row$original3$dsoDet.status) === "DISABLED" ? false : true,
8625
+ value: ((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : (_row$original5$dsoDet = _row$original5.dsoDetails) === null || _row$original5$dsoDet === void 0 ? void 0 : _row$original5$dsoDet.status) === "DISABLED" ? false : true,
8592
8626
  onChange: () => onVendorUpdate(row),
8593
8627
  name: `switch-${row.id}`
8594
8628
  });
@@ -8599,8 +8633,8 @@ const VendorInbox = props => {
8599
8633
  Cell: ({
8600
8634
  row
8601
8635
  }) => {
8602
- var _row$original4, _additionalVendorData;
8603
- const vendorId = (_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.id;
8636
+ var _row$original6, _additionalVendorData;
8637
+ const vendorId = (_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : _row$original6.id;
8604
8638
  if (!additionalVendorData) {
8605
8639
  return /*#__PURE__*/React.createElement("span", null, "Loading...");
8606
8640
  }
@@ -8613,7 +8647,7 @@ const VendorInbox = props => {
8613
8647
  }, /*#__PURE__*/React.createElement("button", {
8614
8648
  className: "submit-bar",
8615
8649
  style: {
8616
- backgroundColor: hasDetails ? "#417505" : "#F47738",
8650
+ backgroundColor: hasDetails ? "#417505" : "#3A8DCC",
8617
8651
  color: "white"
8618
8652
  }
8619
8653
  }, hasDetails ? "View Details" : "Add Details"));
@@ -8638,8 +8672,8 @@ const VendorInbox = props => {
8638
8672
  Cell: ({
8639
8673
  row
8640
8674
  }) => {
8641
- var _row$original5, _row$original5$auditD, _row$original6, _row$original6$auditD;
8642
- return GetCell((_row$original5 = row.original) !== null && _row$original5 !== void 0 && (_row$original5$auditD = _row$original5.auditDetails) !== null && _row$original5$auditD !== void 0 && _row$original5$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : (_row$original6$auditD = _row$original6.auditDetails) === null || _row$original6$auditD === void 0 ? void 0 : _row$original6$auditD.createdTime) : "");
8675
+ var _row$original7, _row$original7$auditD, _row$original8, _row$original8$auditD;
8676
+ return GetCell((_row$original7 = row.original) !== null && _row$original7 !== void 0 && (_row$original7$auditD = _row$original7.auditDetails) !== null && _row$original7$auditD !== void 0 && _row$original7$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : (_row$original8$auditD = _row$original8.auditDetails) === null || _row$original8$auditD === void 0 ? void 0 : _row$original8$auditD.createdTime) : "");
8643
8677
  }
8644
8678
  }, {
8645
8679
  Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
@@ -8651,8 +8685,8 @@ const VendorInbox = props => {
8651
8685
  Cell: ({
8652
8686
  row
8653
8687
  }) => {
8654
- var _row$original7, _row$original7$vendor;
8655
- return GetCell(((_row$original7 = row.original) === null || _row$original7 === void 0 ? void 0 : (_row$original7$vendor = _row$original7.vendor) === null || _row$original7$vendor === void 0 ? void 0 : _row$original7$vendor.name) || "NA");
8688
+ var _row$original9, _row$original9$vendor;
8689
+ return GetCell(((_row$original9 = row.original) === null || _row$original9 === void 0 ? void 0 : (_row$original9$vendor = _row$original9.vendor) === null || _row$original9$vendor === void 0 ? void 0 : _row$original9$vendor.name) || "NA");
8656
8690
  }
8657
8691
  }, {
8658
8692
  Header: t("ES_VENDOR_INBOX_SERVICE_TYPE"),
@@ -8685,6 +8719,25 @@ const VendorInbox = props => {
8685
8719
  const serviceType = ((_additionalDetail2 = additionalDetail) === null || _additionalDetail2 === void 0 ? void 0 : _additionalDetail2.serviceType) || "N/A";
8686
8720
  return /*#__PURE__*/React.createElement("div", null, serviceType);
8687
8721
  }
8722
+ }, {
8723
+ Header: t("WT_FILLING_POINT"),
8724
+ accessor: row => getFillingPointDisplayValue(row),
8725
+ id: "fillingPoint",
8726
+ Cell: ({
8727
+ row
8728
+ }) => {
8729
+ return /*#__PURE__*/React.createElement(Dropdown$2, {
8730
+ className: "fsm-registry-dropdown",
8731
+ selected: getSelectedFillingPointOption(row.original, allFillingPoints),
8732
+ option: allFillingPoints,
8733
+ select: value => onVehicleFillingPointSelect(row, value),
8734
+ style: {
8735
+ textAlign: "left"
8736
+ },
8737
+ optionKey: "fillingPointName",
8738
+ t: t
8739
+ });
8740
+ }
8688
8741
  }, {
8689
8742
  Header: t("ES_FSM_REGISTRY_SELECT_DRIVER"),
8690
8743
  id: "driver",
@@ -8717,13 +8770,13 @@ const VendorInbox = props => {
8717
8770
  Cell: ({
8718
8771
  row
8719
8772
  }) => {
8720
- var _row$original8;
8773
+ var _row$original0;
8721
8774
  return /*#__PURE__*/React.createElement(ToggleSwitch, {
8722
8775
  style: {
8723
8776
  display: "flex",
8724
8777
  justifyContent: "left"
8725
8778
  },
8726
- value: ((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.status) === "DISABLED" ? false : true,
8779
+ value: ((_row$original0 = row.original) === null || _row$original0 === void 0 ? void 0 : _row$original0.status) === "DISABLED" ? false : true,
8727
8780
  onChange: () => onVehicleUpdate(row),
8728
8781
  name: `switch-${row.id}`
8729
8782
  });
@@ -8765,8 +8818,8 @@ const VendorInbox = props => {
8765
8818
  Cell: ({
8766
8819
  row
8767
8820
  }) => {
8768
- var _row$original9, _row$original9$auditD, _row$original0, _row$original0$auditD;
8769
- return GetCell((_row$original9 = row.original) !== null && _row$original9 !== void 0 && (_row$original9$auditD = _row$original9.auditDetails) !== null && _row$original9$auditD !== void 0 && _row$original9$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original0 = row.original) === null || _row$original0 === void 0 ? void 0 : (_row$original0$auditD = _row$original0.auditDetails) === null || _row$original0$auditD === void 0 ? void 0 : _row$original0$auditD.createdTime) : "");
8821
+ var _row$original1, _row$original1$auditD, _row$original10, _row$original10$audit;
8822
+ return GetCell((_row$original1 = row.original) !== null && _row$original1 !== void 0 && (_row$original1$auditD = _row$original1.auditDetails) !== null && _row$original1$auditD !== void 0 && _row$original1$auditD.createdTime ? Digit.DateUtils.ConvertEpochToDate((_row$original10 = row.original) === null || _row$original10 === void 0 ? void 0 : (_row$original10$audit = _row$original10.auditDetails) === null || _row$original10$audit === void 0 ? void 0 : _row$original10$audit.createdTime) : "");
8770
8823
  }
8771
8824
  }, {
8772
8825
  Header: t("ES_FSM_REGISTRY_INBOX_VENDOR_NAME"),
@@ -8800,13 +8853,13 @@ const VendorInbox = props => {
8800
8853
  Cell: ({
8801
8854
  row
8802
8855
  }) => {
8803
- var _row$original1;
8856
+ var _row$original11;
8804
8857
  return /*#__PURE__*/React.createElement(ToggleSwitch, {
8805
8858
  style: {
8806
8859
  display: "flex",
8807
8860
  justifyContent: "left"
8808
8861
  },
8809
- value: ((_row$original1 = row.original) === null || _row$original1 === void 0 ? void 0 : _row$original1.status) === "DISABLED" ? false : true,
8862
+ value: ((_row$original11 = row.original) === null || _row$original11 === void 0 ? void 0 : _row$original11.status) === "DISABLED" ? false : true,
8810
8863
  onChange: () => onDriverUpdate(row),
8811
8864
  name: `switch-${row.id}`
8812
8865
  });
@@ -8822,8 +8875,8 @@ const VendorInbox = props => {
8822
8875
  return [{
8823
8876
  Header: t("ES_VENDOR_INBOX_VENDOR_NAME"),
8824
8877
  exportAccessor: row => {
8825
- var _row$dsoDetails6;
8826
- return (row === null || row === void 0 ? void 0 : row.name) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails6 = row.dsoDetails) === null || _row$dsoDetails6 === void 0 ? void 0 : _row$dsoDetails6.name) || "NA";
8878
+ var _row$dsoDetails0;
8879
+ return (row === null || row === void 0 ? void 0 : row.name) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails0 = row.dsoDetails) === null || _row$dsoDetails0 === void 0 ? void 0 : _row$dsoDetails0.name) || "NA";
8827
8880
  }
8828
8881
  }, {
8829
8882
  Header: t("ES_VENDOR_INBOX_DATE_VENDOR_CREATION"),
@@ -8833,21 +8886,18 @@ const VendorInbox = props => {
8833
8886
  }
8834
8887
  }, {
8835
8888
  Header: t("WT_FILLING_POINT"),
8836
- exportAccessor: row => {
8837
- var _row$dsoDetails7, _row$dsoDetails7$fill, _row$dsoDetails8, _row$dsoDetails9;
8838
- return (row === null || row === void 0 ? void 0 : (_row$dsoDetails7 = row.dsoDetails) === null || _row$dsoDetails7 === void 0 ? void 0 : (_row$dsoDetails7$fill = _row$dsoDetails7.fillingPoint) === null || _row$dsoDetails7$fill === void 0 ? void 0 : _row$dsoDetails7$fill.fillingPointName) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails8 = row.dsoDetails) === null || _row$dsoDetails8 === void 0 ? void 0 : _row$dsoDetails8.fillingPoint) || (row === null || row === void 0 ? void 0 : row.fillingPoint) || (row === null || row === void 0 ? void 0 : (_row$dsoDetails9 = row.dsoDetails) === null || _row$dsoDetails9 === void 0 ? void 0 : _row$dsoDetails9.fillingPointId) || (row === null || row === void 0 ? void 0 : row.fillingPointId) || "NA";
8839
- }
8889
+ exportAccessor: row => getFillingPointDisplayValue(row)
8840
8890
  }, {
8841
8891
  Header: t("ES_VENDOR_INBOX_SERVICE_TYPE"),
8842
8892
  exportAccessor: row => {
8843
- var _parseAdditionalDetai, _row$dsoDetails0;
8844
- return ((_parseAdditionalDetai = parseAdditionalDetails(row === null || row === void 0 ? void 0 : (_row$dsoDetails0 = row.dsoDetails) === null || _row$dsoDetails0 === void 0 ? void 0 : _row$dsoDetails0.additionalDetails)) === null || _parseAdditionalDetai === void 0 ? void 0 : _parseAdditionalDetai.serviceType) || "N/A";
8893
+ var _parseAdditionalDetai, _row$dsoDetails1;
8894
+ return ((_parseAdditionalDetai = parseAdditionalDetails(row === null || row === void 0 ? void 0 : (_row$dsoDetails1 = row.dsoDetails) === null || _row$dsoDetails1 === void 0 ? void 0 : _row$dsoDetails1.additionalDetails)) === null || _parseAdditionalDetai === void 0 ? void 0 : _parseAdditionalDetai.serviceType) || "N/A";
8845
8895
  }
8846
8896
  }, {
8847
8897
  Header: t("ES_VENDOR_REGISTRY_INBOX_ENABLED"),
8848
8898
  exportAccessor: row => {
8849
- var _row$dsoDetails1;
8850
- return (row === null || row === void 0 ? void 0 : (_row$dsoDetails1 = row.dsoDetails) === null || _row$dsoDetails1 === void 0 ? void 0 : _row$dsoDetails1.status) || "NA";
8899
+ var _row$dsoDetails10;
8900
+ return (row === null || row === void 0 ? void 0 : (_row$dsoDetails10 = row.dsoDetails) === null || _row$dsoDetails10 === void 0 ? void 0 : _row$dsoDetails10.status) || "NA";
8851
8901
  }
8852
8902
  }];
8853
8903
  case "VEHICLE":
@@ -8872,6 +8922,9 @@ const VendorInbox = props => {
8872
8922
  var _parseAdditionalDetai2;
8873
8923
  return ((_parseAdditionalDetai2 = parseAdditionalDetails(row === null || row === void 0 ? void 0 : row.additionalDetails)) === null || _parseAdditionalDetai2 === void 0 ? void 0 : _parseAdditionalDetai2.serviceType) || "N/A";
8874
8924
  }
8925
+ }, {
8926
+ Header: t("WT_FILLING_POINT"),
8927
+ exportAccessor: row => getFillingPointDisplayValue(row)
8875
8928
  }, {
8876
8929
  Header: t("ES_FSM_REGISTRY_SELECT_DRIVER"),
8877
8930
  exportAccessor: row => {
@@ -9018,7 +9071,7 @@ const VendorInbox = props => {
9018
9071
  }
9019
9072
  }, result)), showToast && /*#__PURE__*/React.createElement(Toast, {
9020
9073
  error: showToast.key === "error" ? true : false,
9021
- label: t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_DISABLE_SUCCESS` : showToast.action),
9074
+ label: showToast.label ? t(showToast.label) : t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_DISABLE_SUCCESS` : showToast.action),
9022
9075
  onClose: closeToast
9023
9076
  }));
9024
9077
  };
@@ -9323,7 +9376,7 @@ const SelectServiceType = ({
9323
9376
  return /*#__PURE__*/React.createElement(Loader, null);
9324
9377
  }
9325
9378
  if (userType === "employee") {
9326
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t(config.label)), /*#__PURE__*/React.createElement(Dropdown$2, {
9379
+ return /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t(config.label)), /*#__PURE__*/React.createElement(Dropdown$2, {
9327
9380
  className: "payment-form-text-input-correction",
9328
9381
  isMandatory: config.isMandatory,
9329
9382
  selected: serviceTypes,
@@ -9601,6 +9654,8 @@ const AddDriver = ({
9601
9654
  config: Config.filter(i => !i.hideInEmployee).map(config => {
9602
9655
  return {
9603
9656
  ...config,
9657
+ isCollapsible: true,
9658
+ isDefaultOpen: true,
9604
9659
  body: config.body.filter(a => !a.hideInEmployee)
9605
9660
  };
9606
9661
  }),
@@ -9611,7 +9666,8 @@ const AddDriver = ({
9611
9666
  defaultValues: defaultValues,
9612
9667
  onFormValueChange: onFormValueChange,
9613
9668
  noBreakLine: true,
9614
- mode: "onChange"
9669
+ mode: "onChange",
9670
+ noCard: true
9615
9671
  }), showToast && /*#__PURE__*/React.createElement(Toast, {
9616
9672
  error: showToast.key === "error" ? true : false,
9617
9673
  label: t(showToast.key === "success" ? `ES_FSM_${showToast.action}_SUCCESS` : showToast.action),
@@ -9973,21 +10029,11 @@ const EditVendorDetails = props => {
9973
10029
  className: "additional-value"
9974
10030
  }, safeVal));
9975
10031
  })), /*#__PURE__*/React.createElement("div", {
9976
- style: {
9977
- marginTop: "16px",
9978
- color: "#a82227",
9979
- cursor: "pointer",
9980
- textDecoration: "underline"
9981
- },
10032
+ className: "add-details-link hover-button",
9982
10033
  onClick: () => history.push(`/digit-ui/employee/vendor/registry/additionaldetails/info?vendorId=${dsoId}`)
9983
10034
  }, t("Edit Details"))) : /*#__PURE__*/React.createElement("div", {
9984
- style: {
9985
- marginLeft: "16px",
9986
- color: "#a82227",
9987
- cursor: "pointer",
9988
- textDecoration: "underline"
9989
- },
9990
- onClick: () => history.push(`/digit-ui/employee/vendor/registry/additionaldetails/vendor-details?vendorId=${dsoId}`)
10035
+ onClick: () => history.push(`/digit-ui/employee/vendor/registry/additionaldetails/vendor-details?vendorId=${dsoId}`),
10036
+ className: "add-details-link hover-button"
9991
10037
  }, t("Add Additional Details")));
9992
10038
  }
9993
10039
  return /*#__PURE__*/React.createElement(Row, {
@@ -10041,11 +10087,7 @@ const EditVendorDetails = props => {
10041
10087
  });
10042
10088
  }));
10043
10089
  }), detail.type && /*#__PURE__*/React.createElement("div", {
10044
- style: {
10045
- color: "#a82227",
10046
- cursor: "pointer",
10047
- marginLeft: "16px"
10048
- },
10090
+ className: "add-details-link hover-button",
10049
10091
  onClick: () => onActionSelect(detail.type === "ES_FSM_REGISTRY_DETAILS_TYPE_DRIVER" ? "ADD_DRIVER" : "ADD_VEHICLE")
10050
10092
  }, t(`${detail.type}_ADD`))));
10051
10093
  })), showModal && /*#__PURE__*/React.createElement(Modal, {
@@ -10441,6 +10483,8 @@ const AddVehicle = ({
10441
10483
  config: Config.filter(i => !i.hideInEmployee).map(config => {
10442
10484
  return {
10443
10485
  ...config,
10486
+ isCollapsible: true,
10487
+ isDefaultOpen: true,
10444
10488
  body: config.body.filter(a => !a.hideInEmployee)
10445
10489
  };
10446
10490
  }),
@@ -10451,7 +10495,8 @@ const AddVehicle = ({
10451
10495
  defaultValues: defaultValues,
10452
10496
  onFormValueChange: onFormValueChange,
10453
10497
  noBreakLine: true,
10454
- mode: "onChange"
10498
+ mode: "onChange",
10499
+ noCard: true
10455
10500
  }), showToast && /*#__PURE__*/React.createElement(Toast, {
10456
10501
  error: showToast.key === "error" ? true : false,
10457
10502
  label: t(showToast.key === "success" ? `ES_FSM_REGISTRY_${showToast.action}_SUCCESS` : showToast.action),
@@ -10839,11 +10884,13 @@ const CheckPage = ({
10839
10884
  height: "auto"
10840
10885
  },
10841
10886
  checked: agree
10842
- })), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(SubmitBar, {
10887
+ })), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("div", {
10888
+ className: "formcomposer-section-button"
10889
+ }, /*#__PURE__*/React.createElement(SubmitBar, {
10843
10890
  label: t("COMMON_BUTTON_SUBMIT"),
10844
10891
  onSubmit: onSubmit,
10845
10892
  disabled: !agree
10846
- }))));
10893
+ })))));
10847
10894
  };
10848
10895
 
10849
10896
  const GetActionMessage = props => {
@@ -11058,6 +11105,7 @@ const DriverDetails = props => {
11058
11105
  });
11059
11106
  queryClient.invalidateQueries("DSO_SEARCH");
11060
11107
  setTimeout(() => {
11108
+ closeToast();
11061
11109
  history.push(`/digit-ui/employee/fsm/registry`);
11062
11110
  }, 5000);
11063
11111
  }
@@ -11222,7 +11270,6 @@ const DriverDetails = props => {
11222
11270
  }));
11223
11271
  }
11224
11272
  };
11225
- const isMobile = window.Digit.Utils.browser.isMobile();
11226
11273
  if (isLoading) {
11227
11274
  return /*#__PURE__*/React.createElement(Loader, null);
11228
11275
  }
@@ -11230,7 +11277,8 @@ const DriverDetails = props => {
11230
11277
  className: "employee-form-content"
11231
11278
  }, /*#__PURE__*/React.createElement(Card, {
11232
11279
  style: {
11233
- position: "relative"
11280
+ position: "relative",
11281
+ backgroundColor: "#fff"
11234
11282
  }
11235
11283
  }, 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) => {
11236
11284
  var _detail$values;
@@ -11251,33 +11299,35 @@ const DriverDetails = props => {
11251
11299
  className: "value",
11252
11300
  style: {
11253
11301
  color: "#a82227",
11254
- display: "flex"
11302
+ display: "flex",
11303
+ gap: "20px",
11304
+ alignItems: "center"
11255
11305
  }
11256
11306
  }, t(value.value) || "N/A", value.value === "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("span", {
11307
+ className: "add-details-link hover-button hover-button-round",
11257
11308
  onClick: () => onActionSelect("ADD_VENDOR")
11258
11309
  }, /*#__PURE__*/React.createElement(AddIcon, {
11259
11310
  className: "",
11260
11311
  fill: "#a82227",
11261
11312
  styles: {
11262
11313
  cursor: "pointer",
11263
- marginLeft: "20px",
11264
11314
  height: "24px"
11265
11315
  }
11266
- })), value.value != "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("span", {
11316
+ })), value.value !== "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("div", {
11317
+ className: "add-details-link hover-button hover-button-round",
11267
11318
  onClick: () => onActionSelect("EDIT_VENDOR")
11268
11319
  }, /*#__PURE__*/React.createElement(EditIcon, {
11269
11320
  style: {
11270
- cursor: "pointer",
11271
- marginLeft: "20px"
11321
+ cursor: "pointer"
11272
11322
  }
11273
- })), value.value != "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("span", {
11323
+ })), value.value !== "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("div", {
11324
+ className: "add-details-link hover-button hover-button-round",
11274
11325
  onClick: () => onActionSelect("DELETE_VENDOR")
11275
11326
  }, /*#__PURE__*/React.createElement(DeleteIcon, {
11276
11327
  className: "delete",
11277
11328
  fill: "#a82227",
11278
11329
  style: {
11279
- cursor: "pointer",
11280
- marginLeft: "20px"
11330
+ cursor: "pointer"
11281
11331
  }
11282
11332
  }))))) : /*#__PURE__*/React.createElement(Row, {
11283
11333
  key: t(value.title),
@@ -11347,7 +11397,6 @@ const CloseBtn$2 = props => {
11347
11397
  const VehicleDetails = props => {
11348
11398
  var _vehicleData$6, _vehicleData$6$employ;
11349
11399
  const tenantId = Digit.ULBService.getCurrentTenantId();
11350
- const state = Digit.ULBService.getStateId();
11351
11400
  const {
11352
11401
  t
11353
11402
  } = useTranslation();
@@ -11358,7 +11407,6 @@ const VehicleDetails = props => {
11358
11407
  } = useParams();
11359
11408
  const [displayMenu, setDisplayMenu] = useState(false);
11360
11409
  const [selectedAction, setSelectedAction] = useState(null);
11361
- const [config, setCurrentConfig] = useState({});
11362
11410
  const [showModal, setShowModal] = useState(false);
11363
11411
  const [showToast, setShowToast] = useState(null);
11364
11412
  const [vendors, setVendors] = useState([]);
@@ -11588,6 +11636,7 @@ const VehicleDetails = props => {
11588
11636
  });
11589
11637
  queryClient.invalidateQueries("FSM_VEICLES_SEARCH");
11590
11638
  setTimeout(() => {
11639
+ closeToast();
11591
11640
  history.push(`/digit-ui/employee/fsm/registry`);
11592
11641
  }, 5000);
11593
11642
  }
@@ -11602,7 +11651,7 @@ const VehicleDetails = props => {
11602
11651
  });
11603
11652
  }
11604
11653
  if (selectedAction === "ADD_VENDOR") {
11605
- return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
11654
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
11606
11655
  t: t,
11607
11656
  option: vendors,
11608
11657
  value: selectedOption,
@@ -11612,7 +11661,7 @@ const VehicleDetails = props => {
11612
11661
  }));
11613
11662
  }
11614
11663
  if (selectedAction === "EDIT_VENDOR") {
11615
- return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
11664
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
11616
11665
  t: t,
11617
11666
  option: vendors,
11618
11667
  value: selectedOption,
@@ -11654,40 +11703,38 @@ const VehicleDetails = props => {
11654
11703
  }
11655
11704
  }, 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) => {
11656
11705
  var _detail$values2, _detail$values3;
11657
- return (value === null || value === void 0 ? void 0 : value.type) === "custom" ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
11706
+ return (value === null || value === void 0 ? void 0 : value.type) === "custom" ? /*#__PURE__*/React.createElement(React.Fragment, {
11707
+ key: index
11708
+ }, /*#__PURE__*/React.createElement("div", {
11658
11709
  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`
11659
11710
  }, /*#__PURE__*/React.createElement("h2", null, t(value.title)), /*#__PURE__*/React.createElement("div", {
11660
- className: "value",
11711
+ className: "value add-details-link hover-button",
11661
11712
  style: {
11662
11713
  color: "#a82227",
11663
- display: "flex"
11714
+ display: "flex",
11715
+ alignItems: "center",
11716
+ gap: "8px"
11717
+ }
11718
+ }, value.value === "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("div", {
11719
+ onClick: () => onActionSelect("ADD_VENDOR"),
11720
+ style: {
11721
+ color: "#a82227",
11722
+ display: "flex",
11723
+ alignItems: "center",
11724
+ gap: "8px"
11664
11725
  }
11665
- }, t(value.value) || "N/A", value.value === "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("span", {
11666
- onClick: () => onActionSelect("ADD_VENDOR")
11667
11726
  }, /*#__PURE__*/React.createElement(AddIcon, {
11668
11727
  className: "",
11669
- fill: "#a82227",
11670
- styles: {
11671
- cursor: "pointer",
11672
- marginLeft: "20px",
11673
- height: "24px"
11674
- }
11675
- })), value.value != "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("span", {
11728
+ fill: "#a82227"
11729
+ }), " ", t(value.value) || "N/A"), value.value !== "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("div", {
11730
+ className: "add-details-link hover-button",
11676
11731
  onClick: () => onActionSelect("EDIT_VENDOR")
11677
- }, /*#__PURE__*/React.createElement(EditIcon, {
11678
- style: {
11679
- cursor: "pointer",
11680
- marginLeft: "20px"
11681
- }
11682
- })), value.value != "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("span", {
11732
+ }, /*#__PURE__*/React.createElement(EditIcon, null)), value.value !== "ES_FSM_REGISTRY_DETAILS_ADD_VENDOR" && /*#__PURE__*/React.createElement("div", {
11733
+ className: "add-details-link hover-button",
11683
11734
  onClick: () => onActionSelect("DELETE_VENDOR")
11684
11735
  }, /*#__PURE__*/React.createElement(DeleteIcon, {
11685
11736
  className: "delete",
11686
- fill: "#a82227",
11687
- style: {
11688
- cursor: "pointer",
11689
- marginLeft: "20px"
11690
- }
11737
+ fill: "#a82227"
11691
11738
  }))))) : /*#__PURE__*/React.createElement(Row, {
11692
11739
  key: t(value.title),
11693
11740
  label: t(value.title),