This commit is contained in:
Peter Maquiran
2021-06-30 12:03:28 +01:00
17 changed files with 70 additions and 157 deletions
-1
View File
@@ -72,7 +72,6 @@ export class DelegarPage implements OnInit {
} }
close() { close() {
this.router.navigate(['/home/gabinete-digital/expediente']);
this.modalController.dismiss(null); this.modalController.dismiss(null);
} }
-3
View File
@@ -20,12 +20,9 @@ import {
DAYS_OF_WEEK, DAYS_OF_WEEK,
} from 'angular-calendar'; } from 'angular-calendar';
import { CustomDateFormatter } from './custom-date-formatter.provider'; import { CustomDateFormatter } from './custom-date-formatter.provider';
import { EventListPage } from '../gabinete-digital/event-list/event-list.page';
import { ViewEventPage } from './view-event/view-event.page';
import { NewEventPage } from './new-event/new-event.page'; import { NewEventPage } from './new-event/new-event.page';
import { AuthService } from 'src/app/services/auth.service'; import { AuthService } from 'src/app/services/auth.service';
import { User } from 'src/app/models/user.model'; import { User } from 'src/app/models/user.model';
import { letProto } from 'rxjs-compat/operator/let';
import { DateAdapter } from '@angular/material/core'; import { DateAdapter } from '@angular/material/core';
@Component({ @Component({
@@ -108,12 +108,6 @@ export class ViewEventPage implements OnInit {
this.router.navigate(['/home',params["params"].caller]); this.router.navigate(['/home',params["params"].caller]);
} }
}); });
/* this.activatedRoute.queryParams.subscribe(params => {
if(params["caller"]) {
this.router.navigate(['/home',params["caller"]]);
}
}); */
} }
loadEvent(){ loadEvent(){
@@ -46,7 +46,7 @@
</ion-select> </ion-select>
<mat-form-field class="d-none d-md-block width-100"> <mat-form-field floatLabel="never" class="d-none d-md-block width-100">
<mat-select placeholder="Selecione agenda" [(ngModel)]="postData.CalendarName" > <mat-select placeholder="Selecione agenda" [(ngModel)]="postData.CalendarName" >
<mat-option value="Oficial"> <mat-option value="Oficial">
Oficial Oficial
@@ -154,17 +154,9 @@ export class BookMeetingModalPage implements OnInit {
goBack() { goBack() {
this.modalController.dismiss(null); this.modalController.dismiss(null);
let navigationExtras: NavigationExtras = { window.history.back();
queryParams: {
"expedientes": true,
}
}
if( window.innerWidth < 801) {
this.router.navigate(['/home/gabinete-digital/expediente']);
} else {
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
}
} }
async saveTask(){ async saveTask(){
// issue12323423 // issue12323423
let Attendees = this.taskParticipants.concat(this.taskParticipantsCc); let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
@@ -35,6 +35,7 @@ export class ExpedienteDetailPage implements OnInit {
fulltask: any; fulltask: any;
eventsList: Event[]; eventsList: Event[];
serialnumber: string; serialnumber: string;
caller:string;
serialNumber: string; serialNumber: string;
profile: string; profile: string;
intervenientes: any; intervenientes: any;
@@ -65,6 +66,9 @@ export class ExpedienteDetailPage implements OnInit {
if(params["params"].SerialNumber) { if(params["params"].SerialNumber) {
this.serialnumber = 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() { goBack() {
if(this.task.Status == "Pending"){ if(this.task.Status == "Pending" && this.caller != 'events'){
if (window.innerWidth <= 800) { if (window.innerWidth <= 800) {
this.router.navigate(['/home/gabinete-digital/pendentes']); this.router.navigate(['/home/gabinete-digital/pendentes']);
} }
@@ -111,6 +115,7 @@ export class ExpedienteDetailPage implements OnInit {
} }
} }
else{ else{
console.log('HERE');
this.activatedRoute.paramMap.subscribe(params => { this.activatedRoute.paramMap.subscribe(params => {
switch (params["params"].caller) { switch (params["params"].caller) {
case 'events': case 'events':
@@ -229,6 +229,7 @@ ion-content{
width: 35%; width: 35%;
justify-content: flex-start !important; justify-content: flex-start !important;
border-right: 1px solid #d8d8d8; border-right: 1px solid #d8d8d8;
border: 1px solid red;
.aside{ .aside{
background:transparent; background:transparent;
@@ -189,57 +189,6 @@ export class GabineteDigitalPage implements OnInit {
this.openDiplomasPage(''); this.openDiplomasPage('');
this.selectedElement='DiplomasAssinar'; 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(){ refreshExpedientes(){
@@ -11,7 +11,7 @@
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
</div> </div>
<!-- <app-btn-modal-dismiss></app-btn-modal-dismiss> --> <!-- <app-btn-modal-dismiss></app-btn-modal-dismiss> -->
<div class="middle d-flex align-center flex-grow-1"> <div class="middle">
<ion-label class="title">{{ task.Folio}}</ion-label> <ion-label class="title">{{ task.Folio}}</ion-label>
</div> </div>
<div class="div-icon"> <div class="div-icon">
@@ -23,65 +23,32 @@
overflow:auto; overflow:auto;
color:#000; color:#000;
transform: translate3d(0, 1px, 0); transform: translate3d(0, 1px, 0);
.header-top{ .title-content{
width: 360px;
margin: 0px auto;
overflow: auto;
padding: 0 !important;
background: #fff;
.middle{
padding: 0!important;
float: left;
width: 280px;
display: flex; display: flex;
align-items: center; justify-content:space-between;
align-items: flex-start !important;
border-radius: 0 !important;
.middle{
/* width: calc(100% - 37px); */
overflow: auto;
} }
.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{ .title{
width: fit-content;
height: auto;
font-size: 25px; font-size: 25px;
overflow: auto; overflow: auto;
float: left; float: left;
padding-left: 5px;
} }
.div-icon{ .div-icon{
width: 40px; width: 37px !important;
float: right; font-size: 35px !important;
font-size: 35px;
overflow: auto;
padding: 1px; padding: 1px;
right: 0 !important;
} }
}
} }
ion-item-group{ ion-item-group{
margin: 15px; margin: 15px;
@@ -39,6 +39,7 @@ export class PedidoPage implements OnInit {
fulltask: any; fulltask: any;
eventsList: Event[]; eventsList: Event[];
serialnumber: string; serialnumber: string;
caller: string;
intervenientes: any; intervenientes: any;
cc: any = []; cc: any = [];
loggeduser: User; loggeduser: User;
@@ -61,6 +62,9 @@ export class PedidoPage implements OnInit {
if(params["serialNumber"]) { if(params["serialNumber"]) {
this.serialnumber = params["serialNumber"]; this.serialnumber = params["serialNumber"];
} }
if(params["caller"]) {
this.caller = params["caller"];
}
}); });
} }
@@ -445,7 +449,7 @@ export class PedidoPage implements OnInit {
} }
goBack() { goBack() {
if(this.task.Status == "Pending"){ if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
if (window.innerWidth <= 800) { if (window.innerWidth <= 800) {
this.router.navigate(['/home/gabinete-digital/pendentes']); this.router.navigate(['/home/gabinete-digital/pendentes']);
} }
@@ -46,11 +46,11 @@ export class NewActionPage implements OnInit {
console.log(this.folder); console.log(this.folder);
try { try {
await this.publication.CreatePublicationFolder(this.folder).toPromise() await this.publication.CreatePublicationFolder(this.folder).toPromise();
this.toastService.successMessage("Ação presidencial criado") this.toastService.successMessage("Ação presidencial criado");
this.close(); this.close();
} catch (error) { } catch (error) {
this.toastService.badRequest("Ação presidencial não criado") this.toastService.badRequest("Ação presidencial não criado");
} }
} }
@@ -109,7 +109,9 @@ export class NewPublicationPage implements OnInit {
} }
async save(){ async save(){
if(this.publicationType == '3') { console.log('SAVE');
if(this.publicationType == '3'){
console.log(this.navParams.get('publication')); console.log(this.navParams.get('publication'));
if(this.capturedImage != '') { if(this.capturedImage != '') {
@@ -164,7 +166,6 @@ export class NewPublicationPage implements OnInit {
} }
} }
else{ else{
this.publication = { this.publication = {
DateIndex: new Date(), DateIndex: new Date(),
DocumentId:null, DocumentId:null,
@@ -179,7 +180,7 @@ export class NewPublicationPage implements OnInit {
/* console.log('Create'); /* console.log('Create');
console.log(this.publication); */ console.log(this.publication); */
this.publications.CreatePublication(this.folderId, this.publication); this.publications.CreatePublication(this.folderId, this.publication).toPromise();
this.close(); this.close();
@@ -207,13 +208,13 @@ export class NewPublicationPage implements OnInit {
this.capturedImage = ''; this.capturedImage = '';
} }
setTitle(){ setTitle(){
if(this.publicationType == '1'){ if(this.publicationType == '1') {
this.publicationTitle = 'Nova Publicação Rápida'; this.publicationTitle = 'Nova Publicação Rápida';
} }
else if(this.publicationType == '2'){ else if(this.publicationType == '2') {
this.publicationTitle = 'Nova Publicação'; this.publicationTitle = 'Nova Publicação';
} }
else if(this.publicationType == '3'){ else if(this.publicationType == '3') {
this.publicationTitle = 'Editar Publicação'; this.publicationTitle = 'Editar Publicação';
this.pub = this.navParams.get('publication'); this.pub = this.navParams.get('publication');
} }
@@ -12,10 +12,10 @@
<!-- Main container --> <!-- Main container -->
<div class="main-content d-flex height-100 background-white overflow-hidden border-t-radius "> <div class="main-content d-flex height-100 background-white overflow-hidden border-t-radius ">
<!-- Left --> <!-- Left -->
<div class="aside-left app-default-padding d-flex flex-grow-1 flex-column aside width-30 "> <div class="aside-left app-default-padding d-flex flex-grow-1 flex-column width-30 ">
<!-- Header --> <!-- Header -->
<ion-toolbar > <ion-toolbar >
<div class="main-header"> <div class="main-header">
<div class="title-content d-flex justify-space-between"> <div class="title-content d-flex justify-space-between">
<div class="div-title flex-grow-1"> <div class="div-title flex-grow-1">
<ion-label class="title ">Acções Presidenciais</ion-label> <ion-label class="title ">Acções Presidenciais</ion-label>
@@ -30,10 +30,10 @@
</div> </div>
</div> </div>
</div> </div>
</ion-toolbar> </ion-toolbar>
<!-- Content --> <!-- Content -->
<div class="main-content overflow-auto-y"> <div class="aside overflow-y-auto d-flex flex-wrap width-100">
<div class="item d-flex" <div class="item d-flex"
*ngFor="let viagem of publicationsTravelFolderList" *ngFor="let viagem of publicationsTravelFolderList"
(click)="goToPublicationsList(viagem.ProcessId)"> (click)="goToPublicationsList(viagem.ProcessId)">
@@ -46,7 +46,7 @@
<p class="item-content-detail my-5">{{viagem.Detail}}</p> <p class="item-content-detail my-5">{{viagem.Detail}}</p>
</div> </div>
</div> </div>
<div class="item width-100" <div class="item width-100 d-flex"
*ngFor="let evento of publicationsEventFolderList" *ngFor="let evento of publicationsEventFolderList"
(click)="viewPublications(evento)"> (click)="viewPublications(evento)">
<div class="item-icon2"> <div class="item-icon2">
@@ -82,16 +82,27 @@ ion-toolbar{
font-family: Roboto; font-family: Roboto;
background-color: #fff; background-color: #fff;
overflow:auto; overflow:auto;
.aside-left{ .aside-left{
border-right: 1px solid #d8d8d8; 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{ .content{
//border: 1px solid red; //border: 1px solid red;
} }
} }
.item{ .item{
width: 100% !important;
padding: 0 0px 0 0px !important; padding: 0 0px 0 0px !important;
margin: 0px auto;
border-bottom: 1px solid #ebebeb; border-bottom: 1px solid #ebebeb;
} }
.item-icon{ .item-icon{
@@ -127,23 +127,26 @@ export class EditEventToApproveComponent implements OnInit {
this.isEventEdited = false; this.isEventEdited = false;
this.getTask()
this.dateControlStart = new FormControl(moment(new Date())); this.dateControlStart = new FormControl(moment(new Date()));
this.dateControlEnd = new FormControl(moment(new Date())); this.dateControlEnd = new FormControl(moment(new Date()));
} }
ngOnInit() {
this.getTask()
console.log('HERE');
}
async getTask() { async getTask() {
console.log('this.eventProcess', this.eventProcess);
const result = await this.processes.GetTask(this.serialNumber).subscribe( result =>{ const result = await this.processes.GetTask(this.serialNumber).subscribe( result =>{
this.eventProcess = result this.eventProcess = result
this.restoreDatepickerData() this.restoreDatepickerData()
console.log(this.eventProcess.workflowInstanceDataFields.Subject)
// description // description
let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '') let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
this.eventProcess.workflowInstanceDataFields.Body = body this.eventProcess.workflowInstanceDataFields.Body = body
@@ -169,10 +172,6 @@ export class EditEventToApproveComponent implements OnInit {
}) })
}
ngOnInit() {
} }
close() { close() {
@@ -49,20 +49,14 @@ export class NewActionPage implements OnInit {
try { try {
await this.publication.CreatePublicationFolder(this.folder).toPromise() await this.publication.CreatePublicationFolder(this.folder).toPromise()
this.close(); this.close();
this.toastService.successMessage('Publicação criado') this.toastService.successMessage('Acção presidencial criada')
} catch (error) { } catch (error) {
this.toastService.badRequest('Publicação não criado') this.toastService.badRequest('Não foi possivel criar a acção presidencial')
} }
} }
close(){ close(){
this.closeDesktopComponent.emit(); this.closeDesktopComponent.emit();
} }
} }