feat: update export mutation to invalidate additional cache for Fatture In Cloud
This commit is contained in:
parent
995eadd9dc
commit
c7dc508821
1 changed files with 2 additions and 3 deletions
|
|
@ -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) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue