From fe362c362558e1aa113c5057959865f736dba318 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Tue, 29 Jun 2021 15:13:04 +0100 Subject: [PATCH 1/6] save --- .../agenda/view-event/view-event.page.ts | 6 --- .../book-meeting-modal.page.html | 2 +- .../book-meeting-modal.page.ts | 12 +---- .../expediente-detail.page.ts | 7 ++- .../gabinete-digital/gabinete-digital.page.ts | 51 ------------------- .../pedidos/pedido/pedido.page.scss | 19 +++++-- 6 files changed, 23 insertions(+), 74 deletions(-) diff --git a/src/app/pages/agenda/view-event/view-event.page.ts b/src/app/pages/agenda/view-event/view-event.page.ts index ee43756f9..a6584dde7 100644 --- a/src/app/pages/agenda/view-event/view-event.page.ts +++ b/src/app/pages/agenda/view-event/view-event.page.ts @@ -108,12 +108,6 @@ export class ViewEventPage implements OnInit { this.router.navigate(['/home',params["params"].caller]); } }); - - /* this.activatedRoute.queryParams.subscribe(params => { - if(params["caller"]) { - this.router.navigate(['/home',params["caller"]]); - } - }); */ } loadEvent(){ diff --git a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html index 4af7eba49..eeec4d60b 100644 --- a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html +++ b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html @@ -46,7 +46,7 @@ - + Oficial diff --git a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts index 1f1e47809..51a31a44f 100644 --- a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts +++ b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts @@ -154,17 +154,9 @@ export class BookMeetingModalPage implements OnInit { goBack() { this.modalController.dismiss(null); - let navigationExtras: NavigationExtras = { - queryParams: { - "expedientes": true, - } - } - if( window.innerWidth < 801) { - this.router.navigate(['/home/gabinete-digital/expediente']); - } else { - this.router.navigate(['/home/gabinete-digital'], navigationExtras); - } + window.history.back(); } + async saveTask(){ // issue12323423 let Attendees = this.taskParticipants.concat(this.taskParticipantsCc); diff --git a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts index 887f46844..b09faabf3 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts @@ -35,6 +35,7 @@ export class ExpedienteDetailPage implements OnInit { fulltask: any; eventsList: Event[]; serialnumber: string; + caller:string; serialNumber: string; profile: string; intervenientes: any; @@ -65,6 +66,9 @@ export class ExpedienteDetailPage implements OnInit { if(params["params"].SerialNumber) { this.serialnumber = params["params"].SerialNumber; } + if(params["params"].caller) { + this.caller = params["params"].caller; + } }); @@ -97,7 +101,7 @@ export class ExpedienteDetailPage implements OnInit { } goBack() { - if(this.task.Status == "Pending"){ + if(this.task.Status == "Pending" && this.caller != 'events'){ if (window.innerWidth <= 800) { this.router.navigate(['/home/gabinete-digital/pendentes']); } @@ -111,6 +115,7 @@ export class ExpedienteDetailPage implements OnInit { } } else{ + console.log('HERE'); this.activatedRoute.paramMap.subscribe(params => { switch (params["params"].caller) { case 'events': diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.ts b/src/app/pages/gabinete-digital/gabinete-digital.page.ts index a2ffad9d7..7d6a6d3a1 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.ts +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.ts @@ -189,57 +189,6 @@ export class GabineteDigitalPage implements OnInit { this.openDiplomasPage(''); this.selectedElement='DiplomasAssinar'; } - - /* this.activatedRoute.queryParams.subscribe(params => { - switch (params) - { - case params["eventos"]: - this.openEventsToApprovePage("MDGPR"); - this.selectedElement='approval'; - break; - - case params["expedientes"]: - this.openExpedientListPage(); - this.selectedElement='Correspondence'; - this.expedientesPage.doRefresh(); - break; - - case params["pendentes"]: - this.openPendentesPage(''); - this.selectedElement='Pending'; - break; - - case params["despachos"]: - this.openDespachosPage(''); - this.selectedElement='Dispatches'; - break; - - case params["pedidos"]: - this.openPedidosPage('parecer'); - this.selectedElement='RequestsForOpinion'; - break; - - case params["expedientespr"]: - this.openEventsToApprovePage("MDGPR"); - this.selectedElement='Expediente Presidente' - break; - - case params["despachospr"]: - this.openDespachosPrPage(''); - this.selectedElement='DispatchesPr' - break; - - case params["diplomas"]: - this.openDiplomasPage('validar'); - this.selectedElement='DiplomasPorValidar'; - break; - - case params["diplomasassinar"]: - this.openDiplomasPage(''); - this.selectedElement='DiplomasAssinar'; - break; - } - }); */ } refreshExpedientes(){ diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.scss b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.scss index 87e9d322c..f87447fd8 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.scss +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.scss @@ -69,19 +69,28 @@ margin: 1px; } } - + .title-content{ + display: flex; + justify-content:space-between; + align-items: flex-start !important; + border-radius: 0 !important; + .title{ + width: fit-content; + height: auto; font-size: 25px; overflow: auto; float: left; + padding-left: 5px; } .div-icon{ - width: 40px; - float: right; - font-size: 35px; - overflow: auto; + position: absolute; + width: fit-content !important; + font-size: 35px !important; padding: 1px; + right: 0 !important; } + } } ion-item-group{ margin: 15px; From 837e5a6995030cde4f9515f1b8ea3d5f0d36f7f5 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Tue, 29 Jun 2021 15:37:55 +0100 Subject: [PATCH 2/6] save --- src/app/modals/delegar/delegar.page.ts | 1 - .../edit-event-to-approve/edit-event.page.ts | 17 ++++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/app/modals/delegar/delegar.page.ts b/src/app/modals/delegar/delegar.page.ts index b4d74a350..6fab0260d 100644 --- a/src/app/modals/delegar/delegar.page.ts +++ b/src/app/modals/delegar/delegar.page.ts @@ -72,7 +72,6 @@ export class DelegarPage implements OnInit { } close() { - this.router.navigate(['/home/gabinete-digital/expediente']); this.modalController.dismiss(null); } diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts index 359f8dda9..406b8384c 100644 --- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts @@ -127,23 +127,26 @@ export class EditEventToApproveComponent implements OnInit { this.isEventEdited = false; - this.getTask() - this.dateControlStart = new FormControl(moment(new Date())); this.dateControlEnd = new FormControl(moment(new Date())); } + + + ngOnInit() { + this.getTask() + console.log('HERE'); + + } + async getTask() { - console.log('this.eventProcess', this.eventProcess); const result = await this.processes.GetTask(this.serialNumber).subscribe( result =>{ this.eventProcess = result this.restoreDatepickerData() - console.log(this.eventProcess.workflowInstanceDataFields.Subject) - // description let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '') this.eventProcess.workflowInstanceDataFields.Body = body @@ -169,10 +172,6 @@ export class EditEventToApproveComponent implements OnInit { }) - } - - ngOnInit() { - } close() { From ac0dfaf4be4d7dda8b1f4800cf774cdad23343e3 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Tue, 29 Jun 2021 15:56:03 +0100 Subject: [PATCH 3/6] save --- .../pedidos/pedido/pedido.page.html | 2 +- .../pedidos/pedido/pedido.page.scss | 54 +++---------------- 2 files changed, 7 insertions(+), 49 deletions(-) diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html index 1874b81ce..00de1b496 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html @@ -11,7 +11,7 @@ -
+
{{ task.Folio}}
diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.scss b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.scss index f87447fd8..d6217f649 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.scss +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.scss @@ -23,58 +23,17 @@ overflow:auto; color:#000; transform: translate3d(0, 1px, 0); - .header-top{ - width: 360px; - margin: 0px auto; - overflow: auto; - padding: 0 !important; - background: #fff; - .middle{ - padding: 0!important; - float: left; - width: 280px; - - display: flex; - align-items: center; - - } - .right{ - padding: 0!important; - float: right; - font-size: 25px; - color: #0782c9; - margin: 5px 0 0 0; - } - } - .header-bottom{ - width: 310px; - overflow: auto; - margin: 0 auto; - - .header-bottom-icon{ - width: 30px; - font-size: 25px; - float: left; - padding: 2px; - } - .header-bottom-contacts{ - width: 275px; - font-size: 15px; - color: #797979; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - float: left; - padding: 5px; - margin: 1px; - } - } .title-content{ display: flex; justify-content:space-between; align-items: flex-start !important; border-radius: 0 !important; + .middle{ + width: calc(100% - 37px); + overflow: auto; + } + .title{ width: fit-content; height: auto; @@ -84,8 +43,7 @@ padding-left: 5px; } .div-icon{ - position: absolute; - width: fit-content !important; + width: 37px !important; font-size: 35px !important; padding: 1px; right: 0 !important; From 4856bd9b63af0ea3217a508e836c4808a199078a Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Tue, 29 Jun 2021 16:09:22 +0100 Subject: [PATCH 4/6] save --- .../pages/gabinete-digital/pedidos/pedido/pedido.page.scss | 2 +- .../pages/gabinete-digital/pedidos/pedido/pedido.page.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.scss b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.scss index d6217f649..82eff454d 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.scss +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.scss @@ -30,7 +30,7 @@ border-radius: 0 !important; .middle{ - width: calc(100% - 37px); + /* width: calc(100% - 37px); */ overflow: auto; } diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts index 78ef5944b..2bb5e61b7 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts @@ -39,6 +39,7 @@ export class PedidoPage implements OnInit { fulltask: any; eventsList: Event[]; serialnumber: string; + caller: string; intervenientes: any; cc: any = []; loggeduser: User; @@ -61,6 +62,9 @@ export class PedidoPage implements OnInit { if(params["serialNumber"]) { this.serialnumber = params["serialNumber"]; } + if(params["caller"]) { + this.caller = params["caller"]; + } }); } @@ -445,7 +449,7 @@ export class PedidoPage implements OnInit { } goBack() { - if(this.task.Status == "Pending"){ + if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){ if (window.innerWidth <= 800) { this.router.navigate(['/home/gabinete-digital/pendentes']); } From c81d4eaf1e74628794c0cbf79c4ab8b856396611 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Wed, 30 Jun 2021 08:27:43 +0100 Subject: [PATCH 5/6] save --- .../new-publication/new-publication.page.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/app/pages/publications/new-publication/new-publication.page.ts b/src/app/pages/publications/new-publication/new-publication.page.ts index 98e0a9e7f..e2a496b4b 100644 --- a/src/app/pages/publications/new-publication/new-publication.page.ts +++ b/src/app/pages/publications/new-publication/new-publication.page.ts @@ -76,7 +76,7 @@ export class NewPublicationPage implements OnInit { this.camera.getPicture(options).then((imageData) => { // imageData is either a base64 encoded string or a file URI - // If it's base64 (DATA_URL): + // If it's base64 (DATA_URL): let base64Image = 'data:image/jpeg;base64,' + imageData; this.capturedImage = imageData; this.capturedImageTitle = new Date().getTime() + '.jpeg'; @@ -107,6 +107,8 @@ export class NewPublicationPage implements OnInit { } async save(){ + console.log('SAVE'); + if(this.publicationType == '3'){ console.log(this.navParams.get('publication')); @@ -124,7 +126,7 @@ export class NewPublicationPage implements OnInit { } console.log('Edit change image'); console.log(this.publication); - this.publications.UpdatePublication(this.publication.ProcessId, this.publication); + this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise(); this.close(); } else{ @@ -139,14 +141,13 @@ export class NewPublicationPage implements OnInit { FileBase64: this.publication.FileBase64, FileExtension: 'jpeg', } - /* console.log('Edit - keep image'); - console.log(this.publication); */ - this.publications.UpdatePublication(this.publication.ProcessId, this.publication); + console.log('Edit - keep image'); + console.log(this.publication); + this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise(); this.close(); } } else{ - this.publication = { DateIndex: new Date(), DocumentId:null, @@ -161,7 +162,7 @@ export class NewPublicationPage implements OnInit { /* console.log('Create'); console.log(this.publication); */ - this.publications.CreatePublication(this.folderId, this.publication); + this.publications.CreatePublication(this.folderId, this.publication).toPromise(); this.close(); } } From fa0abcec306adf0a1ca36c2a945af2e67667d3c8 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Wed, 30 Jun 2021 11:00:59 +0100 Subject: [PATCH 6/6] save --- .../gabinete-digital/gabinete-digital.page.scss | 1 + .../publications/new-action/new-action.page.ts | 6 +++--- src/app/pages/publications/publications.page.html | 12 ++++++------ src/app/pages/publications/publications.page.scss | 13 ++++++++++++- .../publication/new-action/new-action.page.ts | 10 ++-------- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.scss b/src/app/pages/gabinete-digital/gabinete-digital.page.scss index d4e0cca6a..197e3afa9 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.scss +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.scss @@ -229,6 +229,7 @@ ion-content{ width: 35%; justify-content: flex-start !important; border-right: 1px solid #d8d8d8; + border: 1px solid red; .aside{ background:transparent; diff --git a/src/app/pages/publications/new-action/new-action.page.ts b/src/app/pages/publications/new-action/new-action.page.ts index 74e1a0924..eeae004ad 100644 --- a/src/app/pages/publications/new-action/new-action.page.ts +++ b/src/app/pages/publications/new-action/new-action.page.ts @@ -46,11 +46,11 @@ export class NewActionPage implements OnInit { console.log(this.folder); try { - await this.publication.CreatePublicationFolder(this.folder).toPromise() - this.toastService.successMessage("Ação presidencial criado") + await this.publication.CreatePublicationFolder(this.folder).toPromise(); + this.toastService.successMessage("Ação presidencial criado"); this.close(); } catch (error) { - this.toastService.badRequest("Ação presidencial não criado") + this.toastService.badRequest("Ação presidencial não criado"); } } diff --git a/src/app/pages/publications/publications.page.html b/src/app/pages/publications/publications.page.html index 34b9e11e8..5df09a9ab 100644 --- a/src/app/pages/publications/publications.page.html +++ b/src/app/pages/publications/publications.page.html @@ -12,10 +12,10 @@
-
+
- -
+ +
Acções Presidenciais @@ -30,10 +30,10 @@
-
+ -
+
@@ -46,7 +46,7 @@

{{viagem.Detail}}

-
diff --git a/src/app/pages/publications/publications.page.scss b/src/app/pages/publications/publications.page.scss index a446b55cb..f161f91d4 100644 --- a/src/app/pages/publications/publications.page.scss +++ b/src/app/pages/publications/publications.page.scss @@ -82,16 +82,27 @@ ion-toolbar{ font-family: Roboto; background-color: #fff; overflow:auto; + .aside-left{ border-right: 1px solid #d8d8d8; + margin: 0 !important; + padding: 0 !important; + + .main-header{ + padding: 30px 20px 15px 20px !important; + } + + .aside{ + padding: 0px 20px 0 20px !important; + } } .content{ //border: 1px solid red; } } .item{ + width: 100% !important; padding: 0 0px 0 0px !important; - margin: 0px auto; border-bottom: 1px solid #ebebeb; } .item-icon{ diff --git a/src/app/shared/publication/new-action/new-action.page.ts b/src/app/shared/publication/new-action/new-action.page.ts index 530df12c8..703b32a77 100644 --- a/src/app/shared/publication/new-action/new-action.page.ts +++ b/src/app/shared/publication/new-action/new-action.page.ts @@ -49,20 +49,14 @@ export class NewActionPage implements OnInit { try { await this.publication.CreatePublicationFolder(this.folder).toPromise() this.close(); - this.toastService.successMessage('Publicação criado') + this.toastService.successMessage('Acção presidencial criada') } catch (error) { - this.toastService.badRequest('Publicação não criado') + this.toastService.badRequest('Não foi possivel criar a acção presidencial') } - } close(){ this.closeDesktopComponent.emit(); } - - - - - }