{% set matin_cg = 'matin' in j.conge or 'jour' in j.conge %} {% set aprem_cg = 'aprem' in j.conge or 'jour' in j.conge %} {% set matin_requis = not matin_cg and j.du_min > 0 and j.matin_nominal_min > 0 %} {% set aprem_requis = not aprem_cg and j.du_min > 0 and j.aprem_nominal_min > 0 %} {% set borne_matin = [plages.matin_debut, j.retour or plages.matin_debut] | max %} {% set borne_aprem = [plages.aprem_debut, j.retour or plages.aprem_debut] | max %} {% set matin_warn = matin_requis and ( (j.matin_entree and j.matin_entree > borne_matin) or (j.matin_sortie and j.matin_sortie < plages.matin_fin) ) %} {% set aprem_warn = aprem_requis and ( (j.aprem_entree and j.aprem_entree > borne_aprem) or (j.aprem_sortie and j.aprem_sortie < plages.aprem_fin) ) %}