From c4902c501087adb3959a77db0247cb4b032e45a4 Mon Sep 17 00:00:00 2001
From: "mathias.chouet" <mathias.chouet@irstea.fr>
Date: Wed, 26 Feb 2020 10:35:34 +0100
Subject: [PATCH] Removed TODOs, renamed method

---
 .../components/base-param-input/base-param-input.component.ts | 4 ++--
 .../macrorugo-compound-results-table.component.html           | 1 -
 .../components/pab-results/pab-results-table.component.html   | 1 -
 src/app/components/results-chart/results-chart.component.ts   | 2 +-
 src/app/directives/jalhyd-model-validation.directive.ts       | 4 ++--
 src/app/formulaire/elements/ngparam.ts                        | 4 ++--
 src/app/services/internationalisation.service.ts              | 2 --
 7 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/app/components/base-param-input/base-param-input.component.ts b/src/app/components/base-param-input/base-param-input.component.ts
index d4b885e0f..aab6cebb6 100644
--- a/src/app/components/base-param-input/base-param-input.component.ts
+++ b/src/app/components/base-param-input/base-param-input.component.ts
@@ -46,8 +46,8 @@ export class NgBaseParam extends Observable {
         return this._param.checkMax(max);
     }
 
-    public checkStep(step: number): boolean {
-        return this._param.checkStep(step);
+    public checkMinMaxStep(step: number): boolean {
+        return this._param.checkMinMaxStep(step);
     }
 
     public setValue(val: number) {
diff --git a/src/app/components/macrorugo-compound-results/macrorugo-compound-results-table.component.html b/src/app/components/macrorugo-compound-results/macrorugo-compound-results-table.component.html
index b6d40a92f..d88bb1753 100644
--- a/src/app/components/macrorugo-compound-results/macrorugo-compound-results-table.component.html
+++ b/src/app/components/macrorugo-compound-results/macrorugo-compound-results-table.component.html
@@ -1,4 +1,3 @@
-<!-- @TODO copied from var-results.component.html > merge ?-->
 <div class="macrorugo-compound-results-table-container" #mrcResultsTable fxLayout="row wrap" fxLayoutAlign="center center">
     <div fxFlex="1 1 100%">
         <div class="macrorugo-compound-results-table-buttons">
diff --git a/src/app/components/pab-results/pab-results-table.component.html b/src/app/components/pab-results/pab-results-table.component.html
index f5e6fcf9b..c7334ca62 100644
--- a/src/app/components/pab-results/pab-results-table.component.html
+++ b/src/app/components/pab-results/pab-results-table.component.html
@@ -1,4 +1,3 @@
-<!-- @TODO copied from var-results.component.html > merge ?-->
 <div class="pab-results-table-container" #pabResultsTable fxLayout="row wrap" fxLayoutAlign="center center">
     <div fxFlex="1 1 100%">
         <div class="pab-results-table-buttons">
diff --git a/src/app/components/results-chart/results-chart.component.ts b/src/app/components/results-chart/results-chart.component.ts
index 9f58df172..6a94fc5c6 100644
--- a/src/app/components/results-chart/results-chart.component.ts
+++ b/src/app/components/results-chart/results-chart.component.ts
@@ -365,7 +365,7 @@ export class ResultsChartComponent extends ResultsComponentDirective implements
                 position: "bottom",
                 reverse: false
             };
-            // remove tooltips @TODO make them work for multiple series
+            // remove tooltips
             delete this.graph_options.tooltips;
         } else {
             // enhanced tooltips for single series
diff --git a/src/app/directives/jalhyd-model-validation.directive.ts b/src/app/directives/jalhyd-model-validation.directive.ts
index 41d4bbe9c..90a3719a6 100644
--- a/src/app/directives/jalhyd-model-validation.directive.ts
+++ b/src/app/directives/jalhyd-model-validation.directive.ts
@@ -66,7 +66,7 @@ export class JalhydModelValidationMaxDirective implements Validator {
 }
 
 /**
- * Synchronous validator for Ngparam, relying on JaLHyd ParamDefinition checkStep()
+ * Synchronous validator for Ngparam, relying on JaLHyd ParamDefinition checkMinMaxStep()
  */
 @Directive({
     selector: "[appJalhydModelValidationStep]",
@@ -144,7 +144,7 @@ export function jalhydModelValidatorMax(ngParam: NgParameter): ValidatorFn {
 export function jalhydModelValidatorStep(ngParam: NgParameter): ValidatorFn {
     return (control: AbstractControl): { [key: string]: any } | null => {
         let errorReturn = null; // no error, everything OK
-        const result = ngParam.checkStep(control.value);
+        const result = ngParam.checkMinMaxStep(control.value);
         if (! result) {
             errorReturn = {
                 "jalhydModelStep": {
diff --git a/src/app/formulaire/elements/ngparam.ts b/src/app/formulaire/elements/ngparam.ts
index f09c9081b..0a8baafb2 100644
--- a/src/app/formulaire/elements/ngparam.ts
+++ b/src/app/formulaire/elements/ngparam.ts
@@ -444,8 +444,8 @@ export class NgParameter extends InputField implements Observer {
         return this._paramDef.checkMax(max);
     }
 
-    public checkStep(step: number): boolean {
-        return this._paramDef.checkStep(step);
+    public checkMinMaxStep(step: number): boolean {
+        return this._paramDef.checkMinMaxStep(step);
     }
 
     public parseConfig(json: {}) {
diff --git a/src/app/services/internationalisation.service.ts b/src/app/services/internationalisation.service.ts
index 09d77fc4e..c8e35a07e 100644
--- a/src/app/services/internationalisation.service.ts
+++ b/src/app/services/internationalisation.service.ts
@@ -164,7 +164,6 @@ export class I18nService extends Observable implements Observer {
                 } else {
                     s = v;
                 }
-                // @TODO use sprintf() with named parameters instead ?
                 m = this.replaceAll(m, "%" + k + "%", s);
             }
         }
@@ -174,7 +173,6 @@ export class I18nService extends Observable implements Observer {
 
     /**
      * Finds the localized title for a LoiDebit item
-     * @TODO add StructureType context ? (ex: cem88d / cem88v)
      */
     public localizeLoiDebit(l: LoiDebit) {
         return this.localizeText("INFO_LOIDEBIT_" + LoiDebit[l]);
-- 
GitLab