update value

This commit is contained in:
hamid zarghami
2026-01-25 12:02:23 +03:30
parent 5a129dfcda
commit 375ea9d669
5 changed files with 147 additions and 6 deletions
+20
View File
@@ -160,3 +160,23 @@ export const useCreateAttributeValue = () => {
}) => api.createAttributeValues(id, params),
});
};
export const useUpdateAttributeValue = () => {
return useMutation({
mutationFn: ({
id,
params,
}: {
id: number;
params: CreateAttributeValueType;
}) => api.updateAttributeValues(id, params),
});
};
export const useGetAttributeValueDetail = (id: number, enabled: boolean) => {
return useQuery({
queryKey: ["attrbute-values-detail", id],
queryFn: () => api.getAttributeValueDetail(id),
enabled: !!id && enabled,
});
};