feat: update export mutation to invalidate additional cache for Fatture In Cloud

This commit is contained in:
Marco Pedone 2026-04-16 13:37:39 +02:00
parent 995eadd9dc
commit c7dc508821

View file

@ -299,9 +299,8 @@ const FatturazioneData = ({ userId, cf }: { userId: UsersId; cf: string }) => {
const utils = api.useUtils(); const utils = api.useUtils();
const { mutate: export_mutate } = api.fatture.addToFIC.useMutation({ const { mutate: export_mutate } = api.fatture.addToFIC.useMutation({
onSuccess: async () => { onSuccess: async () => {
await utils.users.getClientProfilo.invalidate({ await utils.users.getClientProfilo.invalidate();
userId, await utils.fatture.getClientFromCF.invalidate();
});
toast.success("Utente esportato con successo su Fatture In Cloud"); toast.success("Utente esportato con successo su Fatture In Cloud");
}, },
onError: (error) => { onError: (error) => {