Skip to content
Snippets Groups Projects
Commit da09d0e1 authored by francois.grand's avatar francois.grand
Browse files

suppression des composants dédiés aux calculettes (CondDistriComponent,...

suppression des composants dédiés aux calculettes (CondDistriComponent, LechaptCalmonComponent, SectionParametreeComponent, ...) closes #10
parent 4ed40301
No related branches found
No related tags found
No related merge requests found
Showing
with 33 additions and 121 deletions
......@@ -80,11 +80,11 @@
<main>
<div class="container-fluid">
<cond-distri *ngIf="isDisplayCondDistri()"></cond-distri>
<lechapt-calmon *ngIf="isDisplayLechaptCalmon()"></lechapt-calmon>
<regime-uniforme *ngIf="isDisplayRegimeUnif()"></regime-uniforme>
<section-param *ngIf="isDisplaySectionParam()"></section-param>
<courbe-remous *ngIf="isDisplayCourbeRemous()"></courbe-remous>
<hydrocalc type="ConduiteDistributrice" *ngIf="isDisplayCondDistri()"></hydrocalc>
<hydrocalc type="LechaptCalmon" *ngIf="isDisplayLechaptCalmon()"></hydrocalc>
<hydrocalc type="RegimeUniforme" *ngIf="isDisplayRegimeUnif()"></hydrocalc>
<hydrocalc type="SectionParametree" *ngIf="isDisplaySectionParam()"></hydrocalc>
<hydrocalc type="CourbeRemous" *ngIf="isDisplayCourbeRemous()"></hydrocalc>
</div>
</main>
......
......@@ -13,11 +13,6 @@ import { FieldSetComponent } from './components/field-set/field-set.component';
import { ParamFieldLineComponent } from './components/param-field-line/param-field-line.component';
import { SelectFieldLineComponent } from './components/select-field-line/select-field-line.component';
import { CheckFieldLineComponent } from './components/check-field-line/check-field-line.component';
import { CondDistriComponent } from './calculators/cond_distri/conddistri.component';
import { LechaptCalmonComponent } from './calculators/lechapt-calmon/lechaptcalmon.component';
import { SectionParametreeComponent } from './calculators/section-param/section-param.component';
import { RegimeUniformeComponent } from './calculators/regime-uniforme/regime-uniforme.component';
import { CourbeRemousComponent } from './calculators/remous/remous.component';
// import { AlertDialog } from './components/alert-dialog/alert-dialog.component';
import { AppErrorModule } from './error.module';
import { CalculatorResultsComponent } from './components/calculator-results/calculator-results.component';
......@@ -46,7 +41,7 @@ import { LogComponent } from './components/log/log.component';
FieldSetComponent,
ParamFieldLineComponent, SelectFieldLineComponent, CheckFieldLineComponent,
LogComponent,
CondDistriComponent, LechaptCalmonComponent, SectionParametreeComponent, GenericCalculatorComponent, RegimeUniformeComponent, CourbeRemousComponent,
GenericCalculatorComponent,
// AlertDialog,
CalculatorResultsComponent, SectionResultsComponent, RemousResultsComponent,
CalcCanvasComponent, SectionCanvasComponent
......
<div class="row">
<div class="col">
<h1>{{uitextTitre}}</h1>
</div>
</div>
<hydrocalc type="ConduiteDistributrice"></hydrocalc>
\ No newline at end of file
import { Component } from '@angular/core';
import { InternationalisationService } from '../../services/internationalisation/internationalisation.service';
@Component({
selector: 'cond-distri',
templateUrl: "./conddistri.component.html"
})
export class CondDistriComponent {
private get uitextTitre() {
return this.intlService.localizeText("INFO_CONDDISTRI_TITRE")
}
constructor(private intlService: InternationalisationService) {
}
}
<div class="row">
<div class="col">
<h1>{{uitextTitre}}</h1>
</div>
</div>
<field-set *ngFor="let fs of fieldSets" [style.display]="getFieldsetStyleDisplay(fs.id)" [formId]=_formulaire.uid [id]=fs.id
[fieldSet]=fs (onRadio)=onRadioClick($event) (onSelectChange)=onSelectChanged($event)></field-set>
......
......@@ -100,6 +100,28 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, Observer {
return this._formulaire.getFieldSets(this._nodeType);
}
private get uitextTitre() {
switch (this._calculatorType) {
case CalculatorType.ConduiteDistributrice:
return this.intlService.localizeText("INFO_CONDDISTRI_TITRE");
case CalculatorType.LechaptCalmon:
return this.intlService.localizeText("INFO_LECHAPT_TITRE");
case CalculatorType.RegimeUniforme:
return this.intlService.localizeText("INFO_REGUNI_TITRE");
case CalculatorType.SectionParametree:
return this.intlService.localizeText("INFO_SECTPARAM_TITRE");
case CalculatorType.CourbeRemous:
return this.intlService.localizeText("INFO_REMOUS_TITRE")
default:
return "Invalid calculator type " + this._calculatorType;
}
}
private get uitextCalculer() {
return this.intlService.localizeText("INFO_CALCULATOR_CALCULER");
}
......
<div class="row">
<div class="col">
<h1>{{uitextTitre}}</h1>
</div>
</div>
<hydrocalc type="LechaptCalmon"></hydrocalc>
\ No newline at end of file
import { Component } from '@angular/core';
import { InternationalisationService } from '../../services/internationalisation/internationalisation.service';
@Component({
selector: 'lechapt-calmon',
templateUrl: "./lechaptcalmon.component.html"
})
export class LechaptCalmonComponent {
private get uitextTitre() {
return this.intlService.localizeText("INFO_LECHAPT_TITRE")
}
constructor(private intlService: InternationalisationService) {
}
}
<div class="row">
<div class="col">
<h1>{{uitextTitre}}</h1>
</div>
</div>
<hydrocalc type="RegimeUniforme"></hydrocalc>
\ No newline at end of file
import { Component } from '@angular/core';
import { InternationalisationService } from '../../services/internationalisation/internationalisation.service';
@Component({
selector: 'regime-uniforme',
templateUrl: "./regime-uniforme.component.html"
})
export class RegimeUniformeComponent {
private get uitextTitre() {
return this.intlService.localizeText("INFO_REGUNI_TITRE")
}
constructor(private intlService: InternationalisationService) {
}
}
<div class="row">
<div class="col">
<h1>{{uitextTitre}}</h1>
</div>
</div>
<hydrocalc type="CourbeRemous"></hydrocalc>
\ No newline at end of file
import { Component } from '@angular/core';
import { InternationalisationService } from '../../services/internationalisation/internationalisation.service';
@Component({
selector: 'courbe-remous',
templateUrl: "./remous.component.html"
})
export class CourbeRemousComponent {
private get uitextTitre() {
return this.intlService.localizeText("INFO_REMOUS_TITRE")
}
constructor(private intlService: InternationalisationService) {
}
}
<div class="row">
<div class="col">
<h1>{{uitextTitre}}</h1>
</div>
</div>
<hydrocalc type="SectionParametree"></hydrocalc>
\ No newline at end of file
import { Component } from '@angular/core';
import { InternationalisationService } from '../../services/internationalisation/internationalisation.service';
@Component({
selector: 'section-param',
templateUrl: "./section-param.component.html"
})
export class SectionParametreeComponent {
private get uitextTitre() {
return this.intlService.localizeText("INFO_SECTPARAM_TITRE")
}
constructor(private intlService: InternationalisationService) {
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment