@extends('layouts.master') @section('css') @endsection @section('title') Staffs @endsection @section('content') @isset($staff) Edit Staff @else Add Staff @endisset Go Back @isset($staff) @method('put') @else @endisset @csrf Name Email Phone Password Role Select role @foreach ($roles as $role) user->roles->first()->id == $role->id ? 'selected' : '') : '' }}> {{ $role->name }} @endforeach Branch Select branch @foreach ($branches as $branch) branch_id == $branch->id ? 'selected' : '') : '' }}> {{ $branch->name }} @endforeach Show all branch ledgers/Voucher all_ledgers == 1 ? 'checked' : '') : '' }}> Location Select location @isset($staff) @if ($staff->stockLocation != null) {{ $staff->stockLocation->name }} @endif @endisset Return Location Select location @isset($staff) @if ($staff->returnLocation != null) {{ $staff->returnLocation->name }} @endif @endisset Address {{ isset($staff) ? $staff->address : '' }} Enable Pos enable_pos == 1 ? 'checked' : '') : '' }}> Status status == 1 ? 'selected' : '') : 'selected' }}> Active status == 0 ? 'selected' : '') : '' }}> Inactive Pos Settings Enable Cost Center posSetting != null ? ($staff->posSetting->enable_cost_center == 1 ? 'checked' : '') : '' }} @endisset> Default Stock Location Select default stock location @isset($staff) @if ($staff->posSetting != null) @if ($staff->posSetting->stock_location != null) {{ $staff->posSetting->stockLocation->name }} @endif @endif @endisset Default Voucher Type Select default voucher type @foreach ($VoucherTypes as $voucherType) id == $staff->posSetting?->voucher_type ? 'selected' : '' }} @endisset> {{ $voucherType->name }} @endforeach Default Sales Ledger Select default sales ledger @isset($staff) @if ($staff->posSetting != null) @if ($staff->posSetting->sales_ledger != null) {{ $staff->posSetting->salesLedger->name }} @endif @endif @endisset Allow Change Price user->sale_executive_price_change == 1 ? 'checked' : '') : '' }}> @if ($company_profile->mybuss_fas == 1 || $company_profile->mop_fas == 1) Route @isset($staff) @php $staffRoutes = $staff->routes->pluck('route_id')->toArray(); @endphp @endisset @foreach ($routes as $route) id, $staffRoutes) ? 'selected' : '') : '' }}> {{ $route->name }} @endforeach Stock Group @isset($staff) @php $staffGroups = $staff->groups->pluck('stock_group_id')->toArray(); @endphp @endisset @foreach ($groups as $group) id, $staffGroups) ? 'selected' : '') : '' }}> {{ $group->name }} @endforeach Allow Customer Creation user->allow_customer_creation == 1 ? 'checked' : '') : '' }}> Sales Executive user->is_sales_executive == 1 ? 'checked' : '') : '' }}> Packing Executive user->is_packing_executive == 1 ? 'checked' : '') : '' }}> Delivery Boy user->is_delivery_boy == 1 ? 'checked' : '') : '' }}> Direct Delivery user->is_direct_delivery == 1 ? 'checked' : '') : '' }}> Production Staff user->is_production_executive == 1 ? 'checked' : '') : '' }}> Production Manager user->is_production_manager == 1 ? 'checked' : '') : '' }}> Loading Staff user->is_loading_staff == 1 ? 'checked' : '') : '' }}> Attendance Manager user->is_attendance_manager == 1 ? 'checked' : '') : '' }}> @endif @isset($staff) Update Staff @else Add Staff @endisset @endsection @section('script') @endsection