55 lines
2.3 KiB
HTML
55 lines
2.3 KiB
HTML
<div class="modal-container">
|
|
<h3 class="modal-title">Detalles del Comando</h3>
|
|
<div class="modal-content">
|
|
<p><strong>Nombre:</strong> {{ data.name }}</p>
|
|
<p><strong>Comentarios:</strong> {{ data.comments }}</p>
|
|
<p><strong>Creado por:</strong> {{ data.createdBy }}</p>
|
|
<p><strong>Fecha de Creación:</strong> {{ data.createdAt | date:'medium' }}</p>
|
|
|
|
<div class="script-display">
|
|
<h4>Script:</h4>
|
|
<pre>{{ data.script }}</pre>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="additional-section" *ngIf="showClientSelect">
|
|
<form [formGroup]="form">
|
|
<h4>Selecciona los clientes:</h4>
|
|
<mat-form-field appearance="fill">
|
|
<mat-label>Clientes</mat-label>
|
|
<mat-select formControlName="selectedClients" multiple (selectionChange)="onClientSelectionChange($event)">
|
|
<mat-option *ngFor="let client of clients" [value]="client.id">
|
|
{{ client.name }}
|
|
</mat-option>
|
|
</mat-select>
|
|
<mat-error *ngIf="form.get('selectedClients')?.invalid && form.get('selectedClients')?.touched">
|
|
Debes seleccionar al menos un cliente.
|
|
</mat-error>
|
|
</mat-form-field>
|
|
<mat-checkbox formControlName="scheduleExecution" (change)="onScheduleChange($event)">
|
|
Programar ejecución
|
|
</mat-checkbox>
|
|
<div *ngIf="showDatePicker" class="schedule-container">
|
|
<mat-form-field appearance="fill">
|
|
<mat-label>Fecha</mat-label>
|
|
<input matInput [matDatepicker]="picker" formControlName="scheduleDate">
|
|
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
|
<mat-datepicker #picker></mat-datepicker>
|
|
</mat-form-field>
|
|
<mat-form-field appearance="fill">
|
|
<mat-label>Hora</mat-label>
|
|
<input matInput type="time" formControlName="scheduleTime">
|
|
</mat-form-field>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="button-row">
|
|
<button mat-button color="primary" class="primary-button" [disabled]="false" (click)="execute()" >
|
|
{{ showClientSelect ? 'Ejecutar' : 'Configurar ejecución' }}
|
|
</button>
|
|
<button mat-button color="accent" class="accent-button" (click)="edit()">Editar</button>
|
|
<button mat-button class="cancel-button" (click)="cancel()">Cancelar</button>
|
|
</div>
|
|
</div>
|