From 14357ade4d5c513c311ffea71287897192dfdeb0 Mon Sep 17 00:00:00 2001 From: Mark Gregory Date: Wed, 16 Sep 2026 16:55:33 +0100 Subject: [PATCH] updates to M3 module --- Modules/M3/Http/Controllers/userPickingStats4.php | 8 +++++--- .../views/liberty-theme/pages/carrierMaint.blade.php | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Modules/M3/Http/Controllers/userPickingStats4.php b/Modules/M3/Http/Controllers/userPickingStats4.php index 3126afd4..e273c753 100644 --- a/Modules/M3/Http/Controllers/userPickingStats4.php +++ b/Modules/M3/Http/Controllers/userPickingStats4.php @@ -97,7 +97,9 @@ class userPickingStats4 extends Controller #echo "$sqlstmt
"; - $lbpf1 = DB::connection(config('m3.connection', 'pgsql'))->select($sqlstmt); + $lbpf1 = $schema->hasTable('lbpf') + ? DB::connection(config('m3.connection', 'pgsql'))->select($sqlstmt) + : []; $lbpf = 0; foreach ($lbpf1 as $key => $val) { @@ -107,7 +109,7 @@ class userPickingStats4 extends Controller $sql = "select * from perfstat where dt='$starting' and a5pickcomu='$user' "; #@dd($sql); - if (isset($request->dates) || isset($request->user)) { + if ((isset($request->dates) || isset($request->user)) && $schema->hasTable('perfstat')) { $statistic4 = DB::connection(config('m3.connection', 'pgsql'))->select($sql); } else { $statistic4 = array(); @@ -306,7 +308,7 @@ class userPickingStats4 extends Controller #error_log("Time required to xyz: " . $duration . "\n", 3, "/temp/v4.log"); return view( - 'liberty-theme.pages.userPickingStats4', + 'm3::liberty-theme.pages.userPickingStats4', compact('statistic4', 'starting', 'user', 'user_array', 'monitor_array', 'totals_array', 'perf_array', 'request', 'no_data') ); diff --git a/Modules/M3/Resources/views/liberty-theme/pages/carrierMaint.blade.php b/Modules/M3/Resources/views/liberty-theme/pages/carrierMaint.blade.php index 366d5206..29d36146 100644 --- a/Modules/M3/Resources/views/liberty-theme/pages/carrierMaint.blade.php +++ b/Modules/M3/Resources/views/liberty-theme/pages/carrierMaint.blade.php @@ -9,9 +9,9 @@
- @if($power_user[0]->R428PWRUSR=="Y") + @if(isset($power_user[0]) && trim((string) ($power_user[0]->R428PWRUSR ?? '')) === 'Y') + data-AT9DPW="{{ ($power_user[0]->R428CO ?? '').($power_user[0]->R428PL ?? '').($power_user[0]->R428WH ?? '') }}">Add Record @endif
@@ -39,7 +39,7 @@ - @if($power_user[0]->R428PWRUSR=="Y") + @if(isset($power_user[0]) && trim((string) ($power_user[0]->R428PWRUSR ?? '')) === 'Y')