Преглед на файлове

fix: :bug: fix (agendamento) permitindo cancelar agendamento quando esta pendente

foi alterada a regra para permitir cancelar um agendamento enquanto ainda esta pendente

fase:dev | origin: melhorina-interna
Gustavo Zanatta преди 1 седмица
родител
ревизия
cabffaabee
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      app/Services/ScheduleService.php

+ 1 - 1
app/Services/ScheduleService.php

@@ -301,7 +301,7 @@ class ScheduleService
       DB::beginTransaction();
       $schedule = Schedule::findOrFail($id);
 
-      $allowedStatuses = ['accepted', 'paid'];
+      $allowedStatuses = ['accepted', 'paid', 'pending'];
       if (!in_array($schedule->status, $allowedStatuses)) {
         throw new \Exception("Cancelamento não permitido para o status atual: {$schedule->status}");
       }