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:
@@ -124,6 +124,7 @@
|
||||
|
||||
<app-edit-action
|
||||
*ngIf="desktopComponent.showEditActions"
|
||||
[folderId]="folderId"
|
||||
class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1"
|
||||
(closeDesktopComponent)="closeDesktopComponent($event)"
|
||||
>
|
||||
|
||||
@@ -280,6 +280,7 @@ export class PublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
async openOptions(id?: string) {
|
||||
this.folderId = id;
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
|
||||
@@ -66,7 +66,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
getPublicationDetail(){
|
||||
this.publications.PresidentialAction(this.folderId).subscribe(res=>{
|
||||
this.publications.GetPresidentialAction(this.folderId).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.item = res;
|
||||
});
|
||||
|
||||
@@ -29,7 +29,16 @@ export class PublicationsService {
|
||||
return this.http.get<any>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
PresidentialAction(id:any){
|
||||
GetPresidentialAction(id:any){
|
||||
const geturl = environment.apiURL + 'presidentialActions/'+id;
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
};
|
||||
return this.http.get<any>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
UpdatePresidentialAction(id:any){
|
||||
const geturl = environment.apiURL + 'presidentialActions/'+id;
|
||||
|
||||
let options = {
|
||||
|
||||
@@ -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')
|
||||
} */
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
getPublicationDetail() {
|
||||
this.publications.PresidentialAction(this.folderId).subscribe(res=>{
|
||||
this.publications.GetPresidentialAction(this.folderId).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.item = res;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user