@extends('layouts/layoutMaster') @section('title', __('locale.Ride Pricing Rules')) @section('vendor-style') @vite(['resources/assets/vendor/libs/datatables-bs5/datatables.bootstrap5.scss', 'resources/assets/vendor/libs/datatables-responsive-bs5/responsive.bootstrap5.scss', 'resources/assets/vendor/libs/datatables-buttons-bs5/buttons.bootstrap5.scss', 'resources/assets/vendor/libs/flatpickr/flatpickr.scss', 'resources/assets/vendor/libs/sweetalert2/sweetalert2.scss', 'resources/assets/vendor/libs/select2/select2.scss']) @endsection @section('vendor-script') @vite(['resources/assets/vendor/libs/datatables-bs5/datatables-bootstrap5.js', 'resources/assets/vendor/libs/flatpickr/flatpickr.js', 'resources/assets/vendor/libs/sweetalert2/sweetalert2.js', 'resources/assets/vendor/libs/select2/select2.js']) @endsection @section('content')
{{ __('locale.Ride Pricing Rules') }}
@forelse($rules as $rule) @empty @endforelse
{{ __('locale.Name') }} {{ __('locale.Country') }} / {{ __('locale.Priority') }} {{ __('locale.Price Type') }} {{ __('locale.Amount') }} {{ __('locale.Conditions') }} {{ __('locale.Status') }} {{ __('locale.Actions') }}
{{ $rule->rule_name }} {{ $rule->country->name ?? '-' }} {{ $rule->priority }} {{ $rule->price_type }} {{ $rule->amount }} @if ($rule->conditions && $rule->conditions->count())
    @foreach ($rule->conditions as $condition)
  • {{ ucfirst(str_replace('_', ' ', $condition->condition_type)) }}: @php $values = json_decode($condition->condition_value, true) ?? []; @endphp @if ($condition->condition_type === 'month') {{ collect($values)->map(fn($m) => \Carbon\Carbon::create()->month((int) $m)->format('F'))->implode(', ') }} @elseif($condition->condition_type === 'day_of_week') {{ implode(', ', $values) }} @else {{ implode(', ', $values) }} @endif
  • @endforeach
@else No conditions @endif
{{ $rule->is_active ? 'Active' : 'Inactive' }}
No pricing rules found.
@include('_partials._modals.modal-ride-price-rule') @endsection @section('page-script') @vite([]) @endsection