fixes
This commit is contained in:
@@ -28,7 +28,10 @@ class DeliveriesDataTable extends DataTable
|
||||
'size' => 'sm',
|
||||
]);
|
||||
})
|
||||
->rawColumns(['active', 'action']);
|
||||
->editColumn('address', function (Delivery $delivery) {
|
||||
return $delivery->address . ' ' . $delivery->zipcode . ' ' . $delivery->city;
|
||||
})
|
||||
->rawColumns(['active', 'address', 'action']);
|
||||
return parent::modifier($datatables);
|
||||
}
|
||||
|
||||
@@ -38,9 +41,7 @@ class DeliveriesDataTable extends DataTable
|
||||
Column::make('active')->title(__('active'))->width(60)->class('text-center'),
|
||||
Column::make('name')->title('Nom'),
|
||||
Column::make('sale_channel.name')->title(__('shop.sale_channels.name')),
|
||||
Column::make('address')->title('Adresse'),
|
||||
Column::make('zipcode')->title('Code postal'),
|
||||
Column::make('city')->title('Ville'),
|
||||
Column::make('address')->title('Adresse')->searchable(false),
|
||||
$this->makeColumnButtons(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ class Customer extends Model
|
||||
return $this->hasMany(Invoice::class);
|
||||
}
|
||||
|
||||
public function Deliveries()
|
||||
public function Delivery()
|
||||
{
|
||||
return $this->hasMany(Delivery::class);
|
||||
return $this->belongsTo(Delivery::class);
|
||||
}
|
||||
|
||||
public function Orders()
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
@include('components.form.inputs.email', ['name' => 'email', 'value' => $customer['email'] ?? null, 'required' => true])
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ Form::label('sale_channel_id', __('shop.sale_channels.name')) }}
|
||||
@include('components.form.select', ['name' => 'sale_channel_id', 'list' => $sale_channels ?? [], 'value' => $customer['sale_channel_id'] ?? null, 'with_empty' => '', 'class' => 'select2'])
|
||||
{{ Form::label('sale_delivery_id', __('shop.deliveries.name')) }}
|
||||
@include('components.form.select', ['name' => 'sale_delivery_id', 'list' => $sale_deliveries ?? [], 'value' => $customer['sale_delivery_id'] ?? null, 'with_empty' => '', 'class' => 'select2'])
|
||||
</div>
|
||||
</div>
|
||||
@include('components.address', ['with_country' => false])
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
{{ Form::label('active', __('active')) }}<br/>
|
||||
@include("components.form.toggle", ['value' => $delivery['active'] ?? false, 'on' => __('active'), 'off' => __('inactive')])
|
||||
@include("components.form.toggle", ['name' => 'active', 'value' => $delivery['active'] ?? false, 'on' => __('active'), 'off' => __('inactive')])
|
||||
</div>
|
||||
<div class="col-3">
|
||||
{{ Form::label('is_public', __('public')) }}
|
||||
@include('components.form.checkboxes.icheck', ['name' => 'is_public', 'value' => $delivery['is_public'] ?? null])
|
||||
{{ Form::label('is_public', __('type')) }}
|
||||
@include('components.form.toggle', ['name' => 'is_public', 'value' => $delivery['is_public'] ?? false, 'on' => __('public'), 'off' => __('administré')])
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ Form::label('is_public', __('A domicile')) }}
|
||||
{{ Form::label('at_house', __('defaut')) }}
|
||||
@include('components.form.checkboxes.icheck', ['name' => 'at_house', 'value' => $delivery['at_house'] ?? null])
|
||||
</div>
|
||||
</div>
|
||||
@@ -32,10 +32,15 @@
|
||||
@include('components.address', ['with_country' => false])
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-6">
|
||||
{{ Form::label('event_date', __('date')) }}
|
||||
@include('components.form.datepicker', ['name' => 'event_date', 'value' => $delivery['event_date'] ?? null])
|
||||
<div class="col-3">
|
||||
{{ Form::label('event_date_begin', __('date')) }}
|
||||
@include('components.form.datepicker', ['name' => 'event_date_begin', 'value' => $delivery['event_date_begin'] ?? null])
|
||||
</div>
|
||||
<div class="col-3">
|
||||
{{ Form::label('event_date_end', __('date')) }}
|
||||
@include('components.form.datepicker', ['name' => 'event_date_end', 'value' => $delivery['event_date_end'] ?? null])
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user