feat: add quiet reading with rare confirmations
Part of the quiet-user-feedback change; docs and specs land in their own repositories.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { notifications } from "@mantine/notifications";
|
||||
import { useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -71,7 +72,7 @@ function useBankCardFormVm(props: BankCardFormProps) {
|
||||
openingDate: values.openingDate,
|
||||
};
|
||||
|
||||
if (props.card)
|
||||
if (props.card) {
|
||||
await updateCard.mutateAsync({
|
||||
body: {
|
||||
...metadata,
|
||||
@@ -80,12 +81,19 @@ function useBankCardFormVm(props: BankCardFormProps) {
|
||||
},
|
||||
id: props.card.id,
|
||||
});
|
||||
else
|
||||
}
|
||||
else {
|
||||
await cardCreation.mutateAsync({
|
||||
id: intent,
|
||||
...metadata,
|
||||
...financial,
|
||||
});
|
||||
notifications.show({
|
||||
id: "bank-card-created-" + intent,
|
||||
message: t("bank.cardSaved"),
|
||||
});
|
||||
}
|
||||
|
||||
setOpened(false);
|
||||
}
|
||||
catch (error_) {
|
||||
|
||||
Reference in New Issue
Block a user