Admin / Subadmin nav access and bugs fixing
This commit is contained in:
@@ -7,8 +7,9 @@ import EditJobStatusModel from "./EditJobStatusModel";
|
||||
import { useGetJobStatusQuery, useJobStatusToggleMutation } from "../../../Redux/Service/job.status";
|
||||
import { useEffect, useState } from "react";
|
||||
import SearchComponent from "../../../components/SearchComponent";
|
||||
import { toaster } from "../../../components/ui/toaster";
|
||||
import { toaster, Toaster } from "../../../components/ui/toaster";
|
||||
import { useDebounce } from "../../../components/Hooks/useDebounce";
|
||||
import { delay } from "../../../components/Utils";
|
||||
|
||||
|
||||
|
||||
@@ -70,6 +71,12 @@ const JobStatus = () => {
|
||||
);
|
||||
try {
|
||||
await jobStatusToggle({ id: agencyId, is_active: newStatus }).unwrap();
|
||||
toaster.create({
|
||||
title: "Success",
|
||||
description: "Status updated successfully",
|
||||
type: "success",
|
||||
});
|
||||
await delay(500);
|
||||
refetch()
|
||||
} catch (error) {
|
||||
console.error("Error updating:", error);
|
||||
@@ -154,6 +161,7 @@ const JobStatus = () => {
|
||||
isError={isError}
|
||||
/>
|
||||
</Box>
|
||||
<Toaster />
|
||||
</MainFrame>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user