feat: rename access to providerAccessId

This commit is contained in:
Fu Diwei
2025-01-04 11:49:50 +08:00
parent 90058b2dae
commit 52dfa5e8c3
16 changed files with 113 additions and 121 deletions

View File

@@ -8,7 +8,7 @@ import { produce } from "immer";
import { z } from "zod";
import { notifyChannelsMap } from "@/domain/settings";
import { type WorkflowNode } from "@/domain/workflow";
import { type WorkflowNode, type WorkflowNotifyNodeConfig } from "@/domain/workflow";
import { useAntdForm, useZustandShallowSelector } from "@/hooks";
import { useNotifyChannelsStore } from "@/stores/notify";
import { useWorkflowStore } from "@/stores/workflow";
@@ -18,7 +18,7 @@ export type NotifyNodeFormProps = {
node: WorkflowNode;
};
const initFormModel = () => {
const initFormModel = (): Partial<WorkflowNotifyNodeConfig> => {
return {
subject: "Completed!",
message: "Your workflow has been completed on Certimate.",
@@ -57,7 +57,7 @@ const NotifyNodeForm = ({ node }: NotifyNodeFormProps) => {
formPending,
formProps,
} = useAntdForm<z.infer<typeof formSchema>>({
initialValues: node?.config ?? initFormModel(),
initialValues: (node?.config as WorkflowNotifyNodeConfig) ?? initFormModel(),
onSubmit: async (values) => {
await formInst.validateFields();
await updateNode(