Skip to content

Commit

Permalink
feat(CIT-185): guardar motivo suspension de agenda
Browse files Browse the repository at this point in the history
  • Loading branch information
MarianoCampetella committed Aug 19, 2022
1 parent c3348b7 commit 151c209
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ export class GestorAgendasComponent implements OnInit, OnDestroy {
this.showGestorAgendas = true;
this.showEditarAgendaPanel = true;
this.showTurnos = false;
this.showSuspenderAgenda = false;
}
this.showAgregarNotaAgenda = false;
this.showRevisionFueraAgenda = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ export class SuspenderAgendaComponent implements OnInit {

const patch = {
'op': 'suspendida',
'estado': 'suspendida'
'estado': 'suspendida',
'motivo': this.motivoSuspensionSelect.select.nombre
};

this.serviceAgenda.patch(this.agenda.id, patch).subscribe((resultado: any) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
<span *ngIf="agenda.cupo == -1">Sin límite</span>
</div>
</div>
<div *ngIf="agenda.estado === 'suspendida'" class="row">
<div class="col-12">
<label>Motivo de suspensión</label>
<span *ngIf="agenda.motivoDeSuspension">{{agenda.motivoDeSuspension}}</span>
</div>
</div>
</div>
</plex-help>
<plex-help *ngIf="agenda.nota" class="mr-1" type="help" icon="message">
Expand Down Expand Up @@ -194,18 +200,17 @@


<ng-container *ngIf="showConfirmar">
<plex-title titulo="Suspender Agenda" size="md"></plex-title>
<plex-select [(ngModel)]="motivoSuspensionSelect.select" name="motivoSuspension" [data]="motivoSuspension"
label="Motivos de Suspensión" placeholder="Seleccione un motivo de suspensión">
</plex-select>
<ng-container class="bg-warning p-3 text-white" *ngIf="!motivoSuspensionSelect.select?.nombre">
Seleccione un motivo de suspensión
</ng-container>

<div class="mt-3 float-right">
<plex-button type="danger" label="Cancelar" (click)="cancelar()">
</plex-button>
<plex-button type="success" label="Confirmar" (click)="suspenderAgenda()" title="Confirmar">
</plex-button>
</div>
<form #formulario="ngForm">
<plex-title titulo="Suspender Agenda" size="md"></plex-title>
<plex-select [(ngModel)]="motivoSuspensionSelect.select" name="motivoSuspension" [data]="motivoSuspension"
label="Motivos de Suspensión" placeholder="Seleccione un motivo de suspensión" [required]="true">
</plex-select>
<div class="mt-3 float-right">
<plex-button type="danger" label="Cancelar" (click)="cancelar()">
</plex-button>
<plex-button class="ml-1" [disabled]="!formulario.valid" type="success" label="Confirmar"
(click)="suspenderAgenda()">
</plex-button>
</div>
</form>
</ng-container>

0 comments on commit 151c209

Please sign in to comment.