Package and individual mail sender, new report, and other changes
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -43,6 +43,8 @@ const formSchema = toTypedSchema(
|
||||
value: z.string().email("E-pošta mora biti veljavna.").min(1, "E-pošta je obvezna."),
|
||||
label: z.string().optional(),
|
||||
receive_auto_mails: z.boolean().optional(),
|
||||
valid: z.boolean().default(true),
|
||||
failed: z.boolean().default(false),
|
||||
decision_ids: z.array(z.string()).optional().default([]),
|
||||
})
|
||||
);
|
||||
@@ -54,6 +56,8 @@ const form = useForm({
|
||||
value: "",
|
||||
label: "",
|
||||
receive_auto_mails: false,
|
||||
valid: true,
|
||||
failed: false,
|
||||
decision_ids: [],
|
||||
},
|
||||
});
|
||||
@@ -78,6 +82,8 @@ const resetForm = () => {
|
||||
value: "",
|
||||
label: "",
|
||||
receive_auto_mails: false,
|
||||
valid: true,
|
||||
failed: false,
|
||||
decision_ids: [],
|
||||
},
|
||||
});
|
||||
@@ -182,6 +188,8 @@ watch(
|
||||
value: email.value ?? email.email ?? email.address ?? "",
|
||||
label: email.label ?? "",
|
||||
receive_auto_mails: !!email.receive_auto_mails,
|
||||
valid: email.valid !== undefined ? !!email.valid : true,
|
||||
failed: !!email.failed,
|
||||
decision_ids: existingDecisionIds,
|
||||
});
|
||||
} else {
|
||||
@@ -272,6 +280,28 @@ const onConfirm = () => {
|
||||
</FormItem>
|
||||
</FormField>
|
||||
|
||||
<FormField v-slot="{ value, handleChange }" name="valid">
|
||||
<FormItem class="flex flex-row items-start space-x-3 space-y-0">
|
||||
<FormControl>
|
||||
<Switch :model-value="value" @update:model-value="handleChange" />
|
||||
</FormControl>
|
||||
<div class="space-y-1 leading-none">
|
||||
<FormLabel class="cursor-pointer">Veljavna</FormLabel>
|
||||
</div>
|
||||
</FormItem>
|
||||
</FormField>
|
||||
|
||||
<FormField v-slot="{ value, handleChange }" name="failed">
|
||||
<FormItem class="flex flex-row items-start space-x-3 space-y-0">
|
||||
<FormControl>
|
||||
<Switch :model-value="value" @update:model-value="handleChange" />
|
||||
</FormControl>
|
||||
<div class="space-y-1 leading-none">
|
||||
<FormLabel class="cursor-pointer">Neuspešna dostava</FormLabel>
|
||||
</div>
|
||||
</FormItem>
|
||||
</FormField>
|
||||
|
||||
<!-- Limit to specific decisions — only shown when receive_auto_mails is on and decisions exist -->
|
||||
<template v-if="(props.person?.client || isClientContext) && form.values.receive_auto_mails && decisionOptions.length > 0">
|
||||
<div class="flex flex-row items-start space-x-3 space-y-0">
|
||||
|
||||
Reference in New Issue
Block a user