This commit is contained in:
tiago.kayaya
2021-06-28 10:49:33 +01:00
parent 989e734b34
commit 2d3f5f0eee
7 changed files with 31 additions and 172 deletions
@@ -30,6 +30,7 @@ constructor(
private activatedRoute: ActivatedRoute,
) {
this.activatedRoute.queryParams.subscribe(params => {
console.log('Cria');
if(params['segment'] == 'validar') {
this.segment = 'validar';
@@ -42,12 +43,15 @@ constructor(
}
ngOnInit() {
this.LoadList();
this.router.events.forEach((event) => {
if(event instanceof NavigationEnd && event.url == this.router.url) {
console.log('Atualiza');
this.LoadList();
}
});
console.log('Init');
this.LoadList();
}
segmentChanged(ev: any) {
@@ -60,7 +60,6 @@ export class ExpedientTaskModalPage implements OnInit {
taskDate: Date;
taskDescription: string;
user: string;
loadedAttachments:any;
documents:SearchDocument[] = [];
@@ -105,7 +104,6 @@ export class ExpedientTaskModalPage implements OnInit {
) {
this.loggeduser = userAuth.ValidatedUser;
this.user = environment.defaultuser +'@'+ environment.domain;
this.task = this.navParams.get('task');
console.log('task', this.task)
@@ -230,7 +228,7 @@ export class ExpedientTaskModalPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs,
@@ -261,7 +259,7 @@ export class ExpedientTaskModalPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
@@ -289,7 +287,7 @@ export class ExpedientTaskModalPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
@@ -325,7 +323,7 @@ export class ExpedientTaskModalPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs,
@@ -356,7 +354,7 @@ export class ExpedientTaskModalPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
@@ -150,15 +150,14 @@
<app-empty-container [texto]="emptyTextDescription" *ngIf="showEmptyContainer" class="d-flex height-100 flex-column"></app-empty-container>
<app-events-to-approve [profile]="'MDGPR'" *ngIf="showEventsToApprove" class="d-flex height-100 flex-column"></app-events-to-approve>
<app-expedients (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showExpedients"></app-expedients>
<app-expediente (openExpedientList)="openExpedientListPage()" [profile]="profile" [serialNumber]="serialNumber" class="d-flex height-100 flex-column" *ngIf="showExpedientDetail"></app-expediente>
<app-pedidos (openPedido)="openExpedientPage($event)" [profile]="profile" [segment]="segment" [serialNumber]="serialNumber" class="d-flex height-100 flex-column" *ngIf="showPedidos"></app-pedidos>
<app-despachos (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showDespachos"></app-despachos>
<app-despachos-pr (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showDespachosPr"></app-despachos-pr>
<app-pendentes (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showPendentes"></app-pendentes>
<app-expedients [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showExpedients"></app-expedients>
<app-pedidos [profile]="profile" [segment]="segment" [serialNumber]="serialNumber" class="d-flex height-100 flex-column" *ngIf="showPedidos"></app-pedidos>
<app-despachos [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showDespachos"></app-despachos>
<app-despachos-pr [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showDespachosPr"></app-despachos-pr>
<app-pendentes [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showPendentes"></app-pendentes>
<app-diplomas (openExpedientDetail)="openExpedientesPrPage($event)" [profile]="profile" [segment]="segment" class="d-flex height-100 flex-column" *ngIf="showDiplomas"></app-diplomas>
<app-diplomas-assinar class="d-flex height-100 flex-column" *ngIf="showDiplomasAssinar"></app-diplomas-assinar>
<app-expedientes-pr (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showExpedientesPr"></app-expedientes-pr>
<app-expedientes-pr [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showExpedientesPr"></app-expedientes-pr>
<app-signed-diploma [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showSignedDiploma"></app-signed-diploma>
</div>
</div>
@@ -333,26 +333,6 @@ export class GabineteDigitalPage implements OnInit {
//this.eventsToApprove.doRefresh();
}
}
async openEventsToApproveList(profile:any) {
this.closeAllDesktopComponent();
//if( window.innerWidth <= 1024){
const modal = await this.modalController.create({
component: EventListPage,
componentProps:{
profile: profile,
},
cssClass: 'modal modal-desktop',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss();
//} else {
//this.desktopComponent.showEventList = true;
//}
}
openExpedientListPage() {
this.closeAllDesktopComponents();
@@ -385,23 +365,9 @@ export class GabineteDigitalPage implements OnInit {
}
openExpedientPage(data){
console.log(data);
this.closeAllDesktopComponents();
if( window.innerWidth <= 800){
//this.openExpedientList();
}
else{
this.serialNumber = data;
this.showExpedientDetail = true;
}
}
openPedidosPage(segment:string) {
this.closeAllDesktopComponents();
if( window.innerWidth <= 800) {
//this.openPedidoList();
let navigationExtras: NavigationExtras;
@@ -424,7 +390,6 @@ export class GabineteDigitalPage implements OnInit {
openDespachosPage(segment?:string) {
this.closeAllDesktopComponents();
if( window.innerWidth <= 800){
//this.openDespachoList();
this.router.navigate(['/home/gabinete-digital/despachos']);
}
else{
@@ -437,7 +402,6 @@ export class GabineteDigitalPage implements OnInit {
openDespachosPrPage(segment?:string) {
this.closeAllDesktopComponents();
if( window.innerWidth <= 800){
//this.openDespachoListPr();
this.router.navigate(['/home/gabinete-digital/despachos-pr']);
}
else{
@@ -450,7 +414,6 @@ export class GabineteDigitalPage implements OnInit {
openPendentesPage(segment?:string){
this.closeAllDesktopComponents();
if( window.innerWidth <= 800){
//this.openPendenteList();
this.router.navigate(['/home/gabinete-digital/pendentes']);
}
else{
@@ -463,7 +426,6 @@ export class GabineteDigitalPage implements OnInit {
openExpedientesPrPage(segment?:string){
this.closeAllDesktopComponents();
if( window.innerWidth <= 800) {
//this.openExpedientList();
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
}
else {
@@ -479,7 +441,6 @@ export class GabineteDigitalPage implements OnInit {
this.closeAllDesktopComponents();
if( window.innerWidth <= 800){
//this.openDeploma();
let navigationExtras: NavigationExtras = { queryParams: {"segment": segment}};
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
}
@@ -496,7 +457,6 @@ export class GabineteDigitalPage implements OnInit {
if (this.loggeduser.Profile == 'MDGPR') {
if( window.innerWidth <= 800){
//this.openDeploma();
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
}
@@ -507,7 +467,6 @@ export class GabineteDigitalPage implements OnInit {
}
} else {
if( window.innerWidth <= 800){
//this.openDeploma();
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
this.router.navigate(['/home/gabinete-digital/diplomas-assinar'], navigationExtras);
}
@@ -517,109 +476,6 @@ export class GabineteDigitalPage implements OnInit {
this.showDiplomasAssinar = true;
}
}
}
openSignedDiploma(segment:string) {
this.closeAllDesktopComponents();
if( window.innerWidth <= 800){
this.openDeploma();
}
else{
this.segment = segment;
this.showSignedDiploma = true;
}
}
async openDeploma() {
const modal = await this.modalController.create({
component: DiplomasPage,
componentProps:{
profile: this.profile,
},
cssClass: 'modal modal-desktop',
//backdropDismiss: false
});
await modal.present();
modal.onDidDismiss();
}
async openExpedientList(){
this.closeAllDesktopComponent();
//if( window.innerWidth <= 1024){
const modal = await this.modalController.create({
component: ExpedientePage,
componentProps: {
profile: this.profile,
},
cssClass: 'modal modal-desktop',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss();
//} else {
console.log('show desktop modal')
//this.desktopComponent.showExpediente = true;
//}
}
/* async openPendenteList(){
this.closeAllDesktopComponent();
const modal = await this.modalController.create({
component: PendentesPage,
componentProps:{
profile: this.profile,
},
cssClass: 'modal modal-desktop',
});
await modal.present();
modal.onDidDismiss();
console.log('show desktop modal')
} */
async openDespachoList(){
this.closeAllDesktopComponent();
const modal = await this.modalController.create({
component: DespachosPage,
componentProps:{
profile: this.profile,
serialNumber: this.serialNumber
},
cssClass: 'modal modal-desktop',
});
await modal.present();
modal.onDidDismiss();
console.log('show desktop modal')
}
async openDespachoListPr(){
this.closeAllDesktopComponent();
const modal = await this.modalController.create({
component: DespachosPrPage,
componentProps:{
profile: this.profile,
},
cssClass: 'modal modal-desktop',
});
await modal.present();
modal.onDidDismiss();
console.log('show desktop modal')
}
async openPedidoList(){
this.closeAllDesktopComponent();
const modal = await this.modalController.create({
component: PedidosPage,
componentProps:{
profile: this.profile,
},
cssClass: 'modal modal-desktop',
});
await modal.present();
modal.onDidDismiss();
console.log('show desktop modal')
}
}