mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -145,9 +145,7 @@
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ export class DiplomaPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
if (window.innerWidth <= 800) {
|
||||
if (window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas']);
|
||||
} else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
|
||||
@@ -83,8 +83,6 @@ constructor(
|
||||
}
|
||||
|
||||
async LoadList(){
|
||||
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
|
||||
console.log('diplomas', diplomas);
|
||||
|
||||
+16
-9
@@ -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()
|
||||
@@ -235,7 +242,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
|
||||
this.adding = "intervenient";
|
||||
|
||||
if(window.innerWidth <= 800){
|
||||
if(window.innerWidth <= 801){
|
||||
const modal = await this.modalController.create({
|
||||
component: AttendeesPageModal,
|
||||
componentProps: {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -93,11 +93,12 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
window.onresize = (event) => {
|
||||
// if not mobile remove all component
|
||||
if( window.innerWidth <= 800){
|
||||
if( window.innerWidth <= 801){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
};
|
||||
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(){
|
||||
@@ -312,7 +357,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
|
||||
selectedElementF(element:string) {
|
||||
if (window.innerWidth >= 800) {
|
||||
if (window.innerWidth >= 801) {
|
||||
return element == this.selectedElement
|
||||
}
|
||||
return false;
|
||||
@@ -323,7 +368,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
this.closeAllDesktopComponents();
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"eventos": true,}};
|
||||
if( window.innerWidth <= 800) {
|
||||
if( window.innerWidth <= 801) {
|
||||
//this.openEventsToApproveList(profile);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
@@ -338,7 +383,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.closeAllDesktopComponents();
|
||||
switch(this.loggeduser.Profile){
|
||||
case 'MDGPR':
|
||||
if( window.innerWidth <= 800) {
|
||||
if( window.innerWidth <= 801) {
|
||||
//this.openExpedientList();
|
||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
}
|
||||
@@ -350,8 +395,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
break;
|
||||
case 'PR':
|
||||
if( window.innerWidth <= 800) {
|
||||
//this.openExpedientList();
|
||||
if( window.innerWidth <= 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
||||
}
|
||||
else {
|
||||
@@ -367,7 +411,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
openPedidosPage(segment:string) {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800) {
|
||||
if( window.innerWidth <= 801) {
|
||||
|
||||
let navigationExtras: NavigationExtras;
|
||||
|
||||
@@ -389,7 +433,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
openDespachosPage(segment?:string) {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800){
|
||||
if( window.innerWidth <= 801){
|
||||
this.router.navigate(['/home/gabinete-digital/despachos']);
|
||||
}
|
||||
else{
|
||||
@@ -401,7 +445,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
openDespachosPrPage(segment?:string) {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800){
|
||||
if( window.innerWidth <= 801){
|
||||
this.router.navigate(['/home/gabinete-digital/despachos-pr']);
|
||||
}
|
||||
else{
|
||||
@@ -413,7 +457,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
openPendentesPage(segment?:string){
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800){
|
||||
if( window.innerWidth <= 801){
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
}
|
||||
else{
|
||||
@@ -425,26 +469,24 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
openExpedientesPrPage(segment?:string){
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800) {
|
||||
if( window.innerWidth <= 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
openDiplomasPage(segment:string) {
|
||||
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
if( window.innerWidth <= 800){
|
||||
if( window.innerWidth <= 801){
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": segment}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
}
|
||||
else{
|
||||
this.closeAllDesktopComponents();
|
||||
this.segment = segment;
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"diplomas": true,}};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
@@ -456,7 +498,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
if (this.loggeduser.Profile == 'MDGPR') {
|
||||
if( window.innerWidth <= 800){
|
||||
if( window.innerWidth <= 801){
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
}
|
||||
@@ -466,7 +508,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.showDiplomasAssinar = true;
|
||||
}
|
||||
} else {
|
||||
if( window.innerWidth <= 800){
|
||||
if( window.innerWidth <= 801){
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar'], navigationExtras);
|
||||
}
|
||||
|
||||
@@ -51,16 +51,7 @@ export class PendentesPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"pedidos": true,
|
||||
}
|
||||
}
|
||||
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
|
||||
// window.history.back();
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
|
||||
@@ -19,15 +19,6 @@
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
|
||||
<ion-refresher-content
|
||||
pullingIcon="chevron-down-circle-outline"
|
||||
pullingText="deslize para actualizar"
|
||||
refreshingSpinner="circles"
|
||||
refreshingText="A actualizar...">
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<div class="width-100 overflow-y-auto height-100" [ngSwitch]="segment">
|
||||
<div *ngIf="diplomasList">
|
||||
<ion-list *ngSwitchCase="'validar'">
|
||||
|
||||
@@ -31,10 +31,9 @@ constructor(
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.LoadList();
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
this.doRefresh();
|
||||
this.LoadList();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -57,9 +56,12 @@ constructor(
|
||||
}
|
||||
|
||||
async LoadList(){
|
||||
this.diplomasList = new Array();
|
||||
|
||||
console.log('OOOKAY');
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
this.diplomasList = new Array();
|
||||
|
||||
|
||||
console.log(diplomas);
|
||||
switch (this.segment) {
|
||||
@@ -168,16 +170,12 @@ constructor(
|
||||
});
|
||||
});
|
||||
this.showLoader = false;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
doRefresh() {
|
||||
this.LoadList();
|
||||
setTimeout(() => {
|
||||
//event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { AnimationController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
@@ -27,7 +27,8 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private processes: ProcessesService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService) {
|
||||
private toastService: ToastService,
|
||||
private router: Router,) {
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
@@ -150,7 +151,8 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
|
||||
|
||||
goBack() {
|
||||
this.close()
|
||||
this.close();
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user