Files
cbsnexora/src/app/centers/centers-view/center-actions/attach-center-meeting/attach-center-meeting.component.html
T

75 lines
3.5 KiB
HTML

<div class="container">
<mat-card>
<form [formGroup]="centerMeetingForm">
<mat-card-content>
<div fxLayout="column">
<mat-form-field (click)="startDatePicker.open()">
<mat-label>{{"labels.inputs.Meeting Start Date" |translate}}</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="startDatePicker" required formControlName="startDate">
<mat-datepicker-toggle matSuffix [for]="startDatePicker"></mat-datepicker-toggle>
<mat-datepicker #startDatePicker></mat-datepicker>
<mat-error *ngIf="centerMeetingForm.controls.startDate.hasError('required')">
{{"labels.inputs.Start Date" |translate}} {{ "labels.commons.is" |translate}} <strong>{{ "labels.commons.required" | translate}}</strong>
</mat-error>
</mat-form-field>
<mat-checkbox class="m-t-10 m-b-10" labelPosition="before" formControlName="repeating">
{{"labels.inputs.Repeats?" |translate}}
</mat-checkbox>
<mat-form-field *ngIf="centerMeetingForm.contains('frequency')">
<mat-label>{{"labels.inputs.Repetition Frequency" |translate}}</mat-label>
<mat-select formControlName="frequency">
<mat-option *ngFor="let option of frequencyOptions" [value]="option.id">
{{ option.value }}
</mat-option>
</mat-select>
<mat-error *ngIf="centerMeetingForm.controls.frequency.hasError('repeatsOnDay')">
{{"labels.inputs.Repetition Frequency" |translate}} {{ "labels.commons.is" |translate}} <strong>{{ "labels.commons.required" | translate}}</strong>
</mat-error>
</mat-form-field>
<mat-form-field *ngIf="centerMeetingForm.contains('interval')">
<mat-label>{{"labels.inputs.Repetition Interval" |translate}}</mat-label>
<mat-select formControlName="interval">
<mat-option *ngFor="let interval of repetitionIntervals" [value]="interval">
{{ interval }}
</mat-option>
</mat-select>
<mat-error *ngIf="centerMeetingForm.controls.interval.hasError('repeatsOnDay')">
{{"labels.inputs.Repetition Interval" |translate}} {{ "labels.commons.is" |translate}} <strong>{{ "labels.commons.required" | translate}}</strong>
</mat-error>
</mat-form-field>
<mat-form-field *ngIf="centerMeetingForm.contains('repeatsOnDay')">
<mat-label>{{"labels.inputs.Repeats on Day" |translate}}</mat-label>
<mat-select formControlName="repeatsOnDay" required>
<mat-option *ngFor="let day of repeatsOnDays" [value]="day.id">
{{ day.value }}
</mat-option>
</mat-select>
<mat-error *ngIf="centerMeetingForm.controls.repeatsOnDay.hasError('repeatsOnDay')">
{{"labels.inputs.At least" |translate}} <strong>{{"labels.inputs.one" |translate}}</strong> {{"labels.inputs.day must be selected" |translate}}
</mat-error>
</mat-form-field>
</div>
</mat-card-content>
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
<button type="button" mat-raised-button [routerLink]="['../../']">{{ "labels.buttons.Cancel" | translate}}</button>
<button mat-raised-button color="primary" [disabled]="!centerMeetingForm.valid" (click)="submit()">{{"labels.buttons.Submit | translate}}</button>
</mat-card-actions>
</form>
</mat-card>
</div>