mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +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 {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user