Skip to content
Snippets Groups Projects

Resolve "Ajout de la fonctionnalité "Respect des critères""

Merged David Dorchies requested to merge 60-ajout-de-la-fonctionnalite-respect-des-criteres into devel
1 file
+ 42
41
Compare changes
  • Side-by-side
  • Inline
@@ -445,49 +445,50 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe
private updateUIValidity() {
this._isUIValid = false;
if (! this._formulaire.calculateDisabled) {
if (this._fieldsetComponents !== undefined) {
this._isUIValid = this._fieldsetComponents.reduce(
// callback
(
// accumulator (valeur précédente du résultat)
acc,
// currentValue (élément courant dans le tableau)
fieldset,
// currentIndex (indice courant dans le tableau)
currIndex,
// array (tableau parcouru)
array
) => {
return acc && fieldset.isValid;
}
// valeur initiale
, this._fieldsetComponents.length > 0);
}
if (this._fieldsetContainerComponents !== undefined) {
this._isUIValid = this._isUIValid && this._fieldsetContainerComponents.reduce<boolean>(
// callback
(
// accumulator (valeur précédente du résultat)
acc,
// currentValue (élément courant dans le tableau)
fieldsetContainer,
// currentIndex (indice courant dans le tableau)
currIndex,
// array (tableau parcouru)
array
): boolean => {
return acc && fieldsetContainer.isValid;
}
// valeur initiale
, true);
}
if (this._pabTableComponent !== undefined) {
this._isUIValid = this._isUIValid && this._pabTableComponent.isValid;
// all fieldsets must be valid
if (this._fieldsetComponents !== undefined) {
this._isUIValid = this._fieldsetComponents.reduce(
// callback
(
// accumulator (valeur précédente du résultat)
acc,
// currentValue (élément courant dans le tableau)
fieldset,
// currentIndex (indice courant dans le tableau)
currIndex,
// array (tableau parcouru)
array
) => {
return acc && fieldset.isValid;
}
// valeur initiale
, this._fieldsetComponents.length > 0);
}
// all fieldset containers must be valid
if (this._fieldsetContainerComponents !== undefined) {
this._isUIValid = this._isUIValid && this._fieldsetContainerComponents.reduce<boolean>(
// callback
(
// accumulator (valeur précédente du résultat)
acc,
// currentValue (élément courant dans le tableau)
fieldsetContainer,
// currentIndex (indice courant dans le tableau)
currIndex,
// array (tableau parcouru)
array
): boolean => {
return acc && fieldsetContainer.isValid;
}
// valeur initiale
, true);
}
// special components must be valid
if (this._pabTableComponent !== undefined) {
this._isUIValid = this._isUIValid && this._pabTableComponent.isValid;
}
}
}
}
public getElementStyleDisplay(id: string) {
const isDisplayed: boolean = this._formulaire.isDisplayed(id);
Loading