mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
Fix merge
This commit is contained in:
+2
-1
@@ -23,6 +23,7 @@
|
||||
<platform name="android">
|
||||
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application android:networkSecurityConfig="@xml/network_security_config" />
|
||||
<application android:requestLegacyExternalStorage="true" />
|
||||
</edit-config>
|
||||
<resource-file src="resources/android/xml/network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" />
|
||||
<allow-intent href="market:*" />
|
||||
@@ -134,7 +135,7 @@
|
||||
</mfp:windows10>
|
||||
<mfp:appChecksum>0</mfp:appChecksum>
|
||||
</mfp:windows>
|
||||
<mfp:platformVersion>8.0.0.00-20210308-063916</mfp:platformVersion>
|
||||
<mfp:platformVersion>8.0.0.00-20210214-154410</mfp:platformVersion>
|
||||
<mfp:clientCustomInit enabled="false" />
|
||||
<mfp:server runtime="mfp" url="http://gpr-dev-10.gabinetedigital.local:9080" />
|
||||
<mfp:serverUri url="" />
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<p>
|
||||
<ion-button class="button-edit-event cursor-pointer" shape="round" (click)="emendarTask()">Adicionar Nota</ion-button>
|
||||
</p>
|
||||
<p>
|
||||
<ion-button class="button-approve cursor-pointer" shape="round" (click)="approveTask()">Aprovar</ion-button>
|
||||
</p>
|
||||
</ion-item>
|
||||
<ion-item lines="none">
|
||||
<p>
|
||||
<ion-button class="button-discart-event cursor-pointer" shape="round" (click)="deleteTask()">Rejeitar</ion-button>
|
||||
</p>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
<ion-content class="container">
|
||||
<div class="arrow-right" (click)="closePopover()">
|
||||
<button class="btn-no-color">
|
||||
<ion-icon slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button class="btn-cancel" shape="round" (click)="emendarTask()">Adicionar Nota</button>
|
||||
<button class="btn-ok" shape="round" (click)="approveTask()">Aprovar</button>
|
||||
<div class="solid"></div>
|
||||
<button class="btn-cancel" shape="round" (click)="editTask()">Editar</button>
|
||||
<button class="btn-delete" shape="round" (click)="deleteTask()">Rejeitar</button>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -1,24 +1,58 @@
|
||||
.button-edit-event {
|
||||
/* width: 140px; */
|
||||
height: 44px;
|
||||
border-radius: 22.5px;
|
||||
--background: #e0e9ee;
|
||||
--color:#061b52;
|
||||
.container{
|
||||
--padding-top:20px !important;
|
||||
--padding-bottom:20px !important;
|
||||
--padding-start:20px !important;
|
||||
--padding-end:20px !important;
|
||||
}
|
||||
.button-options {
|
||||
height: 44px;
|
||||
--color: #42b9fe;
|
||||
.arrow-right{
|
||||
display: none;
|
||||
margin-bottom: 20px;
|
||||
.arrow-right-icon{
|
||||
width: 37px;
|
||||
float: right;
|
||||
font-size: 35px;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.button-approve {
|
||||
/* width: 140px; */
|
||||
height: 44px;
|
||||
border-radius: 22.5px;
|
||||
--background: #42b9fe;
|
||||
.buttons{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
}
|
||||
.button-discart-event {
|
||||
/* width: 140px; */
|
||||
height: 44px;
|
||||
border-radius: 22.5px;
|
||||
--background: #d30a0a;
|
||||
--color:#fff;
|
||||
.solid {
|
||||
display: none;
|
||||
width: 90%;
|
||||
border-top: 5px solid #bbb;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
.btn-ok, .btn-cancel{
|
||||
//width: 50% !important;
|
||||
justify-content: center;
|
||||
margin-bottom: 10px !important;
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
@media only screen and (max-width: 800px) {
|
||||
.btn-ok, .btn-cancel, .btn-delete{
|
||||
width: 47% !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1024px) {
|
||||
.arrow-right{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.btn-cancel{
|
||||
display: none;
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
.btn-delete, .btn-ok{
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
/* .solid{
|
||||
display: block;
|
||||
} */
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { EditEventToApproveComponent } from 'src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-actions-popover',
|
||||
@@ -9,16 +10,25 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
||||
styleUrls: ['./event-actions-popover.page.scss'],
|
||||
})
|
||||
export class EventActionsPopoverPage implements OnInit {
|
||||
serialNumber:string;
|
||||
instanceId: string;
|
||||
|
||||
constructor(private navParams: NavParams,
|
||||
constructor(
|
||||
private navParams: NavParams,
|
||||
private processes:ProcessesService,
|
||||
private router:Router,
|
||||
private modalController: ModalController,
|
||||
private popoverController: PopoverController,) {
|
||||
/* this.serialNumber = this.navParams.get('serialNumber'); */
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.instanceId = this.navParams.get('InstanceId');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
window.onresize = (event) => {
|
||||
if( window.innerWidth >= 800){
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
};
|
||||
}
|
||||
closePopover(){
|
||||
this.popoverController.dismiss();
|
||||
@@ -41,5 +51,25 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
deleteTask(){
|
||||
|
||||
}
|
||||
async editTask() {
|
||||
console.log(this.serialNumber);
|
||||
console.log(this.instanceId);
|
||||
const modal = await this.modalController.create({
|
||||
component: EditEventToApproveComponent,
|
||||
componentProps: {
|
||||
serialNumber: this.serialNumber,
|
||||
InstanceId: this.instanceId
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
// backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<div class="content">
|
||||
<ion-list>
|
||||
<ion-item class="cursor-pointer" lines="none" *ngFor = "let task of expedientList"
|
||||
(click)="viewExpedientDetail(task.serialNumber)">
|
||||
(click)="goToExpediente(task.serialNumber)">
|
||||
<div class="item-exp d-flex">
|
||||
<div class="schedule-date">
|
||||
<div class="time-end">{{task.taskStartDate | date: 'dd-MM-yy'}}</div>
|
||||
|
||||
@@ -320,6 +320,15 @@ export class EventsPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
goToExpediente(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/expediente/expediente-detail'], navigationExtras);
|
||||
}
|
||||
|
||||
async viewExpedientDetail(serialNumber:any) {
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
|
||||
+12
-8
@@ -41,7 +41,11 @@
|
||||
<div class="upper-content d-flex width-100">
|
||||
<div class="content-location d-flex justify-between width-100">
|
||||
<div class="location-detail flex-grow-1">
|
||||
<ion-label >{{loadedEvent.workflowInstanceDataFields.Location}}</ion-label>
|
||||
<div *ngIf="loadedEvent.workflowInstanceDataFields.Location">
|
||||
<ion-label>
|
||||
{{loadedEvent.workflowInstanceDataFields.Location}}
|
||||
</ion-label>
|
||||
</div>
|
||||
<div class="content-details">
|
||||
<ion-label>
|
||||
<p>1 {{customDate}}</p>
|
||||
@@ -57,14 +61,15 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="middle-content">
|
||||
<div *ngIf="loadedEvent.workflowInstanceDataFields.Participants" class="middle-content">
|
||||
<div *ngIf="loadedEvent.workflowInstanceDataFields.Participants">
|
||||
<h5>Intervenientes</h5>
|
||||
<div *ngFor="let att of loadedEvent.workflowInstanceDataFields.ParticipantsList">
|
||||
<ion-label>{{att.Name}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div *ngIf="loadedEvent.workflowInstanceDataFields.Body">
|
||||
<h5>Detalhes</h5>
|
||||
<ion-item lines="none" class="ion-no-padding ion-no-margin">
|
||||
<div [innerHTML]="loadedEvent.workflowInstanceDataFields.Body"></div>
|
||||
@@ -74,17 +79,16 @@
|
||||
|
||||
<div class="d-flex container-div width-100" >
|
||||
<ion-list class="width-100 " >
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-item class="width-100" *ngFor="let document of loadedAttachments">
|
||||
<ion-label class="width-100 d-block list">
|
||||
<ion-label
|
||||
(click)="viewDocument(document.SourceId, document.ApplicationId)"
|
||||
class="width-100 d-block list">
|
||||
<p class="d-flex ion-justify-content-between">
|
||||
<span class="attach-title-item">{{document.SourceName}}</span>
|
||||
<span class="app-name" *ngIf="document.ApplicationId == 8"> Correspondencia </span>
|
||||
<span class="app-name" *ngIf="document.ApplicationId == 386"> AccoesPresidenciais </span>
|
||||
<span class="app-name" *ngIf="document.ApplicationId == 361 "> ArquivoDespachoElect </span>
|
||||
<span class="close-button text-black" >
|
||||
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
||||
</span>
|
||||
|
||||
</p>
|
||||
<p><span class="span-left">{{document.Stakeholders}}</span><span class="span-right"> {{document.CreateDate | date: 'dd-MM-yy'}} </span></p>
|
||||
</ion-label>
|
||||
|
||||
+13
@@ -10,6 +10,7 @@ import { BadRequestComponent } from 'src/app/shared/popover/bad-request/bad-requ
|
||||
import { SuccessMessageComponent } from 'src/app/shared/popover/success-message/success-message.component';
|
||||
import { EmendMessageModalPage } from '../../../agenda/emend-message-modal/emend-message-modal.page';
|
||||
import { EventActionsPopoverPage } from '../../../agenda/event-actions-popover/event-actions-popover.page';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event-modal',
|
||||
@@ -38,6 +39,7 @@ export class ApproveEventModalPage implements OnInit {
|
||||
private menu: MenuController,
|
||||
private alertService: AlertService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private iab: InAppBrowser,
|
||||
) {
|
||||
|
||||
|
||||
@@ -82,6 +84,14 @@ export class ApproveEventModalPage implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
viewDocument(docId:string, applicationId:string){
|
||||
this.processes.GetDocumentUrl(docId, applicationId).subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
});
|
||||
}
|
||||
|
||||
approveTask(serialNumber:string){
|
||||
console.log('approveTask SERIALNUMBER: ', serialNumber)
|
||||
@@ -119,6 +129,9 @@ export class ApproveEventModalPage implements OnInit {
|
||||
|
||||
async getAttachments() {
|
||||
this.loadedAttachments = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise();
|
||||
|
||||
console.log(this.loadedAttachments);
|
||||
|
||||
}
|
||||
|
||||
async openOptions(ev:any) {
|
||||
|
||||
@@ -42,6 +42,11 @@
|
||||
<div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-true">
|
||||
<ion-icon src="assets/images/icons-edit.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="menu-ptions">
|
||||
<button class="btn-no-color" (click)="openOptions(loadedEvent)">
|
||||
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="upper-content d-flex flex-column">
|
||||
<div class="content-location">
|
||||
|
||||
@@ -206,6 +206,9 @@ ion-menu{
|
||||
.div-icon{
|
||||
display: none;
|
||||
}
|
||||
.menu-ptions{
|
||||
display: none;
|
||||
}
|
||||
.content{
|
||||
width: 65%;
|
||||
border-right: 1px solid #d8d8d8;
|
||||
|
||||
@@ -73,7 +73,11 @@ export class ApproveEventPage implements OnInit {
|
||||
"eventos": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
if( window.innerWidth < 801){
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
} else {
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
}
|
||||
|
||||
async getTask(){
|
||||
@@ -135,9 +139,13 @@ export class ApproveEventPage implements OnInit {
|
||||
async openOptions(ev:any) {
|
||||
const popover = await this.popoverController.create({
|
||||
component: EventActionsPopoverPage,
|
||||
cssClass: 'event-actions-popover',
|
||||
cssClass: 'events-options',
|
||||
event: ev,
|
||||
translucent: true
|
||||
translucent: true,
|
||||
componentProps:{
|
||||
serialNumber: ev.serialNumber,
|
||||
InstanceId: ev.workflowInstanceDataFields.InstanceId,
|
||||
},
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
@@ -7,12 +7,14 @@ import { IonicModule } from '@ionic/angular';
|
||||
import { EventListPageRoutingModule } from './event-list-routing.module';
|
||||
|
||||
import { EventListPage } from './event-list.page';
|
||||
import { SharedModule } from 'src/app/shared/shared.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
SharedModule,
|
||||
EventListPageRoutingModule
|
||||
],
|
||||
declarations: [EventListPage]
|
||||
|
||||
@@ -1,39 +1,41 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<div class="header-content">
|
||||
<div class="header-icon-left">
|
||||
<button class="btn-no-color cursor-pointer" (click)="close()">
|
||||
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="header-title">
|
||||
<label>Eventos para Aprovação</label>
|
||||
</div>
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="profile">
|
||||
<ion-segment-button value="MDGPR">
|
||||
Seu calendário
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="PR">
|
||||
Presidente da República
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
</div>
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div [ngSwitch]="profile">
|
||||
<div class="main-content d-flex height-100" [ngSwitch]="segment">
|
||||
<div class="content d-flex flex-column">
|
||||
<div class="header-content">
|
||||
<div class="header-icon-left">
|
||||
<button class="btn-no-color cursor-pointer" (click)="goBack()">
|
||||
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="header-title">
|
||||
<label>Eventos para Aprovação</label>
|
||||
</div>
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="segment">
|
||||
<ion-segment-button value="MDGPR">
|
||||
Seu calendário
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="PR">
|
||||
Presidente da República
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
</div>
|
||||
|
||||
<ion-list *ngSwitchCase="'MDGPR'">
|
||||
<div *ngIf="eventsMDGPRList">
|
||||
<ion-list>
|
||||
<ion-item-sliding>
|
||||
<ion-item class="Rectangle cursor-pointer" lines="none"
|
||||
*ngFor="let event of eventsMDGPRList" (click)="openApproveModal(event.serialNumber, event)">
|
||||
*ngFor="let event of eventsMDGPRList" (click)="goToEventDetail(event)">
|
||||
|
||||
<div class="content-mdgpr-{{event.workflowInstanceDataFields.Agenda}} width-100">
|
||||
<div class="approve-event-time">
|
||||
@@ -72,4 +74,5 @@
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
|
||||
:host{
|
||||
@import '~src/function.scss';
|
||||
.main-content{
|
||||
background-color: #fff !important;
|
||||
border-top-left-radius: 25px;
|
||||
border-top-right-radius: 25px;
|
||||
}
|
||||
.content{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
float: left;
|
||||
}
|
||||
.header-content{
|
||||
margin: 0 !important;
|
||||
|
||||
@@ -3,9 +3,9 @@ import { EventBody } from 'src/app/models/eventbody.model';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { Event } from 'src/app/models/event.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { ApproveEventModalPage } from './approve-event-modal/approve-event-modal.page';
|
||||
import { NavigationEnd, Router } from '@angular/router';
|
||||
import { NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-list',
|
||||
@@ -14,6 +14,7 @@ import { NavigationEnd, Router } from '@angular/router';
|
||||
})
|
||||
export class EventListPage implements OnInit {
|
||||
profile:string;
|
||||
segment:string;
|
||||
showLoader: boolean;
|
||||
eventsPRList: any;
|
||||
eventsMDGPRList: any;
|
||||
@@ -27,18 +28,10 @@ export class EventListPage implements OnInit {
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private router: Router,
|
||||
private navParams: NavParams,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.profile = this.navParams.get('profile');
|
||||
|
||||
/* console.log(this.navParams.get('md')); */
|
||||
if(this.profile == "mdgpr"){
|
||||
this.profile = 'MDGPR'
|
||||
} else {
|
||||
this.profile = 'PR'
|
||||
}
|
||||
this.segment = 'MDGPR';
|
||||
|
||||
this.LoadToApproveEvents();
|
||||
|
||||
@@ -71,8 +64,6 @@ export class EventListPage implements OnInit {
|
||||
}
|
||||
|
||||
async openApproveModal(eventSerialNumber, event){
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ApproveEventModalPage,
|
||||
componentProps:{
|
||||
@@ -81,12 +72,30 @@ export class EventListPage implements OnInit {
|
||||
cssClass: 'event-list cal-modal modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
|
||||
}
|
||||
|
||||
goToEventDetail(eventToAprove){
|
||||
let InstanceId;
|
||||
|
||||
if(!eventToAprove.workflowInstanceDataFields.hasOwnProperty('InstanceId')){
|
||||
InstanceId = ''
|
||||
} else {
|
||||
InstanceId =eventToAprove.workflowInstanceDataFields.InstanceId
|
||||
}
|
||||
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": eventToAprove.serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/event-list/approve-event'], navigationExtras)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
doRefresh(event) {
|
||||
this.LoadToApproveEvents();
|
||||
console.log('refresh');
|
||||
@@ -97,6 +106,9 @@ export class EventListPage implements OnInit {
|
||||
close(){
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
goBack(){
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,39 +1,40 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<app-btn-modal-dismiss></app-btn-modal-dismiss>
|
||||
<div class="title">
|
||||
<ion-label >Correspondência</ion-label>
|
||||
</div>
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
<ion-segment-button value="expedientes">
|
||||
Expedientes
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="pendentes">
|
||||
Pendentes
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher-content
|
||||
pullingIcon="chevron-down-circle-outline"
|
||||
pullingText="deslize para actualizar"
|
||||
refreshingSpinner="circles"
|
||||
refreshingText="A actualizar...">
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div class="main-content d-flex height-100" [ngSwitch]="segment">
|
||||
<div class="content d-flex flex-column width-100">
|
||||
<div class="header-content">
|
||||
<div class="header-icon-left">
|
||||
<button class="btn-no-color cursor-pointer" (click)="goBack()">
|
||||
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="header-title">
|
||||
<label>Expediente</label>
|
||||
</div>
|
||||
<div class="btn-refresh">
|
||||
<button class="btn-no-color" (click)="doRefresh()">
|
||||
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="width-100" [ngSwitch]="segment" *ngIf="taskslist">
|
||||
<ion-list *ngSwitchCase="'expedientes'">
|
||||
<ion-item
|
||||
class="expediente ion-no-padding"
|
||||
<div class="width-100" *ngIf="taskslist">
|
||||
|
||||
<ion-list>
|
||||
<div
|
||||
class="expediente cursor-pointer"
|
||||
*ngFor = "let task of taskslist"
|
||||
(click)="viewExpedientDetail(task.SerialNumber)"
|
||||
(click)="goToExpediente(task.SerialNumber)"
|
||||
>
|
||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||
<div class="item width-100">
|
||||
<div class="exp-top-detail">
|
||||
<div class="exp-top-detail width-100">
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yy' }}</ion-label>
|
||||
</div>
|
||||
@@ -49,33 +50,7 @@
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
<ion-list *ngSwitchCase="'pendentes'">
|
||||
<ion-item
|
||||
class="expediente ion-no-padding"
|
||||
*ngFor = "let task of taskslist"
|
||||
(click)="viewExpedientDetail(task.SerialNumber)"
|
||||
>
|
||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||
<div class="item width-100">
|
||||
<div class="exp-top-detail">
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yy' }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-remetente">
|
||||
<ion-label>{{task.Remetente}}</ion-label>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-bottom-detail">
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
<div *ngIf="!taskslist">
|
||||
@@ -103,5 +78,7 @@
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
|
||||
@@ -1,30 +1,42 @@
|
||||
@import '~src/function.scss';
|
||||
/* CONTENT */
|
||||
:host{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
.main-content{
|
||||
background-color: #fff !important;
|
||||
border-top-left-radius: 25px;
|
||||
border-top-right-radius: 25px;
|
||||
}
|
||||
.title{
|
||||
.content{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
float: left;
|
||||
}
|
||||
.header-content{
|
||||
margin: 0 !important;
|
||||
overflow: auto;
|
||||
|
||||
.header-icon-left{
|
||||
width: 36px;
|
||||
font-size: 33px;
|
||||
color: #42b9fe;
|
||||
float: left;
|
||||
}
|
||||
.header-title{
|
||||
padding-top: 2.5px;
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
color:#000;
|
||||
overflow: auto;
|
||||
float: left;
|
||||
}
|
||||
.item-list-small{
|
||||
font-size: 11px;
|
||||
overflow: auto;
|
||||
}
|
||||
.ion-item-class{
|
||||
padding: 0;
|
||||
|
||||
}
|
||||
.label-text{
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
.btn-refresh {
|
||||
width: fit-content;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
//DIV
|
||||
ion-item{
|
||||
border: 1px solid blue;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
--background: none;
|
||||
}
|
||||
.item {
|
||||
@@ -92,6 +104,7 @@ ion-item{
|
||||
/* New CSS */
|
||||
.expediente{
|
||||
padding-top: 10px;
|
||||
border-bottom: 1px solid #ebebeb;
|
||||
}
|
||||
.exp-list-item{
|
||||
//width: 368px;
|
||||
@@ -100,7 +113,6 @@ ion-item{
|
||||
margin: 10px auto;
|
||||
}
|
||||
.exp-top-detail{
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
.exp-date{
|
||||
@@ -126,7 +138,7 @@ ion-item{
|
||||
|
||||
}
|
||||
.exp-icon{
|
||||
width: 45px;
|
||||
width: fit-content;
|
||||
float: right;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
|
||||
import { DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { LoadingService } from 'src/app/services/loading.service';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { ExpedienteDetailPage } from './expediente-detail/expediente-detail.page';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente',
|
||||
@@ -17,79 +18,65 @@ import { ExpedienteDetailPage } from './expediente-detail/expediente-detail.page
|
||||
export class ExpedientePage implements OnInit {
|
||||
|
||||
segment:string;
|
||||
profile:string;
|
||||
showLoader: boolean;
|
||||
//profile:string;
|
||||
|
||||
@ViewChild(CalendarComponent) myCal: CalendarComponent;
|
||||
|
||||
taskslist:DailyWorkTask[];
|
||||
serialNumber:string;
|
||||
|
||||
@Input() profile:string;
|
||||
@Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private alertService: AlertService,
|
||||
private router: Router,
|
||||
) {
|
||||
this.profile = this.navParams.get('profile');
|
||||
this.profile = 'mdgpr';
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "expedientes";
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
segmentChanged(){
|
||||
console.log(this.segment);
|
||||
this.LoadList();
|
||||
notImplemented(){
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
openExpedientDetailPage(data){
|
||||
console.log(data);
|
||||
this.openExpedientDetail.emit(data);
|
||||
}
|
||||
|
||||
LoadList(){
|
||||
switch(this.segment){
|
||||
case "expedientes":
|
||||
this.processes.GetTasksList("Expediente", false).subscribe(result => {
|
||||
console.log(result);
|
||||
this.taskslist = new Array();
|
||||
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Active");
|
||||
res.forEach(element => {
|
||||
let task: DailyWorkTask = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.originator.email,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
console.log(this.taskslist);
|
||||
});
|
||||
break;
|
||||
case "pendentes":
|
||||
this.processes.GetTasksList("Expediente", false).subscribe(result => {
|
||||
console.log(result);
|
||||
this.taskslist = new Array();
|
||||
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Pending");
|
||||
res.forEach(element => {
|
||||
let task: DailyWorkTask = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.originator.email,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
console.log(this.taskslist);
|
||||
});
|
||||
break;
|
||||
}
|
||||
this.showLoader = true;
|
||||
this.processes.GetTasksList("Expediente", false).subscribe(result => {
|
||||
console.log(result);
|
||||
this.taskslist = new Array();
|
||||
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Active");
|
||||
res.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: DailyWorkTask = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.originator.email,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
console.log(this.taskslist);
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
@@ -100,17 +87,29 @@ export class ExpedientePage implements OnInit {
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
goBack(){
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
}
|
||||
|
||||
goToExpediente(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/expediente/expediente-detail'], navigationExtras);
|
||||
}
|
||||
|
||||
async viewExpedientDetail(serialNumber:any) {
|
||||
|
||||
|
||||
console.log(this.profile);
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedienteDetailPage,
|
||||
componentProps:{
|
||||
enterAnimation: "",
|
||||
serialNumber: serialNumber,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
|
||||
<div class="aside overflow-y-auto d-flex flex-wrap width-100">
|
||||
<div [class.active]="selectedElement == 'approval'" (click)="openEventsToApprovePage('MDGPR');selectedElement='approval'" class="exp-card d-flex flex-column" *ngIf="loggeduser.Profile == 'MDGPR'" >
|
||||
<div (click)="openEventsToApprovePage('MDGPR');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>
|
||||
|
||||
@@ -263,11 +263,12 @@ export class GabineteDigitalPage implements OnInit {
|
||||
console.log(profile);
|
||||
|
||||
this.closeAllDesktopComponents();
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"eventos": true,}};
|
||||
if( window.innerWidth <= 800){
|
||||
this.openEventsToApproveList(profile);
|
||||
//this.openEventsToApproveList(profile);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
else{
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"eventos": true,}};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
this.showEventsToApprove = true;
|
||||
}
|
||||
@@ -296,7 +297,8 @@ export class GabineteDigitalPage implements OnInit {
|
||||
openExpedientListPage() {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800) {
|
||||
this.openExpedientList();
|
||||
//this.openExpedientList();
|
||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
}
|
||||
else {
|
||||
this.selectedElement='Correspondence'
|
||||
|
||||
@@ -30,6 +30,11 @@
|
||||
margin-bottom: 5px !important;
|
||||
margin-top: 5px !important;
|
||||
}
|
||||
@media only screen and (max-width: 800px) {
|
||||
.btn-ok, .btn-cancel, .btn-delete{
|
||||
width: 47% !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1024px) {
|
||||
.arrow-right{
|
||||
display: flex;
|
||||
|
||||
@@ -34,8 +34,13 @@ export class OptsExpedientePage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.task);
|
||||
|
||||
this.profile = "mdgpr";
|
||||
|
||||
window.onresize = (event) => {
|
||||
if( window.innerWidth >= 800){
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
close(){
|
||||
|
||||
@@ -297,6 +297,11 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent-
|
||||
border-bottom:none !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 800px){
|
||||
.btn-refresh{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.hideAsideOptions{
|
||||
@media only screen and (max-width: 800px) {
|
||||
|
||||
@@ -291,6 +291,15 @@
|
||||
max-height: 90px;
|
||||
min-height: 90px;
|
||||
}
|
||||
.events-options .popover-content{
|
||||
width: 100% !important;
|
||||
left: 0 !important;
|
||||
bottom: 0 !important;
|
||||
right: 0 !important;
|
||||
top: calc(100% - 190px) !important;
|
||||
max-height: 190px;
|
||||
min-height: 190px;
|
||||
}
|
||||
.exp-options .popover-content{
|
||||
width: 100% !important;
|
||||
left: 0 !important;
|
||||
|
||||
Reference in New Issue
Block a user