Skip to content

Commit

Permalink
feat(CIT-185): Guardar motivo de suspension de agenda (#1743)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarianoCampetella committed Dec 6, 2022
1 parent 1b5aa28 commit d3ad509
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/turnos/controller/agenda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@ export function actualizarEstado(req, data) {
data.estado = data.prePausada;
} else {
data.estado = req.body.estado;

// Si se suspende una agenda, hay que enviar SMS a todos los pacientes
if (req.body.estado === 'suspendida') {

data.motivoDeSuspension = req.body.motivo;
data.bloques.forEach(bloque => {
bloque.turnos.forEach(turno => {
if (turno.estado !== 'turnoDoble') {
Expand Down
1 change: 1 addition & 0 deletions modules/turnos/schemas/agenda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const AgendaSchema = new mongoose.Schema({
required: true,
default: 'planificacion'
},
motivoDeSuspension: String,
avisos: [{
_id: false,
profesionalId: mongoose.Schema.Types.ObjectId,
Expand Down

0 comments on commit d3ad509

Please sign in to comment.