diff --git a/app/Models/Service.php b/app/Models/Service.php index 30bccda..7c324a1 100644 --- a/app/Models/Service.php +++ b/app/Models/Service.php @@ -50,26 +50,49 @@ class Service extends Model ]; private $inactive_status = [ - 'CANCELLED', // @todo Check if these should be changed to ORDER-CANCELLED + 'CANCELLED', 'ORDER-REJECTED', 'ORDER-CANCELLED', ]; private $valid_status = [ - 'ORDER-SUBMIT' => ['approve'=>'ORDER-SENT','reject'=>'ORDER-REJECTED'], + // Order Submitted + 'ORDER-SUBMIT' => ['approve'=>'ORDER-SENT','hold'=>'ORDER-HOLD','reject'=>'ORDER-REJECTED','cancel'=>'ORDER-CANCELLED'], + // Order On Hold (Reason) + 'ORDER-HOLD' => [], + // Order Rejected (Reason) + 'ORDER-REJECTED' => [], + // Order Cancelled + 'ORDER-CANCELLED' => [], + // Order Sent to Supplier 'ORDER-SENT' => ['update_reference'=>'ORDER-SENT'], ]; + /** + * Account the service belongs to + * + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo + */ public function account() { return $this->belongsTo(Account::class); } + /** + * Account that ordered the service + * + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo + */ public function orderby() { return $this->belongsTo(Account::class); } + /** + * Tenant that the service belongs to + * + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo + */ public function site() { return $this->belongsTo(Site::class); @@ -100,6 +123,11 @@ class Service extends Model return $this->belongsTo(ServiceVoip::class,'id','service_id'); } + /** + * Product of the service + * + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo + */ public function product() { return $this->belongsTo(Product::class); diff --git a/resources/theme/backend/adminlte/a/service.blade.php b/resources/theme/backend/adminlte/a/service.blade.php index 834b24b..fe850ef 100644 --- a/resources/theme/backend/adminlte/a/service.blade.php +++ b/resources/theme/backend/adminlte/a/service.blade.php @@ -33,7 +33,7 @@ @break @default - @include('u.widgets.service_info') + @include('u.widgets.service.info') @endswitch diff --git a/resources/theme/backend/adminlte/a/widgets/service/order/sent.blade.php b/resources/theme/backend/adminlte/a/widgets/service/order/sent.blade.php index 2c9aa72..3d8ea52 100644 --- a/resources/theme/backend/adminlte/a/widgets/service/order/sent.blade.php +++ b/resources/theme/backend/adminlte/a/widgets/service/order/sent.blade.php @@ -1,6 +1,6 @@