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 since 42 < 10 always avaluates to False
  • Step always will always show since 10 < 42 always avaluates to True
  • Step deep is always shown
  • Step facture will only show if the PDF dropped contains facture in its name
  • Step commande will only show if the PDF dropped contains commande 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'