mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
save
This commit is contained in:
+15
-8
@@ -66,11 +66,21 @@ export class BookMeetingModalPage implements OnInit {
|
||||
showLoader = false
|
||||
|
||||
get dateStart () {
|
||||
return this.dateControlStart.value
|
||||
if( window.innerWidth < 801) {
|
||||
return this.postData.StartDate;
|
||||
}
|
||||
else{
|
||||
return this.dateControlStart.value;
|
||||
}
|
||||
}
|
||||
|
||||
get dateEnd () {
|
||||
return this.dateControlEnd.value
|
||||
if( window.innerWidth < 801) {
|
||||
return this.postData.EndDate;
|
||||
}
|
||||
else{
|
||||
return this.dateControlEnd.value;
|
||||
}
|
||||
}
|
||||
|
||||
@ViewChild('picker') picker: any;
|
||||
@@ -182,9 +192,8 @@ export class BookMeetingModalPage implements OnInit {
|
||||
Categories: null,
|
||||
HasAttachments: true,
|
||||
}
|
||||
|
||||
console.log(this.postData);
|
||||
console.log(this.task);
|
||||
|
||||
|
||||
if(this.task.FsId == '8') {
|
||||
|
||||
@@ -220,10 +229,8 @@ export class BookMeetingModalPage implements OnInit {
|
||||
await this.calendarService.createTaskEvent(this.task.FolderId, this.postData, "pr",this.task.SerialNumber, this.task.FsId).toPromise();
|
||||
break;
|
||||
}
|
||||
|
||||
this.toastService.successMessage('Reunião criada', ()=>{
|
||||
this.close();
|
||||
})
|
||||
this.close();
|
||||
this.toastService.successMessage('Reunião criada');
|
||||
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorAssinar'" [class.active]="selectedElement == 'DiplomasPorAssinar'" class="exp-card d-flex flex-column justify-center">
|
||||
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-diploma.svg"></ion-icon>
|
||||
</div>
|
||||
|
||||
@@ -98,6 +98,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
};
|
||||
this.checkRoutes();
|
||||
this.checkUser();
|
||||
|
||||
}
|
||||
|
||||
@@ -111,14 +112,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
switch(this.loggeduser.Profile){
|
||||
case 'MDGPR':
|
||||
this.showExpedients = true;
|
||||
break;
|
||||
case 'PR':
|
||||
this.showExpedientesPr = true;
|
||||
break;
|
||||
}
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
this.checkRoutes();
|
||||
@@ -129,6 +122,17 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.hideRefreshButton();
|
||||
}
|
||||
|
||||
checkUser(){
|
||||
switch(this.loggeduser.Profile){
|
||||
case 'MDGPR':
|
||||
this.showExpedients = true;
|
||||
break;
|
||||
case 'PR':
|
||||
this.showExpedientesPr = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
hideRefreshButton(){
|
||||
window.onresize = (event) => {
|
||||
if( window.innerWidth < 801) {
|
||||
@@ -139,13 +143,54 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
if(window.innerWidth < 801){
|
||||
console.log('YASS');
|
||||
this.hideRefreshBtn = false;
|
||||
}
|
||||
}
|
||||
|
||||
checkRoutes(){
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(this.router.url == '/home/gabinete-digital?eventos=true'){
|
||||
this.openEventsToApprovePage("MDGPR");
|
||||
this.selectedElement='approval';
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?expedientes=true'){
|
||||
this.openExpedientListPage();
|
||||
if(this.loggeduser.Profile == 'MDGPR'){
|
||||
this.selectedElement='Correspondence';
|
||||
}
|
||||
else{
|
||||
this.selectedElement='Expediente Presidente'
|
||||
}
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?pendentes=true'){
|
||||
this.openPendentesPage('');
|
||||
this.selectedElement='Pending';
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?despachos=true'){
|
||||
this.openDespachosPage('');
|
||||
this.selectedElement='Dispatches';
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?pedidos=true'){
|
||||
this.openPedidosPage('parecer');
|
||||
this.selectedElement='RequestsForOpinion';
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?expedientespr=true'){
|
||||
this.openExpedientesPrPage();
|
||||
this.selectedElement='Expediente Presidente'
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?despachospr=true'){
|
||||
this.openDespachosPrPage('');
|
||||
this.selectedElement='DispatchesPr'
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?diplomas=true'){
|
||||
this.openDiplomasPage('validar');
|
||||
this.selectedElement='DiplomasPorValidar';
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?diplomasassinar=true'){
|
||||
this.openDiplomasPage('');
|
||||
this.selectedElement='DiplomasAssinar';
|
||||
}
|
||||
|
||||
/* this.activatedRoute.queryParams.subscribe(params => {
|
||||
switch (params)
|
||||
{
|
||||
case params["eventos"]:
|
||||
@@ -185,8 +230,8 @@ export class GabineteDigitalPage implements OnInit {
|
||||
break;
|
||||
|
||||
case params["diplomas"]:
|
||||
this.openDiplomasPage('');
|
||||
this.selectedElement='DiplomasPorAssinar';
|
||||
this.openDiplomasPage('validar');
|
||||
this.selectedElement='DiplomasPorValidar';
|
||||
break;
|
||||
|
||||
case params["diplomasassinar"]:
|
||||
@@ -194,7 +239,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.selectedElement='DiplomasAssinar';
|
||||
break;
|
||||
}
|
||||
});
|
||||
}); */
|
||||
}
|
||||
|
||||
refreshExpedientes(){
|
||||
@@ -429,7 +474,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
else {
|
||||
this.selectedElement='ExpedientesPr'
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"expedientes": true,}};
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"expedientespr": true,}};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
this.showExpedientesPr = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user