mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Add categories to forms
This commit is contained in:
@@ -115,7 +115,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class width-100">
|
||||
<div class="ion-input-class width-100" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
<ion-datetime
|
||||
placeholder="Início"
|
||||
[(ngModel)]="postEvent.StartDate"
|
||||
@@ -136,7 +136,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
<ion-datetime
|
||||
placeholder="Fim"
|
||||
[(ngModel)]="postEvent.EndDate"
|
||||
|
||||
@@ -168,10 +168,13 @@ export class EditEventPage implements OnInit {
|
||||
IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
||||
Validators.required
|
||||
]),
|
||||
Date: new FormControl(new Date(this.postEvent.StartDate).toLocaleString() < new Date(this.postEvent.EndDate).toLocaleString()? 'ok': null,[
|
||||
Validators.required
|
||||
]),
|
||||
|
||||
// participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||
// Validators.required
|
||||
// ]),
|
||||
participantes: new FormControl(this.taskParticipants, [
|
||||
Validators.required
|
||||
]),
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
+48
-2
@@ -35,7 +35,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<!-- <div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('Location').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('Location').errors?.required">
|
||||
Campo obrigatório.
|
||||
@@ -44,7 +44,7 @@
|
||||
O campo deve ter pelo menos 4 caracteres.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
@@ -78,6 +78,49 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
|
||||
|
||||
<ion-select placeholder="Selecione tipo de evento*"
|
||||
class="d-block d-md-none"
|
||||
[(ngModel)]="postData.Categories[0]"
|
||||
interface="action-sheet"
|
||||
Cancel-text="Cancelar" required>
|
||||
<ion-select-option value="Reunião">Reunião</ion-select-option>
|
||||
<ion-select-option value="Viagem">Viagem</ion-select-option>
|
||||
<ion-select-option value="Conferência">Conferência</ion-select-option>
|
||||
<ion-select-option value="Encontro">Encontro</ion-select-option>
|
||||
</ion-select>
|
||||
|
||||
|
||||
<mat-form-field class="d-none d-md-block" appearance="none" class="width-100" placeholder="Sample Type" required>
|
||||
<!-- <input matInput type="text" > -->
|
||||
<mat-select [(ngModel)]="postData.Categories[0]" >
|
||||
<mat-option value="Reunião">
|
||||
Reunião
|
||||
</mat-option>
|
||||
<mat-option value="Viagem">
|
||||
Viagem
|
||||
</mat-option>
|
||||
<mat-option value="Conferência">
|
||||
Conferência
|
||||
</mat-option>
|
||||
<mat-option value="Encontro">
|
||||
Encontro
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
@@ -201,6 +244,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
|
||||
+8
-3
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { AnimationController, ModalController, NavParams } from '@ionic/angular';
|
||||
import { Event } from 'src/app/models/event.model'
|
||||
import { EventBody } from 'src/app/models/eventbody.model';
|
||||
@@ -70,7 +70,6 @@ export class BookMeetingModalPage implements OnInit {
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
|
||||
|
||||
showLoader = false
|
||||
|
||||
get dateStart () {
|
||||
@@ -145,6 +144,9 @@ export class BookMeetingModalPage implements OnInit {
|
||||
|
||||
this.dateControlStart = new FormControl(moment(new Date()));
|
||||
this.dateControlEnd = new FormControl(moment(new Date(new Date().getTime() + 15 * 60000)));
|
||||
|
||||
|
||||
this.postData.Categories = ['Reunião']
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -206,6 +208,9 @@ export class BookMeetingModalPage implements OnInit {
|
||||
participantes: new FormControl(this.taskParticipants, [
|
||||
Validators.required
|
||||
]),
|
||||
Categories: new FormControl(this.postData.Categories[0], [
|
||||
Validators.required
|
||||
]),
|
||||
|
||||
})
|
||||
}
|
||||
@@ -244,7 +249,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
AppointmentState: 0,
|
||||
TimeZone: 'UTC',
|
||||
Organizer: null,
|
||||
Categories: null,
|
||||
Categories: ['Reunião'],
|
||||
HasAttachments: true,
|
||||
EventRecurrence: null,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user