Admin / Subadmin nav access and bugs fixing

This commit is contained in:
rockyeverlast
2025-09-12 17:49:14 +05:30
parent e5361a5d77
commit 8f19a41c57
19 changed files with 361 additions and 208 deletions

View File

@@ -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>
)
}