diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 6c11af7..7f11fe7 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -30,6 +30,7 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { MatGridListModule } from '@angular/material/grid-list'; import { MatTabsModule } from '@angular/material/tabs'; import { MatSliderModule } from '@angular/material/slider'; +import { MatRadioModule } from '@angular/material/radio'; import { ToastrModule } from 'ngx-toastr'; import { CodeInputModule } from 'angular-code-input'; @@ -91,6 +92,7 @@ import { LogsComponent } from './components/home/workspace/logs/logs.component'; MatGridListModule, MatTabsModule, MatSliderModule, + MatRadioModule, FlexLayoutModule, RouterModule, FontAwesomeModule, diff --git a/src/app/components/home/workspace/hours/hours.component.css b/src/app/components/home/workspace/hours/hours.component.css index ed754a1..f9e6e4e 100644 --- a/src/app/components/home/workspace/hours/hours.component.css +++ b/src/app/components/home/workspace/hours/hours.component.css @@ -12,6 +12,7 @@ } table { + margin: 1rem; table-layout: fixed; align: center; width: 80%; diff --git a/src/app/components/home/workspace/parametres/parametres.component.html b/src/app/components/home/workspace/parametres/parametres.component.html index 1630587..b8f6342 100644 --- a/src/app/components/home/workspace/parametres/parametres.component.html +++ b/src/app/components/home/workspace/parametres/parametres.component.html @@ -6,12 +6,20 @@
+
+ + + + {{operation}} + + +
+
- - Activer code PIN - + Activer code PIN + Téléphone accepté +33   diff --git a/src/app/components/home/workspace/parametres/parametres.component.ts b/src/app/components/home/workspace/parametres/parametres.component.ts index 6af9244..b2df65b 100644 --- a/src/app/components/home/workspace/parametres/parametres.component.ts +++ b/src/app/components/home/workspace/parametres/parametres.component.ts @@ -1,4 +1,5 @@ import { Component, OnInit } from '@angular/core'; +import { ThemePalette } from '@angular/material/core'; import { FormBuilder, FormGroup, Validators, ValidatorFn, ValidationErrors, AbstractControl } from '@angular/forms'; import { Router } from '@angular/router'; import { BackendService } from '../../../../services/backend/backend.service'; @@ -17,6 +18,8 @@ export class ParametresComponent implements OnInit { pinChecked:boolean=false; pinNumber:string="0000"; isProcessing:boolean = true; + defaultOp:string = 'Manuel ON'; + operations:string[] = ['Manuel ON', 'Manuel OFF', 'Horaires']; constructor(private fb:FormBuilder, private bs:BackendService, @@ -49,6 +52,7 @@ export class ParametresComponent implements OnInit { this.paramsFG.get('num_tone').setValue(data.tone_duration); this.paramsFG.get('dtmf_code').setValue(data.dtmf_code); this.paramsFG.get('dtmf_duration').setValue(data.dtmf_duration); + this.defaultOp = data.operation; this.slideDisable = data.pin_actif; this.pinChecked = data.pin_actif; this.pinNumber = data.code_pin; @@ -83,12 +87,14 @@ export class ParametresComponent implements OnInit { return; } - let params:Parameters = {pin_actif:false, + let params:Parameters = {operation:'', + pin_actif:false, code_pin:'', num_autorized:'', tone_duration:0, dtmf_code:'', dtmf_duration:0}; + params.operation = this.defaultOp; params.pin_actif = this.pinChecked; if (this.pinChecked == false) { params.code_pin = '0000'; diff --git a/src/app/models/parameters.model.ts b/src/app/models/parameters.model.ts index dd08856..9620c4b 100644 --- a/src/app/models/parameters.model.ts +++ b/src/app/models/parameters.model.ts @@ -1,4 +1,5 @@ export interface Parameters { + operation:string; pin_actif:boolean; code_pin:string; num_autorized:string; diff --git a/src/assets/img/GNSS_GSM_GPS_rpi.png b/src/assets/img/GNSS_GSM_GPS_rpi.png new file mode 100644 index 0000000..8f1ba9d Binary files /dev/null and b/src/assets/img/GNSS_GSM_GPS_rpi.png differ