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 9, 2022
1 parent a7c89e7 commit b4914b7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 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 @@ -194,18 +194,21 @@


<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>
<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>
<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>
<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 b4914b7

Please sign in to comment.