Skip to content
Snippets Groups Projects
Commit 1a3111e3 authored by David Dorchies's avatar David Dorchies
Browse files

Merge branch...

Merge branch '628-le-separateur-decimal-est-passe-a-la-virgule-sur-certaines-configurations' into 'devel'

Resolve "Le séparateur décimal est passé à la virgule sur certaines configurations"

Closes #628

See merge request !229
parents 8f8d1c9c 09d0c04e
No related branches found
No related tags found
1 merge request!229Resolve "Le séparateur décimal est passé à la virgule sur certaines configurations"
Pipeline #143549 passed
...@@ -9,7 +9,7 @@ stages: ...@@ -9,7 +9,7 @@ stages:
- releases-version - releases-version
default: default:
tags: [docker] tags: [mia2]
image: geaucassiopee/ci-cd-cross-platform-webapp:v3 image: geaucassiopee/ci-cd-cross-platform-webapp:v3
variables: variables:
......
350-modifier-l-avertissement-de-limite-d-ennoiement-de-villemonte devel
...@@ -86,9 +86,11 @@ ...@@ -86,9 +86,11 @@
[class.select]="isSelect(cell)" [attr.rowspan]="rowSpan(cell)" [attr.colspan]="colSpan(cell)" [class.select]="isSelect(cell)" [attr.rowspan]="rowSpan(cell)" [attr.colspan]="colSpan(cell)"
[title]="cellTitle(cell)"> [title]="cellTitle(cell)">
<input matInput *ngIf="isNumberInput(cell)" step="0.00000000000001" type="number" required <input matInput *ngIf="isNumberInput(cell)" type="text" required
[ngModel]="getCellValue(cell)" (ngModelChange)="setCellValue(cell,$event)" [ngModel]="getCellValue(cell)" (ngModelChange)="setCellValue(cell,$event)"
(input)="inputValueChanged($event, cell)"> (input)="inputValueChanged($event, cell)" (keypress) ="invalidNANInputValue($event)"
pattern="^-?[0-9]*\.?[0-9]*$" inputmode="numeric"
>
<mat-select #selectWidget *ngIf="isSelect(cell)" [value]="cell.modelValue" <mat-select #selectWidget *ngIf="isSelect(cell)" [value]="cell.modelValue"
(selectionChange)="loiDebitSelected($event, cell)"> (selectionChange)="loiDebitSelected($event, cell)">
......
...@@ -1388,12 +1388,21 @@ export class PabTableComponent implements AfterViewInit, AfterViewChecked, OnIni ...@@ -1388,12 +1388,21 @@ export class PabTableComponent implements AfterViewInit, AfterViewChecked, OnIni
return round(cell.model.singleValue, this.nDigits); return round(cell.model.singleValue, this.nDigits);
} }
public setCellValue(cell, event) { public setCellValue(cell, $event) {
try { if($event !== "-" && $event !== "") {
cell.model.singleValue = event try {
cell.modelValidity = undefined; cell.model.singleValue = $event;
} catch (error) { cell.modelValidity = undefined;
cell.modelValidity = false; } catch (error) {
cell.modelValidity = false
}
}
}
public invalidNANInputValue(e: any) {
var rgx = /^-?[0-9]*\.?[0-9]*$/;
if(e.key.match(rgx) === null) {
e.preventDefault();
} }
} }
......
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