mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
merge
This commit is contained in:
@@ -22,6 +22,7 @@ import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.p
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
import { DespachosPrOptionsPage } from 'src/app/shared/popover/despachos-pr-options/despachos-pr-options.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common'
|
||||
|
||||
@Component({
|
||||
selector: 'app-despacho-pr',
|
||||
@@ -39,6 +40,7 @@ export class DespachoPrPage implements OnInit {
|
||||
fulltask: any;
|
||||
eventsList: Event[];
|
||||
serialnumber: string;
|
||||
caller: string;
|
||||
profile: string;
|
||||
intervenientes: any;
|
||||
cc: any = [];
|
||||
@@ -55,11 +57,15 @@ export class DespachoPrPage implements OnInit {
|
||||
public popoverController: PopoverController,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,) {
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
console.log(params["serialNumber"]);
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialnumber = params["params"].SerialNumber;
|
||||
}
|
||||
if(params["params"].caller) {
|
||||
this.caller = params["params"].caller;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -85,17 +91,7 @@ export class DespachoPrPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos-pr']);
|
||||
} else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"despachospr": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
|
||||
this.location.back();
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +140,7 @@ export class DespachoPrPage implements OnInit {
|
||||
window.history.back();
|
||||
} finally {
|
||||
if(error.status == 0) {
|
||||
this.toastService.badRequest('Não é possível vizualizar este processo no modo offline')
|
||||
this.toastService.badRequest('Não é possível visualizar este processo no modo offline')
|
||||
} else {
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
}
|
||||
@@ -342,7 +338,7 @@ export class DespachoPrPage implements OnInit {
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
classs = 'add-note-modal'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
|
||||
@@ -90,12 +90,7 @@ export class DespachosPrPage implements OnInit {
|
||||
}
|
||||
|
||||
goToDespachoPr(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/despachos-pr/despacho-pr'], navigationExtras);
|
||||
this.router.navigate(['/home/gabinete-digital/despachos-pr',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
|
||||
@@ -51,7 +51,7 @@ export class DespachoPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private despachoService: DespachoService,
|
||||
private location: Location
|
||||
|
||||
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
@@ -137,6 +137,7 @@ export class DespachoPage implements OnInit {
|
||||
this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
|
||||
|
||||
this.processes.GetTaskParticipants(this.task.FolderId).subscribe(users=>{
|
||||
|
||||
this.intervenientes = users.filter(user=>{
|
||||
return user.Type == 'I';
|
||||
});
|
||||
@@ -152,7 +153,7 @@ export class DespachoPage implements OnInit {
|
||||
window.history.back();
|
||||
} finally {
|
||||
if(error.status == 0) {
|
||||
this.toastService.badRequest('Não é possível vizualizar este processo no modo offline')
|
||||
this.toastService.badRequest('Não é possível visualizar este processo no modo offline')
|
||||
} else {
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
}
|
||||
@@ -233,7 +234,7 @@ export class DespachoPage implements OnInit {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
async reencaminhar(note:string, documents:any) {
|
||||
|
||||
+13
-18
@@ -12,6 +12,7 @@ import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.p
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
import { DeplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common'
|
||||
|
||||
@Component({
|
||||
selector: 'app-diploma-assinar',
|
||||
@@ -29,7 +30,8 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
intervenientes: any;
|
||||
cc: any = [];
|
||||
attachments:any;
|
||||
customDate: any
|
||||
customDate: any;
|
||||
caller:string;
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
@@ -39,12 +41,15 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
) {
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
console.log(params["serialNumber"]);
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialnumber = params["params"].SerialNumber;
|
||||
}
|
||||
if(params["params"].caller) {
|
||||
this.caller = params["params"].caller;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -56,17 +61,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar']);
|
||||
} else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"diplomasassinar": true,
|
||||
}
|
||||
}
|
||||
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
this.location.back();
|
||||
}
|
||||
|
||||
async openOptions(taskAction?: any) {
|
||||
@@ -129,7 +124,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
window.history.back();
|
||||
} finally {
|
||||
if(error.status == 0) {
|
||||
this.toastService.badRequest('Não é possível vizualizar este processo no modo offline')
|
||||
this.toastService.badRequest('Não é possível visualizar este processo no modo offline')
|
||||
} else {
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
}
|
||||
|
||||
@@ -48,15 +48,10 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
goToDiploma(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar/diploma-assinar'], navigationExtras);
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
async refreshing() {
|
||||
@@ -66,7 +61,7 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 1000);
|
||||
@@ -123,7 +118,7 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
|
||||
this.skeletonLoader = false
|
||||
this.showLoader = false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
goBack() {
|
||||
|
||||
@@ -12,6 +12,7 @@ import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.p
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
import { DeplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-diploma',
|
||||
@@ -42,10 +43,11 @@ export class DiplomaPage implements OnInit {
|
||||
private router: Router,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
private location: Location,
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
console.log(params["params"]);
|
||||
|
||||
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialNumber = params["params"].SerialNumber;
|
||||
}
|
||||
@@ -63,10 +65,11 @@ export class DiplomaPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
||||
this.location.back();
|
||||
/* 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: {
|
||||
@@ -87,7 +90,7 @@ export class DiplomaPage implements OnInit {
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
async openOptions(taskAction?: any) {
|
||||
@@ -134,7 +137,7 @@ export class DiplomaPage implements OnInit {
|
||||
});
|
||||
this.cc = users.filter(user=>{
|
||||
return user.Type == 'CC';
|
||||
});
|
||||
});
|
||||
});
|
||||
this.getDocumentDetails(this.task.FolderId, '361');
|
||||
|
||||
@@ -145,7 +148,7 @@ export class DiplomaPage implements OnInit {
|
||||
window.history.back();
|
||||
} finally {
|
||||
if(error.status == 0) {
|
||||
this.toastService.badRequest('Não é possível vizualizar este processo no modo offline')
|
||||
this.toastService.badRequest('Não é possível visualizar este processo no modo offline')
|
||||
} else {
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
}
|
||||
@@ -161,7 +164,7 @@ export class DiplomaPage implements OnInit {
|
||||
browser.show();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
getDocumentDetails(forlderId:string, applicationId:string) {
|
||||
this.processes.GetDocumentDetails(forlderId,applicationId).subscribe(res=>{
|
||||
this.attachments = res.Documents;
|
||||
@@ -171,8 +174,8 @@ export class DiplomaPage implements OnInit {
|
||||
}
|
||||
|
||||
async askSignature(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Aprovar",
|
||||
"ActionTypeId": 99999840,
|
||||
"dataFields": {
|
||||
@@ -185,11 +188,11 @@ export class DiplomaPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
|
||||
|
||||
this.toastService.successMessage(false, ()=>{
|
||||
this.close();
|
||||
})
|
||||
|
||||
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
}
|
||||
@@ -199,8 +202,8 @@ export class DiplomaPage implements OnInit {
|
||||
}
|
||||
|
||||
async askToChange(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Retificar",
|
||||
"ActionTypeId": 99999841,
|
||||
"dataFields": {
|
||||
@@ -223,9 +226,9 @@ export class DiplomaPage implements OnInit {
|
||||
}
|
||||
|
||||
async finish(note:string, documents:any){
|
||||
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Concluir",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
@@ -257,7 +260,7 @@ export class DiplomaPage implements OnInit {
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
classs = 'add-note-modal'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
@@ -266,20 +269,20 @@ export class DiplomaPage implements OnInit {
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
|
||||
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
if(res.data){
|
||||
|
||||
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
|
||||
@@ -10,6 +10,7 @@ import { EventActionsPopoverPage } from 'src/app/pages/agenda/event-actions-popo
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { EditEventToApproveComponent } from 'src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event',
|
||||
@@ -47,6 +48,7 @@ export class ApproveEventPage implements OnInit {
|
||||
private iab: InAppBrowser,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
console.log(params["params"]);
|
||||
@@ -64,7 +66,7 @@ export class ApproveEventPage implements OnInit {
|
||||
toDateString(e) {
|
||||
return new Date(e).toDateString()
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.serialNumber);
|
||||
console.log(this.caller);
|
||||
@@ -73,7 +75,8 @@ export class ApproveEventPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
this.location.back();
|
||||
/* let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"eventos": true,
|
||||
}
|
||||
@@ -82,7 +85,7 @@ export class ApproveEventPage implements OnInit {
|
||||
this.router.navigate(['/home',this.caller, 'event-list']);
|
||||
} else {
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
} */
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
</ion-refresher>
|
||||
<div class="main-content d-flex height-100" >
|
||||
|
||||
<div class="content d-flex flex-column">
|
||||
<div class="content height-100 d-flex flex-column">
|
||||
<div [ngSwitch]="segment">
|
||||
<ion-list *ngSwitchCase="'MDGPR'">
|
||||
<ion-list class="width-100 height-100" *ngSwitchCase="'MDGPR'">
|
||||
<div *ngIf="eventaprovacaostore.listmd" class="overflow-y-auto height-100">
|
||||
<ion-item-sliding>
|
||||
<ion-item class="Rectangle cursor-pointer" lines="none"
|
||||
@@ -57,6 +57,7 @@
|
||||
</ion-item-sliding>
|
||||
</div>
|
||||
</ion-list>
|
||||
<ion-label></ion-label>
|
||||
|
||||
<ion-list *ngSwitchCase="'PR'">
|
||||
<div *ngIf="eventaprovacaostore.listpr" class="overflow-y-auto height-100">
|
||||
@@ -79,6 +80,27 @@
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
<div class="height-100" [ngSwitch]="segment">
|
||||
<div *ngSwitchCase="'MDGPR'" class="d-flex height-100 align-center justify-content-center" >
|
||||
<div
|
||||
*ngIf="!skeletonLoader && eventaprovacaostore.listmd.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngSwitchCase="'PR'" class="d-flex height-100 align-center justify-content-center">
|
||||
<div
|
||||
*ngIf="!skeletonLoader && eventaprovacaostore.listpr.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -119,3 +119,7 @@ ion-item-sliding{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.test{
|
||||
color: #000 !important;
|
||||
border: 1px solid red !important;
|
||||
}
|
||||
|
||||
@@ -75,6 +75,8 @@ export class EventListPage implements OnInit {
|
||||
let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
|
||||
let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
|
||||
this.eventsMDGPRList = mdEventsOficial.concat(mdEventsPessoal);
|
||||
console.log(this.eventsMDGPRList);
|
||||
|
||||
this.eventaprovacaostore.resetmd(this.eventsMDGPRList);
|
||||
}
|
||||
else if(this.segment == 'PR'){
|
||||
|
||||
+6
-3
@@ -13,6 +13,7 @@ import { momentG } from 'src/plugin/momentG'
|
||||
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente-detail',
|
||||
@@ -48,6 +49,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
public popoverController: PopoverController,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
@@ -73,7 +75,8 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
if(this.task.Status == "Pending" && this.caller != 'events'){
|
||||
this.location.back();
|
||||
/* if(this.task.Status == "Pending" && this.caller != 'events'){
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
}
|
||||
@@ -108,7 +111,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
@@ -168,7 +171,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
window.history.back();
|
||||
} finally {
|
||||
if(error.status == 0) {
|
||||
this.toastService.badRequest('Não é possível vizualizar este processo no modo offline')
|
||||
this.toastService.badRequest('Não é possível visualizar este processo no modo offline')
|
||||
} else {
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
}
|
||||
|
||||
+16
-8
@@ -61,29 +61,35 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-content width-100">
|
||||
<h5>Documentos Anexados</h5>
|
||||
|
||||
<ion-list>
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding cursor-pointer">
|
||||
<ion-item *ngFor="let attachment of attachments; let i = index"
|
||||
class="ion-no-margin ion-no-padding cursor-pointer">
|
||||
<ion-label
|
||||
(click)="viewDocument()">
|
||||
<p class="attach-title-item">{{ task.Folio }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p><span class="span-left">{{task.Remetente}}</span><span class="span-right">{{ task.CreateDate | date: 'dd/MM/yy' }}</span></p>
|
||||
<p class="attach-title-item">{{attachment.Description}}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p>
|
||||
<span class="span-left">{{attachment.Stakeholders}}</span>
|
||||
<span *ngIf="!attachment.Stakeholders" class="span-left">Rementente indefinido</span>
|
||||
<span class="span-right">{{ attachment.CreateDate | date: 'dd/MM/yy' }}</span>
|
||||
</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="eventsList">
|
||||
<h3 class="h3-event-title">Eventos Associados</h3>
|
||||
<ion-list>
|
||||
<div *ngIf="eventsList">
|
||||
<ion-item-sliding>
|
||||
<ion-item
|
||||
class="Rectangle" lines="none"
|
||||
<ion-item
|
||||
class="Rectangle" lines="none"
|
||||
*ngFor="let event of eventsList"
|
||||
(click)="viewEventDetail(event.EventId)"
|
||||
>
|
||||
<!-- [routerLink]="['/home/events', event.EventId, 'events']" -->
|
||||
|
||||
<div class="content-{{profile}}-{{event.CalendarName}} width-100 ">
|
||||
<div class="approve-event-time">
|
||||
<p>{{event.StartDate | date: 'HH:mm'}}</p>
|
||||
@@ -100,6 +106,7 @@
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -112,6 +119,7 @@
|
||||
<div hidden class="solid"></div>
|
||||
<button hidden class="btn-cancel" shape="round" >Delegar</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documento <br />(Gestão Documental)</button>
|
||||
</div>
|
||||
<div *ngIf="loggeduser.Profile =='PR' " class="buttons">
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-ok" shape="round" >Marcar para Despacho</button>
|
||||
|
||||
@@ -22,6 +22,10 @@ import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.p
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
import { OptsExpedientePrPage } from 'src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { Attachment } from 'src/app/models/attachment.model';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
import { Location } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente-pr',
|
||||
@@ -44,11 +48,12 @@ export class ExpedientePrPage implements OnInit {
|
||||
cc: any = [];
|
||||
|
||||
loggeduser: User;
|
||||
documents:SearchDocument[] = [];
|
||||
attachments:any;
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
private iab: InAppBrowser,
|
||||
private attachments: AttachmentsService,
|
||||
private events: EventsService,
|
||||
private menu: MenuController,
|
||||
private router: Router,
|
||||
@@ -58,6 +63,8 @@ export class ExpedientePrPage implements OnInit {
|
||||
private userAuth: AuthService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private location: Location,
|
||||
|
||||
) {
|
||||
this.loggeduser = userAuth.ValidatedUser;
|
||||
@@ -81,10 +88,14 @@ export class ExpedientePrPage implements OnInit {
|
||||
}
|
||||
/* this.serialnumber = paramMap.get('SerialNumber'); */
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
this.LoadRelatedEvents(this.serialnumber);
|
||||
//this.LoadRelatedEvents(this.serialnumber);
|
||||
//this.getAttachments(this.serialnumber);
|
||||
});
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
this.LoadRelatedEvents(this.serialnumber);
|
||||
this.getAttachments(this.serialnumber);
|
||||
//this.LoadRelatedEvents(this.serialnumber);
|
||||
|
||||
|
||||
}
|
||||
|
||||
toDateString(e) {
|
||||
@@ -96,7 +107,8 @@ export class ExpedientePrPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
if(this.task.Status == "Pending" && this.caller != 'events'){
|
||||
this.location.back();
|
||||
/* if(this.task.Status == "Pending" && this.caller != 'events'){
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
}
|
||||
@@ -130,7 +142,7 @@ export class ExpedientePrPage implements OnInit {
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
sendExpedienteToPending(){
|
||||
@@ -168,10 +180,7 @@ export class ExpedientePrPage implements OnInit {
|
||||
"Status": res.workflowInstanceDataFields.Status,
|
||||
}
|
||||
|
||||
console.log('task', this.task);
|
||||
|
||||
this.fulltask = res;
|
||||
console.log('GetTask', res);
|
||||
|
||||
let thedate = new Date(this.task.CreateDate);
|
||||
this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
|
||||
@@ -195,7 +204,7 @@ export class ExpedientePrPage implements OnInit {
|
||||
window.history.back();
|
||||
} finally {
|
||||
if(error.status == 0) {
|
||||
this.toastService.badRequest('Não é possível vizualizar este processo no modo offline')
|
||||
this.toastService.badRequest('Não é possível visualizar este processo no modo offline')
|
||||
} else {
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
}
|
||||
@@ -203,9 +212,18 @@ export class ExpedientePrPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
getAttachments(serialNumber){
|
||||
console.log(serialNumber);
|
||||
|
||||
this.attachmentsService.getAttachmentsBySerial(serialNumber).subscribe(res=>{
|
||||
this.attachments = res;
|
||||
console.log('res', res);
|
||||
});
|
||||
}
|
||||
|
||||
async LoadRelatedEvents(serial: string) {
|
||||
if (this.eventsList == null) {
|
||||
this.attachments.getAttachmentsBySerial(serial).subscribe(res => {
|
||||
this.attachmentsService.getAttachmentsBySerial(serial).subscribe(res => {
|
||||
console.log(res);
|
||||
res.forEach(att => {
|
||||
if (this.eventsList == null) {
|
||||
@@ -230,6 +248,48 @@ export class ExpedientePrPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
attachDocument(){
|
||||
this.getDoc();
|
||||
}
|
||||
|
||||
async getDoc() {
|
||||
const modal = await this.modalController.create({
|
||||
component: SearchPage,
|
||||
cssClass: 'modal-width-100-width-background modal',
|
||||
componentProps: {
|
||||
type: 'AccoesPresidenciais & ArquivoDespachoElect',
|
||||
showSearchInput: true,
|
||||
select: true
|
||||
}
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
if(res){
|
||||
const data = res.data;
|
||||
this.documents.push(data.selected);
|
||||
console.log( this.documents);
|
||||
this.documents.forEach(element =>{
|
||||
let body = {
|
||||
"Source": "1",
|
||||
"SourceId": element.Id,
|
||||
"SourceTitle": element.Assunto,
|
||||
"SerialNumber": this.task.SerialNumber,
|
||||
"ApplicationId": element.ApplicationType
|
||||
}
|
||||
this.attachmentsService.setEventAttachmentById(body).subscribe((res)=>{
|
||||
this.getAttachments(this.task.SerialNumber);
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
removeAttachment(index: number){
|
||||
this.documents = this.documents.filter( (e, i) => index != i);
|
||||
}
|
||||
|
||||
openMenu() {
|
||||
this.menu.open();
|
||||
this.modalController.dismiss();
|
||||
@@ -291,7 +351,7 @@ export class ExpedientePrPage implements OnInit {
|
||||
if( window.innerWidth < 801){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
classs = 'add-note-modal'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
|
||||
@@ -40,12 +40,12 @@ export class ExpedientesPrPage implements OnInit {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
const location = window.location
|
||||
const pathname = location.pathname + location.search
|
||||
|
||||
|
||||
this.LoadList();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
@@ -82,7 +82,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocumentsQty": element.totalDocuments,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
|
||||
@@ -33,13 +33,14 @@ import { ExpedientesPrPageModule } from 'src/app/shared/gabinete-digital/expedie
|
||||
import { DiplomasAssinarPageModule } from 'src/app/shared/gabinete-digital/diplomas-assinar/diplomas-assinar.module';
|
||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
|
||||
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
|
||||
FontAwesomeModule,
|
||||
GabineteDigitalPageRoutingModule,
|
||||
//
|
||||
HeaderPageModule,
|
||||
|
||||
@@ -8,140 +8,210 @@
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<div class="main-content d-flex height-100 ">
|
||||
<div class="main-content d-flex height-100">
|
||||
|
||||
<!-- Aside left -->
|
||||
<div class="aside-wrapper d-flex flex-column width-md-40 flex-grow-1 ">
|
||||
<div class="aside-wrapper d-flex flex-column width-md-40 flex-grow-1">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<div class="title-container">
|
||||
<ion-label class="title">Gabinete Digital</ion-label>
|
||||
<div class="title">
|
||||
<ion-label>Gabinete Digital</ion-label>
|
||||
</div>
|
||||
<button *ngIf="hideRefreshBtn" class="btn-no-color btn-refresh" (click)="doRefresh($event)">
|
||||
<ion-icon class="title-icon" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
<div *ngIf="!hideRefreshBtn" class="title-icons">
|
||||
<ion-segment [(ngModel)]="segmentVista" (ionChange)="onSegmentVistaChange()">
|
||||
<ion-segment-button value="listview" class="ion-segment-button-no-border">
|
||||
<fa-icon icon="stream"></fa-icon>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="boxview" class="ion-segment-button-no-border">
|
||||
<fa-icon icon="th-large"></fa-icon>
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</div>
|
||||
</div>
|
||||
<div [ngSwitch]="segmentVista" class="height-100">
|
||||
<!-- This is the list view -->
|
||||
|
||||
<div class="aside overflow-y-auto d-flex flex-wrap width-100">
|
||||
<div (click)="openEventsToApprovePage();selectedElement='approval'" [class.active]="selectedElement == 'approval'" class="exp-card d-flex flex-column" *ngIf="loggeduser.Profile == 'MDGPR'" >
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-agenda.svg"></ion-icon>
|
||||
<div *ngSwitchCase="'listview'" class="height-100">
|
||||
<ion-item-sliding class="overflow-y-auto height-100">
|
||||
<div class="listview">
|
||||
<ion-list *ngIf="allProcessesList">
|
||||
<div
|
||||
class="item-wrapper ion-no-padding cursor-pointer"
|
||||
*ngFor = "let task of allProcessesList"
|
||||
(click)="viewProcessDetails(task.SerialNumber, task.WorkflowName, task.activityInstanceName)">
|
||||
<div class="item width-100">
|
||||
<div class="item-top-detail">
|
||||
<div class="item-subject">
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
</div>
|
||||
<div *ngIf="task.DocumentsQty != 0" class="item-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label>{{task.DocumentsQty}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-middle-detail">
|
||||
<div class="item-remetente">
|
||||
<ion-label>{{task.Senders}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="task.Agenda" class="item-middle-detail">
|
||||
<div class="item-remetente">
|
||||
<ion-label>{{task.customDate}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="task.Agenda" class="item-middle-detail-extra">
|
||||
<div class="item-middle-detail-extra-text">
|
||||
<ion-label *ngIf=" task.WorkflowName == 'Agenda Oficial PR' || task.WorkflowName == 'Agenda Pessoal PR'">
|
||||
Agenda {{task.Agenda}} do Presidente da República
|
||||
</ion-label>
|
||||
<ion-label *ngIf=" task.WorkflowName == 'Agenda Oficial MDGPR' || task.WorkflowName == 'Agenda Pessoal MDGPR'">
|
||||
A sua agenda {{task.Agenda}}
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-bottom-detail d-flex align-items-center">
|
||||
<div class="item-workflow">
|
||||
<span class="label">{{task.activityInstanceName}}</span>
|
||||
</div>
|
||||
<div class="item-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yy' }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Eventos para Aprovação</p>
|
||||
<p class="text-center exp-card-content">{{eventoaprovacaostore.count}} <span class="title1">Documentos</span></p>
|
||||
</ion-item-sliding>
|
||||
</div>
|
||||
|
||||
<div [class.active]="selectedElement == 'Correspondence'" (click)="openExpedientListPage(); selectedElement='Correspondence'" class="exp-card d-flex flex-column justify-center" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-correspondencia.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Correspondencia</p>
|
||||
<p class="text-center exp-card-content">{{expedientegbstore.count}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<!-- <div [class.active]="selectedElement == 'Pending'" (click)="openPendentesPage(); selectedElement='Pending'" class="exp-card d-flex flex-column justify-center" > -->
|
||||
<div [class.active]="selectedElementF('Pending')" (click)="openPendentesPage(); selectedElement='Pending'" class="exp-card d-flex flex-column justify-center" >
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-pendente.svg"></ion-icon>
|
||||
</div>
|
||||
<p *ngIf="loggeduser.Profile == 'MDGPR'" class="text-center exp-card-title ">Pendentes</p>
|
||||
<p *ngIf="loggeduser.Profile == 'PR'" class="text-center exp-card-title ">Meus Pendentes</p>
|
||||
<p class="text-center exp-card-content"><span class="number">{{pendentesstore.count}} </span> <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div [class.active]="selectedElement == 'Dispatches'" class="exp-card d-flex flex-column justify-center" (click)="openDespachosPage(); selectedElement='Dispatches'" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Despachos</p>
|
||||
<p class="text-center exp-card-content">{{despachoStore.count}} <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
|
||||
<div (click)="openPedidosPage('parecer'); selectedElement='RequestsForOpinion'" [class.active]="selectedElement == 'RequestsForOpinion'" class="exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-parecer.svg"></ion-icon>
|
||||
</div>
|
||||
<p *ngIf="loggeduser.Profile == 'MDGPR'" class="text-center exp-card-title ">Pedidos de Parecer</p>
|
||||
<p *ngIf="loggeduser.Profile == 'PR'" class="text-center exp-card-title ">Pedidos de Parecer solicitados por mim</p>
|
||||
<p class="text-center exp-card-content">{{pedidosstore.countparecer}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div (click)="openPedidosPage('deferimento'); selectedElement = 'RequestForApproval'" [class.active]="selectedElement == 'RequestForApproval'" class="exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-deferimento.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Pedidos de Deferimento</p>
|
||||
<p class="text-center exp-card-content">{{pedidosstore.countdeferimento}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loggeduser.Profile == 'PR'" (click)="openExpedientesPrPage(); selectedElement = 'Expediente Presidente'" [class.active]="selectedElement == 'Expediente Presidente'" class="exp-card d-md-flex flex-column justify-center white-background">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="exp-card-title " *ngIf="loggeduser.Profile == 'MDGPR'">Expediente Presidente</p>
|
||||
<p class="exp-card-title " *ngIf="loggeduser.Profile == 'PR'">Expediente</p>
|
||||
<p class="text-center exp-card-content"><span class="number">{{expedienteprstore.count}} </span> <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loggeduser.Profile == 'PR'" (click)="openDespachosPrPage(); selectedElement='DispatchesPr'" [class.active]="selectedElement == 'DispatchesPr'" class="exp-card d-md-flex flex-column justify-center" >
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'MDGPR'">Despacho do Presidente da República</p>
|
||||
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'PR'">Despachos criados por mim</p>
|
||||
<p class="text-center exp-card-content">{{ despachoprstore.count }} <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="p.userRole(['MDGPR'])" (click)="openExpedientesPrPage(); selectedElement='ExpedientesPr'" [class.active]="selectedElement == 'ExpedientesPr'" class="exp-card-long justify-center width-100 white-background">
|
||||
<div class="center-div">
|
||||
<div class="exp-card-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="exp-card-text">
|
||||
<p class="exp-card-title " *ngIf="loggeduser.Profile == mdgpr">Expediente Presidente</p>
|
||||
<p class="exp-card-title " *ngIf="loggeduser.Profile == pr">Expediente</p>
|
||||
<p class="exp-card-content"><span class="number">{{expedienteprstore.count}} </span> <span class="title1">Documentos</span> </p>
|
||||
<!-- This is the box view -->
|
||||
<div *ngSwitchCase="'boxview'" class="aside overflow-y-auto d-flex flex-wrap width-100 height-100">
|
||||
<div (click)="openEventsToApprovePage();selectedElement='approval'" [class.active]="selectedElement == 'approval'" class="exp-card d-flex flex-column" *ngIf="loggeduser.Profile == 'MDGPR'" >
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-agenda.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Eventos para Aprovação</p>
|
||||
<p class="text-center exp-card-content">{{eventoaprovacaostore.count}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDespachosPrPage(); selectedElement='showDespachosPr'" [class.active]="selectedElement == 'showDespachosPr'" class="exp-card-long width-100" >
|
||||
<div class="center-div">
|
||||
<div class="exp-card-icon">
|
||||
<div [class.active]="selectedElement == 'Correspondence'" (click)="openExpedientListPage(); selectedElement='Correspondence'" class="exp-card d-flex flex-column justify-center" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-correspondencia.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Correspondencia</p>
|
||||
<p class="text-center exp-card-content">{{expedientegbstore.count}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<!-- <div [class.active]="selectedElement == 'Pending'" (click)="openPendentesPage(); selectedElement='Pending'" class="exp-card d-flex flex-column justify-center" > -->
|
||||
<div [class.active]="selectedElementF('Pending')" (click)="openPendentesPage(); selectedElement='Pending'" class="exp-card d-flex flex-column justify-center" >
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-pendente.svg"></ion-icon>
|
||||
</div>
|
||||
<p *ngIf="loggeduser.Profile == 'MDGPR'" class="text-center exp-card-title ">Pendentes</p>
|
||||
<p *ngIf="loggeduser.Profile == 'PR'" class="text-center exp-card-title ">Meus Pendentes</p>
|
||||
<p class="text-center exp-card-content"><span class="number">{{pendentesstore.count}} </span> <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div [class.active]="selectedElement == 'Dispatches'" class="exp-card d-flex flex-column justify-center" (click)="openDespachosPage(); selectedElement='Dispatches'" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="exp-card-text">
|
||||
<p class="exp-card-title">Despacho do Presidente da República</p>
|
||||
<p class="text-center exp-card-content">{{ despachoprstore.count }} <span class="title1">Documentos</span> </p>
|
||||
<p class="text-center exp-card-title ">Despachos</p>
|
||||
<p class="text-center exp-card-content">{{despachoStore.count}} <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
|
||||
<div (click)="openPedidosPage('parecer'); selectedElement='RequestsForOpinion'" [class.active]="selectedElement == 'RequestsForOpinion'" class="exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-parecer.svg"></ion-icon>
|
||||
</div>
|
||||
<p *ngIf="loggeduser.Profile == 'MDGPR'" class="text-center exp-card-title ">Pedidos de Parecer</p>
|
||||
<p *ngIf="loggeduser.Profile == 'PR'" class="text-center exp-card-title ">Pedidos de Parecer solicitados por mim</p>
|
||||
<p class="text-center exp-card-content">{{pedidosstore.countparecer}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div (click)="openPedidosPage('deferimento'); selectedElement = 'RequestForApproval'" [class.active]="selectedElement == 'RequestForApproval'" class="exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-deferimento.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Pedidos de Deferimento</p>
|
||||
<p class="text-center exp-card-content">{{pedidosstore.countdeferimento}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loggeduser.Profile == 'PR'" (click)="openExpedientesPrPage(); selectedElement = 'Expediente Presidente'" [class.active]="selectedElement == 'Expediente Presidente'" class="exp-card d-md-flex flex-column justify-center white-background">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="exp-card-title " *ngIf="loggeduser.Profile == 'MDGPR'">Expediente Presidente</p>
|
||||
<p class="exp-card-title " *ngIf="loggeduser.Profile == 'PR'">Expediente</p>
|
||||
<p class="text-center exp-card-content"><span class="number">{{expedienteprstore.count}} </span> <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loggeduser.Profile == 'PR'" (click)="openDespachosPrPage(); selectedElement='DispatchesPr'" [class.active]="selectedElement == 'DispatchesPr'" class="exp-card d-md-flex flex-column justify-center" >
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'MDGPR'">Despacho do Presidente da República</p>
|
||||
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'PR'">Despachos criados por mim</p>
|
||||
<p class="text-center exp-card-content">{{ despachoprstore.count }} <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="p.userRole(['MDGPR'])" (click)="openExpedientesPrPage(); selectedElement='ExpedientesPr'" [class.active]="selectedElement == 'ExpedientesPr'" class="exp-card-long justify-center width-100 white-background">
|
||||
<div class="center-div">
|
||||
<div class="exp-card-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="exp-card-text">
|
||||
<p class="exp-card-title " *ngIf="loggeduser.Profile == mdgpr">Expediente Presidente</p>
|
||||
<p class="exp-card-title " *ngIf="loggeduser.Profile == pr">Expediente</p>
|
||||
<p class="exp-card-content"><span class="number">{{expedienteprstore.count}} </span> <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDespachosPrPage(); selectedElement='showDespachosPr'" [class.active]="selectedElement == 'showDespachosPr'" class="exp-card-long width-100" >
|
||||
<div class="center-div">
|
||||
<div class="exp-card-icon">
|
||||
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="exp-card-text">
|
||||
<p class="exp-card-title">Despacho do Presidente da República</p>
|
||||
<p class="text-center exp-card-content">{{ despachoprstore.count }} <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'MDGPR' ">Diplomas por Validar</p>
|
||||
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'PR'">Diplomas por Assinar</p>
|
||||
<p class="text-center exp-card-content">{{count_dip_pv}} <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDiplomasPage('assinados'); selectedElement='DiplomasAssinados'" [class.active]="selectedElement == 'DiplomasAssinados'" class="exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-diplomas-assinados-presidente.svg"></ion-icon>
|
||||
<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>
|
||||
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'MDGPR' ">Diplomas por Validar</p>
|
||||
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'PR'">Diplomas por Assinar</p>
|
||||
<p class="text-center exp-card-content">{{count_dip_pv}} <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'MDGPR'">Diplomas assinados PR</p>
|
||||
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'PR'" >Diplomas</p>
|
||||
<p class="text-center exp-card-content">{{ count_dip_as_pr }} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loggeduser.Profile == 'PR'" (click)="openDiplomasAssinarPage(); selectedElement='DiplomasAssinar'" [class.active]="selectedElement == 'DiplomasAssinar'" 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 *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDiplomasPage('assinados'); selectedElement='DiplomasAssinados'" [class.active]="selectedElement == 'DiplomasAssinados'" class="exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-diplomas-assinados-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'MDGPR'">Diplomas assinados PR</p>
|
||||
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'PR'" >Diplomas</p>
|
||||
<p class="text-center exp-card-content">{{ count_dip_as_pr }} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
<p class="text-center exp-card-title">Diplomas para Assinar</p>
|
||||
<p class="text-center exp-card-content">{{count_dip_as}} <span class="title1">Documentos</span></p>
|
||||
|
||||
<div *ngIf="loggeduser.Profile == 'PR'" (click)="openDiplomasAssinarPage(); selectedElement='DiplomasAssinar'" [class.active]="selectedElement == 'DiplomasAssinar'" 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>
|
||||
<p class="text-center exp-card-title">Diplomas para Assinar</p>
|
||||
<p class="text-center exp-card-content">{{count_dip_as}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Aside right -->
|
||||
|
||||
@@ -4,7 +4,22 @@ ion-content{
|
||||
--padding-start:15px; */
|
||||
/* --padding-bottom:15px; */
|
||||
/* --background:#ecf8ff; */
|
||||
--background: transparent;
|
||||
--background: #ecf8ff;
|
||||
}
|
||||
ion-segment{
|
||||
overflow: auto;
|
||||
}
|
||||
ion-segment-button{
|
||||
margin: 0 auto !important;
|
||||
padding: 0 !important;
|
||||
|
||||
--padding-bottom: 0px;
|
||||
--padding-top: 5px;
|
||||
--margin-bottom: 5px;
|
||||
--margin-top: 0px;
|
||||
|
||||
min-height: 25px;
|
||||
min-width: 25px;
|
||||
}
|
||||
:host{
|
||||
// background: #0782c9;
|
||||
@@ -12,8 +27,17 @@ ion-content{
|
||||
text-align: center;
|
||||
}
|
||||
.title-container{
|
||||
background:#ecf8ff;
|
||||
padding: 30px 20px 15px 20px !important;
|
||||
//margin-bottom: 15px;
|
||||
border-top-left-radius: 25px;
|
||||
border-top-right-radius: 25px;
|
||||
|
||||
.title{
|
||||
width: fit-content;
|
||||
font-size: 25px !important;
|
||||
float: left;
|
||||
}
|
||||
.btn-no-color{
|
||||
display: flex;
|
||||
float: right;
|
||||
@@ -24,6 +48,14 @@ ion-content{
|
||||
font-size: 30px;
|
||||
color: #42b9fe;
|
||||
}
|
||||
.title-icons{
|
||||
width: fit-content;
|
||||
float: right !important;
|
||||
align-self: baseline;
|
||||
}
|
||||
.title-icons fa-icon{
|
||||
font-size: 25px !important;
|
||||
}
|
||||
}
|
||||
|
||||
ion-card{
|
||||
@@ -87,16 +119,20 @@ ion-content{
|
||||
font-family: Roboto;
|
||||
margin: 0 auto;
|
||||
background:#ecf8ff;
|
||||
overflow:auto;
|
||||
overflow:hidden;
|
||||
padding: 0 !important;
|
||||
|
||||
border-top-left-radius: 25px;
|
||||
border-top-right-radius: 25px;
|
||||
|
||||
.aside-wrapper{
|
||||
//border: 1px solid red;
|
||||
overflow: hidden;
|
||||
.listview{
|
||||
width: 100%t;
|
||||
padding: 0px 20px 15px 20px !important;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.aside{
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -204,6 +240,143 @@ ion-content{
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* New list view CSS */
|
||||
ion-list{
|
||||
background: transparent;
|
||||
}
|
||||
.item-wrapper{
|
||||
border-radius: 15px;
|
||||
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07);
|
||||
border:1px solid #e9e9e9 !important;
|
||||
background-color: #fff !important;
|
||||
margin-bottom: 10px !important;
|
||||
padding: 15px;
|
||||
|
||||
.item{
|
||||
background-color: var(--white);
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
|
||||
.item-top-detail{
|
||||
width: 100%;
|
||||
float: left;
|
||||
font-family: Roboto;
|
||||
font-size: 12pt;
|
||||
font-weight: 700;
|
||||
color: #0d89d1;
|
||||
padding-left: 3px;
|
||||
|
||||
.item-subject{
|
||||
width: 84%;
|
||||
float: left;
|
||||
|
||||
ion-label{
|
||||
margin: 0 !important;
|
||||
padding: 2.5px 10.5px 2.5px 10.5px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-icon{
|
||||
width: fit-content;
|
||||
float: right;
|
||||
/* font-size: 13px; */
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
|
||||
ion-icon{
|
||||
font-size: 12pt;
|
||||
color: #42b9fe;
|
||||
float: left;
|
||||
}
|
||||
label{
|
||||
font-size: 10pt;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-middle-detail{
|
||||
font-size: 10pt;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
padding-left: 3px;
|
||||
//border: 1px solid red;
|
||||
margin: 0 !important;
|
||||
|
||||
.item-remetente{
|
||||
//width: 200px;
|
||||
font-family: Roboto;
|
||||
/* font-size: 13px; */
|
||||
font-weight: normal;
|
||||
color: #000000;
|
||||
float: left;
|
||||
/* border: 1px solid red; */
|
||||
|
||||
ion-label{
|
||||
padding: 2.5px 10.5px 2.5px 10.5px;
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-middle-detail-extra{
|
||||
font-size: 10pt;
|
||||
padding-left: 3px;
|
||||
//border: 1px solid red;
|
||||
|
||||
.item-middle-detail-extra-text{
|
||||
//border: 1px solid blue;
|
||||
|
||||
ion-label{
|
||||
padding: 2.5px 10.5px 2.5px 10.5px;
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-bottom-detail{
|
||||
font-size: 12pt;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
margin-top: 10px;
|
||||
padding-bottom: 0 !important;
|
||||
|
||||
.item-workflow{
|
||||
float: left;
|
||||
margin: 0 !important;
|
||||
align-self: flex-start;
|
||||
|
||||
|
||||
.label{
|
||||
border-radius: 15px;
|
||||
background: #ffb703;
|
||||
/* font-size: 12px; */
|
||||
float: right;
|
||||
padding: 2.5px 13.5px 2.5px 13.5px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.item-date{
|
||||
width: auto;
|
||||
font-family: Roboto;
|
||||
font-size: 10pt;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
font-style: normal;
|
||||
line-height: normal;
|
||||
letter-spacing: normal;
|
||||
color: #797979;
|
||||
text-align: right;
|
||||
flex-grow: 1;
|
||||
|
||||
ion-label{
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-middle-detail, .item-bottom-detail{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (min-width: 561px) {
|
||||
.exp-card-long{
|
||||
@@ -218,16 +391,24 @@ ion-content{
|
||||
|
||||
|
||||
@media only screen and (min-width: 701px) {
|
||||
ion-content{
|
||||
--background: transparent;
|
||||
}
|
||||
.title{
|
||||
font-size: 15px !important;
|
||||
}
|
||||
|
||||
.main-content{
|
||||
border-top-left-radius: 25px;
|
||||
border-top-right-radius: 25px;
|
||||
overflow: hidden;
|
||||
|
||||
.aside-wrapper{
|
||||
display: flex;
|
||||
width: 35%;
|
||||
justify-content: flex-start !important;
|
||||
border-right: 1px solid #d8d8d8;
|
||||
overflow: hidden;
|
||||
|
||||
.aside{
|
||||
background:transparent;
|
||||
@@ -329,7 +510,7 @@ ion-content{
|
||||
}
|
||||
@media only screen and (min-width: 801px) {
|
||||
.title{
|
||||
font-size: 25px;
|
||||
font-size: 25px !important;
|
||||
}
|
||||
.content{
|
||||
width: 65%;
|
||||
|
||||
@@ -21,6 +21,7 @@ import { PedidosStore } from 'src/app/store/pedidos-store.service';
|
||||
import { ExpedienteprStore } from 'src/app/store/expedientepr-store.service';
|
||||
import { DespachosprStore } from 'src/app/store/despachospr-store.service';
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
@Component({
|
||||
selector: 'app-gabinete-digital',
|
||||
templateUrl: './gabinete-digital.page.html',
|
||||
@@ -30,9 +31,13 @@ import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
segment:string;
|
||||
segmentVista:string;
|
||||
showLoader: boolean;
|
||||
public profile:string;
|
||||
|
||||
allProcessesList: any = new Array();
|
||||
skeletonLoader: boolean;
|
||||
|
||||
count_exp_dailywork=0;
|
||||
count_exp_pr =0
|
||||
count_desp_dailywork=0;
|
||||
@@ -103,13 +108,16 @@ export class GabineteDigitalPage implements OnInit {
|
||||
authService: AuthService,
|
||||
public p: PermissionService
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
window.onresize = (event) => {
|
||||
// if not mobile remove all component
|
||||
if( window.innerWidth <= 801){
|
||||
if( window.innerWidth <= 701){
|
||||
this.modalController.dismiss();
|
||||
this.segmentVista = "listview";
|
||||
}
|
||||
else{
|
||||
this.segmentVista = "boxview";
|
||||
}
|
||||
};
|
||||
this.checkRoutes();
|
||||
@@ -126,6 +134,13 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
if( window.innerWidth < 701) {
|
||||
this.segmentVista = "listview";
|
||||
}
|
||||
else{
|
||||
this.segmentVista = "boxview";
|
||||
}
|
||||
|
||||
const pathname = window.location.pathname
|
||||
this.LoadCounts();
|
||||
|
||||
@@ -140,6 +155,144 @@ export class GabineteDigitalPage implements OnInit {
|
||||
});
|
||||
|
||||
this.hideRefreshButton();
|
||||
this.loadAllProcesses();
|
||||
}
|
||||
|
||||
async loadAllProcesses(){
|
||||
let allProcessesList = await this.processesbackend.GetTasksList("", false).toPromise();
|
||||
console.log(allProcessesList);
|
||||
|
||||
this.skeletonLoader = true;
|
||||
|
||||
this.allProcessesList = [];
|
||||
|
||||
allProcessesList.forEach(element => {
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": element.totalDocuments,
|
||||
"DocId": element.workflowInstanceDataFields.DispatchDocId,
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
"Agenda": element.workflowInstanceDataFields.Agenda,
|
||||
"customDate": this.setFormatDate(new Date(element.workflowInstanceDataFields.StartDate), new Date(element.workflowInstanceDataFields.EndDate), element.workflowInstanceDataFields.IsAllDayEvent),
|
||||
}
|
||||
this.allProcessesList.push(task);
|
||||
this.allProcessesList = removeDuplicate( this.allProcessesList)
|
||||
this.allProcessesList = this.sortArrayISODate(this.allProcessesList).reverse();
|
||||
});
|
||||
//this.pendentesstore.reset(this.allProcessesList);
|
||||
this.skeletonLoader = false;
|
||||
|
||||
}
|
||||
|
||||
sortArrayISODate(myArray: any){
|
||||
return myArray.sort(function(a, b) {
|
||||
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
||||
});
|
||||
}
|
||||
|
||||
setFormatDate(start:any, end:any, allday:boolean){
|
||||
let customDate;
|
||||
/* start = new Date();
|
||||
end= new Date("2021-08-04T18:01:04.753Z"); */
|
||||
//end = new Date("2021-09-04T18:01:04.753Z");
|
||||
|
||||
const totalSeconds = Math.floor((end - (start))/1000);;
|
||||
const totalMinutes = Math.floor(totalSeconds/60);
|
||||
const totalHours = Math.floor(totalMinutes/60);
|
||||
const totalDays = Math.floor(totalHours/24);
|
||||
|
||||
const hours = totalHours - ( totalDays * 24 );
|
||||
const minutes = totalMinutes - ( totalDays * 24 * 60 ) - ( hours * 60 );
|
||||
const seconds = totalSeconds - ( totalDays * 24 * 60 * 60 ) - ( hours * 60 * 60 ) - ( minutes * 60 );
|
||||
|
||||
let diffDays = totalDays;
|
||||
let diffMinutes = minutes;
|
||||
|
||||
console.log(allday);
|
||||
if(totalDays == 0){
|
||||
if(allday){
|
||||
customDate = this.getCustomDate(start)+", "+this.getCustomHours(start)+" (todo dia)";
|
||||
console.log(customDate);
|
||||
return customDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
//customDate = this.getCustomDate(start)+","+this.getCustomHours(start)+" ("+minutes+" mins)";
|
||||
customDate = this.getCustomDate(start)+", "+this.getCustomHours(start)+" | "+this.getCustomHours(end);
|
||||
return customDate;
|
||||
}
|
||||
}
|
||||
else{
|
||||
customDate = this.getCustomDate(start)+","+this.getCustomHours(start)+
|
||||
" (termina:"+ this.getCustomDate(end)+","+this.getCustomHours(end)+")";
|
||||
return customDate;
|
||||
}
|
||||
}
|
||||
|
||||
getCustomDate(thedate: Date){
|
||||
return (thedate.getDay()+1) + "/" +
|
||||
(thedate.getMonth()+1) + "/" +
|
||||
thedate.getFullYear();
|
||||
}
|
||||
getCustomHours(thedate: Date){
|
||||
return thedate.getHours() + ":" +
|
||||
thedate.getMinutes();
|
||||
}
|
||||
|
||||
viewProcessDetails(serialNumber:string, workflowName:string, activityName:string){
|
||||
if(workflowName == 'Despacho') {
|
||||
if(activityName == 'Tarefa de Despacho'){
|
||||
this.router.navigate(['/home/gabinete-digital/despachos',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
}
|
||||
else if(workflowName == 'Despacho do Presidente da República') {
|
||||
if(activityName == 'Tarefa de Despacho'){
|
||||
this.router.navigate(['/home/gabinete-digital/despachos-pr',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
else if(activityName == 'Revisar Diploma' || activityName == 'Assinar Diploma'){
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
else if(activityName == 'Diploma Assinado'){
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
}
|
||||
else if(workflowName == 'Pedido de Parecer' || workflowName == 'Pedido de Deferimento') {
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
else if(workflowName == 'Expediente') {
|
||||
this.router.navigate(['/home/gabinete-digital/expediente',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
else if(workflowName == 'Expediente do Presidente' && this.loggeduser.Profile == 'PR') {
|
||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
else if (workflowName == "Pedido de Parecer do Presidente") {
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
/* else if (workflowName == "Expediente") {
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
||||
} */
|
||||
else if(workflowName == 'Agenda Pessoal PR' || workflowName == 'Agenda Oficial PR' || workflowName == 'Agenda Oficial MDGPR' || workflowName == 'Agenda Pessoal MDGPR') {
|
||||
this.router.navigate(['/home/gabinete-digital/event-list/approve-event',serialNumber, 'gabinete-digital']);
|
||||
}
|
||||
else {
|
||||
console.log('cant find page for this task')
|
||||
}
|
||||
}
|
||||
|
||||
onSegmentVistaChange(){
|
||||
|
||||
}
|
||||
|
||||
checkUser(){
|
||||
|
||||
@@ -24,6 +24,8 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ForwardPage } from 'src/app/modals/forward/forward.page';
|
||||
import { async } from '@angular/core/testing';
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
import { Location } from '@angular/common';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-pedido',
|
||||
@@ -61,6 +63,7 @@ export class PedidoPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
public p: PermissionService,
|
||||
private location: Location
|
||||
) {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
@@ -91,7 +94,7 @@ export class PedidoPage implements OnInit {
|
||||
toDateString(e) {
|
||||
return new Date(e).toDateString()
|
||||
}
|
||||
|
||||
|
||||
async LoadTaskDetail(serial: string) {
|
||||
this.processes.GetTask(this.serialnumber).subscribe(res => {
|
||||
|
||||
@@ -167,7 +170,7 @@ export class PedidoPage implements OnInit {
|
||||
window.history.back();
|
||||
} finally {
|
||||
if(error.status == 0) {
|
||||
this.toastService.badRequest('Não é possível vizualizar este processo no modo offline')
|
||||
this.toastService.badRequest('Não é possível visualizar este processo no modo offline')
|
||||
} else {
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
}
|
||||
@@ -449,7 +452,7 @@ export class PedidoPage implements OnInit {
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
classs = 'add-note-modal'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
@@ -491,8 +494,9 @@ export class PedidoPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
||||
if (window.innerWidth <= 800) {
|
||||
this.location.back();
|
||||
/* if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
||||
if (window.innerWidth <= 700) {
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
}
|
||||
else {
|
||||
@@ -509,7 +513,7 @@ export class PedidoPage implements OnInit {
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (window.innerWidth <= 800) {
|
||||
if (window.innerWidth <= 700) {
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos']);
|
||||
}
|
||||
else {
|
||||
@@ -524,7 +528,7 @@ export class PedidoPage implements OnInit {
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
</div>
|
||||
|
||||
<div [ngSwitch]="segment">
|
||||
<div *ngSwitchCase="'parecer'" class="d-flex height-100 align-center justify-content-center" >
|
||||
<div *ngSwitchCase="'parecer'" class="centered-div d-flex height-100 align-center justify-content-center" >
|
||||
<div
|
||||
*ngIf="!skeletonLoader && pedidosstorage.listparecer.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
@@ -125,7 +125,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngSwitchCase="'deferimento'" class="d-flex height-100 align-center justify-content-center">
|
||||
<div *ngSwitchCase="'deferimento'" class="centered-div d-flex height-100 align-center justify-content-center">
|
||||
<div
|
||||
*ngIf="!skeletonLoader && pedidosstorage.listdeferimento.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
|
||||
@@ -38,7 +38,7 @@ ion-content, .header-2, .main-content{
|
||||
}
|
||||
.ion-item-class{
|
||||
padding: 0;
|
||||
|
||||
|
||||
}
|
||||
.label-text{
|
||||
width: 100%;
|
||||
@@ -87,7 +87,7 @@ ion-item{
|
||||
.div-icon ion-icon{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
|
||||
|
||||
}
|
||||
.div-content-expediente p, .div-content-pendentes p{
|
||||
font-size: 14pt;
|
||||
@@ -167,7 +167,7 @@ ion-item{
|
||||
.exp-workflow{
|
||||
float: left;
|
||||
margin: 0 !important;
|
||||
|
||||
|
||||
.label{
|
||||
border-radius: 15px;
|
||||
background: #ffb703;
|
||||
@@ -230,4 +230,13 @@ ion-item{
|
||||
font-size: 45px;
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.centered-div{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin: -35px 0 0 -35px;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class PendentesPage implements OnInit {
|
||||
|
||||
async LoadList(){
|
||||
|
||||
this.skeletonLoader = true
|
||||
this.skeletonLoader = true;
|
||||
|
||||
let pendentes = await this.processes.GetPendingTasks(false).toPromise();
|
||||
this.pendentesList = [];
|
||||
|
||||
Reference in New Issue
Block a user