mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Remove build errors
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import * as moment from 'moment';
|
||||
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||
import { PublicationsService } from 'src/app/services/publications.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
@@ -10,6 +12,24 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
})
|
||||
export class EditActionPage implements OnInit {
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
|
||||
|
||||
public date: any;
|
||||
public disabled = false;
|
||||
public showSpinners = true;
|
||||
public showSeconds = false;
|
||||
public touchUi = false;
|
||||
public enableMeridian = false;
|
||||
public minDate: any;
|
||||
public maxDate: any;
|
||||
public stepHour = 1;
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
||||
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
||||
|
||||
folder: PublicationFolder;
|
||||
@Input() folderId: string;
|
||||
@Output() closeDesktopComponent= new EventEmitter<any>();
|
||||
@@ -26,16 +46,41 @@ export class EditActionPage implements OnInit {
|
||||
this.getPublicationDetail();
|
||||
}
|
||||
|
||||
close(){
|
||||
close() {
|
||||
this.closeDesktopComponent.emit();
|
||||
}
|
||||
|
||||
getPublicationDetail(){
|
||||
getPublicationDetail() {
|
||||
this.publicationsService.GetPresidentialAction(this.folderId).subscribe(res=>{
|
||||
this.folder = res;
|
||||
});
|
||||
}
|
||||
|
||||
get dateValid() {
|
||||
if (window.innerWidth <= 800) {
|
||||
return this.folder.DateBegin < this.folder.DateEnd? ['ok']: []
|
||||
} else {
|
||||
return ['ok']
|
||||
}
|
||||
}
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
}
|
||||
|
||||
injectValidation() {
|
||||
|
||||
this.Form = new FormGroup({
|
||||
Subject: new FormControl(this.folder.Description, [
|
||||
Validators.required,
|
||||
// Validators.minLength(4)
|
||||
]),
|
||||
Date: new FormControl(this.dateValid, [
|
||||
Validators.required
|
||||
]),
|
||||
})
|
||||
}
|
||||
|
||||
async save() {
|
||||
let body = {
|
||||
ProcessId: this.folderId,
|
||||
@@ -55,7 +100,5 @@ export class EditActionPage implements OnInit {
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Não foi possivel atualizar a acção presidencial')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user