Commit 8933e858 authored by Mathias Chouet's avatar Mathias Chouet 🍝
Browse files

#287 added prototype for Jet module

parent 8918bcc8
...@@ -267,8 +267,9 @@ Custom Material SVG Icons will only show up when the application is deployed on ...@@ -267,8 +267,9 @@ Custom Material SVG Icons will only show up when the application is deployed on
On peut soit composer la classe concrète directement avec ces classes, soient dériver ces dernières et composer avec. On peut soit composer la classe concrète directement avec ces classes, soient dériver ces dernières et composer avec.
3. _src/locale/messages.<langue>.json_ : 3. _src/locale/messages.<langue>.json_ :
Ajouter un champ pour le titre du module de calcul. Par exemple : Ajouter deux champs pour le titre et le titre court du module de calcul. Par exemple :
_"INFO_MACALC_TITRE": "Ma calculette"_ _"INFO_MACALC_TITRE": "Ma calculette"_,
_"INFO_MACALC_TITRE_COURT": "Ma calc."_
4. Dans le constructeur de _FormulaireService_, ajouter une entrée dans `this.calculatorPaths` pour fournir le préfixe des fichiers de configuration/internationalisation. 4. Dans le constructeur de _FormulaireService_, ajouter une entrée dans `this.calculatorPaths` pour fournir le préfixe des fichiers de configuration/internationalisation.
......
[
{
"id": "fs_jet",
"type": "fieldset",
"fields": [ "V0", "S", "D", "H" ]
},
{
"type": "options",
"__idCal": "D",
"help": "devalaison/jet"
}
]
\ No newline at end of file
{
"fs_jet": "Jet and impact parameters",
"V0": "Initial speed",
"S": "Initial slope",
"D": "Impact abscissa",
"H": "Fall height",
"t": "Flight time",
"Vx": "Horizontal speed at impact",
"Vz": "Vertical speed at impact",
"Vt": "Impact speed at impact",
"UNIT_V0": "m/s",
"UNIT_S": "m/m",
"UNIT_D": "m",
"UNIT_H": "m",
"UNIT_T": "s",
"UNIT_VX": "m/s",
"UNIT_VZ": "m/s",
"UNIT_VT": "m/s"
}
\ No newline at end of file
{
"fs_jet": "Paramètres du jet et de l'impact",
"V0": "Vitesse initiale",
"S": "Pente initiale",
"D": "Abscisse de l'impact",
"H": "Hauteur de chute",
"t": "Temps de vol",
"Vx": "Vitesse horizontale à l'impact",
"Vz": "Vitesse verticale à l'impact",
"Vt": "Vitesse d'impact à l'impact",
"UNIT_V0": "m/s",
"UNIT_S": "m/m",
"UNIT_D": "m",
"UNIT_H": "m",
"UNIT_T": "s",
"UNIT_VX": "m/s",
"UNIT_VZ": "m/s",
"UNIT_VT": "m/s"
}
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"path": "passe-bassin.jpg", "path": "passe-bassin.jpg",
"credits": "S. Richard / AFB" "credits": "S. Richard / AFB"
}, },
"calculators": [ 12, 13, 6, 5, 10, 15, 9 ] "calculators": [ 12, 13, 6, 5, 10, 15 ]
}, },
{ {
"name": "PASSE_NATURELLE", "name": "PASSE_NATURELLE",
...@@ -24,6 +24,14 @@ ...@@ -24,6 +24,14 @@
}, },
"calculators": [ 11, 17 ] "calculators": [ 11, 17 ]
}, },
{
"name": "DEVALAISON",
"image": {
"path": "surface-libre.jpg",
"credits": "PENSER À CHANGER CETTE IMAGE"
},
"calculators": [ 18, 3, 9 ]
},
{ {
"name": "HYDRAULIQUE_A_SURFACE_LIBRE", "name": "HYDRAULIQUE_A_SURFACE_LIBRE",
"image": { "image": {
......
...@@ -77,6 +77,7 @@ export class FormulaireService extends Observable { ...@@ -77,6 +77,7 @@ export class FormulaireService extends Observable {
this.calculatorPaths[CalculatorType.MacroRugo] = "macrorugo"; this.calculatorPaths[CalculatorType.MacroRugo] = "macrorugo";
this.calculatorPaths[CalculatorType.Pab] = "pab"; this.calculatorPaths[CalculatorType.Pab] = "pab";
this.calculatorPaths[CalculatorType.MacroRugoCompound] = "macrorugo-compound"; this.calculatorPaths[CalculatorType.MacroRugoCompound] = "macrorugo-compound";
this.calculatorPaths[CalculatorType.Jet] = "jet";
} }
private get _intlService(): I18nService { private get _intlService(): I18nService {
...@@ -326,6 +327,7 @@ export class FormulaireService extends Observable { ...@@ -326,6 +327,7 @@ export class FormulaireService extends Observable {
* @param calculatorName nom du module, à afficher dans l'interface * @param calculatorName nom du module, à afficher dans l'interface
*/ */
public createFormulaire(ct: CalculatorType, nub?: Nub, calculatorName?: string): Promise<FormulaireDefinition> { public createFormulaire(ct: CalculatorType, nub?: Nub, calculatorName?: string): Promise<FormulaireDefinition> {
console.log(">> Create form !!", ct);
// Crée un formulaire du bon type // Crée un formulaire du bon type
const f: FormulaireDefinition = this.newFormulaire(ct); const f: FormulaireDefinition = this.newFormulaire(ct);
this._formulaires.push(f); this._formulaires.push(f);
......
...@@ -146,6 +146,8 @@ ...@@ -146,6 +146,8 @@
"INFO_FIELDSET_MOVE_DOWN": "Move down", "INFO_FIELDSET_MOVE_DOWN": "Move down",
"INFO_FIELDSET_MOVE_LEFT": "Move left", "INFO_FIELDSET_MOVE_LEFT": "Move left",
"INFO_FIELDSET_MOVE_RIGHT": "Move right", "INFO_FIELDSET_MOVE_RIGHT": "Move right",
"INFO_JET_TITRE_COURT": "Jet",
"INFO_JET_TITRE": "Jet impact",
"INFO_WALL_ADDED": "1 wall added", "INFO_WALL_ADDED": "1 wall added",
"INFO_WALL_ADDED_N_TIMES": "%s walls added", "INFO_WALL_ADDED_N_TIMES": "%s walls added",
"INFO_WALL_COPIED": "Wall #%s copied", "INFO_WALL_COPIED": "Wall #%s copied",
...@@ -408,6 +410,8 @@ ...@@ -408,6 +410,8 @@
"INFO_SNACKBAR_RESULTS_INVALIDATED": "Results invalidated for", "INFO_SNACKBAR_RESULTS_INVALIDATED": "Results invalidated for",
"INFO_SNACKBAR_SETTINGS_SAVED": "Settings saved on this device", "INFO_SNACKBAR_SETTINGS_SAVED": "Settings saved on this device",
"INFO_THEME_CREDITS": "Credit", "INFO_THEME_CREDITS": "Credit",
"INFO_THEME_DEVALAISON_TITRE": "Downstream migration",
"INFO_THEME_DEVALAISON_DESCRIPTION": "",
"INFO_THEME_HYDRAULIQUE_A_SURFACE_LIBRE_DESCRIPTION": "Calculation modules for flows in channels and rivers", "INFO_THEME_HYDRAULIQUE_A_SURFACE_LIBRE_DESCRIPTION": "Calculation modules for flows in channels and rivers",
"INFO_THEME_HYDRAULIQUE_A_SURFACE_LIBRE_TITRE": "Open-channel flow", "INFO_THEME_HYDRAULIQUE_A_SURFACE_LIBRE_TITRE": "Open-channel flow",
"INFO_THEME_HYDRAULIQUE_EN_CHARGE_DESCRIPTION": "Modules for calculating head losses in pressure pipes", "INFO_THEME_HYDRAULIQUE_EN_CHARGE_DESCRIPTION": "Modules for calculating head losses in pressure pipes",
......
...@@ -146,6 +146,8 @@ ...@@ -146,6 +146,8 @@
"INFO_FIELDSET_MOVE_DOWN": "Déplacer vers le bas", "INFO_FIELDSET_MOVE_DOWN": "Déplacer vers le bas",
"INFO_FIELDSET_MOVE_LEFT": "Déplacer vers la gauche", "INFO_FIELDSET_MOVE_LEFT": "Déplacer vers la gauche",
"INFO_FIELDSET_MOVE_RIGHT": "Déplacer vers la droite", "INFO_FIELDSET_MOVE_RIGHT": "Déplacer vers la droite",
"INFO_JET_TITRE_COURT": "Jet",
"INFO_JET_TITRE": "Impact de jet",
"INFO_WALL_ADDED": "1 cloison ajoutée", "INFO_WALL_ADDED": "1 cloison ajoutée",
"INFO_WALL_ADDED_N_TIMES": "%s cloisons ajoutées", "INFO_WALL_ADDED_N_TIMES": "%s cloisons ajoutées",
"INFO_WALL_COPIED": "Cloison n°%s copiée", "INFO_WALL_COPIED": "Cloison n°%s copiée",
...@@ -407,6 +409,8 @@ ...@@ -407,6 +409,8 @@
"INFO_SNACKBAR_RESULTS_INVALIDATED": "Résultats invalidés pour", "INFO_SNACKBAR_RESULTS_INVALIDATED": "Résultats invalidés pour",
"INFO_SNACKBAR_SETTINGS_SAVED": "Paramètres enregistrés sur cet appareil", "INFO_SNACKBAR_SETTINGS_SAVED": "Paramètres enregistrés sur cet appareil",
"INFO_THEME_CREDITS": "Crédit", "INFO_THEME_CREDITS": "Crédit",
"INFO_THEME_DEVALAISON_TITRE": "Dévalaison",
"INFO_THEME_DEVALAISON_DESCRIPTION": "PENSER À METTRE UNE DESCRIPTION ICI",
"INFO_THEME_HYDRAULIQUE_A_SURFACE_LIBRE_DESCRIPTION": "Modules de calcul pour les écoulements en canaux et rivières", "INFO_THEME_HYDRAULIQUE_A_SURFACE_LIBRE_DESCRIPTION": "Modules de calcul pour les écoulements en canaux et rivières",
"INFO_THEME_HYDRAULIQUE_A_SURFACE_LIBRE_TITRE": "Hydraulique à surface libre", "INFO_THEME_HYDRAULIQUE_A_SURFACE_LIBRE_TITRE": "Hydraulique à surface libre",
"INFO_THEME_HYDRAULIQUE_EN_CHARGE_DESCRIPTION": "Modules de calcul de perte de charge dans les conduites sous pression", "INFO_THEME_HYDRAULIQUE_EN_CHARGE_DESCRIPTION": "Modules de calcul de perte de charge dans les conduites sous pression",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment