@djb25/digit-ui-module-vendor 1.0.85 → 1.0.87

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
1
  import React, { useState, useMemo, useEffect, useCallback, useReducer, useRef } from 'react';
2
2
  import { useHistory, Link, useLocation, useParams, useRouteMatch, Switch, Route, Redirect } from 'react-router-dom';
3
3
  import { useTranslation } from 'react-i18next';
4
- import { Loader, VerticalTimeline, FormComposer, Toast, Card, ShippingTruck, Table, CheckBox, RadioButtons, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, Dropdown, AddIcon, Menu, LinkLabel, SubmitBar, TextInput, DatePicker as DatePicker$4, ViewsIcon, ToggleSwitch, Modal, MdClose, CardSectionHeader, CardText, Row, EditIcon, DeleteIcon, Header, SearchForm, SearchField, MobileNumber, CardLabelError, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, HomeIcon, PropertyHouse, EmployeeModuleCard, FormStep, LabelFieldPair, CardLabel, UploadFile, RadioOrSelect, MultiSelectDropdown, CitizenHomeCard, CardHeader, CardSubHeader, StatusTable, LinkButton, Banner, InfoIcon, CustomTooltip } from '@djb25/digit-ui-react-components';
4
+ import { Loader, VerticalTimeline, FormComposer, Toast, Card, ShippingTruck, Table, CheckBox, RadioButtons, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, Dropdown, AddIcon, Menu, LinkLabel, SubmitBar, TextInput, DatePicker as DatePicker$4, ViewsIcon, ToggleSwitch, Modal, MdClose, CardSectionHeader, Row, EditIcon, DeleteIcon, CardText, Header, SearchForm, SearchField, MobileNumber, CardLabelError, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, HomeIcon, PropertyHouse, EmployeeModuleCard, FormStep, LabelFieldPair, CardLabel, UploadFile, RadioOrSelect, MultiSelectDropdown, CitizenHomeCard, CardHeader, CardSubHeader, StatusTable, LinkButton, Banner, InfoIcon, CustomTooltip } from '@djb25/digit-ui-react-components';
5
5
  import { useQueryClient, useQuery } from 'react-query';
6
6
  import { useForm, Controller } from 'react-hook-form';
7
7
 
@@ -40,10 +40,13 @@ function _catch(body, recover) {
40
40
 
41
41
  const _require = require("@djb25/digit-ui-react-components"),
42
42
  DatePicker = _require.DatePicker;
43
- const SurveyorConfig = function (t, genderMenu, disabled) {
43
+ const SurveyorConfig = function (t, genderMenu, update) {
44
44
  if (genderMenu === void 0) {
45
45
  genderMenu = [];
46
46
  }
47
+ if (update === void 0) {
48
+ update = false;
49
+ }
47
50
  return [{
48
51
  head: "ES_VENDOR_SURVEYOR_BASIC_DETAILS",
49
52
  body: [{
@@ -79,7 +82,8 @@ const SurveyorConfig = function (t, genderMenu, disabled) {
79
82
  pattern: /^[6-9]\d{9}$/
80
83
  },
81
84
  error: t("ES_VENDOR_INVALID_MOBILE")
82
- }
85
+ },
86
+ disable: update
83
87
  }, {
84
88
  label: "ES_VENDOR_SURVEYOR_EMAIL_ID",
85
89
  isMandatory: true,
@@ -3150,7 +3154,7 @@ const Heading = props => {
3150
3154
  }, props.label);
3151
3155
  };
3152
3156
  const SupervisorDetails = props => {
3153
- var _Digit$SessionStorage, _userInfo$type, _formState$tableForm, _formState$tableForm2, _formState$tableForm3, _formState$tableForm4, _dashboardData$dashbo, _supervisorData$2, _supervisorData$2$emp, _formState$tableForm10, _formState$tableForm11;
3157
+ var _Digit$SessionStorage, _userInfo$type, _supervisorData$, _supervisorData$$supe, _formState$tableForm, _formState$tableForm2, _formState$tableForm3, _formState$tableForm4, _dashboardData$dashbo, _supervisorData$3, _supervisorData$3$emp, _formState$tableForm10, _formState$tableForm11;
3154
3158
  const tenantId = Digit.ULBService.getCurrentTenantId();
3155
3159
  const _useTranslation = useTranslation(),
3156
3160
  t = _useTranslation.t;
@@ -3228,17 +3232,27 @@ const SupervisorDetails = props => {
3228
3232
  };
3229
3233
  });
3230
3234
  }, [supervisorSearchResponse, vendorData]);
3235
+ const nextStatus = (supervisorData === null || supervisorData === void 0 ? void 0 : (_supervisorData$ = supervisorData[0]) === null || _supervisorData$ === void 0 ? void 0 : (_supervisorData$$supe = _supervisorData$.supervisorData) === null || _supervisorData$$supe === void 0 ? void 0 : _supervisorData$$supe.status) === "DISABLED" ? {
3236
+ status: "ES_VENDOR_ACTION_ENABLE",
3237
+ action: "ACTIVE",
3238
+ toastMessage: "ES_FSM_REGISTRY_SUPERVISOR_ENABLE_SUCCESS",
3239
+ popupButton: "ENABLE",
3240
+ popupHeader: "ES_VENDOR_SUPERVISOR_ENABLE_POPUP_HEADER",
3241
+ popupMessage: "ES_VENDOR_SUPERVISOR_ENABLE_POPUP_MESSAGE"
3242
+ } : {
3243
+ status: "ES_VENDOR_ACTION_DISABLE",
3244
+ action: "DISABLED",
3245
+ toastMessage: "ES_FSM_REGISTRY_SUPERVISOR_DISABLE_SUCCESS",
3246
+ popupButton: "DISABLE",
3247
+ popupHeader: "ES_VENDOR_SUPERVISOR_DISABLE_POPUP_HEADER",
3248
+ popupMessage: "ES_VENDOR_SUPERVISOR_DISABLE_POPUP_MESSAGE"
3249
+ };
3231
3250
  const _Digit$Hooks$fsm$useS2 = Digit.Hooks.fsm.useSupervisorUpdate(tenantId),
3232
3251
  mutateSupervisor = _Digit$Hooks$fsm$useS2.mutate;
3233
3252
  useEffect(() => {
3234
- var _location$state;
3253
+ var _location$state, _location$state2;
3235
3254
  refetch();
3236
- if ((_location$state = location.state) !== null && _location$state !== void 0 && _location$state.showSuccessToast) {
3237
- setShowToast({
3238
- key: "success",
3239
- action: "UPDATE_SUPERVISOR"
3240
- });
3241
- }
3255
+ if ((_location$state = location.state) !== null && _location$state !== void 0 && _location$state.showSuccessToast) setShowToast((_location$state2 = location.state) === null || _location$state2 === void 0 ? void 0 : _location$state2.message);
3242
3256
  }, []);
3243
3257
  useEffect(() => {
3244
3258
  switch (selectedAction) {
@@ -3246,7 +3260,7 @@ const SupervisorDetails = props => {
3246
3260
  return history.push("/digit-ui/" + userType + "/vendor/registry/modify-supervisor/" + supervisorId);
3247
3261
  case "HOME":
3248
3262
  return history.push("/digit-ui/" + userType + "/vendor/search-vendor?selectedTabs=SUPERVISOR");
3249
- case "DELETE":
3263
+ case nextStatus.status:
3250
3264
  return setShowModal(true);
3251
3265
  }
3252
3266
  }, [selectedAction]);
@@ -3269,11 +3283,11 @@ const SupervisorDetails = props => {
3269
3283
  dashboardData = _Digit$Hooks$fsm$useS3.data,
3270
3284
  isDashboradLoading = _Digit$Hooks$fsm$useS3.isLoading;
3271
3285
  const handleDeleteSupervisor = () => {
3272
- var _supervisorData$;
3273
- let details = supervisorData === null || supervisorData === void 0 ? void 0 : (_supervisorData$ = supervisorData[0]) === null || _supervisorData$ === void 0 ? void 0 : _supervisorData$.supervisorData;
3286
+ var _supervisorData$2;
3287
+ const details = supervisorData === null || supervisorData === void 0 ? void 0 : (_supervisorData$2 = supervisorData[0]) === null || _supervisorData$2 === void 0 ? void 0 : _supervisorData$2.supervisorData;
3274
3288
  const formData = {
3275
3289
  supervisor: _extends({}, details, {
3276
- status: "INACTIVE"
3290
+ status: nextStatus.action
3277
3291
  })
3278
3292
  };
3279
3293
  mutateSupervisor(formData, {
@@ -3291,7 +3305,7 @@ const SupervisorDetails = props => {
3291
3305
  showSuccessToast: true,
3292
3306
  message: {
3293
3307
  key: "success",
3294
- action: t("ES_VENDOR_DELETE_SUPERVISOR_SUCCESS")
3308
+ action: t(nextStatus.toastMessage)
3295
3309
  }
3296
3310
  }
3297
3311
  });
@@ -3400,7 +3414,7 @@ const SupervisorDetails = props => {
3400
3414
  className: "employee-form-content"
3401
3415
  }, /*#__PURE__*/React.createElement(Card, {
3402
3416
  className: "flex-box flex-box-col flex-gap-5"
3403
- }, supervisorData === null || supervisorData === void 0 ? void 0 : (_supervisorData$2 = supervisorData[0]) === null || _supervisorData$2 === void 0 ? void 0 : (_supervisorData$2$emp = _supervisorData$2.employeeResponse) === null || _supervisorData$2$emp === void 0 ? void 0 : _supervisorData$2$emp.map((detail, index) => {
3417
+ }, supervisorData === null || supervisorData === void 0 ? void 0 : (_supervisorData$3 = supervisorData[0]) === null || _supervisorData$3 === void 0 ? void 0 : (_supervisorData$3$emp = _supervisorData$3.employeeResponse) === null || _supervisorData$3$emp === void 0 ? void 0 : _supervisorData$3$emp.map((detail, index) => {
3404
3418
  var _detail$values, _userInfo$roles, _userInfo$roles$map;
3405
3419
  return /*#__PURE__*/React.createElement(React.Fragment, {
3406
3420
  key: index
@@ -3473,14 +3487,14 @@ const SupervisorDetails = props => {
3473
3487
  isLoading: isDashboradLoading
3474
3488
  }))), showModal && /*#__PURE__*/React.createElement(Modal, {
3475
3489
  headerBarMain: /*#__PURE__*/React.createElement(Heading, {
3476
- label: t("ES_VENDOR_SUPERVISOR_DELETE_POPUP_HEADER")
3490
+ label: t(nextStatus.popupHeader)
3477
3491
  }),
3478
3492
  headerBarEnd: /*#__PURE__*/React.createElement(CloseSvg, {
3479
3493
  onClick: closeModal
3480
3494
  }),
3481
3495
  actionCancelLabel: t("CS_COMMON_CANCEL"),
3482
3496
  actionCancelOnSubmit: closeModal,
3483
- actionSaveLabel: t("ES_EVENT_DELETE"),
3497
+ actionSaveLabel: t(nextStatus.status),
3484
3498
  actionSaveOnSubmit: handleDeleteSupervisor
3485
3499
  }, /*#__PURE__*/React.createElement(Card, {
3486
3500
  style: {
@@ -3488,7 +3502,7 @@ const SupervisorDetails = props => {
3488
3502
  }
3489
3503
  }, /*#__PURE__*/React.createElement(ConfirmationBox, {
3490
3504
  t: t,
3491
- title: "ES_VENDOR_SUPERVISOR_DELETE_TEXT"
3505
+ title: nextStatus.popupMessage
3492
3506
  }))), showToast && /*#__PURE__*/React.createElement(Toast, {
3493
3507
  error: showToast.key === "error",
3494
3508
  label: showToast.key === "success" ? t("ES_VENDOR_" + showToast.action + "_SUCCESS", showToast.action === "UPDATE_SUPERVISOR" ? "Supervisor updated successfully" : undefined) : t(showToast.action),
@@ -3499,8 +3513,8 @@ const SupervisorDetails = props => {
3499
3513
  zIndex: "19"
3500
3514
  }
3501
3515
  }, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
3502
- localeKeyPrefix: "ES_VENDOR_SUPERVISOR_ACTION",
3503
- options: ["EDIT", "DELETE"],
3516
+ localeKeyPrefix: "ES_VENDOR_ACTION",
3517
+ options: ["EDIT", nextStatus.popupButton],
3504
3518
  t: t,
3505
3519
  onSelect: a => {
3506
3520
  setDisplayMenu(false);
@@ -3514,12 +3528,12 @@ const SupervisorDetails = props => {
3514
3528
 
3515
3529
  const _require$1 = require("@djb25/digit-ui-react-components"),
3516
3530
  DatePicker$1 = _require$1.DatePicker;
3517
- const SupervisorConfig = function (t, genderMenu, disabled) {
3531
+ const SupervisorConfig = function (t, genderMenu, update) {
3518
3532
  if (genderMenu === void 0) {
3519
3533
  genderMenu = [];
3520
3534
  }
3521
- if (disabled === void 0) {
3522
- disabled = false;
3535
+ if (update === void 0) {
3536
+ update = false;
3523
3537
  }
3524
3538
  return [{
3525
3539
  head: t("ES_VENDOR_SUPERVISOR_BASIC_DETAILS"),
@@ -3527,7 +3541,6 @@ const SupervisorConfig = function (t, genderMenu, disabled) {
3527
3541
  label: t("ES_VENDOR_SUPERVISOR_FULL_NAME"),
3528
3542
  isMandatory: true,
3529
3543
  type: "text",
3530
- disable: disabled,
3531
3544
  populators: {
3532
3545
  name: "fullName",
3533
3546
  validation: {
@@ -3552,7 +3565,7 @@ const SupervisorConfig = function (t, genderMenu, disabled) {
3552
3565
  label: t("ES_VENDOR_SUPERVISOR_MOBILE_NUMBER"),
3553
3566
  isMandatory: true,
3554
3567
  type: "mobileNumber",
3555
- disable: disabled,
3568
+ disable: update,
3556
3569
  populators: {
3557
3570
  name: "mobileNumber",
3558
3571
  validation: {
@@ -3828,7 +3841,7 @@ const CloseBtn = props => {
3828
3841
  }, /*#__PURE__*/React.createElement(CloseSvg, null));
3829
3842
  };
3830
3843
  const SurveyorDetails = props => {
3831
- var _Digit$UserService$ge, _surveyorData$2, _surveyorData$2$emplo;
3844
+ var _Digit$UserService$ge, _surveyorData$, _surveyorData$$survey, _surveyorData$3, _surveyorData$3$emplo;
3832
3845
  const tenantId = Digit.ULBService.getCurrentTenantId();
3833
3846
  const _useTranslation = useTranslation(),
3834
3847
  t = _useTranslation.t;
@@ -3851,12 +3864,6 @@ const SurveyorDetails = props => {
3851
3864
  const _useState4 = useState(null),
3852
3865
  showToast = _useState4[0],
3853
3866
  setShowToast = _useState4[1];
3854
- const _useState5 = useState([]),
3855
- vendors = _useState5[0],
3856
- setVendors = _useState5[1];
3857
- const _useState6 = useState({}),
3858
- selectedOption = _useState6[0],
3859
- setSelectedOption = _useState6[1];
3860
3867
  const _Digit$Hooks$fsm$useD = Digit.Hooks.fsm.useDsoSearch(tenantId, {
3861
3868
  sortBy: "name",
3862
3869
  sortOrder: "ASC",
@@ -3913,50 +3920,45 @@ const SurveyorDetails = props => {
3913
3920
  };
3914
3921
  });
3915
3922
  }, [surveyorSearchResponse, vendorData]);
3923
+ const nextStatus = (surveyorData === null || surveyorData === void 0 ? void 0 : (_surveyorData$ = surveyorData[0]) === null || _surveyorData$ === void 0 ? void 0 : (_surveyorData$$survey = _surveyorData$.surveyorData) === null || _surveyorData$$survey === void 0 ? void 0 : _surveyorData$$survey.status) === "DISABLED" ? {
3924
+ status: "ES_VENDOR_ACTION_ENABLE",
3925
+ action: "ACTIVE",
3926
+ toastMessage: "ES_FSM_REGISTRY_SUPERVISOR_ENABLE_SUCCESS",
3927
+ popupButton: "ENABLE",
3928
+ popupHeader: "ES_VENDOR_SURVEYOR_ENABLE_POPUP_HEADER",
3929
+ popupMessage: "ES_VENDOR_SURVEYOR_ENABLE_POPUP_MESSAGE"
3930
+ } : {
3931
+ status: "ES_VENDOR_ACTION_DISABLE",
3932
+ action: "DISABLED",
3933
+ toastMessage: "ES_FSM_REGISTRY_SUPERVISOR_DISABLE_SUCCESS",
3934
+ popupButton: "DISABLE",
3935
+ popupHeader: "ES_VENDOR_SURVEYOR_DISABLE_POPUP_HEADER",
3936
+ popupMessage: "ES_VENDOR_SURVEYOR_DISABLE_POPUP_MESSAGE"
3937
+ };
3916
3938
  const _Digit$Hooks$fsm$useS2 = Digit.Hooks.fsm.useSurveyorUpdate(tenantId),
3917
3939
  mutateSurveyor = _Digit$Hooks$fsm$useS2.mutate;
3918
3940
  useEffect(() => {
3919
- if (vendorData) {
3920
- let vendors = vendorData.map(data => data.dsoDetails);
3921
- setVendors(vendors);
3922
- }
3923
- }, [vendorData]);
3924
- useEffect(() => {
3925
- var _location$state;
3941
+ var _location$state, _location$state2;
3926
3942
  refetch();
3927
- if ((_location$state = location.state) !== null && _location$state !== void 0 && _location$state.showSuccessToast) {
3928
- var _location$state2;
3929
- setShowToast((_location$state2 = location.state) === null || _location$state2 === void 0 ? void 0 : _location$state2.message);
3930
- }
3943
+ if ((_location$state = location.state) !== null && _location$state !== void 0 && _location$state.showSuccessToast) setShowToast((_location$state2 = location.state) === null || _location$state2 === void 0 ? void 0 : _location$state2.message);
3931
3944
  }, []);
3932
3945
  useEffect(() => {
3933
3946
  switch (selectedAction) {
3934
- case "DELETE":
3935
- case "ADD_VENDOR":
3936
- case "EDIT_VENDOR":
3937
- case "DELETE_VENDOR":
3947
+ case nextStatus.status:
3938
3948
  return setShowModal(true);
3939
3949
  case "EDIT":
3940
3950
  return history.push("/digit-ui/" + userType + "/vendor/registry/modify-surveyor/" + surveyorId);
3941
- case "HOME":
3942
- return history.push("/digit-ui/" + userType + "/vendor/search-vendor?selectedTabs=SURVEYOR");
3943
3951
  }
3944
3952
  }, [selectedAction]);
3945
3953
  const closeToast = () => {
3946
3954
  setShowToast(null);
3947
3955
  };
3948
- const handleModalAction = () => {
3949
- switch (selectedAction) {
3950
- case "DELETE":
3951
- return handleDeleteSurveyor();
3952
- }
3953
- };
3954
3956
  const handleDeleteSurveyor = () => {
3955
- var _surveyorData$;
3956
- let details = surveyorData === null || surveyorData === void 0 ? void 0 : (_surveyorData$ = surveyorData[0]) === null || _surveyorData$ === void 0 ? void 0 : _surveyorData$.surveyorData;
3957
+ var _surveyorData$2;
3958
+ let details = surveyorData === null || surveyorData === void 0 ? void 0 : (_surveyorData$2 = surveyorData[0]) === null || _surveyorData$2 === void 0 ? void 0 : _surveyorData$2.surveyorData;
3957
3959
  const formData = {
3958
3960
  surveyor: _extends({}, details, {
3959
- status: "INACTIVE"
3961
+ status: "DISABLED"
3960
3962
  })
3961
3963
  };
3962
3964
  mutateSurveyor(formData, {
@@ -3984,43 +3986,15 @@ const SurveyorDetails = props => {
3984
3986
  };
3985
3987
  const closeModal = () => {
3986
3988
  setSelectedAction(null);
3987
- setSelectedOption({});
3988
3989
  setShowModal(false);
3989
3990
  };
3990
- const modalHeading = () => {
3991
- switch (selectedAction) {
3992
- case "DELETE":
3993
- case "DELETE_VENDOR":
3994
- return "ES_VENDOR_SURVEYOR_DELETE_POPUP_HEADER";
3995
- case "ADD_VENDOR":
3996
- case "EDIT_VENDOR":
3997
- return "ES_VENDOR_SURVEYOR_ADD_VENDOR_POPUP_HEADER";
3998
- }
3999
- };
4000
- const renderModalContent = () => {
4001
- if (selectedAction === "DELETE" || selectedAction === "DELETE_VENDOR") {
4002
- return /*#__PURE__*/React.createElement(ConfirmationBox, {
4003
- t: t,
4004
- title: "ES_VENDOR_SURVEYOR_DELETE_TEXT"
4005
- });
4006
- }
4007
- if (selectedAction === "ADD_VENDOR" || selectedAction === "EDIT_VENDOR") {
4008
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t("ES_FSM_REGISTRY_SELECT_VENODOR")), /*#__PURE__*/React.createElement(Dropdown, {
4009
- t: t,
4010
- option: vendors,
4011
- value: selectedOption,
4012
- selected: selectedOption,
4013
- select: setSelectedOption,
4014
- optionKey: "name"
4015
- }));
4016
- }
4017
- };
4018
3991
  if (isLoading) {
4019
3992
  return /*#__PURE__*/React.createElement(Loader, null);
4020
3993
  }
3994
+ console.log(nextStatus.status);
4021
3995
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
4022
3996
  className: "employee-form-content"
4023
- }, /*#__PURE__*/React.createElement(Card, null, surveyorData === null || surveyorData === void 0 ? void 0 : (_surveyorData$2 = surveyorData[0]) === null || _surveyorData$2 === void 0 ? void 0 : (_surveyorData$2$emplo = _surveyorData$2.employeeResponse) === null || _surveyorData$2$emplo === void 0 ? void 0 : _surveyorData$2$emplo.map((detail, index) => {
3997
+ }, /*#__PURE__*/React.createElement(Card, null, surveyorData === null || surveyorData === void 0 ? void 0 : (_surveyorData$3 = surveyorData[0]) === null || _surveyorData$3 === void 0 ? void 0 : (_surveyorData$3$emplo = _surveyorData$3.employeeResponse) === null || _surveyorData$3$emplo === void 0 ? void 0 : _surveyorData$3$emplo.map((detail, index) => {
4024
3998
  var _detail$values;
4025
3999
  return /*#__PURE__*/React.createElement(React.Fragment, {
4026
4000
  key: index
@@ -4064,20 +4038,19 @@ const SurveyorDetails = props => {
4064
4038
  }))));
4065
4039
  }))), showModal && /*#__PURE__*/React.createElement(Modal, {
4066
4040
  headerBarMain: /*#__PURE__*/React.createElement(Heading$1, {
4067
- label: t(modalHeading())
4041
+ label: t(nextStatus.popupHeader)
4068
4042
  }),
4069
4043
  headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn, {
4070
4044
  onClick: closeModal
4071
4045
  }),
4072
4046
  actionCancelLabel: t("CS_COMMON_CANCEL"),
4073
4047
  actionCancelOnSubmit: closeModal,
4074
- actionSaveLabel: t(selectedAction === "DELETE" || selectedAction === "DELETE_VENDOR" ? "ES_EVENT_DELETE" : "CS_COMMON_SUBMIT"),
4075
- actionSaveOnSubmit: handleModalAction
4076
- }, /*#__PURE__*/React.createElement(Card, {
4077
- style: {
4078
- boxShadow: "none"
4079
- }
4080
- }, renderModalContent())), showToast && /*#__PURE__*/React.createElement(Toast, {
4048
+ actionSaveLabel: t(nextStatus.status),
4049
+ actionSaveOnSubmit: handleDeleteSurveyor
4050
+ }, /*#__PURE__*/React.createElement(ConfirmationBox, {
4051
+ t: t,
4052
+ title: nextStatus.popupMessage
4053
+ })), showToast && /*#__PURE__*/React.createElement(Toast, {
4081
4054
  error: showToast.key === "error",
4082
4055
  label: showToast.key === "success" ? t("ES_VENDOR_" + showToast.action + "_SUCCESS", showToast.action === "UPDATE_SURVEYOR" ? "Surveyor updated successfully" : undefined) : t(showToast.action),
4083
4056
  onClose: closeToast
@@ -4086,8 +4059,8 @@ const SurveyorDetails = props => {
4086
4059
  zIndex: "19"
4087
4060
  }
4088
4061
  }, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
4089
- localeKeyPrefix: "ES_VENDOR_SURVEYOR_ACTION",
4090
- options: ["EDIT", "DELETE"],
4062
+ localeKeyPrefix: "ES_VENDOR_ACTION",
4063
+ options: ["EDIT", nextStatus.popupButton],
4091
4064
  t: t,
4092
4065
  onSelect: a => {
4093
4066
  setDisplayMenu(false);
@@ -5587,7 +5560,7 @@ const EditSupervisor = () => {
5587
5560
  }
5588
5561
  }, [genderTypeData]);
5589
5562
  const Config = React.useMemo(() => {
5590
- return SupervisorConfig(t, genderMenu);
5563
+ return SupervisorConfig(t, genderMenu, true);
5591
5564
  }, [t, genderMenu]);
5592
5565
  useEffect(() => {
5593
5566
  if (supervisorSearchResponse && supervisorSearchResponse.supervisors && supervisorSearchResponse.supervisors.length > 0) {
@@ -5784,7 +5757,7 @@ const EditSurveyor = () => {
5784
5757
  }
5785
5758
  }, [genderTypeData]);
5786
5759
  const Config = React.useMemo(() => {
5787
- return SurveyorConfig(t, genderMenu);
5760
+ return SurveyorConfig(t, genderMenu, true);
5788
5761
  }, [t, genderMenu]);
5789
5762
  useEffect(() => {
5790
5763
  if (surveyorSearchResponse && surveyorSearchResponse.surveyors && surveyorSearchResponse.surveyors.length > 0) {