@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.
- package/dist/index.js +74 -101
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +75 -102
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43,10 +43,13 @@ function _catch(body, recover) {
|
|
|
43
43
|
|
|
44
44
|
const _require = require("@djb25/digit-ui-react-components"),
|
|
45
45
|
DatePicker = _require.DatePicker;
|
|
46
|
-
const SurveyorConfig = function (t, genderMenu,
|
|
46
|
+
const SurveyorConfig = function (t, genderMenu, update) {
|
|
47
47
|
if (genderMenu === void 0) {
|
|
48
48
|
genderMenu = [];
|
|
49
49
|
}
|
|
50
|
+
if (update === void 0) {
|
|
51
|
+
update = false;
|
|
52
|
+
}
|
|
50
53
|
return [{
|
|
51
54
|
head: "ES_VENDOR_SURVEYOR_BASIC_DETAILS",
|
|
52
55
|
body: [{
|
|
@@ -82,7 +85,8 @@ const SurveyorConfig = function (t, genderMenu, disabled) {
|
|
|
82
85
|
pattern: /^[6-9]\d{9}$/
|
|
83
86
|
},
|
|
84
87
|
error: t("ES_VENDOR_INVALID_MOBILE")
|
|
85
|
-
}
|
|
88
|
+
},
|
|
89
|
+
disable: update
|
|
86
90
|
}, {
|
|
87
91
|
label: "ES_VENDOR_SURVEYOR_EMAIL_ID",
|
|
88
92
|
isMandatory: true,
|
|
@@ -3153,7 +3157,7 @@ const Heading = props => {
|
|
|
3153
3157
|
}, props.label);
|
|
3154
3158
|
};
|
|
3155
3159
|
const SupervisorDetails = props => {
|
|
3156
|
-
var _Digit$SessionStorage, _userInfo$type, _formState$tableForm, _formState$tableForm2, _formState$tableForm3, _formState$tableForm4, _dashboardData$dashbo, _supervisorData$
|
|
3160
|
+
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;
|
|
3157
3161
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
3158
3162
|
const _useTranslation = reactI18next.useTranslation(),
|
|
3159
3163
|
t = _useTranslation.t;
|
|
@@ -3231,17 +3235,27 @@ const SupervisorDetails = props => {
|
|
|
3231
3235
|
};
|
|
3232
3236
|
});
|
|
3233
3237
|
}, [supervisorSearchResponse, vendorData]);
|
|
3238
|
+
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" ? {
|
|
3239
|
+
status: "ES_VENDOR_ACTION_ENABLE",
|
|
3240
|
+
action: "ACTIVE",
|
|
3241
|
+
toastMessage: "ES_FSM_REGISTRY_SUPERVISOR_ENABLE_SUCCESS",
|
|
3242
|
+
popupButton: "ENABLE",
|
|
3243
|
+
popupHeader: "ES_VENDOR_SUPERVISOR_ENABLE_POPUP_HEADER",
|
|
3244
|
+
popupMessage: "ES_VENDOR_SUPERVISOR_ENABLE_POPUP_MESSAGE"
|
|
3245
|
+
} : {
|
|
3246
|
+
status: "ES_VENDOR_ACTION_DISABLE",
|
|
3247
|
+
action: "DISABLED",
|
|
3248
|
+
toastMessage: "ES_FSM_REGISTRY_SUPERVISOR_DISABLE_SUCCESS",
|
|
3249
|
+
popupButton: "DISABLE",
|
|
3250
|
+
popupHeader: "ES_VENDOR_SUPERVISOR_DISABLE_POPUP_HEADER",
|
|
3251
|
+
popupMessage: "ES_VENDOR_SUPERVISOR_DISABLE_POPUP_MESSAGE"
|
|
3252
|
+
};
|
|
3234
3253
|
const _Digit$Hooks$fsm$useS2 = Digit.Hooks.fsm.useSupervisorUpdate(tenantId),
|
|
3235
3254
|
mutateSupervisor = _Digit$Hooks$fsm$useS2.mutate;
|
|
3236
3255
|
React.useEffect(() => {
|
|
3237
|
-
var _location$state;
|
|
3256
|
+
var _location$state, _location$state2;
|
|
3238
3257
|
refetch();
|
|
3239
|
-
if ((_location$state = location.state) !== null && _location$state !== void 0 && _location$state.showSuccessToast)
|
|
3240
|
-
setShowToast({
|
|
3241
|
-
key: "success",
|
|
3242
|
-
action: "UPDATE_SUPERVISOR"
|
|
3243
|
-
});
|
|
3244
|
-
}
|
|
3258
|
+
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);
|
|
3245
3259
|
}, []);
|
|
3246
3260
|
React.useEffect(() => {
|
|
3247
3261
|
switch (selectedAction) {
|
|
@@ -3249,7 +3263,7 @@ const SupervisorDetails = props => {
|
|
|
3249
3263
|
return history.push("/digit-ui/" + userType + "/vendor/registry/modify-supervisor/" + supervisorId);
|
|
3250
3264
|
case "HOME":
|
|
3251
3265
|
return history.push("/digit-ui/" + userType + "/vendor/search-vendor?selectedTabs=SUPERVISOR");
|
|
3252
|
-
case
|
|
3266
|
+
case nextStatus.status:
|
|
3253
3267
|
return setShowModal(true);
|
|
3254
3268
|
}
|
|
3255
3269
|
}, [selectedAction]);
|
|
@@ -3272,11 +3286,11 @@ const SupervisorDetails = props => {
|
|
|
3272
3286
|
dashboardData = _Digit$Hooks$fsm$useS3.data,
|
|
3273
3287
|
isDashboradLoading = _Digit$Hooks$fsm$useS3.isLoading;
|
|
3274
3288
|
const handleDeleteSupervisor = () => {
|
|
3275
|
-
var _supervisorData
|
|
3276
|
-
|
|
3289
|
+
var _supervisorData$2;
|
|
3290
|
+
const details = supervisorData === null || supervisorData === void 0 ? void 0 : (_supervisorData$2 = supervisorData[0]) === null || _supervisorData$2 === void 0 ? void 0 : _supervisorData$2.supervisorData;
|
|
3277
3291
|
const formData = {
|
|
3278
3292
|
supervisor: _extends({}, details, {
|
|
3279
|
-
status:
|
|
3293
|
+
status: nextStatus.action
|
|
3280
3294
|
})
|
|
3281
3295
|
};
|
|
3282
3296
|
mutateSupervisor(formData, {
|
|
@@ -3294,7 +3308,7 @@ const SupervisorDetails = props => {
|
|
|
3294
3308
|
showSuccessToast: true,
|
|
3295
3309
|
message: {
|
|
3296
3310
|
key: "success",
|
|
3297
|
-
action: t(
|
|
3311
|
+
action: t(nextStatus.toastMessage)
|
|
3298
3312
|
}
|
|
3299
3313
|
}
|
|
3300
3314
|
});
|
|
@@ -3403,7 +3417,7 @@ const SupervisorDetails = props => {
|
|
|
3403
3417
|
className: "employee-form-content"
|
|
3404
3418
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
3405
3419
|
className: "flex-box flex-box-col flex-gap-5"
|
|
3406
|
-
}, supervisorData === null || supervisorData === void 0 ? void 0 : (_supervisorData$
|
|
3420
|
+
}, 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) => {
|
|
3407
3421
|
var _detail$values, _userInfo$roles, _userInfo$roles$map;
|
|
3408
3422
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
3409
3423
|
key: index
|
|
@@ -3476,14 +3490,14 @@ const SupervisorDetails = props => {
|
|
|
3476
3490
|
isLoading: isDashboradLoading
|
|
3477
3491
|
}))), showModal && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
|
|
3478
3492
|
headerBarMain: /*#__PURE__*/React__default.createElement(Heading, {
|
|
3479
|
-
label: t(
|
|
3493
|
+
label: t(nextStatus.popupHeader)
|
|
3480
3494
|
}),
|
|
3481
3495
|
headerBarEnd: /*#__PURE__*/React__default.createElement(digitUiReactComponents.CloseSvg, {
|
|
3482
3496
|
onClick: closeModal
|
|
3483
3497
|
}),
|
|
3484
3498
|
actionCancelLabel: t("CS_COMMON_CANCEL"),
|
|
3485
3499
|
actionCancelOnSubmit: closeModal,
|
|
3486
|
-
actionSaveLabel: t(
|
|
3500
|
+
actionSaveLabel: t(nextStatus.status),
|
|
3487
3501
|
actionSaveOnSubmit: handleDeleteSupervisor
|
|
3488
3502
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
3489
3503
|
style: {
|
|
@@ -3491,7 +3505,7 @@ const SupervisorDetails = props => {
|
|
|
3491
3505
|
}
|
|
3492
3506
|
}, /*#__PURE__*/React__default.createElement(ConfirmationBox, {
|
|
3493
3507
|
t: t,
|
|
3494
|
-
title:
|
|
3508
|
+
title: nextStatus.popupMessage
|
|
3495
3509
|
}))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
3496
3510
|
error: showToast.key === "error",
|
|
3497
3511
|
label: showToast.key === "success" ? t("ES_VENDOR_" + showToast.action + "_SUCCESS", showToast.action === "UPDATE_SUPERVISOR" ? "Supervisor updated successfully" : undefined) : t(showToast.action),
|
|
@@ -3502,8 +3516,8 @@ const SupervisorDetails = props => {
|
|
|
3502
3516
|
zIndex: "19"
|
|
3503
3517
|
}
|
|
3504
3518
|
}, displayMenu ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Menu, {
|
|
3505
|
-
localeKeyPrefix: "
|
|
3506
|
-
options: ["EDIT",
|
|
3519
|
+
localeKeyPrefix: "ES_VENDOR_ACTION",
|
|
3520
|
+
options: ["EDIT", nextStatus.popupButton],
|
|
3507
3521
|
t: t,
|
|
3508
3522
|
onSelect: a => {
|
|
3509
3523
|
setDisplayMenu(false);
|
|
@@ -3517,12 +3531,12 @@ const SupervisorDetails = props => {
|
|
|
3517
3531
|
|
|
3518
3532
|
const _require$1 = require("@djb25/digit-ui-react-components"),
|
|
3519
3533
|
DatePicker$1 = _require$1.DatePicker;
|
|
3520
|
-
const SupervisorConfig = function (t, genderMenu,
|
|
3534
|
+
const SupervisorConfig = function (t, genderMenu, update) {
|
|
3521
3535
|
if (genderMenu === void 0) {
|
|
3522
3536
|
genderMenu = [];
|
|
3523
3537
|
}
|
|
3524
|
-
if (
|
|
3525
|
-
|
|
3538
|
+
if (update === void 0) {
|
|
3539
|
+
update = false;
|
|
3526
3540
|
}
|
|
3527
3541
|
return [{
|
|
3528
3542
|
head: t("ES_VENDOR_SUPERVISOR_BASIC_DETAILS"),
|
|
@@ -3530,7 +3544,6 @@ const SupervisorConfig = function (t, genderMenu, disabled) {
|
|
|
3530
3544
|
label: t("ES_VENDOR_SUPERVISOR_FULL_NAME"),
|
|
3531
3545
|
isMandatory: true,
|
|
3532
3546
|
type: "text",
|
|
3533
|
-
disable: disabled,
|
|
3534
3547
|
populators: {
|
|
3535
3548
|
name: "fullName",
|
|
3536
3549
|
validation: {
|
|
@@ -3555,7 +3568,7 @@ const SupervisorConfig = function (t, genderMenu, disabled) {
|
|
|
3555
3568
|
label: t("ES_VENDOR_SUPERVISOR_MOBILE_NUMBER"),
|
|
3556
3569
|
isMandatory: true,
|
|
3557
3570
|
type: "mobileNumber",
|
|
3558
|
-
disable:
|
|
3571
|
+
disable: update,
|
|
3559
3572
|
populators: {
|
|
3560
3573
|
name: "mobileNumber",
|
|
3561
3574
|
validation: {
|
|
@@ -3831,7 +3844,7 @@ const CloseBtn = props => {
|
|
|
3831
3844
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CloseSvg, null));
|
|
3832
3845
|
};
|
|
3833
3846
|
const SurveyorDetails = props => {
|
|
3834
|
-
var _Digit$UserService$ge, _surveyorData$
|
|
3847
|
+
var _Digit$UserService$ge, _surveyorData$, _surveyorData$$survey, _surveyorData$3, _surveyorData$3$emplo;
|
|
3835
3848
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
3836
3849
|
const _useTranslation = reactI18next.useTranslation(),
|
|
3837
3850
|
t = _useTranslation.t;
|
|
@@ -3854,12 +3867,6 @@ const SurveyorDetails = props => {
|
|
|
3854
3867
|
const _useState4 = React.useState(null),
|
|
3855
3868
|
showToast = _useState4[0],
|
|
3856
3869
|
setShowToast = _useState4[1];
|
|
3857
|
-
const _useState5 = React.useState([]),
|
|
3858
|
-
vendors = _useState5[0],
|
|
3859
|
-
setVendors = _useState5[1];
|
|
3860
|
-
const _useState6 = React.useState({}),
|
|
3861
|
-
selectedOption = _useState6[0],
|
|
3862
|
-
setSelectedOption = _useState6[1];
|
|
3863
3870
|
const _Digit$Hooks$fsm$useD = Digit.Hooks.fsm.useDsoSearch(tenantId, {
|
|
3864
3871
|
sortBy: "name",
|
|
3865
3872
|
sortOrder: "ASC",
|
|
@@ -3916,50 +3923,45 @@ const SurveyorDetails = props => {
|
|
|
3916
3923
|
};
|
|
3917
3924
|
});
|
|
3918
3925
|
}, [surveyorSearchResponse, vendorData]);
|
|
3926
|
+
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" ? {
|
|
3927
|
+
status: "ES_VENDOR_ACTION_ENABLE",
|
|
3928
|
+
action: "ACTIVE",
|
|
3929
|
+
toastMessage: "ES_FSM_REGISTRY_SUPERVISOR_ENABLE_SUCCESS",
|
|
3930
|
+
popupButton: "ENABLE",
|
|
3931
|
+
popupHeader: "ES_VENDOR_SURVEYOR_ENABLE_POPUP_HEADER",
|
|
3932
|
+
popupMessage: "ES_VENDOR_SURVEYOR_ENABLE_POPUP_MESSAGE"
|
|
3933
|
+
} : {
|
|
3934
|
+
status: "ES_VENDOR_ACTION_DISABLE",
|
|
3935
|
+
action: "DISABLED",
|
|
3936
|
+
toastMessage: "ES_FSM_REGISTRY_SUPERVISOR_DISABLE_SUCCESS",
|
|
3937
|
+
popupButton: "DISABLE",
|
|
3938
|
+
popupHeader: "ES_VENDOR_SURVEYOR_DISABLE_POPUP_HEADER",
|
|
3939
|
+
popupMessage: "ES_VENDOR_SURVEYOR_DISABLE_POPUP_MESSAGE"
|
|
3940
|
+
};
|
|
3919
3941
|
const _Digit$Hooks$fsm$useS2 = Digit.Hooks.fsm.useSurveyorUpdate(tenantId),
|
|
3920
3942
|
mutateSurveyor = _Digit$Hooks$fsm$useS2.mutate;
|
|
3921
3943
|
React.useEffect(() => {
|
|
3922
|
-
|
|
3923
|
-
let vendors = vendorData.map(data => data.dsoDetails);
|
|
3924
|
-
setVendors(vendors);
|
|
3925
|
-
}
|
|
3926
|
-
}, [vendorData]);
|
|
3927
|
-
React.useEffect(() => {
|
|
3928
|
-
var _location$state;
|
|
3944
|
+
var _location$state, _location$state2;
|
|
3929
3945
|
refetch();
|
|
3930
|
-
if ((_location$state = location.state) !== null && _location$state !== void 0 && _location$state.showSuccessToast)
|
|
3931
|
-
var _location$state2;
|
|
3932
|
-
setShowToast((_location$state2 = location.state) === null || _location$state2 === void 0 ? void 0 : _location$state2.message);
|
|
3933
|
-
}
|
|
3946
|
+
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);
|
|
3934
3947
|
}, []);
|
|
3935
3948
|
React.useEffect(() => {
|
|
3936
3949
|
switch (selectedAction) {
|
|
3937
|
-
case
|
|
3938
|
-
case "ADD_VENDOR":
|
|
3939
|
-
case "EDIT_VENDOR":
|
|
3940
|
-
case "DELETE_VENDOR":
|
|
3950
|
+
case nextStatus.status:
|
|
3941
3951
|
return setShowModal(true);
|
|
3942
3952
|
case "EDIT":
|
|
3943
3953
|
return history.push("/digit-ui/" + userType + "/vendor/registry/modify-surveyor/" + surveyorId);
|
|
3944
|
-
case "HOME":
|
|
3945
|
-
return history.push("/digit-ui/" + userType + "/vendor/search-vendor?selectedTabs=SURVEYOR");
|
|
3946
3954
|
}
|
|
3947
3955
|
}, [selectedAction]);
|
|
3948
3956
|
const closeToast = () => {
|
|
3949
3957
|
setShowToast(null);
|
|
3950
3958
|
};
|
|
3951
|
-
const handleModalAction = () => {
|
|
3952
|
-
switch (selectedAction) {
|
|
3953
|
-
case "DELETE":
|
|
3954
|
-
return handleDeleteSurveyor();
|
|
3955
|
-
}
|
|
3956
|
-
};
|
|
3957
3959
|
const handleDeleteSurveyor = () => {
|
|
3958
|
-
var _surveyorData
|
|
3959
|
-
let details = surveyorData === null || surveyorData === void 0 ? void 0 : (_surveyorData$ = surveyorData[0]) === null || _surveyorData$ === void 0 ? void 0 : _surveyorData
|
|
3960
|
+
var _surveyorData$2;
|
|
3961
|
+
let details = surveyorData === null || surveyorData === void 0 ? void 0 : (_surveyorData$2 = surveyorData[0]) === null || _surveyorData$2 === void 0 ? void 0 : _surveyorData$2.surveyorData;
|
|
3960
3962
|
const formData = {
|
|
3961
3963
|
surveyor: _extends({}, details, {
|
|
3962
|
-
status: "
|
|
3964
|
+
status: "DISABLED"
|
|
3963
3965
|
})
|
|
3964
3966
|
};
|
|
3965
3967
|
mutateSurveyor(formData, {
|
|
@@ -3987,43 +3989,15 @@ const SurveyorDetails = props => {
|
|
|
3987
3989
|
};
|
|
3988
3990
|
const closeModal = () => {
|
|
3989
3991
|
setSelectedAction(null);
|
|
3990
|
-
setSelectedOption({});
|
|
3991
3992
|
setShowModal(false);
|
|
3992
3993
|
};
|
|
3993
|
-
const modalHeading = () => {
|
|
3994
|
-
switch (selectedAction) {
|
|
3995
|
-
case "DELETE":
|
|
3996
|
-
case "DELETE_VENDOR":
|
|
3997
|
-
return "ES_VENDOR_SURVEYOR_DELETE_POPUP_HEADER";
|
|
3998
|
-
case "ADD_VENDOR":
|
|
3999
|
-
case "EDIT_VENDOR":
|
|
4000
|
-
return "ES_VENDOR_SURVEYOR_ADD_VENDOR_POPUP_HEADER";
|
|
4001
|
-
}
|
|
4002
|
-
};
|
|
4003
|
-
const renderModalContent = () => {
|
|
4004
|
-
if (selectedAction === "DELETE" || selectedAction === "DELETE_VENDOR") {
|
|
4005
|
-
return /*#__PURE__*/React__default.createElement(ConfirmationBox, {
|
|
4006
|
-
t: t,
|
|
4007
|
-
title: "ES_VENDOR_SURVEYOR_DELETE_TEXT"
|
|
4008
|
-
});
|
|
4009
|
-
}
|
|
4010
|
-
if (selectedAction === "ADD_VENDOR" || selectedAction === "EDIT_VENDOR") {
|
|
4011
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, null, t("ES_FSM_REGISTRY_SELECT_VENODOR")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
4012
|
-
t: t,
|
|
4013
|
-
option: vendors,
|
|
4014
|
-
value: selectedOption,
|
|
4015
|
-
selected: selectedOption,
|
|
4016
|
-
select: setSelectedOption,
|
|
4017
|
-
optionKey: "name"
|
|
4018
|
-
}));
|
|
4019
|
-
}
|
|
4020
|
-
};
|
|
4021
3994
|
if (isLoading) {
|
|
4022
3995
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
4023
3996
|
}
|
|
3997
|
+
console.log(nextStatus.status);
|
|
4024
3998
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
4025
3999
|
className: "employee-form-content"
|
|
4026
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, surveyorData === null || surveyorData === void 0 ? void 0 : (_surveyorData$
|
|
4000
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.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) => {
|
|
4027
4001
|
var _detail$values;
|
|
4028
4002
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
4029
4003
|
key: index
|
|
@@ -4067,20 +4041,19 @@ const SurveyorDetails = props => {
|
|
|
4067
4041
|
}))));
|
|
4068
4042
|
}))), showModal && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
|
|
4069
4043
|
headerBarMain: /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
4070
|
-
label: t(
|
|
4044
|
+
label: t(nextStatus.popupHeader)
|
|
4071
4045
|
}),
|
|
4072
4046
|
headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn, {
|
|
4073
4047
|
onClick: closeModal
|
|
4074
4048
|
}),
|
|
4075
4049
|
actionCancelLabel: t("CS_COMMON_CANCEL"),
|
|
4076
4050
|
actionCancelOnSubmit: closeModal,
|
|
4077
|
-
actionSaveLabel: t(
|
|
4078
|
-
actionSaveOnSubmit:
|
|
4079
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
}, renderModalContent())), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
4051
|
+
actionSaveLabel: t(nextStatus.status),
|
|
4052
|
+
actionSaveOnSubmit: handleDeleteSurveyor
|
|
4053
|
+
}, /*#__PURE__*/React__default.createElement(ConfirmationBox, {
|
|
4054
|
+
t: t,
|
|
4055
|
+
title: nextStatus.popupMessage
|
|
4056
|
+
})), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
4084
4057
|
error: showToast.key === "error",
|
|
4085
4058
|
label: showToast.key === "success" ? t("ES_VENDOR_" + showToast.action + "_SUCCESS", showToast.action === "UPDATE_SURVEYOR" ? "Surveyor updated successfully" : undefined) : t(showToast.action),
|
|
4086
4059
|
onClose: closeToast
|
|
@@ -4089,8 +4062,8 @@ const SurveyorDetails = props => {
|
|
|
4089
4062
|
zIndex: "19"
|
|
4090
4063
|
}
|
|
4091
4064
|
}, displayMenu ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Menu, {
|
|
4092
|
-
localeKeyPrefix: "
|
|
4093
|
-
options: ["EDIT",
|
|
4065
|
+
localeKeyPrefix: "ES_VENDOR_ACTION",
|
|
4066
|
+
options: ["EDIT", nextStatus.popupButton],
|
|
4094
4067
|
t: t,
|
|
4095
4068
|
onSelect: a => {
|
|
4096
4069
|
setDisplayMenu(false);
|
|
@@ -5590,7 +5563,7 @@ const EditSupervisor = () => {
|
|
|
5590
5563
|
}
|
|
5591
5564
|
}, [genderTypeData]);
|
|
5592
5565
|
const Config = React__default.useMemo(() => {
|
|
5593
|
-
return SupervisorConfig(t, genderMenu);
|
|
5566
|
+
return SupervisorConfig(t, genderMenu, true);
|
|
5594
5567
|
}, [t, genderMenu]);
|
|
5595
5568
|
React.useEffect(() => {
|
|
5596
5569
|
if (supervisorSearchResponse && supervisorSearchResponse.supervisors && supervisorSearchResponse.supervisors.length > 0) {
|
|
@@ -5787,7 +5760,7 @@ const EditSurveyor = () => {
|
|
|
5787
5760
|
}
|
|
5788
5761
|
}, [genderTypeData]);
|
|
5789
5762
|
const Config = React__default.useMemo(() => {
|
|
5790
|
-
return SurveyorConfig(t, genderMenu);
|
|
5763
|
+
return SurveyorConfig(t, genderMenu, true);
|
|
5791
5764
|
}, [t, genderMenu]);
|
|
5792
5765
|
React.useEffect(() => {
|
|
5793
5766
|
if (surveyorSearchResponse && surveyorSearchResponse.surveyors && surveyorSearchResponse.surveyors.length > 0) {
|