feat: service deleting and rest categories placeholders

This commit is contained in:
2024-10-09 02:03:52 +03:00
parent dea1221016
commit 891b6cff9f
9 changed files with 41 additions and 21 deletions

View File

@@ -9,7 +9,7 @@ import useServicesList from "./useServicesList.tsx";
import { Text } from "@mantine/core";
const useServicesState = () => {
const { services, refetch } = useServicesList();
const { services, refetch } = useServicesList({ withPlaceholders: true });
const onCreateClick = () => {
modals.openContextModal({
@@ -27,7 +27,7 @@ const useServicesState = () => {
notifications.guess(ok, { message: message });
if (!ok) return;
await refetch();
}
},
);
};
@@ -45,7 +45,7 @@ const useServicesState = () => {
ServiceService.createServiceCategory({
requestBody: { category: category },
}).then(({ ok, message }) =>
notifications.guess(ok, { message: message })
notifications.guess(ok, { message: message }),
);
};