diff --git a/app/Datatables/Shop/InvoicePaymentsDataTable.php b/app/Datatables/Shop/InvoicePaymentsDataTable.php
new file mode 100644
index 00000000..cb4c10b4
--- /dev/null
+++ b/app/Datatables/Shop/InvoicePaymentsDataTable.php
@@ -0,0 +1,43 @@
+buildQuery($model);
+ }
+
+ public function modifier($datatables)
+ {
+ $datatables
+ ->editColumn('payment_type', function (InvoicePayment $payment) {
+ return InvoicePayments::getPaymentType($payment->payment_type);
+ })
+ ->editColumn('date', function (InvoicePayment $payment) {
+ return $payment->date;
+ })
+ ->rawColumns(['action']);
+
+ return parent::modifier($datatables);
+ }
+
+ protected function getColumns()
+ {
+ return [
+ Column::make('payment_type')->title('Type')->width(80),
+ Column::make('status')->width(60),
+ Column::make('amount')->title('Montant')->width(100),
+ Column::make('reference')->title('Référence'),
+ $this->makeColumnButtons(),
+ ];
+ }
+}
diff --git a/app/Http/Controllers/Admin/Shop/InvoiceController.php b/app/Http/Controllers/Admin/Shop/InvoiceController.php
index edaccad7..2dc395ad 100644
--- a/app/Http/Controllers/Admin/Shop/InvoiceController.php
+++ b/app/Http/Controllers/Admin/Shop/InvoiceController.php
@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Admin\Shop;
use App\Datatables\Admin\Shop\InvoicesDataTable;
+use App\Datatables\Admin\Shop\InvoicePaymentsDataTable;
use App\Http\Controllers\Controller;
use App\Repositories\Shop\Invoices;
use Illuminate\Http\Request;
@@ -28,15 +29,20 @@ class InvoiceController extends Controller
public function show($id)
{
- $data['invoice'] = Invoices::get($id)->toArray();
+ $data['invoice'] = Invoices::getFull($id)->toArray();
return view('Admin.Shop.Invoices.view', $data);
}
public function edit($id)
{
- $data['invoice'] = Invoices::get($id, ['order.customer', 'order.address', 'order.detail'])->toArray();
- $data['statuses'] = Invoices::statuses();
+ $data = Invoices::init();
+ $data['invoice'] = Invoices::getFull($id)->toArray();
+ $model = new invoicePaymentsDataTable();
+ $data['invoice_payments'] = $model->html();
+
+ // dump($data);
+ // exit;
return view('Admin.Shop.Invoices.edit', $data);
}
diff --git a/app/Http/Controllers/Admin/Shop/InvoicePaymentController.php b/app/Http/Controllers/Admin/Shop/InvoicePaymentController.php
new file mode 100644
index 00000000..d6620fff
--- /dev/null
+++ b/app/Http/Controllers/Admin/Shop/InvoicePaymentController.php
@@ -0,0 +1,50 @@
+render('Admin.Shop.InvoicePayments.list');
+ }
+
+ public function create()
+ {
+ return view('Admin.Shop.InvoicePayments.create');
+ }
+
+ public function store(Request $request)
+ {
+ $ret = InvoicePayments::store($request->all());
+
+ return redirect()->route('Admin.Shop.InvoicePayments.index');
+ }
+
+ public function show($id)
+ {
+ $data['invoice_payment'] = InvoicePayments::getFull($id)->toArray();
+
+ return view('Admin.Shop.InvoicePayments.view', $data);
+ }
+
+ public function edit($id)
+ {
+ $data = InvoicePayments::init();
+ $data['invoice_payment'] = InvoicePayments::getFull($id)->toArray();
+ $model = new invoice_paymentPaymentsDataTable();
+ $data['invoice_payment_payments'] = $model->html();
+
+ return view('Admin.Shop.InvoicePayments.edit', $data);
+ }
+
+ public function destroy($id)
+ {
+ return InvoicePayments::delete($id);
+ }
+}
diff --git a/app/Http/Requests/Admin/Shop/StoreMerchandisePost.php b/app/Http/Requests/Admin/Shop/StoreMerchandisePost.php
new file mode 100644
index 00000000..3adc6f05
--- /dev/null
+++ b/app/Http/Requests/Admin/Shop/StoreMerchandisePost.php
@@ -0,0 +1,21 @@
+ 'required',
+ 'producer_id' => 'required',
+ ];
+ }
+}
diff --git a/app/Repositories/Shop/InvoicePayments.php b/app/Repositories/Shop/InvoicePayments.php
index 8e746001..de210acd 100644
--- a/app/Repositories/Shop/InvoicePayments.php
+++ b/app/Repositories/Shop/InvoicePayments.php
@@ -37,10 +37,10 @@ class InvoicePayments
public static function getPaymentType($id)
{
- return self::PaymentTypes()[$id] ?? false;
+ return self::paymentTypes()[$id] ?? false;
}
- public static function PaymentTypes()
+ public static function paymentTypes()
{
return [
'',
diff --git a/app/Repositories/Shop/Invoices.php b/app/Repositories/Shop/Invoices.php
index d7a09eef..10284997 100644
--- a/app/Repositories/Shop/Invoices.php
+++ b/app/Repositories/Shop/Invoices.php
@@ -13,7 +13,7 @@ class Invoices
public static function getInvoiceHtml($id)
{
- $invoice = self::get($id, ['order.customer', 'order.delivery_address', 'order.detail']);
+ $invoice = self::getFull($id);
$order = $invoice->order;
$customer = $order->customer;
unset($invoice->order, $order->customer);
@@ -26,6 +26,19 @@ class Invoices
return view('Shop.Invoices.mail', $data)->render();
}
+ public static function init()
+ {
+ return [
+ 'statuses' => Invoices::statuses(),
+ 'payment_types' => InvoicePayments::paymentTypes(),
+ ];
+ }
+
+ public static function getFull($id)
+ {
+ return self::get($id, ['address', 'order.customer', 'order.delivery_address', 'order.detail']);
+ }
+
public static function getByUUID($uuid)
{
return Invoice::byUUID($uuid)->first();
diff --git a/resources/views/Admin/Shop/InvoicePayments/create.blade.php b/resources/views/Admin/Shop/InvoicePayments/create.blade.php
new file mode 100644
index 00000000..816312fc
--- /dev/null
+++ b/resources/views/Admin/Shop/InvoicePayments/create.blade.php
@@ -0,0 +1,16 @@
+@extends('layout.index', [
+ 'title' => __('invoices.title'),
+ 'subtitle' => __('invoices.create.title'),
+ 'breadcrumb' => [__('invoices.title'), __('invoices.create.title')]
+])
+
+@include('boilerplate::load.fileinput')
+
+@section('content')
+
+ {{ Form::open(['route' => 'Admin.Shop.Invoices.store', 'id' => 'invoice-form', 'autocomplete' => 'off']) }}
+ @include('Admin.Shop.Invoices.form')
+ @include('components.save')
+
+
+@endsection
diff --git a/resources/views/Admin/Shop/InvoicePayments/edit.blade.php b/resources/views/Admin/Shop/InvoicePayments/edit.blade.php
new file mode 100644
index 00000000..e92aa958
--- /dev/null
+++ b/resources/views/Admin/Shop/InvoicePayments/edit.blade.php
@@ -0,0 +1,95 @@
+@extends('layout.index', [
+ 'title' => 'Factures',
+ 'subtitle' => 'Edition d\'une facture',
+ 'breadcrumb' => ['Articles'],
+])
+
+@include('boilerplate::load.fileinput')
+
+@section('content')
+
+
+ {{ Form::open(['route' => 'Admin.Shop.Invoices.update', 'id' => 'invoice-form', 'autocomplete' => 'off']) }}
+
+
+
+
+
+
+
+ @include('components.form.buttons.button-save')
+
+
+
+
+
+
+ {{ $invoice['order']['customer']['last_name'] }}
+ {{ $invoice['order']['customer']['first_name'] }}
+
+
+
+
+ @if ($invoice['order']['delivery_address'])
+ {{ $invoice['order']['delivery_address']['address'] }}
+ @isset($invoice['order']['delivery_address']['address2'])
+ {{ $invoice['order']['delivery_address']['address2'] }}
+ @endisset
+ {{ $invoice['order']['delivery_address']['zipcode'] }}
+ {{ $invoice['order']['delivery_address']['city'] }}
+ @endif
+
+
+
+
+
+
+
+ Facture N° {{ $invoice['ref'] }}
+ du {{ Carbon\Carbon::parse($invoice['created_at'])->isoFormat('LLLL') }}
+
+
+
+
+
+
+
+ @include('components.form.select', [
+ 'label' => 'Statut',
+ 'name' => 'status',
+ 'list' => $statuses ?? [],
+ 'value' => $invoice['status'],
+ 'class' => 'select2',
+ ])
+
+
+ @include('components.form.select', [
+ 'label' => 'Règlement',
+ 'name' => 'payment_type',
+ 'list' => $payment_types ?? [],
+ 'value' => $invoice['order']['payment_type'],
+ 'class' => 'select2',
+ 'disabled' => false,
+ ])
+
+
+
+
+
+
+ @include('Admin.Shop.Orders.partials.detail', [
+ 'detail_type' => 'facture',
+ 'order' => $invoice['order'],
+ ])
+
+
+
+
+
+
+
+ Règlements
+
+
+
+@endsection
diff --git a/resources/views/Admin/Shop/InvoicePayments/form.blade.php b/resources/views/Admin/Shop/InvoicePayments/form.blade.php
new file mode 100644
index 00000000..414c2109
--- /dev/null
+++ b/resources/views/Admin/Shop/InvoicePayments/form.blade.php
@@ -0,0 +1,26 @@
+
+
+ @include('components.form.select', [
+ 'label' => 'Règlement',
+ 'name' => 'payment_type',
+ 'list' => $payment_types ?? [],
+ 'value' => $invoice_payment['payment_type'],
+ 'class' => 'select2',
+ ])
+
+
+ @include('components.form.input', [
+ 'label' => 'Montant',
+ 'name' => 'amount',
+ 'value' => $invoice_payment['amount'],
+ ])
+
+
+
+
+
+
+ @include('components.form.buttons.button-save')
+
+
+
diff --git a/resources/views/Admin/Shop/InvoicePayments/index.blade.php b/resources/views/Admin/Shop/InvoicePayments/index.blade.php
new file mode 100644
index 00000000..a2c9f4c9
--- /dev/null
+++ b/resources/views/Admin/Shop/InvoicePayments/index.blade.php
@@ -0,0 +1,14 @@
+@extends('layout.index', [
+ 'title' => __('shop.invoice_payments.title'),
+ 'subtitle' => __('shop.invoice_payments.list'),
+ 'breadcrumb' => [__('shop.invoice_payments.title')],
+])
+
+@section('content')
+
+ @include('components.datatable', [
+ 'route' => route('Admin.Shop.InvoicePayments.index'),
+ 'model' => 'invoice_payments',
+ ])
+
+@endsection
diff --git a/resources/views/Admin/Shop/InvoicePayments/list.blade.php b/resources/views/Admin/Shop/InvoicePayments/list.blade.php
new file mode 100644
index 00000000..1989ff78
--- /dev/null
+++ b/resources/views/Admin/Shop/InvoicePayments/list.blade.php
@@ -0,0 +1,4 @@
+@include('components.datatable', [
+ 'route' => route('Admin.Shop.InvoicePayments.index'),
+ 'model' => 'invoice_payments',
+])
diff --git a/resources/views/Admin/Shop/InvoicePayments/show.blade.php b/resources/views/Admin/Shop/InvoicePayments/show.blade.php
new file mode 100644
index 00000000..1e1cd729
--- /dev/null
+++ b/resources/views/Admin/Shop/InvoicePayments/show.blade.php
@@ -0,0 +1,36 @@
+@extends('layout.index', [
+ 'title' => __('products.title'),
+ 'subtitle' => __('products.title'),
+ 'breadcrumb' => [__('products.title')]
+])
+
+@section('content')
+
+
+@endsection
diff --git a/resources/views/Admin/Shop/Invoices/edit.blade.php b/resources/views/Admin/Shop/Invoices/edit.blade.php
index b6076e76..25d55bda 100644
--- a/resources/views/Admin/Shop/Invoices/edit.blade.php
+++ b/resources/views/Admin/Shop/Invoices/edit.blade.php
@@ -1,81 +1,98 @@
@extends('layout.index', [
- 'title' => 'Factures',
- 'subtitle' => 'Edition d\'une facture',
- 'breadcrumb' => ['Articles']
+ 'title' => 'Factures',
+ 'subtitle' => 'Edition d\'une facture',
+ 'breadcrumb' => ['Articles'],
])
@include('boilerplate::load.fileinput')
@section('content')
+
+
+ {{ Form::open(['route' => 'Admin.Shop.Invoices.update', 'id' => 'invoice-form', 'autocomplete' => 'off']) }}
+
+
+
+
+
+
+
+ @include('components.form.buttons.button-save')
+
+
- {{ Form::open(['route' => 'Admin.Shop.Invoices.update', 'id' => 'invoice-form', 'autocomplete' => 'off']) }}
-
-
-
-
-
-
-
- @include('components.form.buttons.button-save')
-
-
-
-
-
-
{{ $invoice['order']['customer']['last_name'] }} {{ $invoice['order']['customer']['first_name'] }}
-
-
-
- @if ($invoice['order']['address'])
- {{ $invoice['order']['address']['address'] }}
- @isset ($invoice['order']['address']['address2'])
- {{ $invoice['order']['address']['address2'] }}
- @endisset
- {{ $invoice['order']['address']['zipcode'] }} {{ $invoice['order']['address']['city'] }}
- @endif
-
-
-
-
-
-
-
- Facture N° {{ $invoice['ref'] }}
- du {{ Carbon\Carbon::parse($invoice['created_at'])->isoFormat('LLLL') }}
-
-
-
-
-
-
-
- @include('components.form.select', [
- 'label' => 'Statut',
- 'name' => 'status',
- 'list' => $statuses ?? [],
- 'value' => $invoice['status'],
- 'class' => 'select2',
- ])
-
-
- @include('components.form.select', [
- 'label' => 'Règlement',
- 'name' => 'payment_type',
- 'list' => $payment_types ?? [],
- 'value' => $invoice['order']['payment_type'],
- 'class' => 'select2',
- 'disabled' => false,
- ])
-
-
-
-
-
-
- @include('Admin.Shop.Orders.partials.detail', ['detail_type' => 'facture', 'order' => $invoice['order']])
-
-
-
-
+
+
+
+ {{ $invoice['order']['customer']['last_name'] }}
+ {{ $invoice['order']['customer']['first_name'] }}
+
+
+
+
+ @if ($invoice['order']['delivery_address'])
+ {{ $invoice['order']['delivery_address']['address'] }}
+ @isset($invoice['order']['delivery_address']['address2'])
+ {{ $invoice['order']['delivery_address']['address2'] }}
+ @endisset
+ {{ $invoice['order']['delivery_address']['zipcode'] }}
+ {{ $invoice['order']['delivery_address']['city'] }}
+ @endif
+
+
+
+
+
+
+
+ Facture N° {{ $invoice['ref'] }}
+ du {{ Carbon\Carbon::parse($invoice['created_at'])->isoFormat('LLLL') }}
+
+
+
+
+
+
+ @include('components.form.select', [
+ 'label' => 'Statut',
+ 'name' => 'status',
+ 'list' => $statuses ?? [],
+ 'value' => $invoice['status'],
+ 'class' => 'select2',
+ ])
+
+
+ @include('components.form.select', [
+ 'label' => 'Règlement',
+ 'name' => 'payment_type',
+ 'list' => $payment_types ?? [],
+ 'value' => $invoice['order']['payment_type'],
+ 'class' => 'select2',
+ 'disabled' => false,
+ ])
+
+
+
+
+
+
+ @include('Admin.Shop.Orders.partials.detail', [
+ 'detail_type' => 'facture',
+ 'order' => $invoice['order'],
+ ])
+
+
+
+
+
+
+
+ Règlements
+ @include('Admin.Shop.InvoicePayments.list', [
+ 'dataTable' => $invoice_payments,
+ ])
+
+
+
@endsection
diff --git a/resources/views/Admin/Shop/Invoices/form.blade.php b/resources/views/Admin/Shop/Invoices/form.blade.php
index 532cd00c..d19ca720 100644
--- a/resources/views/Admin/Shop/Invoices/form.blade.php
+++ b/resources/views/Admin/Shop/Invoices/form.blade.php
@@ -1,29 +1,29 @@
+
+
+ @include('components.form.input', [
+ 'name' => 'name',
+ 'value' => $family['name'] ?? null,
+ 'required' => true,
+ 'label' => 'Nom',
+ ])
+
+ @include('components.form.textarea', [
+ 'name' => 'description',
+ 'value' => isset($description) ? $description : null,
+ 'class' => 'editor',
+ 'required' => false,
+ 'label' => 'Description',
+ ])
+
+
+
+
+
+
+
+ @include('components.form.buttons.button-save')
+
+
+
+
@include('boilerplate::load.tinymce')
-
-
-
-
- {{ Form::label('name', 'Nom') }}
- @include('components.form.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true])
-
- {{ Form::label('description', 'Description') }}
- @include('components.form.textarea', ['name' => 'description', 'value' => isset($description) ? $description : null, 'class' => 'editor', 'required' => false])
-
-
-
-
-
-
-
- @include('components.form.buttons.button-save')
-
-
-
-
-@push('js')
-
-@endpush
\ No newline at end of file
diff --git a/resources/views/Admin/Shop/Invoices/list.blade.php b/resources/views/Admin/Shop/Invoices/list.blade.php
index 0117f41b..a2c9f4c9 100644
--- a/resources/views/Admin/Shop/Invoices/list.blade.php
+++ b/resources/views/Admin/Shop/Invoices/list.blade.php
@@ -1,11 +1,14 @@
@extends('layout.index', [
- 'title' => __('shop.invoices.title'),
- 'subtitle' => __('shop.invoices.list'),
- 'breadcrumb' => [__('shop.invoices.title')]
+ 'title' => __('shop.invoice_payments.title'),
+ 'subtitle' => __('shop.invoice_payments.list'),
+ 'breadcrumb' => [__('shop.invoice_payments.title')],
])
@section('content')
- @component('components.card')
- @include('components.datatable', ['route' => route('Admin.Shop.Invoices.index'), 'model' => 'invoices'])
- @endcomponent
+
+ @include('components.datatable', [
+ 'route' => route('Admin.Shop.InvoicePayments.index'),
+ 'model' => 'invoice_payments',
+ ])
+
@endsection
diff --git a/resources/views/load/form/editor/tinymce.blade.php b/resources/views/load/form/editor/tinymce.blade.php
index f1fa9d3f..7ab6180b 100644
--- a/resources/views/load/form/editor/tinymce.blade.php
+++ b/resources/views/load/form/editor/tinymce.blade.php
@@ -1,19 +1,22 @@
-@if(!defined('LOAD_TINYMCE'))
+@if (!defined('LOAD_TINYMCE'))
@push('js')
@component('boilerplate::minify')
@endcomponent
@endpush
diff --git a/resources/views/load/form/select2.blade.php b/resources/views/load/form/select2.blade.php
index e5baf78e..f97702b2 100644
--- a/resources/views/load/form/select2.blade.php
+++ b/resources/views/load/form/select2.blade.php
@@ -1,51 +1,50 @@
-@if(!defined('LOAD_SELECT2'))
- @push('scripts')
-
-
+@if (!defined('LOAD_SELECT2'))
+ @push('scripts')
+
+
-
- @endpush
- @push('css')
-
- @endpush
- @php(define('LOAD_SELECT2', true))
-@endif
\ No newline at end of file
+ if (typeof(parent) == 'undefined') {
+ $(selector).select2({
+ placeholder: "{{ __('select_a_value') }}",
+ allowClear: false,
+ width: {
+ value: '100%'
+ }
+ });
+ } else {
+ $(selector).select2({
+ placeholder: "{{ __('select_a_value') }}",
+ allowClear: true,
+ dropdownParent: $(parent),
+ width: {
+ value: '100%'
+ }
+ });
+ }
+ /*
+ $(selector).on('select2:open',(e) => {
+ let t = $(e.target);
+ console.log(t);
+ if (t && t.length) {
+ let id = t[0].id || t[0].name;
+ console.log(id);
+ let item = $(`input[aria-controls*='${id}']`);
+ console.log(item);
+ return item ? item.focus() : false;
+ }
+ });
+ */
+ }
+
+ @endpush
+ @push('css')
+
+ @endpush
+ @php(define('LOAD_SELECT2', true))
+@endif
diff --git a/resources/views/load/form/upload/fileinput.blade.php b/resources/views/load/form/upload/fileinput.blade.php
index 585cc8b3..1a181c5a 100644
--- a/resources/views/load/form/upload/fileinput.blade.php
+++ b/resources/views/load/form/upload/fileinput.blade.php
@@ -1,12 +1,11 @@
-@if(!defined('LOAD_FILEINPUT'))
+@if (!defined('LOAD_FILEINPUT'))
@push('css')
@endpush
@push('scripts')
- @if(App::getLocale() !== 'en')
+ @if (App::getLocale() !== 'en')
-
@@ -17,41 +16,44 @@
// console.log(options);
var selector = (typeof(sel) == 'undefined') ? '.fileinput' : sel;
$(selector).fileinput(options)
- .on("filebatchselected", function(event, files) {
- $(selector).fileinput("upload");
- }).on('fileuploaded', function (event, data, previewId, index, fileId) {
- // console.log('File uploaded', previewId, index, fileId);
- var file = data.files[0];
- // console.log(file);
- var response = data.response.initialPreviewConfig.extra;
- // console.log(response);
+ .on("filebatchselected", function(event, files) {
+ $(selector).fileinput("upload");
+ }).on('fileuploaded', function(event, data, previewId, index, fileId) {
+ // console.log('File uploaded', previewId, index, fileId);
+ var file = data.files[0];
+ // console.log(file);
+ var response = data.response.initialPreviewConfig.extra;
+ // console.log(response);
- response.model = $(this).data('model');
+ response.model = $(this).data('model');
- // console.log(response);
- if (typeof(callbackUploaded) !== 'undefined') {
- // console.log('Callback');
- eval(callbackUploaded);
- }
- }).on('filebatchuploadcomplete', function(event, preview, config, tags, extraData) {
- console.log('File Batch Uploaded', preview, config, tags, extraData);
- }).on('filebatchuploadsuccess', function(event, data) {
- console.log('File batch upload success');
- console.log(data);
- }).on('fileuploaderror', function(event, data, msg) {
- console.log('File upload error');
- console.log(data);
- console.log(msg);
- });
+ // console.log(response);
+ if (typeof(callbackUploaded) !== 'undefined') {
+ // console.log('Callback');
+ eval(callbackUploaded);
+ }
+ }).on('filebatchuploadcomplete', function(event, preview, config, tags, extraData) {
+ console.log('File Batch Uploaded', preview, config, tags, extraData);
+ }).on('filebatchuploadsuccess', function(event, data) {
+ console.log('File batch upload success');
+ console.log(data);
+ }).on('fileuploaderror', function(event, data, msg) {
+ console.log('File upload error');
+ console.log(data);
+ console.log(msg);
+ });
}
function UploadOptions(options) {
return {
- allowedFileExtensions: (typeof(options.allowedFileExtensions) == 'undefined') ? ['doc','docx','jpg','jpeg','png','xls','xlsx','pdf'] : options.allowedFileExtensions,
+ allowedFileExtensions: (typeof(options.allowedFileExtensions) == 'undefined') ? ['doc', 'docx', 'jpg',
+ 'jpeg', 'png', 'xls', 'xlsx', 'pdf'
+ ] : options.allowedFileExtensions,
browseOnZoneClick: (typeof(options.browseOnZoneClick) == 'undefined') ? true : options.browseOnZoneClick,
dropZoneEnabled: (typeof(options.dropZoneEnabled) == 'undefined') ? false : options.dropZoneEnabled,
initialPreview: (typeof(options.initialPreview) == 'undefined') ? false : options.initialPreview,
- initialPreviewAsData: (typeof(options.initialPreviewAsData) == 'undefined') ? false : options.initialPreviewAsData,
+ initialPreviewAsData: (typeof(options.initialPreviewAsData) == 'undefined') ? false : options
+ .initialPreviewAsData,
maxFilesize: (typeof(options.maxFilesize) == 'undefined') ? false : options.maxFilesize,
overwriteInitial: (typeof(options.overwriteInitial) == 'undefined') ? false : options.overwriteInitial,
showCaption: (typeof(options.showCaption) == 'undefined') ? true : options.showCaption,
@@ -117,8 +119,7 @@
});
}
- function initFileInputImage(images, sel)
- {
+ function initFileInputImage(images, sel) {
UploadInit(sel, {
allowedFileExtensions: ['jpg', 'jpeg', 'png', 'gif'],
overwriteInitial: true,
@@ -131,8 +132,7 @@
});
}
- function uploadShowImage(id, image)
- {
+ function uploadShowImage(id, image) {
$('#' + id + '_preview').toggleClass('d-none');
$('#' + id + '_preview').find('img').attr('src', image);
$('#' + id + '_uploader').toggleClass('d-none');
diff --git a/routes/Admin/Shop/InvoicePayments.php b/routes/Admin/Shop/InvoicePayments.php
new file mode 100644
index 00000000..972269dd
--- /dev/null
+++ b/routes/Admin/Shop/InvoicePayments.php
@@ -0,0 +1,11 @@
+name('InvoicePayments.')->group(function () {
+ Route::get('', 'InvoicePaymentController@index')->name('index');
+ Route::get('create', 'InvoicePaymentController@create')->name('create');
+ Route::delete('destroy', 'InvoicePaymentController@destroy')->name('destroy');
+ Route::post('update', 'InvoicePaymentController@update')->name('update');
+ Route::post('store', 'InvoicePaymentController@store')->name('store');
+ Route::get('edit/{id}', 'InvoicePaymentController@edit')->name('edit');
+
+});
diff --git a/routes/Admin/Shop/route.php b/routes/Admin/Shop/route.php
index 24f21c21..9bc89038 100644
--- a/routes/Admin/Shop/route.php
+++ b/routes/Admin/Shop/route.php
@@ -13,6 +13,7 @@ Route::middleware('auth')->prefix('Shop')->namespace('Shop')->name('Shop.')->gro
include_once __DIR__.'/DeliveryTypeCalculations.php';
include_once __DIR__.'/Homepages.php';
include_once __DIR__.'/InvoiceItems.php';
+ include_once __DIR__.'/InvoicePayments.php';
include_once __DIR__.'/Invoices.php';
include_once __DIR__.'/Merchandises.php';
include_once __DIR__.'/Offers.php';