Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIT - guardar motivo suspension de agenda #2733

Merged
merged 1 commit into from
Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>