kept the mark as show or complete and cacle button stay after the user chose
This commit is contained in:
@@ -116,7 +116,7 @@ class Consultation extends Model
|
||||
*/
|
||||
public function markAsCompleted(): void
|
||||
{
|
||||
if ($this->status !== ConsultationStatus::Approved) {
|
||||
if (! in_array($this->status, [ConsultationStatus::Approved, ConsultationStatus::NoShow])) {
|
||||
throw new \InvalidArgumentException(
|
||||
__('messages.invalid_status_transition', ['from' => $this->status->value, 'to' => 'completed'])
|
||||
);
|
||||
@@ -131,7 +131,7 @@ class Consultation extends Model
|
||||
*/
|
||||
public function markAsNoShow(): void
|
||||
{
|
||||
if ($this->status !== ConsultationStatus::Approved) {
|
||||
if (! in_array($this->status, [ConsultationStatus::Approved, ConsultationStatus::Completed])) {
|
||||
throw new \InvalidArgumentException(
|
||||
__('messages.invalid_status_transition', ['from' => $this->status->value, 'to' => 'no_show'])
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user