Files
fr.Genesis_V1/src/app/components/add-case/add-case.component.html
T
2026-10-22 16:15:16 +02:00

52 lines
2.5 KiB
HTML

<div *ngIf="loadSpinner == true" class="body_modal">
<mat-spinner></mat-spinner>
</div>
<div class="body_modal" *ngIf="caseForm && loadSpinner == false">
<div class="body_modal-tittle">
<h1>{{case ? 'Editar' : 'Agregar'}} Caso</h1>
</div>
<form [formGroup]="caseForm" class="body_modal-form">
<div class="body_modal-form_row">
<mat-form-field appearance="fill" class="body_modal-form_row-field">
<mat-label>Caso</mat-label>
<input type="text" matInput formControlName="name" required>
<!-- <mat-error *ngIf="activityForm.controls['created'].hasError('required')">-->
<!-- Este campo es <strong>requerido</strong>-->
<!-- </mat-error>-->
</mat-form-field>
<mat-form-field appearance="fill" class="body_modal-form_row-field">
<mat-label>Cliente</mat-label>
<mat-select formControlName="id_client">
<mat-option [value]="">Selecciona Cliente</mat-option>
<mat-option *ngFor="let client of clients" [value]="client.id">{{client.businessname}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field appearance="fill" class="body_modal-form_row-field" *ngIf="!case">
<mat-label>Asignar caso</mat-label>
<mat-select multiple required>
<mat-option *ngFor="let user of users" [value]="user.id"
(onSelectionChange)="assingCase(user.id!)">{{user.name}} {{user.lastname}}
({{user.acronym}})
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field appearance="fill" class="body_modal-form_row-field">
<mat-label>Descripcion</mat-label>
<textarea type="text" matInput formControlName="description" rows="10"> </textarea>
<!-- <mat-error *ngIf="activityForm.controls['created'].hasError('required')">-->
<!-- Este campo es <strong>requerido</strong>-->
<!-- </mat-error>-->
</mat-form-field>
</div>
<div class="body_modal-form_row">
<button mat-raised-button color="primary" (click)="addCase()" style="margin-bottom: 5%;"
[disabled]="caseForm.invalid || spinner || (case ? userAssing == [] ? true : false : userAssing.length < 1 ? true : false) "
[class.spinner]="spinner">{{case ? 'Editar' : 'Agregar'}}</button>
<button mat-raised-button color="warn" (click)="this.dialogRef.close(false)">Cerrar</button>
</div>
</form>
</div>