ddb203857f
It was a loose section above the cards. It is now a card like the cytology pair, as wide as the grid and last, and it takes the general filter's interval (semester or month) and, when the filter names periods, opens on the newest one it publishes; another filter drops the period picked inside the card. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
38 lines
2.6 KiB
HTML
38 lines
2.6 KiB
HTML
<mat-card class="route" aria-label="Días desde la toma de muestra hasta cada evento de la ruta del tamizaje">
|
|
<header><div class="card-identity"><h2 class="figure-title">Tiempos de la ruta del tamizaje</h2></div></header>
|
|
@switch (status()) {
|
|
@case ('deferred') { <p role="status">La vista se cargará al acercarse a esta región.</p> }
|
|
@case ('loading') { <mat-progress-bar mode="indeterminate" aria-label="Cargando los tiempos de la ruta del tamizaje" /><p role="status">Cargando los tiempos de la ruta…</p> }
|
|
@case ('error') { <div role="alert"><p>{{ message() }}</p><button mat-stroked-button type="button" (click)="retry()">Reintentar</button></div> }
|
|
@case ('incompatible') { <div role="alert"><p>{{ message() }}</p><button mat-stroked-button type="button" (click)="retry()">Reintentar</button></div> }
|
|
}
|
|
@if (model(); as m) {
|
|
<div class="controls">
|
|
<mat-form-field appearance="outline" subscriptSizing="dynamic">
|
|
<mat-label>Periodo</mat-label>
|
|
<mat-select [value]="m.period" (selectionChange)="selectPeriod($event.value)" aria-label="Periodo de la ruta del tamizaje">
|
|
@for (period of m.periods; track period) { <mat-option [value]="period">{{ periodLabel(period) }}</mat-option> }
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<mat-button-toggle-group [value]="view()" (change)="selectView($event.value)" aria-label="Vista de los tiempos">
|
|
<mat-button-toggle value="cumulative">Acumulado desde la toma</mat-button-toggle>
|
|
<mat-button-toggle value="steps">Por pasos</mat-button-toggle>
|
|
</mat-button-toggle-group>
|
|
</div>
|
|
@if (status() === 'empty') { <p role="status">No hay tiempos publicados para esta ruta.</p> }
|
|
@else if (figure(); as figure) {
|
|
<app-plotly-chart [figure]="figure" [showNotes]="false" label="Días desde la toma de muestra hasta cada evento de la ruta del tamizaje" />
|
|
}
|
|
<details class="published-values"><summary>Valores publicados</summary>
|
|
<div class="table-scroll" role="region" aria-label="Tabla de tiempos de la ruta del tamizaje" tabindex="0">
|
|
<table><caption>Días por evento en {{ m.period ? periodLabel(m.period) : 'el periodo' }}</caption>
|
|
<thead><tr><th scope="col">Evento</th><th scope="col">Desde la toma</th><th scope="col">Desde el paso anterior</th></tr></thead>
|
|
<tbody>@for (row of m.rows; track row.step.id) {
|
|
<tr><th scope="row">{{ row.step.label }}</th><td>{{ cellText(row.fromSample) }}</td><td>{{ cellText(row.fromPrevious) }}</td></tr>
|
|
}</tbody>
|
|
</table>
|
|
</div>
|
|
</details>
|
|
}
|
|
</mat-card>
|