page de paramètres du module GSM

This commit is contained in:
Vincent BENOIT
2022-10-10 11:58:49 +02:00
parent eb1bfbf85c
commit e1de9cfa5a
6 changed files with 102 additions and 16 deletions

View File

@@ -12,7 +12,10 @@ import { ToastrService } from 'ngx-toastr';
export class ParametresComponent implements OnInit {
paramsFG:FormGroup;
submitted:boolean=false;
Pw:number = 10;
PwPin:number = 4;
Pw:number = 9;
slideDisable:boolean=false;
pinChecked:boolean=false;
constructor(private fb:FormBuilder,
private bs:BackendService,
@@ -21,13 +24,9 @@ export class ParametresComponent implements OnInit {
ngOnInit(): void {
this.paramsFG=this.fb.group({
pin:["", [
Validators.required,
Validators.pattern('(?=\\D*\\d)(?=[^a-z])(?=[^A-Z]*[A-Z]).{' + this.Pw + '}')
]],
num_accepted:["", [
Validators.required,
Validators.pattern('(?=\\D*\\d)(?=[^a-z])(?=[^A-Z]*[A-Z]).{' + this.Pw + '}'),
Validators.pattern('(?=[0-9]{9}).{' + this.Pw + '}'),
]],
});
}
@@ -36,4 +35,18 @@ export class ParametresComponent implements OnInit {
}
onSlideChanged(event: any): void {
console.log("checked ?", event.checked);
this.pinChecked=event.checked;
}
onCodeChanged(code: string): void {
// this called every time when user changed the code
}
onCodeCompleted(code: string): void {
// this called only if user entered full code
}
}