feat: add conditional rendering for skip payment and document controls in FormNewServizio
This commit is contained in:
parent
d894f9d6ec
commit
db8d1da5ab
1 changed files with 80 additions and 79 deletions
|
|
@ -596,86 +596,87 @@ export const FormNewServizio = ({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Separator />
|
<Separator />
|
||||||
|
{!isLimited && (
|
||||||
|
<div className="flex w-full flex-col items-start justify-between gap-4 sm:flex-row">
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="skipPayment"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem className="w-full">
|
||||||
|
<div className="flex flex-wrap items-center gap-x-2">
|
||||||
|
<FormLabel htmlFor="skipPayment">Salta Pagamento</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Switch
|
||||||
|
checked={field.value}
|
||||||
|
className="data-[state=checked]:bg-neutral-700"
|
||||||
|
id="skipPayment"
|
||||||
|
onCheckedChange={field.onChange}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</div>
|
||||||
|
<FormDescription>
|
||||||
|
Salta la richiesta di pagamento al cliente (per tutti i
|
||||||
|
pagamenti)
|
||||||
|
</FormDescription>
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="skipControlloDoc"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem className="w-full">
|
||||||
|
<div className="flex flex-wrap items-center gap-x-2">
|
||||||
|
<FormLabel htmlFor="skipControlloDoc">
|
||||||
|
Salta controllo documento
|
||||||
|
</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Switch
|
||||||
|
checked={field.value}
|
||||||
|
className="data-[state=checked]:bg-neutral-700"
|
||||||
|
id="skipControlloDoc"
|
||||||
|
onCheckedChange={field.onChange}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</div>
|
||||||
|
<FormDescription>
|
||||||
|
Salta la richiesta del documento del cliente al momento
|
||||||
|
dello sblocco contatti
|
||||||
|
</FormDescription>
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="skipDocMotivazione"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem className="w-full">
|
||||||
|
<div className="flex flex-wrap items-center gap-x-2">
|
||||||
|
<FormLabel htmlFor="skipDocMotivazione">
|
||||||
|
Salta documento motivazione
|
||||||
|
</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Switch
|
||||||
|
checked={field.value}
|
||||||
|
className="data-[state=checked]:bg-neutral-700"
|
||||||
|
id="skipDocMotivazione"
|
||||||
|
onCheckedChange={field.onChange}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="flex w-full flex-col items-start justify-between gap-4 sm:flex-row">
|
<FormDescription>
|
||||||
<FormField
|
Salta l'invio del documento di motivazione al cliente
|
||||||
control={form.control}
|
al momento della conferma annuncio
|
||||||
name="skipPayment"
|
</FormDescription>
|
||||||
render={({ field }) => (
|
</FormItem>
|
||||||
<FormItem className="w-full">
|
)}
|
||||||
<div className="flex flex-wrap items-center gap-x-2">
|
/>
|
||||||
<FormLabel htmlFor="skipPayment">Salta Pagamento</FormLabel>
|
</div>
|
||||||
<FormControl>
|
)}
|
||||||
<Switch
|
|
||||||
checked={field.value}
|
|
||||||
className="data-[state=checked]:bg-neutral-700"
|
|
||||||
id="skipPayment"
|
|
||||||
onCheckedChange={field.onChange}
|
|
||||||
/>
|
|
||||||
</FormControl>
|
|
||||||
<FormMessage />
|
|
||||||
</div>
|
|
||||||
<FormDescription>
|
|
||||||
Salta la richiesta di pagamento al cliente (per tutti i
|
|
||||||
pagamenti)
|
|
||||||
</FormDescription>
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="skipControlloDoc"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem className="w-full">
|
|
||||||
<div className="flex flex-wrap items-center gap-x-2">
|
|
||||||
<FormLabel htmlFor="skipControlloDoc">
|
|
||||||
Salta controllo documento
|
|
||||||
</FormLabel>
|
|
||||||
<FormControl>
|
|
||||||
<Switch
|
|
||||||
checked={field.value}
|
|
||||||
className="data-[state=checked]:bg-neutral-700"
|
|
||||||
id="skipControlloDoc"
|
|
||||||
onCheckedChange={field.onChange}
|
|
||||||
/>
|
|
||||||
</FormControl>
|
|
||||||
<FormMessage />
|
|
||||||
</div>
|
|
||||||
<FormDescription>
|
|
||||||
Salta la richiesta del documento del cliente al momento dello
|
|
||||||
sblocco contatti
|
|
||||||
</FormDescription>
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="skipDocMotivazione"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem className="w-full">
|
|
||||||
<div className="flex flex-wrap items-center gap-x-2">
|
|
||||||
<FormLabel htmlFor="skipDocMotivazione">
|
|
||||||
Salta documento motivazione
|
|
||||||
</FormLabel>
|
|
||||||
<FormControl>
|
|
||||||
<Switch
|
|
||||||
checked={field.value}
|
|
||||||
className="data-[state=checked]:bg-neutral-700"
|
|
||||||
id="skipDocMotivazione"
|
|
||||||
onCheckedChange={field.onChange}
|
|
||||||
/>
|
|
||||||
</FormControl>
|
|
||||||
<FormMessage />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<FormDescription>
|
|
||||||
Salta l'invio del documento di motivazione al cliente al
|
|
||||||
momento della conferma annuncio
|
|
||||||
</FormDescription>
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Button type="submit">Salva</Button>
|
<Button type="submit">Salva</Button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue