diff --git a/src/app/pages/login/login.page.html b/src/app/pages/login/login.page.html index 7d127100f..52d0ee3c9 100644 --- a/src/app/pages/login/login.page.html +++ b/src/app/pages/login/login.page.html @@ -1,86 +1,85 @@
-
+
-
-
-
-
- -

Inicie a sessão

-
-

Nome de utilizador

- - - -

Palavra-passe

- - - -
- -
-
-
-

Uma iniciativa do Gabinete do Presidente da República

+

Inicie a sessão

+
+

Nome de utilizador

+ + + +

Palavra-passe

+ + + +
+ +
+
+
+

Uma iniciativa do Gabinete do Presidente da República

+
-
- -
-
-
+
+
+
- - -
- Digite o PIN - Digite o novo PIN + Digite o PIN + Digite o novo PIN -
-
-
-
-
-
-
- -
-
1
2
3
+
+
+
+
+
- -
-
4
5
6
+
+ +
+
1
2
3
+
+ +
+
4
5
6
+
+ +
+
7
8
9
+
+ +
+
0
+
+
- -
-
7
8
9
+ +
+ Entrar com senha
- -
-
0
-
- -
- -
- Entrar com senha -
-
- Limpar -
+
+ Limpar +
+
-
diff --git a/src/app/pages/login/login.page.scss b/src/app/pages/login/login.page.scss index 93e5cb06f..88f9eae74 100644 --- a/src/app/pages/login/login.page.scss +++ b/src/app/pages/login/login.page.scss @@ -211,8 +211,9 @@ ion-item{ } } -@media only screen and (min-width: 1024px){ - .form{ - width: 400px; +@media only screen and (max-height: 746px){ + .msg-bottom-p { + padding-top: 20px; + position: unset !important; } } \ No newline at end of file diff --git a/src/app/shared/agenda/new-event/new-event.page.html b/src/app/shared/agenda/new-event/new-event.page.html index 6408fccbc..d095b64d7 100644 --- a/src/app/shared/agenda/new-event/new-event.page.html +++ b/src/app/shared/agenda/new-event/new-event.page.html @@ -14,20 +14,44 @@
-
+
+ +
+
+
+ Campo obrigatório. +
+
+ O campo deve ter pelo menos 4 caracteres. +
+
+
+
-
+ +
+ +
+
+
+ Campo obrigatório. +
+
+ O campo deve ter pelo menos 4 caracteres. +
+
+
@@ -36,7 +60,7 @@
- + Oficial @@ -58,9 +82,9 @@
- + - + Reunião @@ -84,7 +108,11 @@
-
+ + +
-
+ +
- + Não se repete diff --git a/src/app/shared/agenda/new-event/new-event.page.ts b/src/app/shared/agenda/new-event/new-event.page.ts index 8fe802826..01fcb2410 100644 --- a/src/app/shared/agenda/new-event/new-event.page.ts +++ b/src/app/shared/agenda/new-event/new-event.page.ts @@ -61,8 +61,8 @@ export class NewEventPage implements OnInit { public showSeconds = false; public touchUi = false; public enableMeridian = false; - public minDate: any; - public maxDate: any; + public minDate = new Date(); + public maxDate = ''; public stepHour = 1; public stepMinute = 5; public stepSecond = 5; @@ -71,7 +71,7 @@ export class NewEventPage implements OnInit { @Input() profile:string; @Input() selectedSegment: string; @Input() selectedDate: Date; - @Input() taskParticipants: EventPerson[]; + @Input() taskParticipants: EventPerson[] = []; @Input() taskParticipantsCc: any = []; @Output() setIntervenient = new EventEmitter(); @@ -94,6 +94,9 @@ export class NewEventPage implements OnInit { @ViewChild('inicio') inicio: any; @ViewChild('picker1') picker1: any; + Form: any = {} + validateFrom = false + public options = [ { value: true, label: 'True' }, @@ -118,7 +121,6 @@ export class NewEventPage implements OnInit { return this.dateControlEnd.value } - constructor( private modalController: ModalController, private eventService: EventsService, @@ -154,7 +156,7 @@ export class NewEventPage implements OnInit { let selectedEndDate = new Date(this.selectedDate); /* Set + 30minutes to seleted datetime */ selectedEndDate.setMinutes(this.selectedDate.getMinutes() + 30) ; - this.minDate = this.selectedDate.toString(); + if(this.selectedSegment != "Combinada"){ this.postEvent ={ @@ -222,6 +224,46 @@ export class NewEventPage implements OnInit { this.date = new Date(2021,9,4,5,6,7); this.getDatepickerData() + + this.injectValidation() + } + + runValidation() { + this.validateFrom = true + } + + injectValidation() { + + this.Form = new FormGroup({ + Subject: new FormControl(this.postEvent.Subject, [ + Validators.required, + Validators.minLength(4) + ]), + Location: new FormControl(this.postEvent.Location, [ + Validators.required, + ]), + CalendarName: new FormControl(this.postEvent.CalendarName), + Categories: new FormControl(this.postEvent.Categories[0], [ + Validators.required + ]), + dateStart: new FormControl(this.dateStart, [ + Validators.required + ]), + dateEnd: new FormControl(this.dateEnd, [ + Validators.required + ]), + IsRecurring: new FormControl(this.postEvent.IsRecurring, [ + Validators.required + ]), + participantes: new FormControl(this.participantes, [ + Validators.required + ]), + + }) + } + + get participantes() { + return this.taskParticipantsCc.concat(this.taskParticipants) } openInicio() { @@ -283,7 +325,12 @@ export class NewEventPage implements OnInit { } - async save(){ + async save() { + + this.runValidation() + + // dont runt this function + if (!this.Form.valid) return false this.getDatepickerData() diff --git a/src/global.scss b/src/global.scss index b52f7ece4..d13cdf552 100644 --- a/src/global.scss +++ b/src/global.scss @@ -983,4 +983,16 @@ background: rgb(92, 92, 92); // .ng-star-inserted { // opacity: 0; -// } \ No newline at end of file +// } + + + +.input-error{ + border: 1px solid #fba0a0 !important; +} + +.input-errror-message{ + margin-top: -16px; + margin-bottom: 10px; + font-size: 11pt; +} \ No newline at end of file