mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Edit process to approve
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
<div class="header-title flex-grow-1">
|
||||
<label>{{loadedEvent.workflowInstanceDataFields.Subject}}</label>
|
||||
</div>
|
||||
<div (click)="notImplemented()" class="header-icon-right display-none-{{showAside}}">
|
||||
<div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-{{showAside}}">
|
||||
<ion-icon src="assets/images/icons-edit.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
@@ -129,7 +129,6 @@
|
||||
<ion-icon name="ellipsis-vertical-outline"></ion-icon>
|
||||
</ion-menu-button>
|
||||
<button class="btn-ok" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</button>
|
||||
<button full class="btn-cancel" shape="round" (click)="editar(loadedEvent.serialNumber)" >Editar</button>
|
||||
<button hidden class="btn-delete" shape="round" (click)="rejectTask(loadedEvent.serialNumber)">Rejeitar</button>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -180,9 +180,10 @@ export class ApproveEventComponent implements OnInit {
|
||||
|
||||
async editar(serialNumber: string) {
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: EditEventToApproveComponent,
|
||||
componentProps:{
|
||||
componentProps: {
|
||||
serialNumber: serialNumber,
|
||||
InstanceId:this.InstanceId
|
||||
},
|
||||
@@ -193,7 +194,8 @@ export class ApproveEventComponent implements OnInit {
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
|
||||
this.getTask();
|
||||
this.getAttachments();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<ion-item
|
||||
class="item ion-no-padding width-100 cursor-pointer"
|
||||
*ngFor="let event of eventsMDGPRList"
|
||||
(click)="openApproveModal(event.serialNumber)">
|
||||
(click)="openApproveModal(event.serialNumber, event)">
|
||||
<div class="event-mdgpr-{{event.workflowInstanceDataFields.Agenda}} width-100">
|
||||
<div class="approve-event-time">
|
||||
<p>{{event.workflowInstanceDataFields.StartDate | date: 'hh:mm'}}</p>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<ion-content>
|
||||
<!-- Edit event for Inicio -->
|
||||
<div class="main-content height-100">
|
||||
<div class="main-content height-100 d-flex">
|
||||
|
||||
<div class="content d-flex flex-column width-md-100 height-100">
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
<div class="ion-item-container width-100">
|
||||
<ion-input placeholder="Assunto" [(ngModel)]="eventProcess.workflowInstanceDataFields.Subject"></ion-input>
|
||||
</div>
|
||||
{{eventProcess.workflowInstanceDataFields.Subject}}
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
@@ -150,7 +149,7 @@
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people cursor-pointer" (click)="addParticipants();showAttendees=true">
|
||||
<div class="add-people cursor-pointer" (click)="addParticipants()">
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
@@ -171,7 +170,7 @@
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people cursor-pointer" (click)="addParticipantsCC();showAttendees=true">
|
||||
<div class="add-people cursor-pointer" (click)="addParticipantsCC()">
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
@@ -189,23 +188,23 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="d-flex container-div width-100" *ngFor="let document of loadedEventAttachments" >
|
||||
<ion-list class="width-100 list" >
|
||||
<ion-item class="width-100">
|
||||
<ion-label class="width-100">
|
||||
<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" (click)="deleteAttachment(document.Id)" >
|
||||
<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>
|
||||
</ion-item>
|
||||
<div class="d-flex container-div width-100" >
|
||||
<ion-list class="width-100 " >
|
||||
<ion-item class="width-100" *ngFor="let document of loadedAttachments">
|
||||
<ion-label 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" (click)="deleteAttachment(document.Id)" >
|
||||
<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>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
@@ -217,13 +216,13 @@
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <app-attendee-modal class="aside-right flex-column height-100 d-none d-md-flex pt-10"
|
||||
<app-attendee-modal class="aside-right flex-column height-100 d-none d-md-flex pt-10"
|
||||
*ngIf="showAttendees"
|
||||
[taskParticipants]="taskParticipants"
|
||||
[taskParticipantsCc]="taskParticipantsCc"
|
||||
[adding]="adding"
|
||||
(dynamicSetIntervenient)="dynamicSetIntervenient($event)"
|
||||
></app-attendee-modal> -->
|
||||
></app-attendee-modal>
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content{
|
||||
margin: 0;
|
||||
float: left;
|
||||
border-left: 1px solid #d8d8d8 !important;
|
||||
}
|
||||
.content {
|
||||
margin: 0;
|
||||
float: left;
|
||||
border-right: 1px solid #d8d8d8 !important;
|
||||
}
|
||||
.main-header{
|
||||
font-family: Roboto;
|
||||
background-color: #fff;
|
||||
|
||||
@@ -29,7 +29,8 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
Agenda: '',
|
||||
EndDate: '',
|
||||
Location: '',
|
||||
Subject: ''
|
||||
Subject: '',
|
||||
InstanceId: ''
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,17 +64,12 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
) {
|
||||
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.postEvent = this.navParams.get('event');
|
||||
this.profile = this.navParams.get('profile');
|
||||
this.InstanceId = this.navParams.get('InstanceId')
|
||||
// this.profile = this.navParams.get('profile');
|
||||
|
||||
this.isEventEdited = false;
|
||||
|
||||
console.log(this.eventProcess.workflowInstanceDataFields.Subject)
|
||||
|
||||
|
||||
this.getTask()
|
||||
this.getAttachments()
|
||||
|
||||
}
|
||||
|
||||
@@ -90,7 +86,11 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
|
||||
this.eventProcess.workflowInstanceDataFields.Body = body
|
||||
this.Location = this.eventProcess.workflowInstanceDataFields.Location
|
||||
|
||||
|
||||
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
||||
this.getAttachments()
|
||||
|
||||
|
||||
// attendees
|
||||
//this.eventProcess.workflowInstanceDataFields.ParticipantsList
|
||||
// subject
|
||||
@@ -121,10 +121,6 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -147,7 +143,6 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
|
||||
this.eventProcess.workflowInstanceDataFields.ParticipantsList = this.taskParticipants.concat(this.taskParticipantsCc)
|
||||
|
||||
|
||||
}
|
||||
|
||||
async openAttendees() {
|
||||
@@ -178,6 +173,8 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
this.setIntervenientCC(newAttendeesCC);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.showAttendees = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,6 +194,7 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
}
|
||||
|
||||
addParticipantsCC(){
|
||||
|
||||
this.adding = 'CC'
|
||||
this.openAttendees();
|
||||
}
|
||||
@@ -206,12 +204,11 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
this.taskParticipantsCc = taskParticipantsCc;
|
||||
}
|
||||
|
||||
|
||||
async getAttachments(){
|
||||
|
||||
async getAttachments() {
|
||||
this.loadedAttachments = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise();
|
||||
|
||||
console.log(this.loadedAttachments)
|
||||
|
||||
}
|
||||
|
||||
deleteAttachment(attachmentID: string) {
|
||||
@@ -235,18 +232,19 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then( async (res)=>{
|
||||
if(res){
|
||||
|
||||
|
||||
const data = res.data;
|
||||
|
||||
//data.selected
|
||||
const DocumentToSave = {
|
||||
SourceTitle: data.selected.Assunto,
|
||||
ParentId: this.postEvent.EventId,
|
||||
ParentId: this.InstanceId,
|
||||
Source: '1',
|
||||
SourceId: data.selected.Id,
|
||||
ApplicationId: data.selected.ApplicationType.toString(),
|
||||
Id: '0',
|
||||
Id: '',
|
||||
Link: '',
|
||||
SerialNumber: '',
|
||||
SerialNumber: ''
|
||||
};
|
||||
|
||||
await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{
|
||||
|
||||
Reference in New Issue
Block a user