ultimatepos/Modules/Portal/Resources/views/customer/periodic_services/index.blade.php

29 lines
1.6 KiB
PHP

@extends('portal::layouts.customer')
@section('title', __('portal::lang.periodic_services'))
@section('content')
<section class="portal-page-header"><h1>@lang('portal::lang.periodic_services')</h1></section>
<section class="content">
<div class="box box-primary">
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead><tr><th>@lang('maintenance::lang.title')</th><th>@lang('portal::lang.linked_equipment')</th><th>@lang('portal::lang.frequency')</th><th>@lang('portal::lang.due_date')</th><th></th></tr></thead>
<tbody>
@forelse($schedules as $schedule)
<tr>
<td>{{ $schedule->title }}</td>
<td>{{ $schedule->equipment->name ?? ($schedule->productionLine->name ?? $schedule->project->name ?? '-') }}</td>
<td>{{ $schedule->frequency_type }} @if($schedule->frequency_value) ({{ $schedule->frequency_value }}) @endif</td>
<td>@if($schedule->next_due_at) @format_datetime($schedule->next_due_at) @else - @endif</td>
<td><a href="{{ action([\Modules\Portal\Http\Controllers\Customer\PreventiveScheduleController::class, 'show'], [$schedule->id]) }}" class="btn btn-xs btn-info">@lang('portal::lang.view_details')</a></td>
</tr>
@empty
<tr><td colspan="5" class="text-center text-muted">@lang('portal::lang.no_records')</td></tr>
@endforelse
</tbody>
</table>
</div>
{{ $schedules->links() }}
</div>
</section>
@endsection