mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -5,6 +5,7 @@ import { HomeGuard } from '../guards/home.guard';
|
||||
import { LoginGuard } from '../guards/login.guard';
|
||||
import { GroupMessagesPage } from '../pages/chat/group-messages/group-messages.page';
|
||||
import { MessagesPage } from '../pages/chat/messages/messages.page';
|
||||
import { ProcessesResolverService } from '../resolvers/processes-resolver.service';
|
||||
import { UserDataResolver } from '../resolvers/userData.resolver';
|
||||
|
||||
import { HomePage } from './home.page';
|
||||
@@ -209,6 +210,34 @@ const routes: Routes = [
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'diplomas',
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/diplomas/diplomas.module').then(m => m.DiplomasPageModule),
|
||||
/* resolve { diplomas: ProcessesResolverService}, */
|
||||
},
|
||||
{
|
||||
path:':SerialNumber/:caller',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/diplomas/diploma/diploma.module').then(m => m.DiplomaPageModule),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'diplomas-assinar',
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/diplomas-assinar/diplomas-assinar.module').then(m => m.DiplomasAssinarPageModule),
|
||||
/* resolve { diplomas: ProcessesResolverService}, */
|
||||
},
|
||||
{
|
||||
path:':SerialNumber/:caller',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.module').then(m => m.DiplomaAssinarPageModule),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path:'event-list',
|
||||
children: [
|
||||
|
||||
@@ -95,7 +95,7 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
goBack() {
|
||||
if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
||||
if (window.innerWidth <= 800) {
|
||||
if (window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
}
|
||||
else {
|
||||
@@ -108,7 +108,7 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (window.innerWidth <= 800) {
|
||||
if (window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos']);
|
||||
} else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
|
||||
-1
@@ -11,7 +11,6 @@
|
||||
|
||||
ion-content, .header-2, .main-content{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
<ion-header class="ion-no-border header-2">
|
||||
<div class="title">
|
||||
<app-btn-modal-dismiss (click)="goBack()"></app-btn-modal-dismiss>
|
||||
<div class="thetitle"><ion-label >Diplomas</ion-label></div>
|
||||
<div class="theicon btn-refresh">
|
||||
<button class="btn-no-color" (click)="doRefresh($event)">
|
||||
|
||||
@@ -23,7 +23,8 @@ export class DiplomaPage implements OnInit {
|
||||
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
||||
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
||||
|
||||
serialnumber: string;
|
||||
serialNumber: string;
|
||||
caller:string;
|
||||
profile: string;
|
||||
task: any
|
||||
fulltask: any
|
||||
@@ -42,32 +43,51 @@ export class DiplomaPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
console.log(params["serialNumber"]);
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
console.log(params["params"]);
|
||||
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialNumber = params["params"].SerialNumber;
|
||||
}
|
||||
if(params["params"].caller) {
|
||||
this.caller = params["params"].caller;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.profile = "mdgpr";
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
}
|
||||
|
||||
goBack() {
|
||||
if (window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas']);
|
||||
} else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"diplomas": true,
|
||||
if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
||||
if (window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
}
|
||||
else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"pendentes": true,
|
||||
}
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas']);
|
||||
} else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
'diplomas': true
|
||||
}
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async openOptions(taskAction?: any) {
|
||||
@@ -147,7 +167,7 @@ export class DiplomaPage implements OnInit {
|
||||
|
||||
async askSignature(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Aprovar",
|
||||
"ActionTypeId": 99999840,
|
||||
"dataFields": {
|
||||
@@ -169,7 +189,7 @@ export class DiplomaPage implements OnInit {
|
||||
|
||||
async askToChange(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Retificar",
|
||||
"ActionTypeId": 99999841,
|
||||
"dataFields": {
|
||||
@@ -189,7 +209,7 @@ export class DiplomaPage implements OnInit {
|
||||
async finish(note:string, documents:any){
|
||||
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Concluir",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
|
||||
@@ -7,7 +7,6 @@ import { IonicModule } from '@ionic/angular';
|
||||
import { DiplomasPageRoutingModule } from './diplomas-routing.module';
|
||||
|
||||
import { DiplomasPage } from './diplomas.page';
|
||||
import { SharedModule } from 'src/app/shared/shared.module';
|
||||
import { ComponentsModule } from 'src/app/components/components.module';
|
||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Component, Input, OnInit, } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { DiplomaPage } from 'src/app/pages/gabinete-digital/diplomas/diploma/diploma.page';
|
||||
|
||||
@@ -27,7 +28,6 @@ constructor(
|
||||
private alertService: AlertService,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private location: Location,
|
||||
) {
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
console.log('Cria');
|
||||
@@ -37,42 +37,22 @@ constructor(
|
||||
} else if (params['segment'] == 'assinados') {
|
||||
this.segment = 'assinados';
|
||||
}
|
||||
|
||||
this.LoadList();
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
/* this.router.events.forEach((event) => {
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
console.log('Atualiza');
|
||||
|
||||
this.LoadList();
|
||||
}
|
||||
}); */
|
||||
|
||||
//this.LoadList();
|
||||
}
|
||||
|
||||
ngAfterContentInit(): void {
|
||||
});
|
||||
console.log('Init');
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
ngOnChanges(changes: import("@angular/core").SimpleChanges): void {
|
||||
console.log('HERE');
|
||||
|
||||
}
|
||||
|
||||
reloadCurrentPage() {
|
||||
console.log('Reload');
|
||||
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
refreshComponent(){
|
||||
console.log('YEASS N');
|
||||
|
||||
this.router.navigate([this.router.url])
|
||||
}
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
|
||||
@@ -85,17 +65,11 @@ constructor(
|
||||
}
|
||||
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
|
||||
// this.LoadList();
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
goToDiploma(serialNumber:any) {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas/diploma'], navigationExtras);
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas', serialNumber, 'gabinete-digital']);
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
|
||||
@@ -186,7 +186,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.selectedElement='DiplomasPorValidar';
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?diplomasassinar=true'){
|
||||
this.openDiplomasPage('');
|
||||
this. openDiplomasAssinarPage();
|
||||
this.selectedElement='DiplomasAssinar';
|
||||
}
|
||||
}
|
||||
@@ -276,7 +276,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
console.log(event);
|
||||
|
||||
this.closeAllDesktopComponents();
|
||||
switch(this.loggeduser.Profile){
|
||||
/* switch(this.loggeduser.Profile){
|
||||
case 'MDGPR':
|
||||
this.selectedElement='Correspondence';
|
||||
this.showExpedients = true;
|
||||
@@ -286,7 +286,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.selectedElement='ExpedientesPr';
|
||||
this.showExpedientesPr = true;
|
||||
break;
|
||||
}
|
||||
} */
|
||||
this.LoadCounts();
|
||||
//this.refreshExpedientes();
|
||||
|
||||
@@ -445,21 +445,8 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
openDiplomasAssinarPage() {
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
if (this.loggeduser.Profile == 'MDGPR') {
|
||||
if( window.innerWidth <= 801){
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
}
|
||||
else{
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"diplomasassinar": true,}};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
this.showDiplomasAssinar = true;
|
||||
}
|
||||
} else {
|
||||
if( window.innerWidth <= 801){
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar'], navigationExtras);
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar']);
|
||||
}
|
||||
else{
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"diplomasassinar": true,}};
|
||||
@@ -467,6 +454,5 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.showDiplomasAssinar = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ProcessesResolverService } from './processes-resolver.service';
|
||||
|
||||
describe('ProcessesResolverService', () => {
|
||||
let service: ProcessesResolverService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(ProcessesResolverService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRoute, ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { DailyWorkTask } from '../models/dailyworktask.model';
|
||||
import { ProcessesService } from '../services/processes.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ProcessesResolverService implements Resolve<any[]> {
|
||||
|
||||
constructor(
|
||||
private processesService: ProcessesService,
|
||||
) { }
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot):
|
||||
Observable<any> | Promise<any> | any[] {
|
||||
return this.processesService.GetTasksList("Despacho do Presidente da República", false);
|
||||
}
|
||||
}
|
||||
@@ -43,12 +43,7 @@ constructor(
|
||||
}
|
||||
|
||||
goToDiploma(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas/diploma'], navigationExtras);
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas', serialNumber, 'gabinete-digital']);
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
|
||||
@@ -650,6 +650,7 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent-
|
||||
|
||||
|
||||
// center
|
||||
app-diploma-assinar ion-content .main-content,
|
||||
app-approve-event ion-content .main-content,
|
||||
app-view-event ion-content .main-content,
|
||||
app-expediente-pr .main-content{
|
||||
|
||||
Reference in New Issue
Block a user