@php
$authUser = auth()->user();
$isPrimaryAdminUser = auth()->check() && auth()->user()->hasAnyRole(['admin', 'manager']);
$isTaxiLimitedAdminUser = auth()->check() && auth()->user()->hasRole('admin-limited');
$isOwnerAdminUser = auth()->check() && (int) auth()->id() === 1 && auth()->user()->hasRole('admin');
$canSeeServiceMenu = $authUser
&& $authUser->canAny(['view-services', 'view-service-option-groups', 'view-service-options']);
$canSeePackageMenu = $authUser && (
$authUser->canAny(['view-package-types', 'view-countries', 'view-states', 'view-cities', 'new-package-order'])
|| ($authUser->hasRole('manager') && ($authUser->vendor?->vendor_type?->is_parcel ?? false))
);
$canSeePropertyMenu = $authUser && $authUser->canAny([
'manage-properties',
'manage-property-types',
'manage-amenities',
'manage-cancellation-policies',
'manage-booking-fee-types',
'manage-property-report-reasons',
'manage-property-reports',
]);
@endphp
{{-- dashboard --}}
{{-- a tela que o operador deixa aberta o dia inteiro --}}
@can('view-drivers')
@endcan
@can('view-support')
@endcan
@hasrole('admin')
{{-- fatos que a IA usa e respostas prontas do operador --}}
@endhasrole
{{ __('Operação') }}
{{-- orders --}}
@canany(['view-orders', 'view-taxi-orders', 'view-refund', 'view-reviews', 'view-delivery-addresses', 'view-coupons'])
@showRegularOrders
@endshowRegularOrders
@showTaxiOrders
@endshowTaxiOrders
@showPropertyOrders
@showPropertyBooking
{{-- so com modulo de produto --}}
@endshowPropertyBooking
@endshowPropertyOrders
@can('view-refund')
@endcan
@can('view-reviews')
@showProduct
@endshowProduct
@endcan
@can('view-delivery-addresses')
@endcan
@can('view-coupons')
@endcan
@endcan
{{-- dispatch order on maps --}}
{{-- order timeline --}}
@can('view-fleets')
@can('manager-fleets')
@endcan
@hasanyrole('fleet-manager')
@endhasanyrole
@endcan
{{ __('Pessoas') }}
{{-- driver management --}}
@can(['view-drivers', 'view-driver-incentives'])
{{-- Drivers --}}
@can('view-drivers')
@endcan
@can('track-drivers-location')
@if (isUsingWebsocket())
@endif
@endcan
{{-- drivers documents --}}
@can('view-driver-documents')
@endcan
{{-- driver incentives --}}
{{-- TODO: Driver incentives --}}
{{-- @can('view-driver-incentives')
@endcan --}}
@endcan
{{-- user management --}}
@can(['view-users', 'view-deleted-users'])
{{-- Users --}}
@can('view-users')
@endcan
{{-- Deleted Users --}}
@can('view-deleted-users')
@endcan
@endcan
@showDeliveryBoys
@endshowDeliveryBoys
{{ __('Dinheiro') }}
@canany(['view-payment-section', 'view-payout'])
{{-- Payments + Payouts fundidos: dois grupos com o mesmo nome traduzido confundiam --}}
@can('view-payment-section')
@can('view-wallet-transactions')
{{-- wallet transactions --}}
@endcan
@can('view-payment-accounts')
@endcan
@can('view-outstanding-payments')
@endcan
@if ($isPrimaryAdminUser || (auth()->check() && auth()->user()->hasRole('manager')))
@endif
@endcan
@can('view-payout')
@hasanyrole('city-admin|admin|admin-limited')
@endhasanyrole
@endcan
@endcanany
{{-- Earings --}}
@can('view-earning')
@can('view-vendor-earning')
@endcan
@can('my-earning')
@endcan
@handleDeliveryBoys
@endhandleDeliveryBoys
@can('vendor-earning-history')
@endcan
@can('driver-earning-history')
@endcan
@endcan
@can('view-subscription')
{{-- subscription list --}}
@can('manage-subscriptions')
@endcan
{{-- vendors and current subscriptions --}}
{{-- vendor subscription history --}}
@can('my-subscription')
@endcan
@endcan
{{-- Vendor payment methods --}}
@can('manage-vendor-payment-methods')
@endcan
{{-- reports --}}
@can('view-report')
@can('view-loyalty')
@showProduct
{{-- so com modulo de produto --}}
@endshowProduct
@endcan
@can('view-coupon-report')
@endcan
@can('view-referral-report')
@endcan
@can('view-commission-report')
@endcan
{{-- products --}}
@showProduct
@can('view-product-report')
@endcan
@endshowProduct
{{-- services --}}
@showService
@can('view-service-report')
@endcan
@endshowService
@showPropertyBooking
@can('view-property-report')
@endcan
@endshowPropertyBooking
@can('view-vendor-report')
@endcan
@can('view-customers-report')
@endcan
@can('view-subscriptions-report')
@endcan
@can('view-summary-report')
@endcan
@endcan
{{ __('Catálogo') }}
{{-- taxi booking --}}
@can('view-taxi')
@can('view-taxi-vehicle-types')
@endcan
@can('view-taxi-vehicles')
@endcan
@can('view-car-makes')
@endcan
@can('view-car-models')
@endcan
{{-- Payment methods --}}
@can('view-taxi-payment-methods')
@endcan
{{-- Price --}}
@can('view-taxi-pricing')
@endcan
{{-- Taxi settings --}}
@can('view-taxi-settings')
@endcan
{{-- Taxi settings --}}
@can('view-taxi-zones')
@endcan
{{-- New Order Taxi --}}
@can('new-taxi-order')
@endcan
@endcan
{{-- Vendors --}}
@can('view-vendors')
@can('view-zones')
@endcan
@can('set-vendor-fees')
@endcan
@can('view-favourites')
@endcan
{{-- vendors documents --}}
@can('view-vendor-documents')
@endcan
@endcan
@can('view-categories')
@showProduct
@endshowProduct
@endcan
@can('view-tags')
@showProduct
{{-- so com modulo de produto --}}
@endshowProduct
@endcan
{{-- Products --}}
@showProduct
@can('view-product-requests')
@endcan
@can('view-product-brands')
@endcan
@can('view-favourites')
@endcan
@endshowProduct
{{-- Package --}}
@if ($canSeePackageMenu)
@showPackage
@can('view-package-types')
@endcan
@can('view-countries')
@endcan
@can('view-states')
@endcan
@can('view-cities')
@endcan
{{-- manager package delivery options --}}
@hasanyrole('manager')
@endhasanyrole
@can('new-package-order')
@endcan
@showNewParcelOrder
@endshowNewParcelOrder
@endshowPackage
@endif
{{-- Services --}}
@if ($canSeeServiceMenu)
@showService
@can('view-services')
@endcan
{{-- SERVICE GROUPS --}}
@can('view-service-option-groups')
@endcan
{{-- service options --}}
@can('view-service-options')
@endcan
@endshowService
@endif
{{-- Property/Hotel Booking --}}
@if ($canSeePropertyMenu)
@showPropertyBooking
@can('manage-properties')
@endcan
@can('manage-amenities')
@endcan
@can('manage-property-types')
@endcan
@can('manage-cancellation-policies')
@endcan
@can('manage-booking-fee-types')
@endcan
@canany(['manage-property-reports', 'manage-property-report-reasons'])
@endcanany
@can('manage-property-report-reasons')
@endcan
@can('manage-property-reports')
@endcan
@endshowPropertyBooking
@endif
@can('view-flash-sales')
@showProduct
{{-- so com modulo de produto --}}
@endshowProduct
@endcan
@can('view-banners')
@endcan
@if(amI('manager'))
@endif
{{ __('Sistema') }}
@hasrole('admin')
@endhasrole
{{-- modules --}}
@can('manage-modules')
{{-- Vendor Types --}}
@endcan
@hasanyrole('admin|admin-limited')
@if (Route::has('launch.mission.control') && auth()->user()->can('view-launch-mission-control'))
@endif
@if (Route::has('launch.goal.settings') && auth()->user()->can('view-launch-goal-settings'))
@endif
@endhasanyrole
@can('view-operations')
{{-- notifications --}}
{{-- backups --}}
@if ($isOwnerAdminUser)
@endif
{{-- import --}}
@if ($isOwnerAdminUser)
@endif
{{-- Export --}}
@if ($isOwnerAdminUser)
@endif
{{-- logs --}}
@if ($isOwnerAdminUser)
@endif
{{-- data reset --}}
@if ($isOwnerAdminUser)
@endif
{{-- cron job --}}
@if ($isOwnerAdminUser)
@endif
{{-- cron job --}}
@if ($isOwnerAdminUser)
@endif
{{-- troubleshoot --}}
@if ($isOwnerAdminUser)
@endif
{{-- jobs monitor --}}
@if (auth()->check() && auth()->user()->can('view-queue-jobs-handler'))
@production
@endproduction
@endif
{{-- Activity Logs --}}
@if ($isOwnerAdminUser)
@can('view-activity-logs')
@endcan
@endif
{{-- Navigation Telemetry --}}
@if ($isOwnerAdminUser)
@can('view-navigation-telemetry')
@endcan
@endif
@endcan
{{-- Settings --}}
@if ($isOwnerAdminUser)
@can('view-settings')
{{-- Settings --}}
{{-- App Settings --}}
{{-- websocket settings --}}
@can('manage-notification-settings')
@endcan
{{-- Currencies --}}
{{-- Payment methods --}}
{{-- Settings --}}
{{-- Page Settings --}}
{{-- CMS Pages --}}
{{-- Map Settings --}}
{{-- Finance Settings --}}
{{-- payment webhooks --}}
{{-- dynamic link --}}
@can('view-in-app-support')
@endcan
{{-- Web Settings --}}
{{-- Mail Settings --}}
{{-- Translation Editor --}}
@can('edit-system-translations')
@endcan
{{-- Roles is admin-only: the screen edits every role, admin included,
and performs no authorization check of its own. --}}
@hasrole('admin')
@endhasrole
@hasanyrole('admin|admin-limited')
@production
@endproduction
@endhasanyrole
{{-- upgrade --}}
@endcan
@endif
{{-- Profile Menu Settings --}}
@if (auth()->check() && auth()->user()->hasRole('admin'))
@can('manage-profile-menu-settings')
@endcan
@endif
{{-- misc --}}
@can('mang-onboarding')
@endcan
@can('view-faq')
@endcan
{{-- extensions --}}
@can('manage-extensions')
@endcan