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, useWatch } from "react-hook-form";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -112,6 +113,8 @@ const useOperationFormVm = (props: OperationFormProps) => {
|
||||
description: values.description,
|
||||
};
|
||||
|
||||
const actionId = crypto.randomUUID();
|
||||
|
||||
if (props.operation)
|
||||
await updateOperation.mutateAsync({
|
||||
body: { ...body, version },
|
||||
@@ -122,6 +125,11 @@ const useOperationFormVm = (props: OperationFormProps) => {
|
||||
id: intent,
|
||||
...body,
|
||||
});
|
||||
|
||||
notifications.show({
|
||||
id: "bank-operation-saved-" + actionId,
|
||||
message: t("bank.operationSaved"),
|
||||
});
|
||||
setOpened(false);
|
||||
}
|
||||
catch (error_) {
|
||||
|
||||
Reference in New Issue
Block a user