mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
improve edition of draft
This commit is contained in:
+59
-7
@@ -1,6 +1,9 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { error } from 'console';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { ProcessesService} from 'src/app/services/processes.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-details-documents-options',
|
||||
@@ -9,12 +12,23 @@ import { PermissionService } from 'src/app/services/permission.service';
|
||||
})
|
||||
export class EventDetailsDocumentsOptionsPage implements OnInit {
|
||||
|
||||
Document: any
|
||||
content: any = "";
|
||||
|
||||
constructor(
|
||||
public p: PermissionService,
|
||||
private modalController: ModalController,
|
||||
) {}
|
||||
private navParams: NavParams,
|
||||
private processService: ProcessesService,
|
||||
private erroHandler: HttpErrorHandle
|
||||
) {
|
||||
this.Document = this.navParams.get('Document')
|
||||
this.content = this.navParams.get('content')
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
ngOnInit() {
|
||||
console.log(this.content)
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
@@ -25,13 +39,51 @@ export class EventDetailsDocumentsOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
async openBookMeetingModal() {
|
||||
this.modalController.dismiss({component:'openBookMeetingModal', taskAction: ''});
|
||||
this.modalController.dismiss({ component: 'openBookMeetingModal', taskAction: '' });
|
||||
}
|
||||
|
||||
async openExpedientActionsModal( taskAction: any) {
|
||||
this.modalController.dismiss({component:'openExpedientActionsModal', taskAction});
|
||||
async openExpedientActionsModal(taskAction: any) {
|
||||
this.modalController.dismiss({ component: 'openExpedientActionsModal', taskAction });
|
||||
}
|
||||
|
||||
async distartExpedientModal(body:any) {}
|
||||
async distartExpedientModal(body: any) { }
|
||||
|
||||
save(document,content) {
|
||||
console.log(document)
|
||||
let objectDraft = {
|
||||
"status": true,
|
||||
"description": document.Assunto,
|
||||
"content": content,
|
||||
"path": document.path,
|
||||
"ownerId": document.ownerId
|
||||
}
|
||||
this.processService.SaveDraftByID(document.DocId, objectDraft).subscribe((res) => [
|
||||
this.erroHandler.httpsSucessMessagge('Draft Save'),
|
||||
this.modalController.dismiss()
|
||||
],(error) => {
|
||||
this.erroHandler.httpStatusHandle(error)
|
||||
})
|
||||
|
||||
this.modalController.dismiss();
|
||||
|
||||
}
|
||||
|
||||
saveDraft(document, content) {
|
||||
console.log(document)
|
||||
let objectDraft = {
|
||||
"status": false,
|
||||
"description": document.Assunto,
|
||||
"content": content,
|
||||
"path": document.path,
|
||||
"ownerId": document.ownerId
|
||||
}
|
||||
this.processService.SaveDraftByID(document.DocId, objectDraft).subscribe((res) => [
|
||||
this.erroHandler.httpsSucessMessagge('Draft Save'),
|
||||
this.modalController.dismiss()
|
||||
],(error) => {
|
||||
this.erroHandler.httpStatusHandle(error)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user