Checklist
show
You can show or hide a checklist conditionnaly.
show
You can show or hide a checklist conditionnaly.
Use the show
property.
The value is a boolean expression evaluated.
Here is a checklist with some show
properties:
$schema: https://paxpar.tech/schema/mycheck/default/0
name: Show of the show feature
steps:
- id: default
title: default is always shown
- id: never
title: Should never be shown
show: 42 < 10
- id: always
title: Should always be shown
show: 10 < 42
- id: deep
title: Some deep show props
children:
- id: facture
name: Should show for a 'facture'
show: "'facture' in pdf.info.pdfName.lower()"
- id: commande
name: Should show for a 'commande'
show: "'commande' in pdf.info.pdfName.lower()"
- Step
default
is always shown (default behaviour) - Step
never
will never show since42 < 10
always avaluates toFalse
- Step
always
will always show since10 < 42
always avaluates toTrue
- Step
deep
is always shown - Step
facture
will only show if the PDF dropped containsfacture
in its name - Step
commande
will only show if the PDF dropped containscommande
in its name
show or assert
- title: 2 Signatures
icon: mdi-pen
children:
- id: signature
name: Signature fournisseur M BATITOUT
icon: mdi-pen
show: "'FA2_' not in pdf.info.pdfName"
status: OK
- id: signature
name: Signature fournisseur M BATITOUT
icon: mdi-pen
show: "'FA2_' in pdf.info.pdfName"
status: KO
is equivalent to:
- title: 2 Signatures
icon: mdi-pen
children:
- id: signature
name: Signature fournisseur M BATITOUT
icon: mdi-pen
assert: "'FA2_' not in pdf.info.pdfName"
- name: Coucou c'est Nadine AAA
icon: mdi-pen
assert: "2 < 4" # True / Vrai --> status OK
- name: Coucou c'est Nadine BBB
icon: mdi-pen
assert: "8 < 4" # False / Faux ---> status KO
- name: Coucou c'est Nadine CCC
icon: mdi-pen
show: "2 < 4" # True / Vrai ---> affiché !
- name: Coucou c'est Nadine DDD
icon: mdi-pen
show: "8 < 4" # False / Faux ---> masqué !
- id: signature
name: Signature du chargé de travaux (Surveillance Client) de Méliane
icon: mdi-pen
children:
- id : cle publique
name: Clé publique de Méliane trouvée
icon: mdi-pen
status: OK
#show: "'aqd' not in pdf.info.pdfName" # nom du fichier contient 'aqd'
show: "pdf.info.pdfName == 'aq.pdf'" # nom du fichier est 'aqd.pdf'
- id : cle publique
name: Clé publique de Méliane non trouvée
icon: mdi-pen
status: KO
#show: "'aqd' in pdf.info.pdfName" # nom du fichier ne contient pas 'aqd'
show: "pdf.info.pdfName != 'aq.pdf'" # nom du fichier n'est pas 'aqd.pdf'