From 27720ee88260d503cab4df0b13425c5d938af8ab Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 16 Jun 2023 15:10:36 +1000 Subject: [PATCH] Telephone is now phone --- app/Console/Commands/ImportCosts.php | 4 ++-- app/Jobs/ImportCosts.php | 4 ++-- app/Mail/OrderRequestApprove.php | 2 +- resources/views/email/admin/order/approve.blade.php | 2 +- resources/views/email/admin/order/reject.blade.php | 2 +- resources/views/email/admin/service/cancel.blade.php | 2 +- resources/views/email/admin/service/change.blade.php | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/Console/Commands/ImportCosts.php b/app/Console/Commands/ImportCosts.php index 4afd986..01a44b1 100644 --- a/app/Console/Commands/ImportCosts.php +++ b/app/Console/Commands/ImportCosts.php @@ -31,8 +31,8 @@ class ImportCosts extends Command */ public function handle() { - if (! str_starts_with($this->argument('file'),'storage/app/')) - throw new \Exception('Filename must start with storage/app/'); + if (! str_starts_with($this->argument('file'),'files/')) + throw new \Exception('Filename must start with files/'); Job::dispatchSync( Site::findOrFail($this->argument('siteid')), diff --git a/app/Jobs/ImportCosts.php b/app/Jobs/ImportCosts.php index 3f60fd9..e7aaa08 100644 --- a/app/Jobs/ImportCosts.php +++ b/app/Jobs/ImportCosts.php @@ -161,7 +161,7 @@ class ImportCosts implements ShouldQueue break; - case 'telephone': + case 'phone': $to = Cost\Phone::where('site_id',$this->co->site_id) ->where('cost_id',$this->co->id) ->where('service_phone_id',$so->type->id) @@ -192,7 +192,7 @@ class ImportCosts implements ShouldQueue break; default: - dump(['so'=>$so,'line'=>$line]); + dump(['so'=>$so,'category'=>$so->category,'line'=>$line,'m'=>$m,'r'=>$r]); throw new \Exception(sprintf('ERROR: Service type not handled for service [%s] (%s) on line [%d]',$m[1],$so->category,$c)); } diff --git a/app/Mail/OrderRequestApprove.php b/app/Mail/OrderRequestApprove.php index eb41159..b181bd1 100644 --- a/app/Mail/OrderRequestApprove.php +++ b/app/Mail/OrderRequestApprove.php @@ -43,7 +43,7 @@ class OrderRequestApprove extends Mailable case 'broadband': $subject = sprintf('%s: %s',$this->service->category,$this->service->type->service_address); break; - case 'telephone': $subject = sprintf('%s: %s',$this->service->category,$this->service->type->service_number); + case 'phone': $subject = sprintf('%s: %s',$this->service->category,$this->service->type->service_number); break; default: diff --git a/resources/views/email/admin/order/approve.blade.php b/resources/views/email/admin/order/approve.blade.php index 0d57f2a..12d8137 100644 --- a/resources/views/email/admin/order/approve.blade.php +++ b/resources/views/email/admin/order/approve.blade.php @@ -12,7 +12,7 @@ Please order the following... @case('broadband') | Address | {{ $service->type->service_address }} | @break; -@case('telephone') +@case('phone') | Number | {{ $service->type->service_number }} | | Supplier Details | {{ $service->order_info->join(':') }} | @break; diff --git a/resources/views/email/admin/order/reject.blade.php b/resources/views/email/admin/order/reject.blade.php index 2fc054f..dbd39b3 100644 --- a/resources/views/email/admin/order/reject.blade.php +++ b/resources/views/email/admin/order/reject.blade.php @@ -13,7 +13,7 @@ @case('broadband') | Address | {{ is_object($service->type) ? $service->type->service_address : 'Not Supplied' }} | @break; -@case('telephone') +@case('phone') | Address | {{ is_object($service->type) ? $service->type->service_address : 'Not Supplied' }} | | Supplier Details | {{ join(':',$service->order_info) }} | @break; diff --git a/resources/views/email/admin/service/cancel.blade.php b/resources/views/email/admin/service/cancel.blade.php index af346fc..7c15174 100644 --- a/resources/views/email/admin/service/cancel.blade.php +++ b/resources/views/email/admin/service/cancel.blade.php @@ -12,7 +12,7 @@ Please cancel the following... @case('broadband') | Address | {{ $service->type->service_address }} | @break; -@case('telephone') +@case('phone') | Number | {{ $service->type->service_number }} | | Supplier Details | {{ $service->order_info->join(':') }} | @break; diff --git a/resources/views/email/admin/service/change.blade.php b/resources/views/email/admin/service/change.blade.php index 254575e..db38dbc 100644 --- a/resources/views/email/admin/service/change.blade.php +++ b/resources/views/email/admin/service/change.blade.php @@ -12,7 +12,7 @@ Please change the following... @case('broadband') | Address | {{ $service->type->service_address }} | @break; -@case('telephone') +@case('phone') | Number | {{ $service->type->service_number }} | | Supplier Details | {{ $service->order_info->join(':') }} | @break;