{{-- Bootstrap CSS --}}
{{-- Custom Css --}}
{{--
--}}
{{--
--}}
@yield('title')
R-Pro
+
@php $userRoleID = Auth::user()->user_role_id; $userRolePermissions = session('userRolePermissions'); $forms = [ 'dashboard_form', 'store_form', 'store_dineIn_form', 'store_saleLists_form', 'store_reservation_form', 'customers_form', 'customers_customer_form', 'customers_customerType_form', 'stockControl_form', 'stockControl_stockReceive_form', 'stockControl_stockReceive_receive_form', 'stockControl_stockReceive_receiveLists_form', 'stockControl_stockIssue_form', 'stockControl_stockIssue_issue_form', 'stockControl_stockIssue_issueLists_form', 'stockControl_issueType_form', 'stockControl_stockPurchase_form', 'stockControl_stockPurchase_purchase_form', 'stockControl_stockPurchase_purchaseLists_form', 'card_form', 'card_couponCard_form', 'card_memberCard_form', 'card_memberCard_card_form', 'card_memberCard_cardType_form', 'users_form', 'users_employee_form', 'users_employee_employee_form', 'users_employee_employeePosition_form', 'users_users_form', 'users_users_user_form', 'users_users_userRole_form', 'suppliers_form', 'suppliers_supplier_form', 'suppliers_supplierLists_form', 'configuration_form', 'configuration_item_form', 'configuration_item_category_form', 'configuration_item_item_form', 'configuration_item_unit_form', 'configuration_item_discount_form', 'configuration_item_price_control_form', 'configuration_floor_form', 'configuration_table_form', 'configuration_location_form', 'configuration_delivery_form', 'reports_form', 'reports_stockIn_form', 'reports_stockOut_form', 'reports_purchase_form', 'reports_sales_form', 'setting_form', ]; foreach ($forms as $form) { $$form = 'd-none'; } // If user role ID is 1, set all forms to visible if ($userRoleID == 1) { foreach ($forms as $form) { $$form = ''; } } else { // Create a mapping array for form_menu_id to form variables $formMapping = [ 1 => 'dashboard_form', 2 => 'store_form', 3 => 'store_dineIn_form', 4 => 'store_saleLists_form', 5 => 'store_reservation_form', 6 => 'customers_form', 7 => 'customers_customer_form', 8 => 'customers_customerType_form', 9 => 'stockControl_form', 10 => 'stockControl_stockReceive_form', 11 => 'stockControl_stockReceive_receive_form', 12 => 'stockControl_stockReceive_receiveLists_form', 13 => 'stockControl_stockIssue_form', 14 => 'stockControl_stockIssue_issue_form', 15 => 'stockControl_stockIssue_issueLists_form', 16 => 'stockControl_issueType_form', 17 => 'stockControl_stockPurchase_form', 18 => 'stockControl_stockPurchase_purchase_form', 19 => 'stockControl_stockPurchase_purchaseLists_form', 20 => 'card_form', 21 => 'card_couponCard_form', 22 => 'card_memberCard_form', 23 => 'card_memberCard_card_form', 24 => 'card_memberCard_cardType_form', 25 => 'users_form', 26 => 'users_employee_form', 27 => 'users_employee_employee_form', 28 => 'users_employee_employeePosition_form', 29 => 'users_users_form', 30 => 'users_users_user_form', 31 => 'users_users_userRole_form', 32 => 'suppliers_form', 33 => 'suppliers_supplier_form', 34 => 'suppliers_supplierLists_form', 35 => 'configuration_form', 36 => 'configuration_item_form', 37 => 'configuration_item_category_form', 38 => 'configuration_item_item_form', 39 => 'configuration_item_unit_form', 40 => 'configuration_item_discount_form', 41 => 'configuration_item_price_control_form', 42 => 'configuration_floor_form', 43 => 'configuration_table_form', 44 => 'configuration_location_form', 45 => 'configuration_delivery_form', 46 => 'reports_form', 47 => 'reports_stockIn_form', 48 => 'reports_stockOut_form', 49 => 'reports_purchase_form', 50 => 'reports_sales_form', 51 => 'setting_form', ]; // Loop through the user role permissions and set the forms foreach ($userRolePermissions as $userRolePermission) { if (isset($formMapping[$userRolePermission['form_menu_id']])) { $form = $formMapping[$userRolePermission['form_menu_id']]; $$form = ''; } } } @endphp
Dashboard
Dashboard
Store
Store
Dine-In
Sale-Lists
Reservation
{{--
Order Delivery
Delivery
Delivery Lists
--}} {{--
Reservation
Table Reservation
--}}
Customers
Customers
Customer
Customer Type
Stock Control
Stock Control
Stock Receive
Receive
Receive Lists
Stock Issue
Issue
Issue Lists
Issue Type
Stock Purchase
Purchase
Purchase Lists
Card
Card
Coupon Card
Member Card
Card
Card Type
Users
Users
Employee
Employee
Employee Position
Users
User
User Role
Suppliers
Suppliers
Supplier
Supplier Lists
Configuration
Configuration
Item
Category
Item
Unit
Discount
Price Control
Floor
Table
Location
Delivery
Reports
Reports
Stock-In
Stock-Out
Purchase
Sales
Setting
Setting
{{ Auth::user()->username }}
{{ Auth::user()->name }}
{{--
--}}
@csrf
{{--
@csrf
--}} {{--
--}} {{--
--}}
@yield('content')