diff --git a/app/Http/Controllers/ServiceController.php b/app/Http/Controllers/ServiceController.php index 134e5e7..2f4520b 100644 --- a/app/Http/Controllers/ServiceController.php +++ b/app/Http/Controllers/ServiceController.php @@ -38,6 +38,7 @@ class ServiceController extends Controller $o->order_info->put('cancel_cancel',Carbon::now()->format('Y-m-d H:i:s')); $o->order_status = 'ACTIVE'; + $o->stop_at = NULL; return $o->save(); } diff --git a/app/Models/Service.php b/app/Models/Service.php index 0cff768..5ece2a1 100644 --- a/app/Models/Service.php +++ b/app/Models/Service.php @@ -1077,6 +1077,11 @@ class Service extends Model implements IDs && (! in_array($this->order_status,array_merge(self::INACTIVE_STATUS,['INACTIVE']))); } + public function isPendingCancel(): bool + { + return in_array(strtolower($this->order_status),['cancel-request','cancel-pending']); + } + /** * Generate a collection of invoice_item objects that will be billed for the next invoice * diff --git a/composer.lock b/composer.lock index 97e86a0..62cbe7e 100644 --- a/composer.lock +++ b/composer.lock @@ -3059,11 +3059,11 @@ }, { "name": "leenooks/laravel", - "version": "11.1.12", + "version": "11.1.13", "source": { "type": "git", "url": "https://gitea.dege.au/laravel/leenooks.git", - "reference": "ba18a2a21c0bf98c3825d53f93ed620d6a3e4423" + "reference": "be6061fb6e91689714260dd0139839b9cfbffbc7" }, "type": "library", "extra": { @@ -3096,7 +3096,7 @@ "laravel", "leenooks" ], - "time": "2024-08-17T00:36:07+00:00" + "time": "2024-08-17T03:14:51+00:00" }, { "name": "leenooks/passkey", diff --git a/resources/views/theme/backend/adminlte/service/widget/information.blade.php b/resources/views/theme/backend/adminlte/service/widget/information.blade.php index d700556..1c5631d 100644 --- a/resources/views/theme/backend/adminlte/service/widget/information.blade.php +++ b/resources/views/theme/backend/adminlte/service/widget/information.blade.php @@ -22,6 +22,12 @@