Skip to content

Commit

Permalink
Role access table (#1606)
Browse files Browse the repository at this point in the history
* removed iterator

* changes

* EOD checkopoint

* validation for user role

* Response and user-employee validation working

* Pull from console

* console.log and debuggers removed

* index path for response

* Making some changes

* console removed

* random

* user access roles working

* localizations added

* Removed debuggera dn console

* Localizations

* Changes

* response screen working

* Delete package-lock.json
  • Loading branch information
abishekTa-egov authored Oct 22, 2024
1 parent a9cfddd commit 96ccb9f
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,21 @@ const SetupMicroplan = ({ hierarchyType, hierarchyData }) => {
const handleUpdates = (propsForMutate) => {
updateResources(propsForMutate, {
onSuccess: (data) => {
// Check if there is a redirectTo property in the response
if (data?.redirectTo) {
history.push(data?.redirectTo, data?.state)
}
history.push(data?.redirectTo, data?.state); // Navigate to the specified route
}
},
onError: (error, variables) => {
setShowToast(({ key: "error", label: error?.message ? error.message : t("FAILED_TO_UPDATE_RESOURCE") }))
// Display error toast if update fails
setShowToast({
key: "error",
label: error?.message ? error.message : t("FAILED_TO_UPDATE_RESOURCE"),
});
},
});
};


const onSubmit = (formData) => {
// setIsSubmittting to true -> to run inline validations within the components
Expand Down

0 comments on commit 96ccb9f

Please sign in to comment.