From 682504008d37dd2f4055b5e39c55c06dd1d25040 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Fri, 25 Jun 2021 10:50:31 +0100 Subject: [PATCH 1/3] Improve form --- src/global.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/global.scss b/src/global.scss index 4e012ae94..f130a4996 100644 --- a/src/global.scss +++ b/src/global.scss @@ -906,14 +906,14 @@ background: rgb(92, 92, 92); } .mat-form-field-underline.ng-tns-c193-6.ng-star-inserted, .mat-form-field-underline { - display: none; + // display: none; } .date-hour-picker { margin-top: -6px; label#mat-form-field-label-7 { - // display: none; + display: none; } .span.ng-tns-c193-4, .ng-star-inserted { From 1adacf2febf6ae8b3ded89a7aa1bdc6bd3bc1292 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Fri, 25 Jun 2021 11:16:07 +0100 Subject: [PATCH 2/3] Fixe --- package-lock.json | 42 +++++++++++++++++++++++++++++++++++++----- package.json | 4 ++-- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3f903fda6..cd83b102f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4624,6 +4624,16 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -8265,9 +8275,9 @@ } }, "cordova-plugin-mfp-push": { - "version": "8.0.2020072705", - "resolved": "https://registry.npmjs.org/cordova-plugin-mfp-push/-/cordova-plugin-mfp-push-8.0.2020072705.tgz", - "integrity": "sha512-aA7EAZnFgu8R5U+Vpt5fGbCq1lRYHrt9AXXEJMwc5Vv0sFVUz9iOyzMXHYuSFSqmYgW/XldRXgTxoc8UvXErcQ==", + "version": "8.0.2021062405", + "resolved": "https://registry.npmjs.org/cordova-plugin-mfp-push/-/cordova-plugin-mfp-push-8.0.2021062405.tgz", + "integrity": "sha512-OOSV4TCkZVNfwQzjfbsD0ycNcZyokKdBPJnEK/QrtrGtEA+Ah1R86FphXFNJtCWEQYybCCHvCVXgor4Pgf11xQ==", "dev": true }, "cordova-plugin-okhttp": { @@ -10286,6 +10296,13 @@ } } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -13512,6 +13529,13 @@ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" }, + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "dev": true, + "optional": true + }, "nanoid": { "version": "3.1.23", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", @@ -19882,7 +19906,11 @@ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } }, "glob-parent": { "version": "3.1.0", @@ -20509,7 +20537,11 @@ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } }, "glob-parent": { "version": "3.1.0", diff --git a/package.json b/package.json index 982a4ff18..f09e0d6f3 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "cordova-plugin-ionic-keyboard": "^2.2.0", "cordova-plugin-ionic-webview": "^4.2.1", "cordova-plugin-mfp": "^8.0.2021031007", - "cordova-plugin-mfp-push": "^8.0.2020072705", + "cordova-plugin-mfp-push": "^8.0.2021062405", "cordova-plugin-splashscreen": "^5.0.2", "cordova-plugin-statusbar": "^2.4.2", "cordova-plugin-whitelist": "^1.3.4", @@ -156,4 +156,4 @@ "url": "git+https://Kayaya@bitbucket.org/equilibriumito/gabinete-digital.git" }, "license": "ISC" -} +} \ No newline at end of file From a97ca61578685172c231eac237cb94cbdbb0d0c0 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Mon, 28 Jun 2021 11:16:21 +0100 Subject: [PATCH 3/3] Improve login --- src/app/pages/login/login.page.html | 129 +++++++++--------- src/app/pages/login/login.page.scss | 7 +- .../agenda/new-event/new-event.page.html | 47 +++++-- .../shared/agenda/new-event/new-event.page.ts | 59 +++++++- src/global.scss | 14 +- 5 files changed, 173 insertions(+), 83 deletions(-) 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