mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Pull made
This commit is contained in:
@@ -285,7 +285,7 @@
|
||||
</div>
|
||||
<div class="ion-input-class-no-height width-100 flex-grow-1">
|
||||
<!-- rows="6" cols="20" -->
|
||||
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="postEvent.Body.Text" placeholder="Detalhes" ></ion-textarea>
|
||||
<ion-textarea class="heigh-200" autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="postEvent.Body.Text" placeholder="Detalhes" ></ion-textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-emend-message-modal',
|
||||
@@ -12,7 +13,8 @@ export class EmendMessageModalPage implements OnInit {
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
this.emendMessage = '';
|
||||
}
|
||||
@@ -24,7 +26,12 @@ export class EmendMessageModalPage implements OnInit {
|
||||
}
|
||||
|
||||
save() {
|
||||
this.modalController.dismiss({option:'save', note: this.emendMessage});
|
||||
if(this.emendMessage != '') {
|
||||
this.modalController.dismiss({option:'save', note: this.emendMessage});
|
||||
} else {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -114,37 +114,42 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
.then( async (res) => {
|
||||
|
||||
|
||||
if(res.data.note !== ''){
|
||||
let body = { "serialNumber": this.serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
if(res.data.option == 'save') {
|
||||
if(res.data.note !== '') {
|
||||
let body = { "serialNumber": this.serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
this.toastService.badRequest();
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
this.toastService.badRequest();
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
</div>
|
||||
<div class="ion-input-class-no-height flex-grow-1">
|
||||
|
||||
<ion-textarea class="textarea" autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="postEvent.Body.Text" placeholder="Detalhes" autoGrow="true" ></ion-textarea>
|
||||
<ion-textarea class="textarea heigh-200" autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="postEvent.Body.Text" placeholder="Detalhes" autoGrow="true" ></ion-textarea>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+31
-29
@@ -191,39 +191,41 @@ export class ApproveEventModalPage implements OnInit {
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then( async (res) => {
|
||||
if(res.data.note !== '') {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
if(res.data.option == 'save') {
|
||||
if(res.data.note !== '') {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
//
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
//this.alertService.presentAlert('Operação cancelada!');
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="loadedEvent" class="aside-right flex-column height-100">
|
||||
<div class="aside-buttons">
|
||||
<div class="aside-buttons" >
|
||||
<button (click)="editar(loadedEvent.serialNumber)" full class="btn-cancel" shape="round" *ngIf="loadedEvent.activityInstanceName == 'Aprovar Evento'">Editar evento</button>
|
||||
<button (click)="approveTask(loadedEvent.serialNumber)" full class="btn-cancel" shape="round" *ngIf="loadedEvent.activityInstanceName == 'Aprovar Evento'">Aprovar</button>
|
||||
<button (click)="emendTask(loadedEvent.serialNumber)" class="btn-cancel" shape="round" >Rever</button>
|
||||
|
||||
@@ -16,6 +16,7 @@ import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { OfflineManagerService } from 'src/app/services/offline-manager.service';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import config from 'capacitor.config';
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event',
|
||||
@@ -117,10 +118,14 @@ export class ApproveEventPage implements OnInit {
|
||||
this.loadedEvent = event
|
||||
|
||||
|
||||
this.today = new Date(this.loadedEvent.workflowInstanceDataFields.StartDate);
|
||||
|
||||
this.customDate = this.days[this.today.getDay()] + ", " + this.today.getDate() + " de " + (this.months[this.today.getMonth()]);
|
||||
|
||||
try {
|
||||
this.today = new Date(this.loadedEvent.workflowInstanceDataFields.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()] + ", " + this.today.getDate() + " de " + (this.months[this.today.getMonth()]);
|
||||
} catch(error) {
|
||||
console.log(this.loadedEvent)
|
||||
throw(error)
|
||||
}
|
||||
|
||||
this.loadedAttachments = this.loadedEvent.Documents;
|
||||
|
||||
})
|
||||
@@ -178,11 +183,15 @@ export class ApproveEventPage implements OnInit {
|
||||
this.loadedEvent = task
|
||||
|
||||
|
||||
this.today = new Date(this.loadedEvent.workflowInstanceDataFields.StartDate);
|
||||
|
||||
this.customDate = this.days[this.today.getDay()] + ", " + this.today.getDate() + " de " + (this.months[this.today.getMonth()]);
|
||||
|
||||
this.loadedAttachments = this.loadedEvent.Documents;
|
||||
|
||||
try {
|
||||
this.today = new Date(this.loadedEvent.workflowInstanceDataFields.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()] + ", " + this.today.getDate() + " de " + (this.months[this.today.getMonth()]);
|
||||
} catch(error) {
|
||||
console.log(this.loadedEvent)
|
||||
throw(error)
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
@@ -194,12 +203,17 @@ export class ApproveEventPage implements OnInit {
|
||||
async getTask() {
|
||||
this.processes.GetTask(this.serialNumber).subscribe(async res => {
|
||||
|
||||
this.loadedEvent = await this.processes.GetTask(this.serialNumber).toPromise();
|
||||
this.loadedEvent = res
|
||||
this.addProcessToDB(this.loadedEvent)
|
||||
|
||||
this.today = new Date(this.loadedEvent.workflowInstanceDataFields.StartDate);
|
||||
|
||||
this.customDate = this.days[this.today.getDay()] + ", " + this.today.getDate() + " de " + (this.months[this.today.getMonth()]);
|
||||
try {
|
||||
this.today = new Date(this.loadedEvent.workflowInstanceDataFields.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()] + ", " + this.today.getDate() + " de " + (this.months[this.today.getMonth()]);
|
||||
|
||||
} catch(error) {
|
||||
console.log(this.loadedEvent)
|
||||
throw(error)
|
||||
}
|
||||
|
||||
}, (error) => {
|
||||
this.getProcessFromDB();
|
||||
@@ -247,40 +261,42 @@ export class ApproveEventPage implements OnInit {
|
||||
modal.onDidDismiss()
|
||||
.then(async (res) => {
|
||||
|
||||
|
||||
if (res.data !== '') {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
if(res.data.option == 'save') {
|
||||
if (res.data !== '') {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
.catch(() => {
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
.catch(() => {
|
||||
|
||||
this.offlineManager.storeRequestData('event-listRever', body);
|
||||
});
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.offlineManager.storeRequestData('event-listRever', body);
|
||||
});
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
}
|
||||
else {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -362,39 +378,44 @@ export class ApproveEventPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
|
||||
|
||||
if (res.data.note !== '') {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
if(res.data.option == 'save') {
|
||||
if (res.data.note !== '') {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.toastService._successMessage();
|
||||
this.goBack();
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.toastService._successMessage();
|
||||
this.goBack();
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
|
||||
}
|
||||
else {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
else {
|
||||
//this.alertService.presentAlert('Operação cancelada!');
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -256,7 +256,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height width-100">
|
||||
<ion-textarea [(ngModel)]="postData.Body.Text" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
|
||||
<ion-textarea class="heigh-200" autoGrow="true" [(ngModel)]="postData.Body.Text" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Location')?.invalid && validateFrom || validateField ">
|
||||
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" class="add-border" placeholder="Descrição*" [(ngModel)]="postData.DispatchFolder.Message"></ion-textarea>
|
||||
<ion-textarea autoGrow="true" autocomplete="on" autocorrect="on" spellcheck="true" class="add-border heigh-200" placeholder="Descrição*" [(ngModel)]="postData.DispatchFolder.Message"></ion-textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
-1
@@ -31,7 +31,6 @@
|
||||
.ion-item-class-2{
|
||||
//width: 360px;
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
}
|
||||
.ion-icon-class{
|
||||
width: 45px;
|
||||
|
||||
Reference in New Issue
Block a user