mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -24,7 +24,7 @@ export class DarParecerPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
) {
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.instanceId = this.navParams.get('ProcessInstanceID');
|
||||
}
|
||||
@@ -32,15 +32,15 @@ export class DarParecerPage implements OnInit {
|
||||
ngOnInit() {
|
||||
console.log(this.serialNumber
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
cancel() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
|
||||
async save() {
|
||||
|
||||
|
||||
const DocumentToSave = this.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
@@ -53,8 +53,8 @@ export class DarParecerPage implements OnInit {
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Registar",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
@@ -68,7 +68,7 @@ export class DarParecerPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.modalController.dismiss();
|
||||
this.modalController.dismiss('sucess');
|
||||
this.toastService._successMessage('Parecer enviado');
|
||||
} catch (error) {
|
||||
this.toastService._badRequest("Parecer não solicitado");
|
||||
@@ -81,7 +81,7 @@ export class DarParecerPage implements OnInit {
|
||||
removeAttachment(index: number){
|
||||
this.documents = this.documents.filter( (e, i) => index != i);
|
||||
}
|
||||
|
||||
|
||||
async getDoc() {
|
||||
const modal = await this.modalController.create({
|
||||
component: SearchPage,
|
||||
@@ -102,5 +102,5 @@ export class DarParecerPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -602,7 +602,7 @@ export class PedidoPage implements OnInit {
|
||||
console.log(task);
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
if (window.innerWidth < 701) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'add-note-modal-no-height showAsideOptions'
|
||||
@@ -618,7 +618,9 @@ export class PedidoPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res => {
|
||||
this.goBack();
|
||||
if(res.data == 'sucess'){
|
||||
this.goBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user