@extends('adminlte::page')
@section('title', __('working_orders.tab-title'))
@section('content_header')
@stop
@section('content')
@stop
@section('footer')
@include('working_orders.modals.create')
@include('working_orders.modals.delete')
@include('working_orders.modals.filters')
@include('working_orders.modals.productInfo')
@append
@push('css')
@include('adminlte::libs.css.datatables')
@include('adminlte::libs.css.select2')
@endpush
@push('js')
@include('adminlte::libs.js.datatables')
@include('adminlte::libs.js.select2')
@php
$columns = [
[
'data' => 'number',
'name' => 'number',
'title' => __('working_orders.table.columns.number'),
'width' => '10%'
],
[
'data' => 'delivery_date',
'name' => 'delivery_date',
'title' => __('working_orders.table.columns.delivery_date')
],
[
'data' => 'esb',
'name' => 'esb',
'title' => __('working_orders.table.columns.esb')
],
[
'data' => 'client',
'name' => 'client',
'title' => __('working_orders.table.columns.client')
],
[
'data' => 'location',
'name' => 'location',
'title' => __('working_orders.table.columns.location')
],
[
'data' => 'contact_number',
'name' => 'contact_number',
'title' => __('working_orders.table.columns.contact_number')
],
[
'data' => 'product',
'name' => 'product',
'title' => __('working_orders.table.columns.product')
],
[
'data' => 'fault_description',
'name' => 'fault_description',
'title' => __('working_orders.table.columns.fault_description')
],
[
'data' => 'serviser',
'name' => 'serviser',
'title' => __('working_orders.table.columns.serviser')
],
[
'data' => 'status',
'name' => 'status',
'title' => __('working_orders.table.columns.status')
],
[
'data' => 'actions',
'name' => 'actions',
'title' => __('working_orders.table.columns.actions'),
'sortable' => false,
'width' => '10%'
]
];
$url = url()->current();
$endpoint = [
'url' => "{$url}/all?completed=0",
'dataSrc' => 'data'
];
$endpointCompleted = [
'url' => "{$url}/all?completed=1",
'dataSrc' => 'data'
];
@endphp
{{-- Add inline js when developing or testing here. When you're finished, transfer to working_orders.js --}}
@endpush