mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
add popup message
This commit is contained in:
+3
-3
@@ -1,7 +1,7 @@
|
||||
<ion-content class="container-wrapper">
|
||||
<div class="main-content d-flex height-100 overflow-hidden">
|
||||
|
||||
<app-task-details
|
||||
<app-task-details
|
||||
*ngIf="task"
|
||||
[task]=task
|
||||
[intervenientes]=intervenientes
|
||||
@@ -12,7 +12,7 @@
|
||||
(goBack)= goBack()
|
||||
(viewDocument)=viewDocument($event)
|
||||
class="content d-flex flex-column"
|
||||
|
||||
|
||||
></app-task-details>
|
||||
|
||||
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="solid"></div>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button (click)="openAddNoteModal('Arquivo')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<!-- <div class="solid"></div> -->
|
||||
</div>
|
||||
<div class="buttons">
|
||||
|
||||
+52
-29
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, PopoverController } from '@ionic/angular';
|
||||
import { ModalController, PopoverController, ToastController } from '@ionic/angular';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { momentG } from 'src/plugin/momentG';
|
||||
|
||||
@@ -17,6 +17,7 @@ import { CreateProcessPage } from 'src/app/modals/create-process/create-process.
|
||||
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
import { TinyMCEPage } from 'src/app/tiny-mce/tiny-mce.page';
|
||||
import { PopupQuestionPage } from 'src/app/modals/popup-question/popup-question.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-diploma-assinar',
|
||||
@@ -50,7 +51,8 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
private despachoService: DespachoService,
|
||||
public TaskService: TaskService
|
||||
public TaskService: TaskService,
|
||||
private toastController: ToastController
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
@@ -103,7 +105,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
|
||||
this.processes.GetTask(serial).subscribe(res => {
|
||||
this.TaskService.loadDiplomas();
|
||||
|
||||
|
||||
this.task = {
|
||||
"SerialNumber": res.serialNumber,
|
||||
"Folio": res.workflowInstanceDataFields.Subject,
|
||||
@@ -149,7 +151,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
this.cc = users.filter(user=>{
|
||||
return user.Type == 'CC';
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
this.getDocumentDetails(this.task.FolderId, '361');
|
||||
@@ -207,8 +209,8 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
getDocumentDetails(forlderId:string, applicationId:string) {
|
||||
this.processes.GetDocumentDetails(forlderId,applicationId).subscribe(res=>{
|
||||
this.attachments = res.Documents;
|
||||
|
||||
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -242,32 +244,53 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
}
|
||||
|
||||
async AssinarDraft() {
|
||||
let body = {
|
||||
"InstanceId": this.task.InstanceID,
|
||||
"FolderId": this.task.FolderID,
|
||||
"DraftIds": this.DraftIds,
|
||||
"OriginalFileName": this.DraftNames
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
|
||||
try {
|
||||
await this.processes.presidentialActionsSignature(body).toPromise()
|
||||
const modal = await this.modalController.create({
|
||||
component: PopupQuestionPage,
|
||||
componentProps: {
|
||||
title: 'Deseja assinar este Diploma?',
|
||||
message: 'Nota: Ao Efetuar esta operação, o tratamento deste diploma não poderá ser realizado a partir da caixa de correspondência'
|
||||
},
|
||||
cssClass: "popup-question discart-expedient-modal",
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
await this.Assinar();
|
||||
this.TaskService.loadDiplomas();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
const data = res.data
|
||||
if(data == "Yes") {
|
||||
let body = {
|
||||
"InstanceId": this.task.InstanceID,
|
||||
"FolderId": this.task.FolderID,
|
||||
"DraftIds": this.DraftIds,
|
||||
"OriginalFileName": this.DraftNames
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
|
||||
try {
|
||||
await this.processes.presidentialActionsSignature(body).toPromise()
|
||||
|
||||
await this.Assinar();
|
||||
this.TaskService.loadDiplomas();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName: string) {
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
classs = 'modal modal-desktop'
|
||||
@@ -363,7 +386,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
|
||||
|
||||
|
||||
if (res['data'] == 'openDiscart') {
|
||||
await this.distartExpedientModal();
|
||||
@@ -376,7 +399,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
}
|
||||
|
||||
async distartExpedientModal() {
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
@@ -392,7 +415,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
modal.onDidDismiss().then(res => {
|
||||
if (res['data'] == 'close') {
|
||||
this.close();
|
||||
/*
|
||||
/*
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user