Merge branch 'develop' into 'feature/debug_forms'
# Conflicts: # src/components/dashboard/machinary-office/TableRowActions.jsx # src/components/dashboard/passenger-boss/TableRowActions.jsx # src/components/dashboard/passenger-office/TableRowActions.jsx # src/components/dashboard/province-manager/TableRowActions.jsx # src/components/dashboard/transportation-assistance/TableRowActions.jsx
This commit is contained in:
@@ -20,7 +20,7 @@ const DashboardChangePasswordComponent = () => {
|
||||
const {directionApp} = useDirection();
|
||||
|
||||
const handleSubmit = (values, {setSubmitting, resetForm}) => {
|
||||
Notifications(directionApp, t);
|
||||
Notifications(t);
|
||||
axios
|
||||
.post(
|
||||
CHANGE_PASSWORD,
|
||||
@@ -35,12 +35,12 @@ const DashboardChangePasswordComponent = () => {
|
||||
)
|
||||
.then((response) => {
|
||||
toast.dismiss(pendingToast); // Dismiss the pending toast notification
|
||||
Notifications(directionApp, t, response);
|
||||
Notifications(t, response);
|
||||
resetForm();
|
||||
})
|
||||
.catch((error) => {
|
||||
toast.dismiss(pendingToast); // Dismiss the pending toast notification
|
||||
Notifications(directionApp, t, error.response);
|
||||
Notifications(t, error.response);
|
||||
})
|
||||
.finally(() => {
|
||||
setSubmitting(false); // Set `setSubmitting` to false after the API request completes
|
||||
|
||||
@@ -20,7 +20,7 @@ const DashboardEditProfile = () => {
|
||||
const {directionApp} = useDirection();
|
||||
|
||||
const editAvatar = async (avatar) => {
|
||||
Notifications(directionApp, t);
|
||||
Notifications(t);
|
||||
try {
|
||||
const formData = new FormData();
|
||||
|
||||
@@ -37,7 +37,7 @@ const DashboardEditProfile = () => {
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
Notifications(directionApp, t, error.response);
|
||||
Notifications(t, error.response);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
@@ -55,13 +55,13 @@ const DashboardEditProfile = () => {
|
||||
// });
|
||||
// })
|
||||
// .then((response) => {
|
||||
// Notifications(directionApp, t, response);
|
||||
// Notifications( t, response);
|
||||
// getUser((data) => {
|
||||
// changeUser(data);
|
||||
// });
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// Notifications(directionApp, t, error.response);
|
||||
// Notifications( t, error.response);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// setSubmitting(false);
|
||||
@@ -75,13 +75,13 @@ const DashboardEditProfile = () => {
|
||||
// },
|
||||
// })
|
||||
// .then((response) => {
|
||||
// Notifications(directionApp, t, response);
|
||||
// Notifications( t, response);
|
||||
// getUser((data) => {
|
||||
// changeUser(data);
|
||||
// });
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// Notifications(directionApp, t, error.response);
|
||||
// Notifications( t, error.response);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// setSubmitting(false);
|
||||
|
||||
Reference in New Issue
Block a user