mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Improve
This commit is contained in:
@@ -94,7 +94,7 @@ export class NewEventPage implements OnInit {
|
||||
@ViewChild('inicio') inicio: any;
|
||||
@ViewChild('picker1') picker1: any;
|
||||
|
||||
Form: any = {}
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
|
||||
|
||||
@@ -125,11 +125,8 @@ export class NewEventPage implements OnInit {
|
||||
private modalController: ModalController,
|
||||
private eventService: EventsService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private userService: AuthService,
|
||||
private http: HttpClient,
|
||||
private zone: NgZone,
|
||||
private dateAdapter: DateAdapter<any>,
|
||||
// private translate: TranslateService
|
||||
) {
|
||||
@@ -237,7 +234,7 @@ export class NewEventPage implements OnInit {
|
||||
this.Form = new FormGroup({
|
||||
Subject: new FormControl(this.postEvent.Subject, [
|
||||
Validators.required,
|
||||
Validators.minLength(4)
|
||||
// Validators.minLength(4)
|
||||
]),
|
||||
Location: new FormControl(this.postEvent.Location, [
|
||||
Validators.required,
|
||||
@@ -255,16 +252,13 @@ export class NewEventPage implements OnInit {
|
||||
IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
||||
Validators.required
|
||||
]),
|
||||
participantes: new FormControl(this.participantes, [
|
||||
participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||
Validators.required
|
||||
]),
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
get participantes() {
|
||||
return this.taskParticipantsCc.concat(this.taskParticipants)
|
||||
}
|
||||
|
||||
openInicio() {
|
||||
let input: any = document.querySelector('#new-inicio')
|
||||
@@ -327,10 +321,10 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
async save() {
|
||||
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
|
||||
// dont runt this function
|
||||
// if (!this.Form.valid) return false
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
|
||||
this.getDatepickerData()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user