mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Update publication page
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||
import { PublicationsService } from 'src/app/services/publications.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-new-action',
|
||||
templateUrl: './new-action.page.html',
|
||||
styleUrls: ['./new-action.page.scss'],
|
||||
})
|
||||
export class NewActionPage implements OnInit {
|
||||
|
||||
folder: PublicationFolder;
|
||||
segment:string;
|
||||
|
||||
@Output() closeDesktopComponent= new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private publication: PublicationsService
|
||||
) {
|
||||
this.folder = new PublicationFolder();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.segment = "Viagem";
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
console.log(ev.detail.value);
|
||||
}
|
||||
|
||||
save(){
|
||||
this.folder = {
|
||||
ProcessId: null,
|
||||
Description: this.folder.Description,
|
||||
Detail: this.folder.Detail,
|
||||
DateBegin: this.folder.DateBegin,
|
||||
DateEnd: this.folder.DateEnd,
|
||||
ActionType: this.segment,
|
||||
}
|
||||
console.log(this.folder);
|
||||
|
||||
this.publication.CreatePublicationFolder(this.folder);
|
||||
this.close();
|
||||
}
|
||||
|
||||
close(){
|
||||
this.closeDesktopComponent.emit();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user