Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1602bdd72e | ||
|
|
14357ade4d | ||
|
|
0237b1dc2a | ||
|
|
ce06aa9fac |
@@ -343,36 +343,39 @@ class Helper
|
||||
}
|
||||
|
||||
public static function getUserCOWHSPLT(){
|
||||
# Get Current USER
|
||||
$loggedUser = strtoUpper(m3_user());
|
||||
// dump($loggedUser);
|
||||
$getUsers = DB::connection(config('m3.connection', 'pgsql'))->select("select R428US, R428ADMUSR, R428PWRUSR, R428CO, R428PL, R428WH, R42811A,R42821A from ICM428M where R428US='".$loggedUser."'");
|
||||
|
||||
foreach ($getUsers as $key=>$user) {
|
||||
if(trim($user->R428ADMUSR)=="Y") {
|
||||
# Different logic from Qinclude version : this not an Array
|
||||
$admin_users=trim($user->R428ADMUSR);
|
||||
}
|
||||
if(trim($user->R428PWRUSR)=="Y") {
|
||||
# Different logic from Qinclude version : this not an Array
|
||||
$power_users=trim($user->R428PWRUSR);
|
||||
}
|
||||
if(trim($user->R42811A)=="C") {
|
||||
$csr="Y";
|
||||
}
|
||||
if(trim($user->R42821A)=="Y") {
|
||||
$execUser="Y";
|
||||
}
|
||||
$UserCO = $user->R428CO;
|
||||
$UserWHS = $user->R428WH;
|
||||
$UserPL = $user->R428PL;
|
||||
$defaults = [
|
||||
'UserCO' => '',
|
||||
'UserWHS' => '',
|
||||
'UserPL' => '',
|
||||
];
|
||||
|
||||
$currentUser = [
|
||||
'UserCO' => $UserCO,
|
||||
'UserWHS' => $UserWHS,
|
||||
'UserPL' => $UserPL,
|
||||
$loggedUser = strtoupper(trim((string) m3_user()));
|
||||
if ($loggedUser === '') {
|
||||
return $defaults;
|
||||
}
|
||||
|
||||
try {
|
||||
if (!\Illuminate\Support\Facades\Schema::connection(config('m3.connection', 'pgsql'))->hasTable('icm428m')) {
|
||||
return $defaults;
|
||||
}
|
||||
|
||||
$user = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')
|
||||
->select('R428US', 'R428ADMUSR', 'R428PWRUSR', 'R428CO', 'R428PL', 'R428WH', 'R42811A', 'R42821A')
|
||||
->where('R428US', $loggedUser)
|
||||
->first();
|
||||
|
||||
if (!$user) {
|
||||
return $defaults;
|
||||
}
|
||||
|
||||
return [
|
||||
'UserCO' => trim((string) ($user->R428CO ?? '')),
|
||||
'UserWHS' => trim((string) ($user->R428WH ?? '')),
|
||||
'UserPL' => trim((string) ($user->R428PL ?? '')),
|
||||
];
|
||||
return $currentUser;
|
||||
} catch (\Throwable $e) {
|
||||
\Illuminate\Support\Facades\Log::warning('M3 user context unavailable', ['exception' => $e->getMessage()]);
|
||||
return $defaults;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ use Str;
|
||||
use Log;
|
||||
use Http;
|
||||
use File;
|
||||
use Helper;
|
||||
use Modules\M3\Helpers\Helper;
|
||||
use Modules\M3\Http\Controllers\GetContentsController;
|
||||
|
||||
//use Request;
|
||||
|
||||
@@ -9,7 +9,7 @@ use DB;
|
||||
use Config;
|
||||
use Str;
|
||||
use Log;
|
||||
use Helper;
|
||||
use Modules\M3\Helpers\Helper;
|
||||
|
||||
class M3Controller extends Controller
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ use Cache;
|
||||
use DateTime;
|
||||
use Smalot\PdfParser\Parser;
|
||||
use File;
|
||||
use Helper;
|
||||
use Modules\M3\Helpers\Helper;
|
||||
use Json;
|
||||
|
||||
class M3InventoryReport extends Controller
|
||||
|
||||
@@ -14,7 +14,7 @@ use Cache;
|
||||
use DateTime;
|
||||
use Smalot\PdfParser\Parser;
|
||||
use File;
|
||||
use Helper;
|
||||
use Modules\M3\Helpers\Helper;
|
||||
|
||||
class PdfStorage extends Controller
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ use Cache;
|
||||
use DateTime;
|
||||
use Smalot\PdfParser\Parser;
|
||||
use File;
|
||||
use Helper;
|
||||
use Modules\M3\Helpers\Helper;
|
||||
|
||||
class ReplenAPI extends Controller
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ use Cache;
|
||||
use DateTime;
|
||||
use Smalot\PdfParser\Parser;
|
||||
use File;
|
||||
use Helper;
|
||||
use Modules\M3\Helpers\Helper;
|
||||
|
||||
class TransferAPI extends Controller
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ use Cache;
|
||||
use DateTime;
|
||||
use Smalot\PdfParser\Parser;
|
||||
use File;
|
||||
use Helper;
|
||||
use Modules\M3\Helpers\Helper;
|
||||
|
||||
class TwoShipAPIs extends Controller
|
||||
{
|
||||
|
||||
@@ -14,33 +14,20 @@ class M3DeliveryController extends Controller
|
||||
{
|
||||
|
||||
public static function index(Request $request) {
|
||||
|
||||
$power_user = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')
|
||||
->select('R428PWRUSR','R428US','R428CO','R428PL','R428WH')
|
||||
->where('R428US','=',strtoUpper(m3_user()))
|
||||
->first();
|
||||
$co = $power_user->R428CO;
|
||||
$plant = $power_user->R428PL;
|
||||
$whs = $power_user->R428WH;
|
||||
$ICM664M = DB::connection(config('m3.connection', 'pgsql'))->select("select * from ICM664M
|
||||
where AVCO='$co' and AVPLANT='$plant' and AVWHS='$whs'");
|
||||
$IC670M = DB::connection(config('m3.connection', 'pgsql'))->select("select * from IC670M where WDCO='$co' and WDPL='$plant' and WDWHS='$whs'");
|
||||
$shipvia = DB::connection(config('m3.connection', 'pgsql'))->select("select AXCODE, AXDESC from ICM319M order by 1");
|
||||
#646 where AXCO='$co' and AXWHS='$whs' and AXPLANT='$plant'
|
||||
$connection = config('m3.connection', 'pgsql');
|
||||
$power_user = (object) ['R428PWRUSR'=>'N','R428US'=>strtoUpper(m3_user()),'R428CO'=>'','R428PL'=>'','R428WH'=>''];
|
||||
if (\Illuminate\Support\Facades\Schema::connection($connection)->hasTable('icm428m')) {
|
||||
$power_user = DB::connection($connection)->table('icm428m')->select('R428PWRUSR','R428US','R428CO','R428PL','R428WH')
|
||||
->where('R428US',strtoUpper(m3_user()))->first() ?? $power_user;
|
||||
}
|
||||
$co=$power_user->R428CO; $plant=$power_user->R428PL; $whs=$power_user->R428WH;
|
||||
$ICM664M = \Illuminate\Support\Facades\Schema::connection($connection)->hasTable('icm664m')
|
||||
? DB::connection($connection)->table('icm664m')->where('AVCO',$co)->where('AVPLANT',$plant)->where('AVWHS',$whs)->get() : collect();
|
||||
$IC670M = \Illuminate\Support\Facades\Schema::connection($connection)->hasTable('ic670m')
|
||||
? DB::connection($connection)->table('ic670m')->where('WDCO',$co)->where('WDPL',$plant)->where('WDWHS',$whs)->get() : collect();
|
||||
$shipvia = \Illuminate\Support\Facades\Schema::connection($connection)->hasTable('icm319m')
|
||||
? DB::connection($connection)->table('icm319m')->select('AXCODE','AXDESC')->orderBy('AXCODE')->get() : collect();
|
||||
return view('m3::liberty-theme.pages.M3Delivery', compact('ICM664M','IC670M','power_user','shipvia'));
|
||||
|
||||
// AVCO AVCO CHARACTER 3 No ' ' Division
|
||||
// AVWHS AVWHS CHARACTER 3 No ' ' Warehouse
|
||||
// AVPLANT AVPLANT CHARACTER 3 No ' ' Plant
|
||||
// AVDELMETH AVDELMETH CHARACTER 4 No ' ' Delivery method
|
||||
// AVSHPVIA AVSHPVIA CHARACTER 4 No ' ' Sentinel ship via
|
||||
// AVSHSRT AVSHSRT CHARACTER 6 No ' ' Sentinel route
|
||||
// AVSHORCL AVSHORCL CHARACTER 3 No ' ' Sentinel intl code
|
||||
// AVSPR1A01 AVSPR1A01 CHARACTER 1 No ' ' Spare field 1A 01
|
||||
// AVSPR1A02 AVSPR1A02 CHARACTER 1 No ' ' Spare field 1A 02
|
||||
// AVSPR10A01 AVSPR10A01 CHARACTER 10 No ' ' Spare field 10A 1
|
||||
// AVSPR15A01 AVSPR15A01 CHARACTER 15 No ' ' Spare field 15A 1
|
||||
// AVSPR30A01 AVSPR30A01 CHARACTER 30 No ' ' Spare field 30A 1
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -23,9 +23,10 @@ class M3ErrorsDispController extends Controller
|
||||
$skipdates = isset($request->skipdates) ? trim($request->skipdates) : "N";
|
||||
|
||||
# Get users from ICM428M
|
||||
$ICM428M = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')
|
||||
->select('R428US', 'R428FIRST', 'R428FAMILY')
|
||||
->get();
|
||||
$connection = config('m3.connection', 'pgsql');
|
||||
$ICM428M = \Illuminate\Support\Facades\Schema::connection($connection)->hasTable('icm428m')
|
||||
? DB::connection($connection)->table('icm428m')->select('R428US', 'R428FIRST', 'R428FAMILY')->get()
|
||||
: collect();
|
||||
$ICM428MCOL = collect($ICM428M);
|
||||
$ICM428MCOL->filter(function ($value) {
|
||||
return $value->R428US = trim($value->R428US);
|
||||
|
||||
@@ -19,7 +19,10 @@ class M3GetPDFFromCacheController extends Controller
|
||||
// Parse PDF file and build necessary objects.
|
||||
$parser = new \Smalot\PdfParser\Parser();
|
||||
|
||||
$aggno = $aggmsg = ""; #$carrier = $trackingno = "";
|
||||
$aggno = $aggmsg = "";
|
||||
$IC670M = $PDFArray = $carrier = $trackingno = $ICM688M1 = [];
|
||||
$AYMACPKR = $WHDDA = $COMPANY = $PLANT = $WHS = '';
|
||||
#$carrier = $trackingno = "";
|
||||
|
||||
# PDF File PATH
|
||||
$pdfFilePath = Config::get('arrays.PdfPath');
|
||||
|
||||
@@ -15,6 +15,10 @@ use Storage;
|
||||
class OrderLinesOfClosedOrder extends Controller
|
||||
{
|
||||
public static function index(Request $request){
|
||||
$IC670M = $ICM688M2 = [];
|
||||
$WHDDA = $COMPANY = $PLANT = $WHS = '';
|
||||
$REPORTDATEDisp = today()->format('Ymd');
|
||||
$allReportsUrls = [];
|
||||
try {
|
||||
$SHUSER = m3_user() !== '' ? Str::upper(trim(m3_user())) : '';
|
||||
// dd($SHUSER);
|
||||
|
||||
@@ -23,10 +23,10 @@ class ReplenishSettingsController extends Controller
|
||||
# Get Logged user Id
|
||||
$userId = m3_user() !== '' ? strtoupper(m3_user()) : '' ;
|
||||
// $userId = 'E1135818'; // Brad : E1135818 Malak : E2011812 ACOM_PDF
|
||||
$ICM428M = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')
|
||||
->where('R428US',$userId)
|
||||
->where('R428STS','A')
|
||||
->first();
|
||||
$connection = config('m3.connection', 'pgsql');
|
||||
$ICM428M = \Illuminate\Support\Facades\Schema::connection($connection)->hasTable('icm428m')
|
||||
? DB::connection($connection)->table('icm428m')->where('R428US',$userId)->where('R428STS','A')->first()
|
||||
: null;
|
||||
|
||||
$userCO = isset($ICM428M->R428CO) ? $ICM428M->R428CO : '';
|
||||
$userPL = isset($ICM428M->R428PL) ? $ICM428M->R428PL : '';
|
||||
@@ -34,11 +34,13 @@ class ReplenishSettingsController extends Controller
|
||||
|
||||
if ($userCO!='') {
|
||||
# Warehouse Table
|
||||
$IC670M = DB::connection(config('m3.connection', 'pgsql'))->table('ic670m')
|
||||
$IC670M = \Illuminate\Support\Facades\Schema::connection($connection)->hasTable('ic670m')
|
||||
? DB::connection($connection)->table('ic670m')
|
||||
->where('WDCO',$userCO)
|
||||
->where('WDPL',$userPL)
|
||||
->where('WDWHS',$userWH)
|
||||
->get();
|
||||
->get()
|
||||
: [];
|
||||
}
|
||||
else{
|
||||
// $REFCAT658 =[];
|
||||
@@ -151,10 +153,10 @@ class ReplenishSettingsController extends Controller
|
||||
# Get Logged user Id
|
||||
$userId = m3_user() !== '' ? strtoupper(m3_user()) : '' ;
|
||||
// $userId = 'E1135818'; // Brad : E1135818 Malak : E2011812 ACOM_PDF
|
||||
$ICM428M = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')
|
||||
->where('R428US',$userId)
|
||||
->where('R428STS','A')
|
||||
->first();
|
||||
$connection = config('m3.connection', 'pgsql');
|
||||
$ICM428M = \Illuminate\Support\Facades\Schema::connection($connection)->hasTable('icm428m')
|
||||
? DB::connection($connection)->table('icm428m')->where('R428US',$userId)->where('R428STS','A')->first()
|
||||
: null;
|
||||
|
||||
$userCO = isset($ICM428M->R428CO) ? $ICM428M->R428CO : '';
|
||||
$userPL = isset($ICM428M->R428PL) ? $ICM428M->R428PL : '';
|
||||
|
||||
@@ -8,7 +8,7 @@ use Config;
|
||||
use Illuminate\Http\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Modules\M3\Models\ICM160M;
|
||||
use Helper;
|
||||
use Modules\M3\Helpers\Helper;
|
||||
|
||||
|
||||
class carrierMaintController extends Controller
|
||||
@@ -17,10 +17,19 @@ class carrierMaintController extends Controller
|
||||
public static function index(Request $request) {
|
||||
$currentUser = Helper::getUserCOWHSPLT();
|
||||
$UserCO = $currentUser['UserCO'] ?? '';
|
||||
$ICM160M = DB::connection(config('m3.connection', 'pgsql'))->select("
|
||||
select canum, canam, substr(CATPID,1,3) as TwoshipCarrierCode, substr(CATPID,4,1) as ParcelCarrierCode, caspr10A01, caspr1A01
|
||||
from icm160m WHERE CACO='$UserCO'");
|
||||
$power_user = DB::connection(config('m3.connection', 'pgsql'))->select("select R428PWRUSR, R428CO, R428PL, R428WH from ICM428M where R428US='".strtoUpper(m3_user())."'");
|
||||
$ICM160M = [];
|
||||
$power_user = [];
|
||||
$schema = \Illuminate\Support\Facades\Schema::connection(config('m3.connection', 'pgsql'));
|
||||
if ($schema->hasTable('icm160m')) {
|
||||
$ICM160M = DB::connection(config('m3.connection', 'pgsql'))->select("
|
||||
select canum, canam, substr(CATPID,1,3) as TwoshipCarrierCode, substr(CATPID,4,1) as ParcelCarrierCode, caspr10A01, caspr1A01
|
||||
from icm160m WHERE CACO=?", [$UserCO]);
|
||||
}
|
||||
if ($schema->hasTable('icm428m')) {
|
||||
$power_user = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')
|
||||
->select('R428PWRUSR', 'R428CO', 'R428PL', 'R428WH')
|
||||
->where('R428US', strtoUpper(m3_user()))->get()->all();
|
||||
}
|
||||
return view('m3::liberty-theme.pages.carrierMaint', compact('ICM160M','power_user'));
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,12 @@ use Log;
|
||||
class execSummaryController extends Controller
|
||||
{
|
||||
public static function index(Request $request){
|
||||
$IC670M = collect();
|
||||
$WHDDA = '';
|
||||
$COMPANY = '110';
|
||||
$PLANT = '144';
|
||||
$WHS = '322';
|
||||
|
||||
try {
|
||||
# Ajax Call
|
||||
if ($request->ajax()) {
|
||||
|
||||
@@ -14,24 +14,19 @@ class palletQtyController extends Controller
|
||||
{
|
||||
|
||||
public static function index(Request $request) {
|
||||
|
||||
#$IC670M = DB::connection(config('m3.connection', 'pgsql'))->table('ic670m')->get();
|
||||
#$power_user = DB::connection(config('m3.connection', 'pgsql'))->select("select R428PWRUSR, R428CO, R428PL, R428WH from ICM428M where R428US='".strtoUpper(m3_user())."'");
|
||||
$power_user = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')
|
||||
->select('R428PWRUSR','R428US','R428CO','R428PL','R428WH')
|
||||
->where('R428US','=',strtoUpper(m3_user()))
|
||||
->first();
|
||||
$co = $power_user->R428CO;
|
||||
$plant = $power_user->R428PL;
|
||||
$whs = $power_user->R428WH;
|
||||
$ICM709M = DB::connection(config('m3.connection', 'pgsql'))->table('icm709m')
|
||||
->where('AT9CO','=',$co)
|
||||
->where('AT9PLT','=',$plant)
|
||||
->where('AT9WHS','=',$whs)
|
||||
->get();
|
||||
$IC670M = DB::connection(config('m3.connection', 'pgsql'))->select("select * from IC670M where WDCO='$co' and WDPL='$plant' and WDWHS='$whs'");
|
||||
$connection = config('m3.connection', 'pgsql');
|
||||
$power_user = (object) ['R428PWRUSR'=>'N','R428US'=>strtoUpper(m3_user()),'R428CO'=>'','R428PL'=>'','R428WH'=>''];
|
||||
if (\Illuminate\Support\Facades\Schema::connection($connection)->hasTable('icm428m')) {
|
||||
$power_user = DB::connection($connection)->table('icm428m')
|
||||
->select('R428PWRUSR','R428US','R428CO','R428PL','R428WH')
|
||||
->where('R428US','=',strtoUpper(m3_user()))->first() ?? $power_user;
|
||||
}
|
||||
$co=$power_user->R428CO; $plant=$power_user->R428PL; $whs=$power_user->R428WH;
|
||||
$ICM709M = \Illuminate\Support\Facades\Schema::connection($connection)->hasTable('icm709m')
|
||||
? DB::connection($connection)->table('icm709m')->where('AT9CO',$co)->where('AT9PLT',$plant)->where('AT9WHS',$whs)->get() : collect();
|
||||
$IC670M = \Illuminate\Support\Facades\Schema::connection($connection)->hasTable('ic670m')
|
||||
? DB::connection($connection)->table('ic670m')->where('WDCO',$co)->where('WDPL',$plant)->where('WDWHS',$whs)->get() : collect();
|
||||
return view('m3::liberty-theme.pages.palletQty', compact('ICM709M','IC670M','power_user'));
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -14,28 +14,20 @@ class userControlController extends Controller
|
||||
{
|
||||
|
||||
public static function index(Request $request) {
|
||||
|
||||
#$sqlstmt="select * from ICM428M";
|
||||
#$ICM428M = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')->get();
|
||||
$ICM428M = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')
|
||||
->select('R428US','R428CO', 'R428WH')
|
||||
->where('R428US','=',strtoUpper(m3_user()))
|
||||
->first();
|
||||
$co = $ICM428M->R428CO;
|
||||
$whs = $ICM428M->R428WH;
|
||||
|
||||
$ICM428M = DB::connection(config('m3.connection', 'pgsql'))->select("SELECT * FROM ICM428M where R428CO='$co' and R428WH='$whs'");
|
||||
#765 add DATE_PASSWORD_EXPIRES as DATE_EXPIRED, SET_PASSWORD_TO_EXPIRE as EXPIRED
|
||||
$USER_INFO = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')->selectRaw('R428US as USERPRF, R428STS as STATUS, NULL as DATE_EXPIRED, NULL as EXPIRED')->get()->all();
|
||||
#echo "<pre>"; var_dump($USER_INFO); echo "</pre>";
|
||||
$power_user = DB::connection(config('m3.connection', 'pgsql'))->select("select R428PWRUSR, R428CO, R428PL, R428WH from ICM428M where R428US='".strtoUpper(m3_user())."'");
|
||||
#765
|
||||
# $expired_users = DB::connection(config('m3.connection', 'pgsql'))->select("SELECT USER_PROFILE FROM TABLE (SYSTOOLS.AUDIT_JOURNAL_CP () ) WHERE PASSWORD_EXPIRED = '*YES'");
|
||||
# echo "<pre>"; print_r($expired_users); echo "</pre>";
|
||||
|
||||
$IC670M = DB::connection(config('m3.connection', 'pgsql'))->table('ic670m')->get();
|
||||
$connection = config('m3.connection', 'pgsql');
|
||||
$profile = null;
|
||||
if (\Illuminate\Support\Facades\Schema::connection($connection)->hasTable('icm428m')) {
|
||||
$profile = DB::connection($connection)->table('icm428m')->where('R428US',strtoUpper(m3_user()))->first();
|
||||
}
|
||||
$co=$profile->R428CO ?? ''; $whs=$profile->R428WH ?? '';
|
||||
$ICM428M = \Illuminate\Support\Facades\Schema::connection($connection)->hasTable('icm428m')
|
||||
? DB::connection($connection)->table('icm428m')->where('R428CO',$co)->where('R428WH',$whs)->get() : collect();
|
||||
$USER_INFO = \Illuminate\Support\Facades\Schema::connection($connection)->hasTable('icm428m')
|
||||
? DB::connection($connection)->table('icm428m')->selectRaw('R428US as USERPRF, R428STS as STATUS, NULL as DATE_EXPIRED, NULL as EXPIRED')->get()->all() : [];
|
||||
$power_user = [(object)['R428PWRUSR'=>$profile->R428PWRUSR ?? 'N','R428CO'=>$co,'R428PL'=>$profile->R428PL ?? '','R428WH'=>$whs]];
|
||||
$IC670M = \Illuminate\Support\Facades\Schema::connection($connection)->hasTable('ic670m')
|
||||
? DB::connection($connection)->table('ic670m')->get() : collect();
|
||||
return view('m3::liberty-theme.pages.userControl', compact('ICM428M','IC670M','power_user','USER_INFO'));
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -32,21 +32,25 @@ class userPickingStats4 extends Controller
|
||||
#618
|
||||
# Get Logged User CO & WH
|
||||
# Get Users from ICM428M
|
||||
$ICM428M = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')
|
||||
->select('R428US','R428CO', 'R428WH')
|
||||
->where('R428US','=',strtoUpper(m3_user()))
|
||||
->first();
|
||||
$co = $ICM428M->R428CO;
|
||||
$whs = $ICM428M->R428WH;
|
||||
$co = '';
|
||||
$whs = '';
|
||||
$ICM428M = [];
|
||||
$schema = \Illuminate\Support\Facades\Schema::connection(config('m3.connection', 'pgsql'));
|
||||
if ($schema->hasTable('icm428m')) {
|
||||
$profile = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')
|
||||
->select('R428US','R428CO', 'R428WH')
|
||||
->where('R428US','=',strtoUpper(m3_user()))
|
||||
->first();
|
||||
$co = $profile->R428CO ?? '';
|
||||
$whs = $profile->R428WH ?? '';
|
||||
|
||||
$ICM428M = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')
|
||||
->selectRaw("R428US as userprf, (trim(R428FIRST) || ' ' || trim(R428FAMILY)) as name, R428EMPCDE as empno")
|
||||
->where('R428STS', 'A')->where('R428EMPCDE', '!=', 0)
|
||||
->where('R428CO', $co)->where('R428WH', $whs)->get()->all();
|
||||
}
|
||||
|
||||
$user_array=array();
|
||||
#$sqlstmt="SELECT R428US as userprf, R428FIRST, R428FAMILY, R428EMPCDE as empno FROM ICM428M where R428EMPCDE!=0";
|
||||
$sqlstmt="SELECT R428US as userprf, (trim(R428FIRST) || ' ' || trim(R428FAMILY)) as name, R428EMPCDE as empno FROM ICM428M
|
||||
where R428STS='A' and R428EMPCDE!=0 and R428CO='$co' and R428WH='$whs'";
|
||||
$ICM428M = DB::connection(config('m3.connection', 'pgsql'))->select($sqlstmt);
|
||||
// ->selectRaw("R428US, (trim(R428FIRST) || ' ' || trim(R428FAMILY)), R428EMPCDE ")
|
||||
// ->where("R428EMPCDE!=0")
|
||||
// ->get();
|
||||
#while($row = odbc_fetch_object($result)) {
|
||||
$x=0;
|
||||
foreach($ICM428M as $key=>$row) {
|
||||
@@ -93,7 +97,9 @@ class userPickingStats4 extends Controller
|
||||
|
||||
#echo "$sqlstmt<br>";
|
||||
|
||||
$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) {
|
||||
@@ -103,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();
|
||||
@@ -302,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')
|
||||
);
|
||||
|
||||
|
||||
@@ -17,31 +17,40 @@ class userPickingStats5 extends Controller
|
||||
public static function index(Request $request){
|
||||
|
||||
#618
|
||||
# Get Logged User CO & WH
|
||||
# Get Users from ICM428M
|
||||
$ICM428M = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')
|
||||
->select('R428US','R428CO', 'R428WH')
|
||||
->where('R428US','=',strtoUpper(m3_user()))
|
||||
->first();
|
||||
$co = $ICM428M->R428CO;
|
||||
$whs = $ICM428M->R428WH;
|
||||
# Get Logged User CO & WH. Legacy M3 profile data may not yet exist in PostgreSQL.
|
||||
$co = '';
|
||||
$whs = '';
|
||||
$user_array = [];
|
||||
try {
|
||||
if (\Illuminate\Support\Facades\Schema::connection(config('m3.connection', 'pgsql'))->hasTable('icm428m')) {
|
||||
$profile = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')
|
||||
->select('R428US','R428CO', 'R428WH')
|
||||
->where('R428US', strtoupper((string) m3_user()))
|
||||
->first();
|
||||
$co = trim((string) ($profile->R428CO ?? ''));
|
||||
$whs = trim((string) ($profile->R428WH ?? ''));
|
||||
|
||||
#@dd($request);
|
||||
#$user_array=Config::get('arrays.user_array');
|
||||
$user_array=array();
|
||||
$sqlstmt="SELECT R428US as userprf, (trim(R428FIRST) || ' ' || trim(R428FAMILY)) as name, R428EMPCDE as empno FROM ICM428M
|
||||
where R428EMPCDE!=0 and R428CO='$co' and R428WH='$whs'";
|
||||
$ICM428M = DB::connection(config('m3.connection', 'pgsql'))->select($sqlstmt);
|
||||
$x=0;
|
||||
foreach($ICM428M as $key=>$row) {
|
||||
// print_r($row);
|
||||
$user_array[$x]['userprf']=trim($row->USERPRF);
|
||||
#$user_array[$x]['name']=trim($row->R428FIRST)+' '+trim($row->R428FAMILY);
|
||||
$user_array[$x]['name']=trim($row->NAME);
|
||||
$user_array[$x]['empno']=$row->EMPNO;
|
||||
$x++;
|
||||
if ($co !== '' && $whs !== '') {
|
||||
$rows = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')
|
||||
->selectRaw("R428US as userprf, (trim(R428FIRST) || ' ' || trim(R428FAMILY)) as name, R428EMPCDE as empno")
|
||||
->where('R428EMPCDE', '!=', 0)
|
||||
->where('R428CO', $co)
|
||||
->where('R428WH', $whs)
|
||||
->get();
|
||||
foreach ($rows as $row) {
|
||||
$user_array[] = [
|
||||
'userprf' => trim((string) $row->userprf),
|
||||
'name' => trim((string) $row->name),
|
||||
'empno' => $row->empno,
|
||||
];
|
||||
}
|
||||
array_multisort(array_column($user_array, 'name'), SORT_ASC, $user_array);
|
||||
}
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
\Illuminate\Support\Facades\Log::warning('M3 picking user list unavailable', ['exception' => $e->getMessage()]);
|
||||
$user_array = [];
|
||||
}
|
||||
array_multisort(array_column($user_array, 'name'), SORT_ASC, $user_array);
|
||||
|
||||
// Filter by date
|
||||
if (isset($request->dates)) {
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/* M3 integration inside the Core WMS shell. Core owns the global sidebar, topbar, typography and appearance. */
|
||||
.m3-core-page{font-family:inherit;color:inherit;width:100%;max-width:1600px;margin:0 auto;padding:1.5rem}
|
||||
.m3-core-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1.5rem;padding:1.5rem;border:1px solid rgb(228 228 231);border-radius:1.5rem;background:linear-gradient(135deg,#020617,#0f172a 55%,#172554);color:#fff}
|
||||
.m3-core-eyebrow{margin:0 0 .5rem;font-size:.75rem;font-weight:700;letter-spacing:.28em;color:#bfdbfe}
|
||||
.m3-core-title{margin:0;font:inherit;font-size:2rem;font-weight:650;line-height:1.15;letter-spacing:-.025em;color:#fff}
|
||||
.m3-core-context{margin:.5rem 0 0;color:#dbeafe}
|
||||
.m3-core-actions{display:flex;gap:.5rem;flex-wrap:wrap}
|
||||
.m3-core-breadcrumb{margin-bottom:1rem;color:rgb(82 82 91);font-size:.875rem}
|
||||
.m3-core-content{color:rgb(24 24 27)}
|
||||
.m3-core-content .container-fluid{padding:0}
|
||||
.m3-core-content .panel,.m3-core-content .card,.m3-core-content .well{border:1px solid rgb(228 228 231);border-radius:1rem;background:#fff;box-shadow:0 1px 2px rgb(0 0 0/.04);overflow:hidden}
|
||||
.m3-core-content .panel-heading,.m3-core-content .card-header{background:rgb(250 250 250);border-bottom:1px solid rgb(228 228 231);padding:.9rem 1rem;font-weight:600}
|
||||
.m3-core-content table{color:inherit;background:transparent}
|
||||
.m3-core-content .table>tbody>tr>td,.m3-core-content .table>tbody>tr>th,.m3-core-content .table>tfoot>tr>td,.m3-core-content .table>tfoot>tr>th,.m3-core-content .table>thead>tr>td,.m3-core-content .table>thead>tr>th{border-color:rgb(228 228 231)}
|
||||
.m3-core-content input,.m3-core-content select,.m3-core-content textarea,.m3-core-content button{font-family:inherit}
|
||||
.m3-core-alert{padding:1rem;border:1px solid rgb(254 202 202);border-radius:1rem;background:rgb(254 242 242);color:rgb(153 27 27);font-weight:600}
|
||||
html.dark .m3-core-header{border-color:rgb(63 63 70);background:linear-gradient(135deg,#020617,#0f172a 55%,#172554)}
|
||||
html.dark .m3-core-breadcrumb{color:rgb(161 161 170)}
|
||||
html.dark .m3-core-content{color:rgb(244 244 245)}
|
||||
html.dark .m3-core-content .panel,html.dark .m3-core-content .card,html.dark .m3-core-content .well{border-color:rgb(63 63 70);background:rgb(24 24 27)}
|
||||
html.dark .m3-core-content .panel-heading,html.dark .m3-core-content .card-header{background:rgb(39 39 42);border-color:rgb(63 63 70);color:rgb(244 244 245)}
|
||||
html.dark .m3-core-content .table{color:rgb(244 244 245)}
|
||||
html.dark .m3-core-content .table>tbody>tr>td,html.dark .m3-core-content .table>tbody>tr>th,html.dark .m3-core-content .table>tfoot>tr>td,html.dark .m3-core-content .table>tfoot>tr>th,html.dark .m3-core-content .table>thead>tr>td,html.dark .m3-core-content .table>thead>tr>th{border-color:rgb(63 63 70)}
|
||||
html.dark .m3-core-content input,html.dark .m3-core-content select,html.dark .m3-core-content textarea{background:rgb(39 39 42);border-color:rgb(82 82 91);color:rgb(244 244 245)}
|
||||
html.dark .m3-core-alert{border-color:rgb(127 29 29);background:rgb(69 10 10);color:rgb(254 202 202)}
|
||||
@media(max-width:768px){.m3-core-page{padding:1rem}.m3-core-header{padding:1.25rem}.m3-core-title{font-size:1.6rem}}
|
||||
@@ -0,0 +1,26 @@
|
||||
/* M3 integration inside the Core WMS shell. Core owns the global sidebar, topbar, typography and appearance. */
|
||||
.m3-core-page{font-family:inherit;color:inherit;width:100%;max-width:1600px;margin:0 auto;padding:1.5rem}
|
||||
.m3-core-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1.5rem;padding:1.5rem;border:1px solid rgb(228 228 231);border-radius:1.5rem;background:linear-gradient(135deg,#020617,#0f172a 55%,#172554);color:#fff}
|
||||
.m3-core-eyebrow{margin:0 0 .5rem;font-size:.75rem;font-weight:700;letter-spacing:.28em;color:#bfdbfe}
|
||||
.m3-core-title{margin:0;font:inherit;font-size:2rem;font-weight:650;line-height:1.15;letter-spacing:-.025em;color:#fff}
|
||||
.m3-core-context{margin:.5rem 0 0;color:#dbeafe}
|
||||
.m3-core-actions{display:flex;gap:.5rem;flex-wrap:wrap}
|
||||
.m3-core-breadcrumb{margin-bottom:1rem;color:rgb(82 82 91);font-size:.875rem}
|
||||
.m3-core-content{color:rgb(24 24 27)}
|
||||
.m3-core-content .container-fluid{padding:0}
|
||||
.m3-core-content .panel,.m3-core-content .card,.m3-core-content .well{border:1px solid rgb(228 228 231);border-radius:1rem;background:#fff;box-shadow:0 1px 2px rgb(0 0 0/.04);overflow:hidden}
|
||||
.m3-core-content .panel-heading,.m3-core-content .card-header{background:rgb(250 250 250);border-bottom:1px solid rgb(228 228 231);padding:.9rem 1rem;font-weight:600}
|
||||
.m3-core-content table{color:inherit;background:transparent}
|
||||
.m3-core-content .table>tbody>tr>td,.m3-core-content .table>tbody>tr>th,.m3-core-content .table>tfoot>tr>td,.m3-core-content .table>tfoot>tr>th,.m3-core-content .table>thead>tr>td,.m3-core-content .table>thead>tr>th{border-color:rgb(228 228 231)}
|
||||
.m3-core-content input,.m3-core-content select,.m3-core-content textarea,.m3-core-content button{font-family:inherit}
|
||||
.m3-core-alert{padding:1rem;border:1px solid rgb(254 202 202);border-radius:1rem;background:rgb(254 242 242);color:rgb(153 27 27);font-weight:600}
|
||||
html.dark .m3-core-header{border-color:rgb(63 63 70);background:linear-gradient(135deg,#020617,#0f172a 55%,#172554)}
|
||||
html.dark .m3-core-breadcrumb{color:rgb(161 161 170)}
|
||||
html.dark .m3-core-content{color:rgb(244 244 245)}
|
||||
html.dark .m3-core-content .panel,html.dark .m3-core-content .card,html.dark .m3-core-content .well{border-color:rgb(63 63 70);background:rgb(24 24 27)}
|
||||
html.dark .m3-core-content .panel-heading,html.dark .m3-core-content .card-header{background:rgb(39 39 42);border-color:rgb(63 63 70);color:rgb(244 244 245)}
|
||||
html.dark .m3-core-content .table{color:rgb(244 244 245)}
|
||||
html.dark .m3-core-content .table>tbody>tr>td,html.dark .m3-core-content .table>tbody>tr>th,html.dark .m3-core-content .table>tfoot>tr>td,html.dark .m3-core-content .table>tfoot>tr>th,html.dark .m3-core-content .table>thead>tr>td,html.dark .m3-core-content .table>thead>tr>th{border-color:rgb(63 63 70)}
|
||||
html.dark .m3-core-content input,html.dark .m3-core-content select,html.dark .m3-core-content textarea{background:rgb(39 39 42);border-color:rgb(82 82 91);color:rgb(244 244 245)}
|
||||
html.dark .m3-core-alert{border-color:rgb(127 29 29);background:rgb(69 10 10);color:rgb(254 202 202)}
|
||||
@media(max-width:768px){.m3-core-page{padding:1rem}.m3-core-header{padding:1.25rem}.m3-core-title{font-size:1.6rem}}
|
||||
@@ -58,125 +58,35 @@
|
||||
// dump($callingProgramPacking);
|
||||
@endphp
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}" />
|
||||
<title>@yield('title') - {{ config('app.name', 'WMS') }}</title>
|
||||
|
||||
{{-- Use Core's favicon set so M3 keeps the same browser identity as WMS. --}}
|
||||
<link rel="icon" href="{{ asset('favicons/favicon.ico') }}" sizes="any">
|
||||
<link rel="icon" href="{{ asset('favicons/favicon.svg') }}" type="image/svg+xml">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ asset('favicons/favicon-32x32.png') }}">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="{{ asset('favicons/favicon-192x192.png') }}">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ asset('favicons/apple-touch-icon.png') }}">
|
||||
<link rel="manifest" href="{{ asset('favicons/site.webmanifest') }}">
|
||||
<meta name="application-name" content="{{ config('app.name') }}">
|
||||
<meta name="apple-mobile-web-app-title" content="{{ config('app.name') }}">
|
||||
<meta name="msapplication-config" content="{{ asset('favicons/browserconfig.xml') }}">
|
||||
|
||||
{{-- Load the same locally managed font family used by Core. --}}
|
||||
@fonts
|
||||
<x-layouts.app :title="trim($__env->yieldContent('title', 'M3'))">
|
||||
<div class="m3-core-page" data-m3-module>
|
||||
@include('m3::liberty-theme.partials.styles')
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/js/all.min.js" crossorigin="anonymous"></script>
|
||||
</head>
|
||||
<body class="sb-nav-fixed">
|
||||
@include('m3::liberty-theme.partials.top-navigation')
|
||||
<div id="layoutSidenav">
|
||||
@if ( !($pdfURL && $callingProgramPacking))
|
||||
@include('m3::liberty-theme.partials.left-navigation')
|
||||
@endif
|
||||
<link href="{{ route('m3.assets', ['path' => 'liberty-theme/css/m3-core-shell.css']) }}" rel="stylesheet" />
|
||||
|
||||
<div id="layoutSidenav_content">
|
||||
<main>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
@yield('breadcrumb')
|
||||
</div>
|
||||
<div class="page-btn">
|
||||
@yield('btn')
|
||||
</div>
|
||||
<!-- /.col-lg-12 -->
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
@if( $csr=='')
|
||||
@yield('content')
|
||||
@elseif( $csr=='Y' && $pdfURL)
|
||||
@yield('content')
|
||||
@else
|
||||
{!! '<h1 class="text-center">403 - Unauthorized</h1>' !!}
|
||||
@endif
|
||||
<!-- /.container-fluid -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /#page-wrapper -->
|
||||
</main>
|
||||
<footer class="py-4 bg-light mt-auto">
|
||||
@include('m3::liberty-theme.partials.footer')
|
||||
</footer>
|
||||
<div class="m3-core-header">
|
||||
<div>
|
||||
<p class="m3-core-eyebrow">M3 INTEGRATION</p>
|
||||
<h1 class="m3-core-title">@yield('title', 'M3')</h1>
|
||||
@if($WDWNAM !== '')
|
||||
<p class="m3-core-context">{{ $WDWNAM }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="m3-core-actions">@yield('btn')</div>
|
||||
</div>
|
||||
|
||||
@hasSection('breadcrumb')
|
||||
<div class="m3-core-breadcrumb">@yield('breadcrumb')</div>
|
||||
@endif
|
||||
|
||||
<section class="m3-core-content">
|
||||
@if($csr === '' || ($csr === 'Y' && $pdfURL))
|
||||
@yield('content')
|
||||
@else
|
||||
<div class="m3-core-alert">403 - Unauthorized</div>
|
||||
@endif
|
||||
</section>
|
||||
|
||||
@include('m3::liberty-theme.partials.scripts')
|
||||
@yield('scripts')
|
||||
</body>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#R428DPWSel").on('change', function() {
|
||||
var R428DPW = $(this).val();
|
||||
var R428US = '{{ $loggedUser }}';
|
||||
var currentWHS = $(this).find('option:selected').text();
|
||||
// console.log(R428DPW);
|
||||
// console.log(R428US);
|
||||
|
||||
var form_post2 = {
|
||||
R428DPW : R428DPW,
|
||||
R428US : R428US,
|
||||
_token : '{{ csrf_token() }}'
|
||||
};
|
||||
// console.log(form_post2);
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('m3.userprofileupdateajax') }}",
|
||||
type: "POST",
|
||||
data: form_post2,
|
||||
success: function(response) {
|
||||
if(response.success==true){
|
||||
Swal.fire({
|
||||
title: "Warehouse changed successfully",
|
||||
text: "",
|
||||
icon: "success",
|
||||
confirmButtonColor: "#3085d6"
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
// Swal.fire('Warehouse changed successfully');
|
||||
// $("#currentWHSPAN").html(currentWHS);
|
||||
}
|
||||
else{
|
||||
Swal.fire('Warehouse change Failed');
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
// console.log(error);
|
||||
// alert(error);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
||||
</div>
|
||||
</x-layouts.app>
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
@if($power_user[0]->R428PWRUSR=="Y")
|
||||
@if(isset($power_user[0]) && trim((string) ($power_user[0]->R428PWRUSR ?? '')) === 'Y')
|
||||
<button name="carrierAdd" type="button" class="btn btn-sm btn-info carrierAdd_click" id="carrierAdd_click"
|
||||
data-AT9DPW="{{$power_user[0]->R428CO.$power_user[0]->R428PL.$power_user[0]->R428WH}}">Add Record</button>
|
||||
data-AT9DPW="{{ ($power_user[0]->R428CO ?? '').($power_user[0]->R428PL ?? '').($power_user[0]->R428WH ?? '') }}">Add Record</button>
|
||||
@endif
|
||||
<!-- data-AT9DPW="$co.$plant.$whs">Add Record</button> -->
|
||||
</div>
|
||||
@@ -39,7 +39,7 @@
|
||||
<tr>
|
||||
<td></td>
|
||||
<td align="center">
|
||||
@if($power_user[0]->R428PWRUSR=="Y")
|
||||
@if(isset($power_user[0]) && trim((string) ($power_user[0]->R428PWRUSR ?? '')) === 'Y')
|
||||
<button name="carrierEdit{{trim($val->CANUM)}}" type="submit" class="btn btn-sm btn-info carrierEdit_click" id="carrierEdit_click"
|
||||
data-CANUM="{{trim($val->CANUM)}}" data-CANAM="{{trim($val->CANAM)}}" data-TWOSHIPCARRIERCODE="{{trim($val->TWOSHIPCARRIERCODE)}}"
|
||||
data-PARCELCARRIERCODE="{{trim($val->PARCELCARRIERCODE)}}" data-CASPR10A01="{{trim($val->CASPR10A01)}}"
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<nav class="m3-module-nav" aria-label="M3 navigation">
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.index') ? 'is-active' : '' }}" href="{{ route('m3.index') }}"><i class="fas fa-gauge-high"></i><span>Dashboard</span></a>
|
||||
@if($execUser !== 'Y')
|
||||
@if($csr !== 'Y')
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.replenishmentSettings.*') ? 'is-active' : '' }}" href="{{ route('m3.replenishmentSettings.index') }}"><i class="fas fa-arrows-rotate"></i><span>Replenishment</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.M3ErrorsDisplay.*') ? 'is-active' : '' }}" href="{{ route('m3.M3ErrorsDisplay.index') }}"><i class="fas fa-list-check"></i><span>Transactions</span></a>
|
||||
@endif
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.M3GetPDFFromCache.*') ? 'is-active' : '' }}" href="{{ route('m3.M3GetPDFFromCache.index') }}"><i class="fas fa-file-pdf"></i><span>Documents</span></a>
|
||||
@if($csr !== 'Y')
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.userControl') ? 'is-active' : '' }}" href="{{ route('m3.userControl') }}"><i class="fas fa-users-gear"></i><span>Users</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.palletQty') ? 'is-active' : '' }}" href="{{ route('m3.palletQty') }}"><i class="fas fa-boxes-stacked"></i><span>Part Data</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.M3Delivery') ? 'is-active' : '' }}" href="{{ route('m3.M3Delivery') }}"><i class="fas fa-truck"></i><span>Delivery</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.OrderLinesOfClosedOrder') ? 'is-active' : '' }}" href="{{ route('m3.OrderLinesOfClosedOrder') }}"><i class="fas fa-file-excel"></i><span>Closed Orders</span></a>
|
||||
@if($power_users === 'Y' || $admin_users === 'Y')
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.carrierMaint') ? 'is-active' : '' }}" href="{{ route('m3.carrierMaint') }}"><i class="fas fa-route"></i><span>Carriers</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.userPickingStats4') || request()->routeIs('m3.userPickingStats5') ? 'is-active' : '' }}" href="{{ route('m3.userPickingStats4') }}"><i class="fas fa-chart-line"></i><span>Efficiency</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.pendingClosure') ? 'is-active' : '' }}" href="{{ route('m3.pendingClosure') }}"><i class="fas fa-clock"></i><span>Pending Closure</span></a>
|
||||
@endif
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.ship-to.*') ? 'is-active' : '' }}" href="{{ route('m3.ship-to.index') }}"><i class="fas fa-warehouse"></i><span>Ship-to</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.execsummary') || request()->routeIs('m3.execsummaryline') ? 'is-active' : '' }}" href="{{ route('m3.execsummary') }}"><i class="fas fa-chart-column"></i><span>KPI</span></a>
|
||||
<a class="m3-module-nav-link {{ request()->routeIs('m3.whsePerf*') ? 'is-active' : '' }}" href="{{ route('m3.whsePerf') }}"><i class="fas fa-chart-area"></i><span>OTTC</span></a>
|
||||
@endif
|
||||
@endif
|
||||
</nav>
|
||||
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Process;
|
||||
use ZipArchive;
|
||||
|
||||
class ExportSource extends Command
|
||||
{
|
||||
protected $signature = 'source:export';
|
||||
|
||||
protected $description = 'Export project source to ~/Downloads';
|
||||
|
||||
public function handle(): int
|
||||
{
|
||||
$project = basename(base_path());
|
||||
$timestamp = now()->format('Ymd-His');
|
||||
$downloads = rtrim((string) getenv('HOME'), '/').'/Downloads';
|
||||
$archive = "{$downloads}/{$project}-source-{$timestamp}.zip";
|
||||
|
||||
$this->info("Exporting {$project}...");
|
||||
|
||||
/*
|
||||
* Fast export of all Git-tracked source.
|
||||
*/
|
||||
$result = Process::path(base_path())
|
||||
->timeout(60)
|
||||
->run([
|
||||
'git',
|
||||
'archive',
|
||||
'--format=zip',
|
||||
"--output={$archive}",
|
||||
'HEAD',
|
||||
]);
|
||||
|
||||
if ($result->failed()) {
|
||||
$this->error($result->errorOutput());
|
||||
|
||||
return self::FAILURE;
|
||||
}
|
||||
|
||||
$zip = new ZipArchive();
|
||||
|
||||
if ($zip->open($archive) !== true) {
|
||||
$this->error('Could not open ZIP.');
|
||||
|
||||
return self::FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove ONLY:
|
||||
*
|
||||
* node_modules
|
||||
* vendor
|
||||
* Provision
|
||||
* .scannerwork
|
||||
* contents of storage/framework
|
||||
* contents of storage/logs
|
||||
*/
|
||||
$removeDirectories = [
|
||||
'node_modules/',
|
||||
'vendor/',
|
||||
'Provision/',
|
||||
'provision/',
|
||||
'.scannerwork/',
|
||||
'storage/framework/',
|
||||
'storage/logs/',
|
||||
];
|
||||
|
||||
for ($i = $zip->numFiles - 1; $i >= 0; $i--) {
|
||||
$name = $zip->getNameIndex($i);
|
||||
|
||||
foreach ($removeDirectories as $directory) {
|
||||
if (str_starts_with($name, $directory)) {
|
||||
$zip->deleteIndex($i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Restore the storage directory structure EMPTY.
|
||||
*/
|
||||
$zip->addEmptyDir('storage/framework');
|
||||
$zip->addEmptyDir('storage/framework/cache');
|
||||
$zip->addEmptyDir('storage/framework/cache/data');
|
||||
$zip->addEmptyDir('storage/framework/sessions');
|
||||
$zip->addEmptyDir('storage/framework/testing');
|
||||
$zip->addEmptyDir('storage/framework/views');
|
||||
$zip->addEmptyDir('storage/logs');
|
||||
|
||||
$zip->close();
|
||||
|
||||
$this->info('Done.');
|
||||
$this->line($archive);
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -231,7 +231,7 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="wms-sidebar-group" data-wms-menu-group="integration-reporting">
|
||||
<div class="wms-sidebar-group" data-wms-menu-group="integration-reporting" @if (request()->routeIs('m3.*')) data-wms-selected="true" data-wms-has-active="true" data-wms-menu-open="true" @endif>
|
||||
<button type="button" class="wms-sidebar-heading wms-sidebar-heading-button" data-wms-menu-toggle
|
||||
data-wms-sidebar-label aria-expanded="false">
|
||||
<span class="wms-sidebar-heading-content">
|
||||
@@ -248,6 +248,23 @@
|
||||
<i class="fa-solid fa-cubes-stacked wms-sidebar-icon" aria-hidden="true"></i>
|
||||
<span data-wms-sidebar-label>{{ __('M3') }}</span>
|
||||
</a>
|
||||
|
||||
@if (request()->routeIs('m3.*'))
|
||||
<div class="wms-m3-submenu space-y-1 border-l border-zinc-200/70 pl-3 dark:border-zinc-700/70" data-wms-sidebar-label>
|
||||
<a href="{{ route('m3.index') }}" class="wms-sidebar-link wms-m3-submenu-link @if (request()->routeIs('m3.index')) is-active @endif"><i class="fa-solid fa-gauge-high wms-sidebar-icon" aria-hidden="true"></i><span>{{ __('Dashboard') }}</span></a>
|
||||
@if (Route::has('m3.replenishmentSettings.index'))<a href="{{ route('m3.replenishmentSettings.index') }}" class="wms-sidebar-link wms-m3-submenu-link @if (request()->routeIs('m3.replenishmentSettings.*')) is-active @endif"><i class="fa-solid fa-sliders wms-sidebar-icon" aria-hidden="true"></i><span>{{ __('Replenishment Settings') }}</span></a>@endif
|
||||
@if (Route::has('m3.M3ErrorsDisplay.index'))<a href="{{ route('m3.M3ErrorsDisplay.index') }}" class="wms-sidebar-link wms-m3-submenu-link @if (request()->routeIs('m3.M3ErrorsDisplay*')) is-active @endif"><i class="fa-solid fa-list-check wms-sidebar-icon" aria-hidden="true"></i><span>{{ __('Transaction Log') }}</span></a>@endif
|
||||
@if (Route::has('m3.M3GetPDFFromCache.index'))<a href="{{ route('m3.M3GetPDFFromCache.index') }}" class="wms-sidebar-link wms-m3-submenu-link @if (request()->routeIs('m3.M3GetPDFFromCache*')) is-active @endif"><i class="fa-solid fa-box-archive wms-sidebar-icon" aria-hidden="true"></i><span>{{ __('Sentinel Doc Archive') }}</span></a>@endif
|
||||
@if (Route::has('m3.userControl'))<a href="{{ route('m3.userControl') }}" class="wms-sidebar-link wms-m3-submenu-link @if (request()->routeIs('m3.userControl*')) is-active @endif"><i class="fa-solid fa-users-gear wms-sidebar-icon" aria-hidden="true"></i><span>{{ __('User Control') }}</span></a>@endif
|
||||
@if (Route::has('m3.palletQty'))<a href="{{ route('m3.palletQty') }}" class="wms-sidebar-link wms-m3-submenu-link @if (request()->routeIs('m3.palletQty*')) is-active @endif"><i class="fa-solid fa-boxes-stacked wms-sidebar-icon" aria-hidden="true"></i><span>{{ __('ERP/TMS Part Data') }}</span></a>@endif
|
||||
@if (Route::has('m3.M3Delivery'))<a href="{{ route('m3.M3Delivery') }}" class="wms-sidebar-link wms-m3-submenu-link @if (request()->routeIs('m3.M3Delivery*')) is-active @endif"><i class="fa-solid fa-truck-fast wms-sidebar-icon" aria-hidden="true"></i><span>{{ __('M3 Delivery Methods') }}</span></a>@endif
|
||||
@if (Route::has('m3.OrderLinesOfClosedOrder'))<a href="{{ route('m3.OrderLinesOfClosedOrder') }}" class="wms-sidebar-link wms-m3-submenu-link @if (request()->routeIs('m3.OrderLinesOfClosedOrder')) is-active @endif"><i class="fa-solid fa-file-excel wms-sidebar-icon" aria-hidden="true"></i><span>{{ __('Closed Order Lines') }}</span></a>@endif
|
||||
@if (Route::has('m3.carrierMaint'))<a href="{{ route('m3.carrierMaint') }}" class="wms-sidebar-link wms-m3-submenu-link @if (request()->routeIs('m3.carrierMaint*')) is-active @endif"><i class="fa-solid fa-location-dot wms-sidebar-icon" aria-hidden="true"></i><span>{{ __('Distribution WHS Addresses') }}</span></a>@endif
|
||||
@if (Route::has('m3.userPickingStats4'))<a href="{{ route('m3.userPickingStats4') }}" class="wms-sidebar-link wms-m3-submenu-link @if (request()->routeIs('m3.userPickingStats4')) is-active @endif"><i class="fa-solid fa-chart-column wms-sidebar-icon" aria-hidden="true"></i><span>{{ __('KPI1 Bar') }}</span></a>@endif
|
||||
@if (Route::has('m3.userPickingStats5'))<a href="{{ route('m3.userPickingStats5') }}" class="wms-sidebar-link wms-m3-submenu-link @if (request()->routeIs('m3.userPickingStats5')) is-active @endif"><i class="fa-solid fa-chart-line wms-sidebar-icon" aria-hidden="true"></i><span>{{ __('KPI1 Line') }}</span></a>@endif
|
||||
@if (Route::has('m3.execsummary'))<a href="{{ route('m3.execsummary') }}" class="wms-sidebar-link wms-m3-submenu-link @if (request()->routeIs('m3.execsummary*')) is-active @endif"><i class="fa-solid fa-chart-simple wms-sidebar-icon" aria-hidden="true"></i><span>{{ __('OTTC') }}</span></a>@endif
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (Route::has('sentinel-integration.index'))
|
||||
|
||||
Reference in New Issue
Block a user