Compare commits

...

3 Commits

Author SHA1 Message Date
Abhinav Raut
562babf222 Merge pull request #150 from csr4422/fix/convert-select-values
Fix: convert select values to number or null before submit
2025-09-29 23:01:36 +05:30
csr4422
93e94432f5 feat: add None option to SLA and Business Hours select boxes 2025-09-29 21:20:20 +05:30
csr4422
ec63604163 Fix: convert select values to number or null before submit 2025-09-29 17:18:36 +05:30

View File

@@ -57,9 +57,8 @@
<Input type="number" placeholder="0" v-bind="componentField" />
</FormControl>
<FormDescription>
Maximum number of conversations that can be auto-assigned to an agent,
conversations in "Resolved" or "Closed" states do not count toward this limit. Set to 0
for unlimited.
Maximum number of conversations that can be auto-assigned to an agent, conversations in
"Resolved" or "Closed" states do not count toward this limit. Set to 0 for unlimited.
</FormDescription>
<FormMessage />
</FormItem>
@@ -97,6 +96,7 @@
</SelectTrigger>
<SelectContent>
<SelectGroup>
<SelectItem :value = 0>None</SelectItem>
<SelectItem v-for="bh in businessHours" :key="bh.id" :value="bh.id">
{{ bh.name }}
</SelectItem>
@@ -121,6 +121,7 @@
</SelectTrigger>
<SelectContent>
<SelectGroup>
<SelectItem :value= 0>None</SelectItem>
<SelectItem
v-for="sla in slaStore.options"
:key="sla.value"
@@ -226,7 +227,11 @@ const fetchBusinessHours = async () => {
}
const onSubmit = form.handleSubmit((values) => {
props.submitForm(values)
props.submitForm({
...values,
business_hours_id: values.business_hours_id > 0 ? values.business_hours_id : null,
sla_policy_id: values.sla_policy_id > 0 ? values.sla_policy_id: null
})
})
watch(