mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
fix
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>
|
||||
|
||||
Reference in New Issue
Block a user