@extends('layouts.main') @section('title', 'Setting - '.$pageTitle) @section('navbarTitle', 'Setting') @section('css') @php $dashboardCssPath = public_path('assets/css/dashboard.css'); $dashboardCssVersion = file_exists($dashboardCssPath) ? filemtime($dashboardCssPath) : time(); @endphp @endsection @section('content') @php $isEdit = $mode === 'edit'; $isProtectedPosition = $resourceLabel === 'Position' && (bool) ($item?->is_protected ?? false); @endphp @include('layouts.breadcrumb', [ 'title' => 'Setting', 'current' => $pageTitle, 'homeRoute' => 'dashboard', ]) @include('settings.partials.nav')
@csrf @if ($isEdit) @method('PUT') @endif

{{ $pageTitle }}

Manage {{ strtolower($resourceLabel) }} name and active status.

@if ($errors->any()) @include('partials.swal-alert', [ 'type' => 'error', 'title' => 'The data is not valid.', 'message' => 'Please check the required fields again.', ]) @endif
@error('name')
{{ $message }}
@enderror
@if ($isProtectedPosition)
Protected positions are required by system access rules.
@endif @error('status')
{{ $message }}
@enderror
@endsection @section('script') @php $dashboardJsPath = public_path('assets/js/dashboard.js'); $dashboardJsVersion = file_exists($dashboardJsPath) ? filemtime($dashboardJsPath) : time(); @endphp @endsection