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:
@@ -62,14 +62,13 @@
|
||||
padding: 0 !important;
|
||||
}
|
||||
.div-title{
|
||||
width: 180px;
|
||||
/* padding: 0!important; */
|
||||
float: left;
|
||||
margin: 2.5px 0 0 5px;
|
||||
width: fit-content;
|
||||
float: left;
|
||||
margin: 2.5px 0 0 5px;
|
||||
}
|
||||
.title{
|
||||
font-size: 25px;
|
||||
}
|
||||
font-size: 25px;
|
||||
}
|
||||
.container-div{
|
||||
margin-bottom: 15px;
|
||||
overflow: auto;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||
import { PublicationsService } from 'src/app/services/publications.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-action',
|
||||
@@ -9,48 +10,55 @@ import { PublicationsService } from 'src/app/services/publications.service';
|
||||
})
|
||||
export class EditActionPage implements OnInit {
|
||||
|
||||
folderId:string;
|
||||
@Input() folderId: string;
|
||||
folder: PublicationFolder;
|
||||
segment:string;
|
||||
@Output() closeDesktopComponent= new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private publicationsService: PublicationsService,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
this.folder = new PublicationFolder();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.folderId);
|
||||
|
||||
this.getPublicationDetail();
|
||||
}
|
||||
|
||||
close(){
|
||||
this.closeDesktopComponent.emit();
|
||||
}
|
||||
|
||||
getPublicationDetail() {
|
||||
this.publicationsService.PresidentialAction(this.folderId).subscribe(res=>{
|
||||
console.log(res);
|
||||
getPublicationDetail(){
|
||||
this.publicationsService.GetPresidentialAction(this.folderId).subscribe(res=>{
|
||||
this.folder = res;
|
||||
});
|
||||
}
|
||||
|
||||
save(){
|
||||
/* this.folder = {
|
||||
async save(){
|
||||
console.log(this.folder);
|
||||
|
||||
this.folder = {
|
||||
ProcessId: null,
|
||||
Description: this.folder.Description,
|
||||
Detail: this.folder.Detail,
|
||||
DateBegin: this.folder.DateBegin,
|
||||
DateEnd: this.folder.DateEnd,
|
||||
ActionType: this.segment,
|
||||
ActionType: this.folder.ActionType,
|
||||
}
|
||||
console.log(this.folder);
|
||||
|
||||
try {
|
||||
await this.publication.CreatePublicationFolder(this.folder).toPromise()
|
||||
/* try {
|
||||
await this.publicationsService.UpdatePresidentialAction(this.folder).toPromise()
|
||||
this.close();
|
||||
this.toastService.successMessage('Acção presidencial criada')
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Não foi possivel criar a acção presidencial')
|
||||
} */
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user