@php $order_work_data = ['index', 'create', 'edit']; $order_work_invoice = ['invoice', 'invoice-detail']; $order_work_delivery = ['delivery']; $set_quotation = ($action == 'quotation') ? ' active' : ''; $set_order_sales = ($action == 'sales') ? ' active' : ''; $set_order_work_data = ($action == 'work' && in_array($function, $order_work_data)) ? ' active' : ''; $set_order_work_verification = ($action == 'work' && ($function == 'verification' or $function == 'verify')) ? ' active' : ''; $set_order_work_invoice = ($action == 'work' && in_array($function, $order_work_invoice)) ? ' active' : ''; $set_inventory_handover = ($action == 'handover') ? ' active' : ''; $set_inventory_goods_customer = ($action == 'goods' && $function == 'stock' && request()->flag == 'customer') ? ' active' : ''; $set_report_sales = ($controller == 'report' && $action == 'sales') ? ' active' : ''; $set_report_work = ($controller == 'report' && $action == 'work') ? ' active' : ''; $set_report_goods_customer = ($controller == 'report' && $action == 'goods-customer') ? ' active' : ''; if ($action == 'work' && !in_array($function, $order_work_invoice) && !in_array($function, $order_work_delivery)) { $set_order_work = ' active'; $set_order_work_collapse = ''; $set_order_work_expanded = 'true'; $set_order_work_show = ' show'; } else { $set_order_work = ''; $set_order_work_collapse = ' collapsed'; $set_order_work_expanded = 'false'; $set_order_work_show = ''; } @endphp