updates to M3 module
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
--bs-white-rgb: 255, 255, 255;
|
||||
--bs-black-rgb: 0, 0, 0;
|
||||
--bs-body-rgb: 33, 37, 41;
|
||||
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
--bs-font-sans-serif: "Instrument Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
|
||||
--bs-body-font-family: var(--bs-font-sans-serif);
|
||||
@@ -11794,7 +11794,7 @@ a:link {
|
||||
}
|
||||
|
||||
.highcharts-data-table table {
|
||||
font-family: Verdana, sans-serif;
|
||||
font-family: var(--bs-font-sans-serif);
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #EBEBEB;
|
||||
margin: 10px auto;
|
||||
@@ -11820,3 +11820,9 @@ a:link {
|
||||
.highcharts-data-table tr:hover {
|
||||
background: #f1f7ff;
|
||||
}
|
||||
|
||||
|
||||
/* Core typography integration: keep Liberty layout but use WMS/Core typography. */
|
||||
html, body, button, input, select, textarea, .navbar, .nav, .dropdown-menu, .table {
|
||||
font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
}
|
||||
|
||||
@@ -67,7 +67,21 @@
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}" />
|
||||
<title>@yield('title')</title>
|
||||
<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
|
||||
@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>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!-- jQuery -->
|
||||
<script src="/m3/assets/liberty-theme/js/jquery.min.js"></script>
|
||||
<script src="{{ route('m3.assets', ['path' => 'liberty-theme/js/jquery.min.js']) }}"></script>
|
||||
|
||||
<!-- SB Admin -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity= "sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
||||
@@ -15,12 +15,12 @@
|
||||
@endphp
|
||||
|
||||
@if($controller != 'ReplenishSettingsController' && $controller != 'M3ErrorsDispController')
|
||||
<script src="/m3/assets/liberty-theme/js/scripts.js"></script>
|
||||
<script src="{{ route('m3.assets', ['path' => 'liberty-theme/js/scripts.js']) }}"></script>
|
||||
@endif
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js" crossorigin="anonymous"></script>
|
||||
<script src="/m3/assets/liberty-theme/assets/demo/chart-area-demo.js"></script>
|
||||
<script src="/m3/assets/liberty-theme/assets/demo/chart-bar-demo.js"></script>
|
||||
<script src="{{ route('m3.assets', ['path' => 'liberty-theme/assets/demo/chart-area-demo.js']) }}"></script>
|
||||
<script src="{{ route('m3.assets', ['path' => 'liberty-theme/assets/demo/chart-bar-demo.js']) }}"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/simple-datatables@latest" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- Datatable -->
|
||||
@@ -28,17 +28,17 @@
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.datatables.net/v/bs5/jszip-2.5.0/dt-1.11.3/af-2.3.7/b-2.0.1/b-colvis-2.0.1/b-html5-2.0.1/b-print-2.0.1/cr-1.5.4/date-1.1.1/fc-4.0.0/fh-3.2.0/kt-2.6.4/r-2.2.9/rg-1.1.3/rr-1.2.8/sc-2.0.5/sb-1.2.2/sp-1.4.0/sl-1.3.3/datatables.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/m3/assets/liberty-theme/js/datatables-simple-demo.js"></script>
|
||||
<script type="text/javascript" src="{{ route('m3.assets', ['path' => 'liberty-theme/js/datatables-simple-demo.js']) }}"></script>
|
||||
{{-- Data Bootstrap Responsive --}}
|
||||
<script type="text/javascript" src="https://cdn.datatables.net/responsive/2.4.1/js/dataTables.responsive.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.datatables.net/responsive/2.4.1/js/responsive.bootstrap.min.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.full.js"></script>
|
||||
<script src="/m3/assets/liberty-theme/js/dataTables.altEditor.free.js"></script>
|
||||
<script src="{{ route('m3.assets', ['path' => 'liberty-theme/js/dataTables.altEditor.free.js']) }}"></script>
|
||||
|
||||
<!-- Morris Charts -->
|
||||
<script src="/m3/assets/liberty-theme/js/morris.min.js"></script>
|
||||
<script src="/m3/assets/liberty-theme/js/raphael.min.js"></script>
|
||||
<script src="{{ route('m3.assets', ['path' => 'liberty-theme/js/morris.min.js']) }}"></script>
|
||||
<script src="{{ route('m3.assets', ['path' => 'liberty-theme/js/raphael.min.js']) }}"></script>
|
||||
|
||||
<!-- Date range picker -->
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<link href="https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css" rel="stylesheet" />
|
||||
<link href="/m3/assets/liberty-theme/css/styles.css" rel="stylesheet" />
|
||||
<link href="/m3/assets/liberty-theme/css/morris.css" rel="stylesheet" />
|
||||
<link href="{{ route('m3.assets', ['path' => 'liberty-theme/css/styles.css']) }}" rel="stylesheet" />
|
||||
<link href="{{ route('m3.assets', ['path' => 'liberty-theme/css/morris.css']) }}" rel="stylesheet" />
|
||||
|
||||
<!-- Date range picker -->
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
|
||||
|
||||
@@ -39,11 +39,34 @@ use Modules\M3\Http\Controllers\WhsPerfMetrics;
|
||||
|
||||
|
||||
Route::get('/assets/{path}', function (string $path) {
|
||||
abort_if(str_contains($path, '..'), 404);
|
||||
$file = module_path('M3', 'Resources/public/' . $path);
|
||||
abort_unless(is_file($file), 404);
|
||||
return response()->file($file);
|
||||
})->where('path', '.*')->name('assets');
|
||||
abort_if(str_contains($path, '..') || str_contains($path, "\0"), 404);
|
||||
|
||||
$root = realpath(module_path('M3', 'Resources/public'));
|
||||
$file = realpath(module_path('M3', 'Resources/public/' . ltrim($path, '/')));
|
||||
|
||||
abort_unless($root && $file && str_starts_with($file, $root . DIRECTORY_SEPARATOR) && is_file($file), 404);
|
||||
|
||||
$extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));
|
||||
$contentTypes = [
|
||||
'css' => 'text/css; charset=UTF-8',
|
||||
'js' => 'application/javascript; charset=UTF-8',
|
||||
'svg' => 'image/svg+xml',
|
||||
'png' => 'image/png',
|
||||
'jpg' => 'image/jpeg',
|
||||
'jpeg' => 'image/jpeg',
|
||||
'gif' => 'image/gif',
|
||||
'ico' => 'image/x-icon',
|
||||
'woff' => 'font/woff',
|
||||
'woff2' => 'font/woff2',
|
||||
'ttf' => 'font/ttf',
|
||||
];
|
||||
|
||||
return response(file_get_contents($file), 200, [
|
||||
'Content-Type' => $contentTypes[$extension] ?? 'application/octet-stream',
|
||||
'Cache-Control' => app()->environment('local') ? 'no-cache, no-store, must-revalidate' : 'public, max-age=86400',
|
||||
'X-Content-Type-Options' => 'nosniff',
|
||||
]);
|
||||
})->where('path', '.+')->name('assets');
|
||||
|
||||
Route::get('/health', fn () => response()->json(['module' => 'M3', 'status' => 'ok', 'database' => config('m3.connection', 'pgsql')]))->name('health');
|
||||
|
||||
|
||||
@@ -241,12 +241,12 @@
|
||||
</button>
|
||||
|
||||
<div class="wms-sidebar-group-items" data-wms-menu-items>
|
||||
@if (Route::has('m3-integration.index'))
|
||||
<a href="{{ route('m3-integration.index') }}" wire:navigate
|
||||
class="wms-sidebar-link @if (request()->routeIs('m3-integration.*')) is-active @endif"
|
||||
title="{{ __('M3 Integration') }}">
|
||||
<i class="fa-solid fa-plug-circle-bolt wms-sidebar-icon" aria-hidden="true"></i>
|
||||
<span data-wms-sidebar-label>{{ __('M3 Integration') }}</span>
|
||||
@if (Route::has('m3.index'))
|
||||
<a href="{{ route('m3.index') }}"
|
||||
class="wms-sidebar-link @if (request()->routeIs('m3.*')) is-active @endif"
|
||||
title="{{ __('M3') }}">
|
||||
<i class="fa-solid fa-cubes-stacked wms-sidebar-icon" aria-hidden="true"></i>
|
||||
<span data-wms-sidebar-label>{{ __('M3') }}</span>
|
||||
</a>
|
||||
@endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user