mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer
This commit is contained in:
Generated
+18
-8
@@ -2531,6 +2531,17 @@
|
|||||||
"schema-utils": "^3.0.0",
|
"schema-utils": "^3.0.0",
|
||||||
"serialize-javascript": "^5.0.1",
|
"serialize-javascript": "^5.0.1",
|
||||||
"webpack-sources": "^1.4.3"
|
"webpack-sources": "^1.4.3"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"glob-parent": {
|
||||||
|
"version": "5.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
||||||
|
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is-glob": "^4.0.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"has-flag": {
|
"has-flag": {
|
||||||
@@ -9911,9 +9922,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"glob-parent": {
|
"glob-parent": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
||||||
"integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
|
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"is-glob": "^4.0.1"
|
"is-glob": "^4.0.1"
|
||||||
@@ -19049,8 +19060,7 @@
|
|||||||
},
|
},
|
||||||
"ssri": {
|
"ssri": {
|
||||||
"version": "6.0.1",
|
"version": "6.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
|
"resolved": "",
|
||||||
"integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==",
|
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"figgy-pudding": "^3.5.1"
|
"figgy-pudding": "^3.5.1"
|
||||||
@@ -19676,9 +19686,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ws": {
|
"ws": {
|
||||||
"version": "7.4.5",
|
"version": "7.4.6",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.5.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz",
|
||||||
"integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g=="
|
"integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A=="
|
||||||
},
|
},
|
||||||
"xcode": {
|
"xcode": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
|
|||||||
+1
-1
@@ -67,7 +67,7 @@
|
|||||||
"socket.io-client": "^2.3.0",
|
"socket.io-client": "^2.3.0",
|
||||||
"tslib": "^2.0.0",
|
"tslib": "^2.0.0",
|
||||||
"wordcloud": "^1.1.2",
|
"wordcloud": "^1.1.2",
|
||||||
"ws": "^7.4.5",
|
"ws": "^7.4.6",
|
||||||
"zone.js": "~0.10.2"
|
"zone.js": "~0.10.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
<div class="list-people">
|
<div class="list-people">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-label *ngIf="taskParticipants.length == 0" class="list-people-title">Adicionar intervenientes</ion-label>
|
<ion-label *ngIf="taskParticipants.length < 1" class="list-people-title">Adicionar intervenientes</ion-label>
|
||||||
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
|
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
try {
|
try {
|
||||||
await this.processes.postDespatcho(this.postData).toPromise();
|
await this.processes.postDespatcho(this.postData).toPromise();
|
||||||
this.FinalizarDespacho();
|
this.FinalizarDespacho();
|
||||||
this.toastService.badRequest('Despacho criado');
|
this.toastService.successMessage('Despacho criado');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.toastService.badRequest('Processo não efectuado');
|
this.toastService.badRequest('Processo não efectuado');
|
||||||
}
|
}
|
||||||
@@ -220,6 +220,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await this.processes.postParecer(this.postData).toPromise();
|
await this.processes.postParecer(this.postData).toPromise();
|
||||||
|
|
||||||
this.FinalizarParecer();
|
this.FinalizarParecer();
|
||||||
this.toastService.successMessage('Pedido de Parecer criado');
|
this.toastService.successMessage('Pedido de Parecer criado');
|
||||||
}
|
}
|
||||||
@@ -342,23 +343,38 @@ export class CreateProcessPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async FinalizarDespacho() {
|
async FinalizarDespacho() {
|
||||||
let body = {
|
|
||||||
"serialNumber": this.task.serialNumber,
|
if(this.task.activityInstanceName =='Tarefa de Despacho' || this.task.activityInstanceName =='Reexecutar Despacho'){
|
||||||
"action": "Despacho",
|
let body = {
|
||||||
"ActionTypeId": 94,
|
"serialNumber": this.task.serialNumber,
|
||||||
"dataFields": {
|
"action": "Conhecimento",
|
||||||
"ReviewUserComment": '',
|
"ActionTypeId": 104,
|
||||||
},
|
"dataFields": {
|
||||||
"AttachmentList" :null,
|
"ReviewUserComment": '',
|
||||||
|
},
|
||||||
|
"AttachmentList" :null,
|
||||||
|
}
|
||||||
|
await this.processes.CompleteTask(body).toPromise();
|
||||||
|
}
|
||||||
|
else if(this.task.activityInstanceName =='Concluir Despacho'){
|
||||||
|
let body = {
|
||||||
|
"serialNumber": this.task.serialNumber,
|
||||||
|
"action": "Despacho",
|
||||||
|
"ActionTypeId": 94,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": '',
|
||||||
|
},
|
||||||
|
"AttachmentList" :null,
|
||||||
|
}
|
||||||
|
await this.processes.CompleteTask(body).toPromise();
|
||||||
}
|
}
|
||||||
await this.processes.CompleteTask(body).toPromise();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async FinalizarParecer() {
|
async FinalizarParecer() {
|
||||||
let body = {
|
let body = {
|
||||||
"serialNumber": this.task.serialNumber,
|
"serialNumber": this.task.serialNumber,
|
||||||
"action": "Parecer",
|
"action": "Parecer",
|
||||||
"ActionTypeId": 92,
|
"ActionTypeId": 96,
|
||||||
"dataFields": {
|
"dataFields": {
|
||||||
"ReviewUserComment": '',
|
"ReviewUserComment": '',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<ion-header class="ion-no-border px-20">
|
<ion-header class="ion-no-border px-20">
|
||||||
<ion-toolbar class="px-10">
|
<ion-toolbar class="px-10">
|
||||||
<ion-title class="pa-0">Adicionar intervenientes</ion-title>
|
<ion-title class="pa-0">Adicionar intervenientes - A.M.</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
<ion-searchbar class="attendee-search-bar" (ionChange)="onChange($event)" placeholder="Insira email para adicionar destinatário"></ion-searchbar><!-- [(ngModel)]="searchCountryString" -->
|
<ion-searchbar class="attendee-search-bar" (ionChange)="onChange($event)" placeholder="Insira email para adicionar destinatário"></ion-searchbar><!-- [(ngModel)]="searchCountryString" -->
|
||||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||||
|
|||||||
@@ -120,11 +120,11 @@ export class AttendeesPage implements OnInit {
|
|||||||
|
|
||||||
async selectContact(itm: EventPerson){
|
async selectContact(itm: EventPerson){
|
||||||
if(this.adding == "intervenient"){
|
if(this.adding == "intervenient"){
|
||||||
|
itm.IsRequired = true;
|
||||||
this.taskParticipants.push(itm);
|
this.taskParticipants.push(itm);
|
||||||
|
|
||||||
} else if (this.adding == "CC") {
|
} else if (this.adding == "CC") {
|
||||||
|
itm.IsRequired = false;
|
||||||
this.taskParticipantsCc.push(itm);
|
this.taskParticipantsCc.push(itm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
<ion-icon class="icon" slot="end" src="assets/images/icons-correspondencias.svg"></ion-icon>
|
<ion-icon class="icon" slot="end" src="assets/images/icons-correspondencias.svg"></ion-icon>
|
||||||
<div class="text">Correspondência por ler</div>
|
<div class="text">Correspondência por ler</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn-no-color cursor-pointer" (click)="viewExpedientListPage()">
|
<button (click)="viewExpedientListPage()" class="btn-no-color cursor-pointer">
|
||||||
<ion-icon class="icon-next" slot="end" src="assets/images/icons-arrow-circle-arrow-right.svg"></ion-icon>
|
<ion-icon class="icon-next" slot="end" src="assets/images/icons-arrow-circle-arrow-right.svg"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,41 +2,6 @@
|
|||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
<ion-menu autoHide="false" side="end" content-id="main-content">
|
|
||||||
<ion-header>
|
|
||||||
<ion-toolbar translucent>
|
|
||||||
<ion-title>Menu</ion-title>
|
|
||||||
</ion-toolbar>
|
|
||||||
</ion-header>
|
|
||||||
<ion-content>
|
|
||||||
<ion-list>
|
|
||||||
<ion-item (click)="openExpedientActionsModal('0',fulltask)">
|
|
||||||
<ion-icon name="documents" slot="start"></ion-icon>
|
|
||||||
<ion-label>Efectuar Despacho</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item (click)="openExpedientActionsModal('1',fulltask)">
|
|
||||||
<ion-icon name="arrow-undo" slot="start"></ion-icon>
|
|
||||||
<ion-label>Pedido de Parecer</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item (click)="openExpedientActionsModal('2',fulltask)">
|
|
||||||
<ion-icon name="arrow-redo" slot="start"></ion-icon>
|
|
||||||
<ion-label>Pedido de Deferimento</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item (click)="openBookMeetingModal(task)">
|
|
||||||
<ion-icon name="calendar" slot="start"></ion-icon>
|
|
||||||
<ion-label>Marcar reunião</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item hidden disabled>
|
|
||||||
<ion-icon name="paper-plane" slot="start"></ion-icon>
|
|
||||||
<ion-label>Enviar para pendentes</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
</ion-list>
|
|
||||||
</ion-content>
|
|
||||||
</ion-menu>
|
|
||||||
<div class="ion-page d-none" id="main-content">
|
|
||||||
<ion-menu-button></ion-menu-button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<div class="main-content d-flex height-100">
|
<div class="main-content d-flex height-100">
|
||||||
<div class="content d-flex flex-column" *ngIf="task">
|
<div class="content d-flex flex-column" *ngIf="task">
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<ion-header class="ion-no-border">
|
<ion-header class="ion-no-border">
|
||||||
<h4>Adicionar Intervenientes</h4>
|
<h4>Adicionar Intervenientes - TK</h4>
|
||||||
<ion-searchbar (ionChange)="onChange($event)" placeholder="Pesquisar"></ion-searchbar>
|
<ion-searchbar (ionChange)="onChange($event)" placeholder="Pesquisar"></ion-searchbar>
|
||||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|||||||
+1
-1
@@ -65,7 +65,7 @@
|
|||||||
<div class="list-people">
|
<div class="list-people">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-label *ngIf="taskParticipants.length == 0" class="list-people-title">Adicionar intervenientes</ion-label>
|
<ion-label *ngIf="taskParticipants.length < 1" class="list-people-title">Adicionar intervenientes</ion-label>
|
||||||
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
|
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|||||||
+54
-75
@@ -21,6 +21,7 @@ import { User } from 'src/app/models/user.model';
|
|||||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
||||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
|
import { AttendeesPage } from 'src/app/pages/events/attendees/attendees.page';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-expedient-task-modal',
|
selector: 'app-expedient-task-modal',
|
||||||
@@ -249,10 +250,12 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
"Note": "",
|
"Note": "",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.taskResult = await this.processes.postParecer(this.postData).toPromise();
|
//this.taskResult = await this.processes.postParecer(this.postData).toPromise();
|
||||||
await this.toastService.successMessage('Processo efetuado', () =>{
|
await this.toastService.successMessage('Processo efetuado');
|
||||||
|
setInterval(()=>{
|
||||||
this.modalController.dismiss(action_parecer);
|
this.modalController.dismiss(action_parecer);
|
||||||
});
|
}, 7000);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await this.toastService.badRequest('Processo não efetuado')
|
await this.toastService.badRequest('Processo não efetuado')
|
||||||
}
|
}
|
||||||
@@ -368,88 +371,70 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async addParticipants() {
|
async openAttendees() {
|
||||||
/* console.log('HERES'); */
|
|
||||||
|
|
||||||
|
|
||||||
this.adding = "intervenient";
|
|
||||||
this.contacts = this.taskParticipants;
|
|
||||||
|
|
||||||
if(window.innerWidth <=800){
|
|
||||||
|
|
||||||
this.showAttendees=false;
|
|
||||||
|
|
||||||
|
if(window.innerWidth <= 1024) {
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: AddParticipantsModalPage,
|
component: AttendeesPage,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
eventPersons: this.participants
|
adding: this.adding,
|
||||||
|
taskParticipants: this.taskParticipants,
|
||||||
|
taskParticipantsCc: this.taskParticipantsCc
|
||||||
},
|
},
|
||||||
cssClass: 'add-participants-modal',
|
cssClass: 'attendee modal modal-desktop',
|
||||||
backdropDismiss: false
|
backdropDismiss: false
|
||||||
});
|
});
|
||||||
|
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then((res) => {
|
|
||||||
this.taskParticipants = res.data;
|
modal.onDidDismiss().then((data) => {
|
||||||
let newattendees: EventPerson[] = res['data'];
|
|
||||||
if(newattendees!= null){
|
if(data){
|
||||||
newattendees.forEach(newattendee => {
|
data = data['data'];
|
||||||
let att = {
|
|
||||||
'UserEmail': newattendee.EmailAddress,
|
const newAttendees: EventPerson[] = data['taskParticipants'];
|
||||||
'UserType': 'I',
|
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
|
||||||
};
|
|
||||||
if(this.participants == null){
|
this.setIntervenient(newAttendees);
|
||||||
this.participants = new Array();
|
this.setIntervenientCC(newAttendeesCC);
|
||||||
}
|
|
||||||
this.participants.push(att);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
this.postData.UsersSelected = this.participants;
|
|
||||||
console.log(this.postData);
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.showAttendees=true
|
this.showAttendees = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* setIntervenient(data){
|
||||||
|
this.taskParticipants = data;
|
||||||
|
//this.postData.UsersSelected = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
setIntervenientCC(data){
|
||||||
|
this.taskParticipantsCc = data;
|
||||||
|
} */
|
||||||
|
|
||||||
|
|
||||||
|
async setIntervenient(data) {
|
||||||
|
this.taskParticipants = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
async setIntervenientCC(data) {
|
||||||
|
this.taskParticipantsCc = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
async addParticipants() {
|
||||||
|
this.adding = 'intervenient'
|
||||||
|
this.openAttendees();
|
||||||
|
}
|
||||||
|
|
||||||
async addParticipantsCc() {
|
async addParticipantsCc() {
|
||||||
|
|
||||||
this.adding = "CC";
|
this.adding = "CC";
|
||||||
this.contacts = this.taskParticipantsCc;
|
this.openAttendees();
|
||||||
|
}
|
||||||
if(window.innerWidth <=800){
|
|
||||||
this.showAttendees=false;
|
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
|
||||||
component: AddParticipantsCcModalPage,
|
|
||||||
componentProps: {
|
|
||||||
eventPersons: this.participants
|
|
||||||
},
|
|
||||||
cssClass: 'add-participants-cc-modal',
|
|
||||||
backdropDismiss: false
|
|
||||||
});
|
|
||||||
await modal.present();
|
|
||||||
modal.onDidDismiss().then((res) => {
|
|
||||||
this.taskParticipantsCc = res.data;
|
|
||||||
let newattendees: EventPerson[] = res['data'];
|
|
||||||
if(newattendees!= null){
|
|
||||||
newattendees.forEach(newattendee => {
|
|
||||||
let att = {
|
|
||||||
'UserEmail': newattendee.EmailAddress,
|
|
||||||
'UserType': 'CC',
|
|
||||||
};
|
|
||||||
if(this.participants == null){
|
|
||||||
this.participants = new Array();
|
|
||||||
}
|
|
||||||
this.participants.push(att);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.postData.UsersSelected = this.participants;
|
|
||||||
console.log(this.postData);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.showAttendees=true
|
|
||||||
}
|
|
||||||
|
|
||||||
|
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}){
|
||||||
|
this.taskParticipants = taskParticipants;
|
||||||
|
this.taskParticipantsCc = taskParticipantsCc;
|
||||||
}
|
}
|
||||||
|
|
||||||
async distartExpedientModal() {
|
async distartExpedientModal() {
|
||||||
@@ -485,13 +470,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async setIntervenient(data) {
|
|
||||||
this.taskParticipants = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
async setIntervenientCC(data) {
|
|
||||||
this.taskParticipantsCc = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
async closeComponent() {
|
async closeComponent() {
|
||||||
this.showAttendees = false;
|
this.showAttendees = false;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<ion-header class="ion-no-border px-20">
|
<ion-header class="ion-no-border px-20">
|
||||||
<ion-toolbar class="px-10">
|
<ion-toolbar class="px-10">
|
||||||
<ion-title class="pa-0">Adicionar intervenientes</ion-title>
|
<ion-title class="pa-0">Adicionar intervenientes</ion-title>
|
||||||
|
<ion-title>Agenda Desktop</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
<ion-searchbar class="attendee-search-bar" (ionChange)="onChange($event)" placeholder="Insira email para adicionar destinatário"></ion-searchbar><!-- [(ngModel)]="searchCountryString" -->
|
<ion-searchbar class="attendee-search-bar" (ionChange)="onChange($event)" placeholder="Insira email para adicionar destinatário"></ion-searchbar><!-- [(ngModel)]="searchCountryString" -->
|
||||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { SearchPage } from 'src/app/pages/search/search.page';
|
|||||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||||
import { EventsService } from 'src/app/services/events.service';
|
import { EventsService } from 'src/app/services/events.service';
|
||||||
import { ProcessesService } from 'src/app/services/processes.service';
|
import { ProcessesService } from 'src/app/services/processes.service';
|
||||||
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { Event, EventToApproveEdit } from '../../../models/event.model';
|
import { Event, EventToApproveEdit } from '../../../models/event.model';
|
||||||
import { BadRequestPage } from '../../popover/bad-request/bad-request.page';
|
import { BadRequestPage } from '../../popover/bad-request/bad-request.page';
|
||||||
import { SuccessMessagePage} from '../../popover/success-message/success-message.page';
|
import { SuccessMessagePage} from '../../popover/success-message/success-message.page';
|
||||||
@@ -140,7 +141,8 @@ export class EditEventToApproveComponent implements OnInit {
|
|||||||
public alertController: AlertController,
|
public alertController: AlertController,
|
||||||
private attachmentsService: AttachmentsService,
|
private attachmentsService: AttachmentsService,
|
||||||
private processes:ProcessesService,
|
private processes:ProcessesService,
|
||||||
private animationController: AnimationController
|
private animationController: AnimationController,
|
||||||
|
private toastService: ToastService,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
this.serialNumber = this.navParams.get('serialNumber');
|
this.serialNumber = this.navParams.get('serialNumber');
|
||||||
@@ -253,9 +255,9 @@ export class EditEventToApproveComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
|
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
|
||||||
this.successMessage('Evento editado')
|
this.toastService.successMessage('Evento editado');
|
||||||
}, error =>{
|
}, error =>{
|
||||||
this.badRequest('Evento não editado')
|
this.toastService.badRequest('Evento não editado');
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@@ -263,16 +265,16 @@ export class EditEventToApproveComponent implements OnInit {
|
|||||||
if(document['action'] == 'add') {
|
if(document['action'] == 'add') {
|
||||||
delete document.action
|
delete document.action
|
||||||
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
|
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
|
||||||
//this.successMessage()
|
this.toastService.successMessage();
|
||||||
}, error =>{
|
}, error =>{
|
||||||
this.badRequest()
|
this.toastService.badRequest();
|
||||||
});
|
});
|
||||||
} else if(document['action'] == 'delete') {
|
} else if(document['action'] == 'delete') {
|
||||||
delete document.action
|
delete document.action
|
||||||
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
|
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
|
||||||
//this.successMessage()
|
this.toastService.successMessage()
|
||||||
}, error =>{
|
}, error =>{
|
||||||
this.badRequest()
|
this.toastService.badRequest()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -407,96 +409,4 @@ export class EditEventToApproveComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async successMessage(message?: any, callback?) {
|
|
||||||
|
|
||||||
const enterAnimation = (baseEl: any) => {
|
|
||||||
const backdropAnimation = this.animationController.create()
|
|
||||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
|
||||||
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
|
|
||||||
|
|
||||||
const wrapperAnimation = this.animationController.create()
|
|
||||||
.addElement(baseEl.querySelector('.modal-wrapper')!)
|
|
||||||
.keyframes([
|
|
||||||
{ offset: 0, opacity: '1', right: '-100%' },
|
|
||||||
{ offset: 1, opacity: '1', right: '0px' }
|
|
||||||
]);
|
|
||||||
|
|
||||||
return this.animationController.create()
|
|
||||||
.addElement(baseEl)
|
|
||||||
.easing('ease-out')
|
|
||||||
.duration(500)
|
|
||||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
||||||
}
|
|
||||||
|
|
||||||
const leaveAnimation = (baseEl: any) => {
|
|
||||||
return enterAnimation(baseEl).direction('reverse');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
|
||||||
enterAnimation,
|
|
||||||
leaveAnimation,
|
|
||||||
component: SuccessMessagePage,
|
|
||||||
componentProps: {
|
|
||||||
message: message || 'Processo efetuado' ,
|
|
||||||
},
|
|
||||||
cssClass: 'notification-modal'
|
|
||||||
});
|
|
||||||
|
|
||||||
modal.present()
|
|
||||||
|
|
||||||
setTimeout(()=>{
|
|
||||||
if (callback) {
|
|
||||||
callback()
|
|
||||||
}
|
|
||||||
modal.dismiss()
|
|
||||||
},7000)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
async badRequest(message?: string, callback?) {
|
|
||||||
const enterAnimation = (baseEl: any) => {
|
|
||||||
const backdropAnimation = this.animationController.create()
|
|
||||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
|
||||||
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
|
|
||||||
|
|
||||||
const wrapperAnimation = this.animationController.create()
|
|
||||||
.addElement(baseEl.querySelector('.modal-wrapper')!)
|
|
||||||
.keyframes([
|
|
||||||
{ offset: 0, opacity: '1', right: '-100%' },
|
|
||||||
{ offset: 1, opacity: '1', right: '0px' }
|
|
||||||
]);
|
|
||||||
|
|
||||||
return this.animationController.create()
|
|
||||||
.addElement(baseEl)
|
|
||||||
.easing('ease-out')
|
|
||||||
.duration(500)
|
|
||||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
||||||
}
|
|
||||||
|
|
||||||
const leaveAnimation = (baseEl: any) => {
|
|
||||||
return enterAnimation(baseEl).direction('reverse');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
|
||||||
enterAnimation,
|
|
||||||
leaveAnimation,
|
|
||||||
component: BadRequestPage,
|
|
||||||
componentProps: {
|
|
||||||
message: message || 'Processo efetuado' ,
|
|
||||||
},
|
|
||||||
cssClass: 'notification-modal'
|
|
||||||
});
|
|
||||||
|
|
||||||
modal.present()
|
|
||||||
|
|
||||||
setTimeout(()=>{
|
|
||||||
if (callback) {
|
|
||||||
callback()
|
|
||||||
}
|
|
||||||
modal.dismiss()
|
|
||||||
},7000)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user