BO only + remove StaticPages

This commit is contained in:
Jérémy Munsch 2024-01-05 11:46:54 +01:00
parent 2659f617b3
commit 9bf55c411d
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
4 changed files with 6 additions and 27 deletions

7
package-lock.json generated
View file

@ -12,7 +12,6 @@
"@fortawesome/free-regular-svg-icons": "^6.5.1",
"@fortawesome/free-solid-svg-icons": "^6.5.1",
"@fortawesome/vue-fontawesome": "^3.0.5",
"@ldc-web/cookie-notice": "^3.1.2",
"@sipec/vue3-tags-input": "^3.0.4",
"@types/bootstrap": "^5.2.7",
"@types/node": "^20.8.2",
@ -1048,12 +1047,6 @@
"integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==",
"dev": true
},
"node_modules/@ldc-web/cookie-notice": {
"version": "3.1.3",
"resolved": "https://lab.s-web.fr/api/v4/projects/50/packages/npm/@ldc-web/cookie-notice/-/@ldc-web/cookie-notice-3.1.3.tgz",
"integrity": "sha1-+VPwI1VOhD+nWZeutLhT+on02CU=",
"dev": true
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",

View file

@ -6,7 +6,7 @@
{{ __('Accueil') }}
</a>
</li>
@can('viewAny', \App\Models\StaticPage::class)
{{-- @can('viewAny', \App\Models\StaticPage::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.static_pages.*')) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.static_pages.index') }}"
@ -14,7 +14,7 @@
{{ Str::of(trans_choice('models.classes.static_page', '*'))->title() }}
</a>
</li>
@endcan
@endcan --}}
@canAny(['isConceptor', 'viewAny'], \App\Models\User::class)
<li class="nav-item">
<div class="dropdown">

View file

@ -2,7 +2,6 @@
use App\Http\Controllers\Bo\ActivityLogController;
use App\Http\Controllers\Bo\DashboardController;
use App\Http\Controllers\Bo\StaticPageController;
use App\Http\Controllers\Bo\UserController;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
@ -37,15 +36,6 @@ Route::prefix('bo')
UserController::class, 'duplicate'
])->name('users.duplicate');
// * StaticPages
Route::resource('pages', StaticPageController::class)
->names([
'index' => 'static_pages.index',
'edit' => 'static_pages.edit',
'update' => 'static_pages.update',
])->parameters(['pages' => 'static_page'])
->only(['index', 'edit', 'update']);
Route::middleware('can:isConceptor')->group(function () {
// * ACTIVITY LOGS.
Route::resource('activity_logs', ActivityLogController::class)->only(['index', 'show']);

View file

@ -1,7 +1,5 @@
<?php
use App\Http\Controllers\Fo\HomeController;
use App\Http\Controllers\Fo\StaticPageController;
use Illuminate\Support\Facades\Route;
Route::middleware(['throttle:credentials'])
@ -12,10 +10,8 @@ Route::middleware(['throttle:credentials'])
Route::view('/bs-demo', 'fo.pages.bs-demo')->name('bs-demo');
}
Route::get('/', [HomeController::class, 'index'])->name('homepage');
Route::get('/contact', [StaticPageController::class, 'contact'])->name('contact.show');
// * LEGALS
Route::get('/mentions-legales', [StaticPageController::class, 'legals'])->name('legals.show');
Route::get('/charte-de-confidentialite', [StaticPageController::class, 'policies'])->name('policies.show');
Route::fallback(function () {
response()->redirectToRoute('bo.dashboard')->throwResponse();
});
Route::redirect('/', '/bo')->name('homepage');
});