refactor(FE-238-239-240): implement approval workflow chickin & project flock, membuat custom hook useApprovals, dan handling error format approvals

This commit is contained in:
randy-ar
2025-11-12 15:24:44 +07:00
parent 5dccaf40cb
commit b2f4317c08
13 changed files with 258 additions and 200 deletions
@@ -16,8 +16,12 @@ export default function AddChickinKandang() {
data: projectFlockKandang,
isLoading: isLoading,
mutate: refreshProjectFlockKandang,
} = useSWR(projectFlockKandangId, (id: number) =>
ProjectFlockKandangApi.getSingle(id)
} = useSWR(
`get-single-project-flock-kandang/${projectFlockKandangId}`,
async () =>
ProjectFlockKandangApi.getSingle(
parseInt(projectFlockKandangId as string)
)
);
if (!projectFlockKandangId) {