cosmetic fixes, enhance profile, fix mails, ...
This commit is contained in:
@@ -17,6 +17,7 @@ var jsCompat = [
|
|||||||
var jsSite = [
|
var jsSite = [
|
||||||
jsBase,
|
jsBase,
|
||||||
jsBootstrap,
|
jsBootstrap,
|
||||||
|
'node_modules/jquery-serializejson/jquery.serializejson.min.js',
|
||||||
'node_modules/currency.js/dist/currency.min.js',
|
'node_modules/currency.js/dist/currency.min.js',
|
||||||
'build/js/plugins/smooth_products/js/smoothproducts.min.js',
|
'build/js/plugins/smooth_products/js/smoothproducts.min.js',
|
||||||
'build/js/site.js',
|
'build/js/site.js',
|
||||||
|
|||||||
53
app/Datatables/Shop/CustomerOrdersDataTable.php
Normal file
53
app/Datatables/Shop/CustomerOrdersDataTable.php
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Datatables\Shop;
|
||||||
|
|
||||||
|
use Yajra\DataTables\Html\Column;
|
||||||
|
|
||||||
|
use App\Datatables\ParentDataTable as DataTable;
|
||||||
|
use App\Models\Shop\Order;
|
||||||
|
use App\Repositories\Shop\InvoicePayments;
|
||||||
|
use App\Repositories\Shop\Orders;
|
||||||
|
|
||||||
|
class CustomerOrdersDataTable extends DataTable
|
||||||
|
{
|
||||||
|
public $model_name = 'orders';
|
||||||
|
public $sortedColumn = 1;
|
||||||
|
public $sortedOrder = 'desc';
|
||||||
|
public $stateSave = true;
|
||||||
|
|
||||||
|
public function query(Order $model)
|
||||||
|
{
|
||||||
|
$customer_id = Auth::id();
|
||||||
|
$model = $model->byCustomer($customer_id)->with(['delivery']);
|
||||||
|
return $this->buildQuery($model);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function modifier($datatables)
|
||||||
|
{
|
||||||
|
$datatables
|
||||||
|
->editColumn('status', function (Order $order) {
|
||||||
|
return Orders::getStatus($order->status);
|
||||||
|
})
|
||||||
|
->editColumn('created_at', function (Order $order) {
|
||||||
|
return $order->created_at->toDateTimeString();
|
||||||
|
})
|
||||||
|
->editColumn('payment_type', function (Order $order) {
|
||||||
|
return InvoicePayments::getPaymentType($order->payment_type);
|
||||||
|
})
|
||||||
|
->rawColumns(['action']);
|
||||||
|
return parent::modifier($datatables);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getColumns()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Column::make('ref')->title('Ref'),
|
||||||
|
Column::make('status')->title('Statut'),
|
||||||
|
Column::make('created_at')->title('Date'),
|
||||||
|
Column::make('payment_type')->title('Règlement'),
|
||||||
|
Column::make('total_shipped')->title('Montant')->class('text-right'),
|
||||||
|
$this->makeColumnButtons(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -64,6 +64,8 @@ class CategoryController extends Controller
|
|||||||
]),
|
]),
|
||||||
'tags' => TagGroups::getWithTagsAndCountOffers($category_id),
|
'tags' => TagGroups::getWithTagsAndCountOffers($category_id),
|
||||||
];
|
];
|
||||||
|
// dump($data);
|
||||||
|
// exit;
|
||||||
return view('Shop.Shelves.shelve', $data);
|
return view('Shop.Shelves.shelve', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class CustomerController extends Controller
|
|||||||
public function edit()
|
public function edit()
|
||||||
{
|
{
|
||||||
$id = Auth::id();
|
$id = Auth::id();
|
||||||
$data['customer'] = Customers::get($id);
|
$data['customer'] = Customers::get($id, 'addresses')->toArray();
|
||||||
return view('Shop.Customers.edit', $data);
|
return view('Shop.Customers.edit', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,5 +35,4 @@ class CustomerController extends Controller
|
|||||||
$customer = Customers::store($data);
|
$customer = Customers::store($data);
|
||||||
return response()->json(['error' => 0]);
|
return response()->json(['error' => 0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ use Illuminate\Http\Request;
|
|||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
|
||||||
use App\Repositories\Shop\Invoices;
|
use App\Repositories\Shop\Invoices;
|
||||||
|
use App\Repositories\Core\PDF;
|
||||||
|
|
||||||
class InvoiceController extends Controller
|
class InvoiceController extends Controller
|
||||||
{
|
{
|
||||||
@@ -15,9 +16,21 @@ class InvoiceController extends Controller
|
|||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show($id)
|
public function show($uuid)
|
||||||
{
|
{
|
||||||
$data = Invoices::get($id);
|
$data = Invoices::getByUUID($uuid);
|
||||||
return view('Shop.Invoices.show', $data);
|
return view('Shop.Invoices.show', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function pdf($uuid)
|
||||||
|
{
|
||||||
|
\Debugbar::disable();
|
||||||
|
$data['invoice'] = Invoices::getByUUID($uuid);
|
||||||
|
$filename = 'invoice-' . $uuid . '.pdf';
|
||||||
|
$html = view('Shop.Invoices.pdf', $data)->toHtml();
|
||||||
|
// $html = '<h1>Hello world!</h1>';
|
||||||
|
// return PDF::convertHTML($html);
|
||||||
|
// return view('Shop.Invoices.pdf', $data);
|
||||||
|
return PDF::view('Shop.Invoices.pdf', $data, $filename);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,16 +26,26 @@ class OrderController extends Controller
|
|||||||
$data = Orders::getByUUID($uuid);
|
$data = Orders::getByUUID($uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function pdf($uuid)
|
||||||
|
{
|
||||||
|
$data = Orders::getByUUID($uuid);
|
||||||
|
return view('Shop.Orders.pdf', $data);
|
||||||
|
}
|
||||||
|
|
||||||
public function order()
|
public function order()
|
||||||
{
|
{
|
||||||
$customer = Customers::getWithAddresses();
|
if (ShopCart::count()) {
|
||||||
$data = [
|
$customer = Customers::getWithAddresses();
|
||||||
'customer' => $customer ? $customer->toArray() : false,
|
$data = [
|
||||||
'basket' => ShopCart::getSummary(),
|
'customer' => $customer ? $customer->toArray() : false,
|
||||||
'deliveries' => Deliveries::getAllWithSaleChannel()->toArray(),
|
'basket' => ShopCart::getSummary(),
|
||||||
'sale_channel' => SaleChannels::getDefault()->toArray(),
|
'deliveries' => Deliveries::getAllWithSaleChannel()->toArray(),
|
||||||
];
|
'sale_channel' => SaleChannels::getDefault()->toArray(),
|
||||||
return view('Shop.Orders.order', $data);
|
];
|
||||||
|
return view('Shop.Orders.order', $data);
|
||||||
|
} else {
|
||||||
|
return redirect()->route('home');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
namespace App\Mail;
|
namespace App\Mail;
|
||||||
|
|
||||||
use App\Models\Core\Mail\MailTemplate;
|
use App\Models\Core\Mail\MailTemplate;
|
||||||
use App\Repositories\Core\DateTime;
|
|
||||||
use App\Repositories\Shop\Customers;
|
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Mail\Mailables\Address;
|
use Illuminate\Mail\Mailables\Address;
|
||||||
use Illuminate\Mail\Mailables\Envelope;
|
use Illuminate\Mail\Mailables\Envelope;
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ use Illuminate\Mail\Mailables\Envelope;
|
|||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
use Spatie\MailTemplates\TemplateMailable;
|
use Spatie\MailTemplates\TemplateMailable;
|
||||||
|
|
||||||
|
|
||||||
class Preparation extends TemplateMailable
|
class Preparation extends TemplateMailable
|
||||||
{
|
{
|
||||||
use Queueable, SerializesModels;
|
use Queueable, SerializesModels;
|
||||||
|
|||||||
@@ -55,6 +55,5 @@ class Shop
|
|||||||
$menu->addTo('shop', 'Unités', [
|
$menu->addTo('shop', 'Unités', [
|
||||||
'route' => 'Admin.Shop.Unities.index',
|
'route' => 'Admin.Shop.Unities.index',
|
||||||
])->activeIfRoute(['Admin.Shop.Unities.*'])->order(14);
|
])->activeIfRoute(['Admin.Shop.Unities.*'])->order(14);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,11 @@ class Category extends parentCategory
|
|||||||
return $this->tags->articles;
|
return $this->tags->articles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function Parent()
|
||||||
|
{
|
||||||
|
return $this->hasOne(Category::class, 'id', 'parent_id');
|
||||||
|
}
|
||||||
|
|
||||||
public function categorizables()
|
public function categorizables()
|
||||||
{
|
{
|
||||||
return $this->hasMany(Categorizable::class);
|
return $this->hasMany(Categorizable::class);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace App\Repositories\Core;
|
|||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
Trait DateStats
|
trait DateStats
|
||||||
{
|
{
|
||||||
public static function countByMonth($prev = 0)
|
public static function countByMonth($prev = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
88
app/Repositories/Core/PDF.php
Normal file
88
app/Repositories/Core/PDF.php
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repositories\Core;
|
||||||
|
|
||||||
|
use Barryvdh\DomPDF\Facade\Pdf as DomPDF;
|
||||||
|
use GravityMedia\Ghostscript\Ghostscript;
|
||||||
|
use Mpdf\Mpdf;
|
||||||
|
use Barryvdh\Snappy\Facades\SnappyPdf;
|
||||||
|
use Symfony\Component\Process\Process;
|
||||||
|
|
||||||
|
class PDF
|
||||||
|
{
|
||||||
|
public static function view($view, $data, $filename = 'file.pdf')
|
||||||
|
{
|
||||||
|
\Debugbar::disable();
|
||||||
|
$pdf = DomPDF::loadView($view, $data);
|
||||||
|
return $pdf->download($filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function convertHTML($html)
|
||||||
|
{
|
||||||
|
$mpdf = new Mpdf();
|
||||||
|
$mpdf->WriteHTML($html);
|
||||||
|
return $mpdf->Output();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function convertURL($url)
|
||||||
|
{
|
||||||
|
$pdf = SnappyPdf::loadFile($url);
|
||||||
|
return $pdf->download('invoice.pdf');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function convertIfNeeded($filename)
|
||||||
|
{
|
||||||
|
if (self::getVersion($filename) > 1.4) {
|
||||||
|
self::downgrade2($filename);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getVersion($filename)
|
||||||
|
{
|
||||||
|
$pdf = fopen($filename, 'r');
|
||||||
|
if ($pdf) {
|
||||||
|
$line_first = fgets($pdf);
|
||||||
|
fclose($pdf);
|
||||||
|
} else {
|
||||||
|
echo 'error opening the file.';
|
||||||
|
}
|
||||||
|
preg_match_all('!\d+!', $line_first, $matches);
|
||||||
|
$version = implode('.', $matches[0]);
|
||||||
|
|
||||||
|
return (float) $version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function downgrade($filename)
|
||||||
|
{
|
||||||
|
$new_filename = $filename.'-temp';
|
||||||
|
$ghostscript = new Ghostscript([
|
||||||
|
'quiet' => false,
|
||||||
|
]);
|
||||||
|
|
||||||
|
$device = $ghostscript->createPdfDevice($new_filename);
|
||||||
|
$device->setCompatibilityLevel(1.4);
|
||||||
|
|
||||||
|
// dump($device);
|
||||||
|
$process = $device->createProcess($filename);
|
||||||
|
// dump($process);
|
||||||
|
// echo '$ ' . $process->getCommandLine() . PHP_EOL;
|
||||||
|
// exit;
|
||||||
|
$process->run(function ($type, $buffer) {
|
||||||
|
if ($type === Process::ERR) {
|
||||||
|
throw new \RuntimeException($buffer);
|
||||||
|
}
|
||||||
|
// print $buffer;
|
||||||
|
});
|
||||||
|
|
||||||
|
unlink($filename);
|
||||||
|
rename($new_filename, $filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function downgrade2($filename)
|
||||||
|
{
|
||||||
|
$new_filename = $filename.'-temp';
|
||||||
|
shell_exec('gs -dBATCH -dCompatibilityLevel=1.4 -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile="'.$new_filename.'" "'.$filename.'"');
|
||||||
|
unlink($filename);
|
||||||
|
rename($new_filename, $filename);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -34,14 +34,14 @@ class Categories
|
|||||||
return Category::orderBy('name', 'asc')->get();
|
return Category::orderBy('name', 'asc')->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function get($id)
|
public static function get($id, $relations = false)
|
||||||
{
|
{
|
||||||
return Category::findOrFail($id);
|
return $relations ? Category::with($relations)->findOrFail($id) : Category::findOrFail($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getFull($id)
|
public static function getFull($id)
|
||||||
{
|
{
|
||||||
$category = self::get($id);
|
$category = self::get($id, ['Parent']);
|
||||||
$data = $category->toArray();
|
$data = $category->toArray();
|
||||||
$data['name'] = $category->name;
|
$data['name'] = $category->name;
|
||||||
$data['description'] = $category->description;
|
$data['description'] = $category->description;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Repositories\Shop;
|
namespace App\Repositories\Shop;
|
||||||
|
|
||||||
use App\Datatables\Shop\OrdersDataTable;
|
use App\Datatables\Shop\CustomerOrdersDataTable;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ class Customers
|
|||||||
public static function editProfile($id = false)
|
public static function editProfile($id = false)
|
||||||
{
|
{
|
||||||
$id = $id ? $id : self::getId();
|
$id = $id ? $id : self::getId();
|
||||||
$orders_datatable = new OrdersDataTable;
|
$orders_datatable = new CustomerOrdersDataTable;
|
||||||
$data = [
|
$data = [
|
||||||
'customer' => self::get($id, ['addresses', 'deliveries', 'orders'])->toArray(),
|
'customer' => self::get($id, ['addresses', 'deliveries', 'orders'])->toArray(),
|
||||||
'deliveries' => Deliveries::getAll('sale_channel')->toArray(),
|
'deliveries' => Deliveries::getAll('sale_channel')->toArray(),
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ class Invoices
|
|||||||
{
|
{
|
||||||
public static function getByUUID($uuid)
|
public static function getByUUID($uuid)
|
||||||
{
|
{
|
||||||
return Order::byUUID($uuid)->first();
|
return Invoice::byUUID($uuid)->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function saveInvoice($order_id, $data)
|
public static function saveInvoice($order_id, $data)
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
"darryldecode/cart": "^4.1",
|
"darryldecode/cart": "^4.1",
|
||||||
"datatables/datatables": "^1.10",
|
"datatables/datatables": "^1.10",
|
||||||
"ddzobov/laravel-pivot-softdeletes": "^2.1",
|
"ddzobov/laravel-pivot-softdeletes": "^2.1",
|
||||||
|
"dietercoopman/smart": "^1.6",
|
||||||
"dompdf/dompdf": "^2.0.3",
|
"dompdf/dompdf": "^2.0.3",
|
||||||
"dyrynda/laravel-cascade-soft-deletes": "^4.1",
|
"dyrynda/laravel-cascade-soft-deletes": "^4.1",
|
||||||
"eduardokum/laravel-mail-auto-embed": "^2.0",
|
"eduardokum/laravel-mail-auto-embed": "^2.0",
|
||||||
@@ -38,6 +39,7 @@
|
|||||||
"intervention/image": "^2.5",
|
"intervention/image": "^2.5",
|
||||||
"intervention/imagecache": "^2.4",
|
"intervention/imagecache": "^2.4",
|
||||||
"jasonlewis/expressive-date": "^1.0",
|
"jasonlewis/expressive-date": "^1.0",
|
||||||
|
"jdavidbakr/mail-tracker": "6.0",
|
||||||
"jenssegers/date": "^4.0",
|
"jenssegers/date": "^4.0",
|
||||||
"jeroen-g/blade-macro": "^1.0",
|
"jeroen-g/blade-macro": "^1.0",
|
||||||
"kalnoy/nestedset": "^6.0",
|
"kalnoy/nestedset": "^6.0",
|
||||||
@@ -92,6 +94,7 @@
|
|||||||
"staudenmeir/eloquent-has-many-deep": "^1.13",
|
"staudenmeir/eloquent-has-many-deep": "^1.13",
|
||||||
"stillat/numeral.php": "^2.0",
|
"stillat/numeral.php": "^2.0",
|
||||||
"symfony/http-client": "^6.2",
|
"symfony/http-client": "^6.2",
|
||||||
|
"tanthammar/laravel-window-size": "^2.1",
|
||||||
"thomasjohnkane/snooze": "^2.2",
|
"thomasjohnkane/snooze": "^2.2",
|
||||||
"toin0u/geocoder-laravel": "^4.2",
|
"toin0u/geocoder-laravel": "^4.2",
|
||||||
"unicodeveloper/laravel-password": "^1.0",
|
"unicodeveloper/laravel-password": "^1.0",
|
||||||
|
|||||||
@@ -11,15 +11,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<x-card title="Mes adresses de livraison" class="gradient-green1 mb-3">
|
<x-card title="Mes adresses de livraison" class="gradient-green1 mb-3">
|
||||||
@include('Shop.Customers.partials.addresses')
|
@include('Shop.Customers.partials.addresses', ['addresses' => $customer['addresses']])
|
||||||
</x-card>
|
</x-card>
|
||||||
|
|
||||||
<x-card title="Mon mot de passe" class="gradient-green1">
|
<x-card title="Mon mot de passe" class="gradient-green1">
|
||||||
@include('Shop.auth.passwords.password_confirmation')
|
@include('Shop.auth.passwords.password_confirmation')
|
||||||
</x-card>
|
</x-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<x-save />
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@include('load.layout.modal')
|
@include('load.layout.modal')
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@foreach ($addresses ?? [] as $address)
|
@foreach ($addresses ?? [] as $address)
|
||||||
<div class="row">
|
<div class="row mt-3">
|
||||||
<div class="col-1">
|
<div class="col-1">
|
||||||
<x-form.radios.icheck name="address_id" val="{{ $address['id'] }}" id="address_{{ $address['id'] }}"/>
|
<x-form.radios.icheck name="address_id" val="{{ $address['id'] }}" id="address_{{ $address['id'] }}"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -13,9 +13,22 @@
|
|||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
|
<div id="add_address_container" class="green-dark d-none mb-3 mt-3">
|
||||||
|
<x-card classBody="bg-green-dark yellow" title="Nouvelle adresse">
|
||||||
|
@include('components.address', ['prefix' => 'deliveries', 'with_country' => false, 'with_tab' => true])
|
||||||
|
</x-card>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 text-right">
|
<div class="col-12 text-right">
|
||||||
<x-form.button id="add_address" icon="fa-plus" txt="Ajouter une adresse" class="btn-warning btn-sm" />
|
<x-form.button id="add_address" icon="fa-plus" txt="Ajouter une adresse" class="btn-warning btn-sm" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@push('js')
|
||||||
|
<script>
|
||||||
|
$('#add_address').click(function() {
|
||||||
|
$('#add_address_container').toggleClass('d-none');
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
@foreach ($deliveries as $delivery)
|
@foreach ($deliveries as $delivery)
|
||||||
<div class="row mt-3 mb-3">
|
<div class="row">
|
||||||
<div class="col-1 text-right">
|
<div class="col-1 text-right pt-1">
|
||||||
@include('components.form.radios.icheck', [
|
@include('components.form.radios.icheck', [
|
||||||
'name' => 'delivery_id',
|
'name' => 'delivery_id',
|
||||||
'id_name' => 'delivery_id_' . $delivery['id'],
|
'id_name' => 'delivery_id_' . $delivery['id'],
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
'checked' => $customer['sale_delivery_id'] ?? false,
|
'checked' => $customer['sale_delivery_id'] ?? false,
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
<div class="col-11 pt-1">
|
<div class="col-11 pt-3">
|
||||||
<strong>{{ $delivery['name'] }} - {{ $delivery['sale_channel']['name'] }}</strong><br/>
|
<strong>{{ $delivery['name'] }} - {{ $delivery['sale_channel']['name'] }}</strong><br/>
|
||||||
<p>{{ $delivery['description'] }}</p>
|
<p>{{ $delivery['description'] }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="row mb-3">
|
<div class="row mb-3 mt-3">
|
||||||
<label for="new-password" class="col-md-6 control-label text-right">Mot de passe actuel</label>
|
<label for="new-password" class="col-md-6 control-label text-right">Mot de passe actuel</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input id="current-password" type="password" class="form-control" name="current-password" required>
|
<input id="current-password" type="password" class="form-control" name="current-password" required>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<div class="container p-0">
|
<div class="container p-0">
|
||||||
<div class="row m-0 shadow bg-white p-2 w-100 @if ( in_array($menu['id'], [$category['id'], $category['parent_id']])) active @endif">
|
<div class="row m-0 shadow bg-white p-2 w-100 @if ( in_array($menu['id'], [$category['id'] ?? false, $category['parent_id'] ?? false])) active @endif">
|
||||||
<div class="col mb-4">
|
<div class="col mb-4">
|
||||||
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $menu['id']]) }}">
|
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $menu['id']]) }}">
|
||||||
<div class="w-100"><strong>Tous les articles</strong></div>
|
<div class="w-100"><strong>Tous les articles</strong></div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $menu_children['id']]) }}">
|
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $menu_children['id']]) }}">
|
||||||
<div class="w-100 @if (in_array($menu_children['id'], [$category['id'], $category['parent_id']])) active @endif">
|
<div class="w-100 @if (in_array($menu_children['id'], [$category['id'] ?? false, $category['parent_id'] ?? false])) active @endif">
|
||||||
<strong>{{ $menu_children['name'] }}</strong>
|
<strong>{{ $menu_children['name'] }}</strong>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<ul class="navbar-nav w-100">
|
<ul class="navbar-nav w-100">
|
||||||
@foreach ($categories as $menu)
|
@foreach ($categories as $menu)
|
||||||
<li class="nav-item dropdown megamenu p-2 col
|
<li class="nav-item dropdown megamenu p-2 col
|
||||||
@if (in_array($menu['id'], [$category['id'], $category['parent_id'], $category['parent']['parent_id'] ?? false])) active @endif">
|
@if (in_array($menu['id'], [$category['id'] ?? false, $category['parent_id'] ?? false, $category['parent']['parent_id'] ?? false])) active @endif">
|
||||||
@if ($menu['children'] ?? false)
|
@if ($menu['children'] ?? false)
|
||||||
<a id="megamenu_{{ $menu['id'] }}" href="{{ route('Shop.Categories.show', ['id' => $menu['id']]) }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link dropdown-toggle text-uppercase">
|
<a id="megamenu_{{ $menu['id'] }}" href="{{ route('Shop.Categories.show', ['id' => $menu['id']]) }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link dropdown-toggle text-uppercase">
|
||||||
{{ $menu['name'] }}
|
{{ $menu['name'] }}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@if (($mode ?? false) == 'view')
|
@if (($mode ?? false) == 'view')
|
||||||
<label class="light" for="{{ $prefix ?? null }}address">{{ __('address') }}</label><br/>
|
<label class="{{ $classLabel ?? 'light' }}" for="{{ $prefix ?? null }}address">{{ __('address') }}</label><br/>
|
||||||
@if ($item[($prefix ?? null) . 'address'])
|
@if ($item[($prefix ?? null) . 'address'])
|
||||||
{{ $item[($prefix ?? null) . 'address'] ?? null }}<br/>
|
{{ $item[($prefix ?? null) . 'address'] ?? null }}<br/>
|
||||||
@endif
|
@endif
|
||||||
@@ -23,34 +23,61 @@
|
|||||||
<input type="hidden" name="{{ ($prefix ?? null) . (($with_tab ?? false) ? '[id]' : 'address_id') }}" value="{{ $with_id }}">
|
<input type="hidden" name="{{ ($prefix ?? null) . (($with_tab ?? false) ? '[id]' : 'address_id') }}" value="{{ $with_id }}">
|
||||||
@endif
|
@endif
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-12 col-lg-6 form-group">
|
<div class="col-12">
|
||||||
<label class="light" for="{{ $prefix ?? null }}address">{{ __('street') }}</label><br/>
|
@include('components.form.input', [
|
||||||
@include('components.form.input', ['name' => ($prefix ?? null) . (($with_tab ?? false) ? '[address]' : 'address'), 'value' => ($with_tab ?? false) ? $item['address'] : ($item[($prefix ?? null) . 'address'] ?? null), 'disabled' => $disabled ?? false ])
|
'label' => __('street'),
|
||||||
|
'name' => ($prefix ?? null) . (($with_tab ?? false) ? '[address]' : 'address'),
|
||||||
|
'value' => ($with_tab ?? false) ? $item['address'] ?? null : ($item[($prefix ?? null) . 'address'] ?? null),
|
||||||
|
'disabled' => $disabled ?? false
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-6 form-group">
|
<div class="col-12">
|
||||||
<label class="light" for="{{ $prefix ?? null }}address2">{{ __('street_complement') }}</label><br/>
|
@include('components.form.input', [
|
||||||
@include('components.form.input', ['name' => ($prefix ?? null) . (($with_tab ?? false) ? '[address2]' : 'address2'), 'value' => ($with_tab ?? false) ? $item['address2'] : ($item[($prefix ?? null) . 'address2'] ?? null), 'disabled' => $disabled ?? false ])
|
'label' => __('street_complement'),
|
||||||
|
'name' => ($prefix ?? null) . (($with_tab ?? false) ? '[address2]' : 'address2'),
|
||||||
|
'value' => ($with_tab ?? false) ? $item['address2'] ?? null : ($item[($prefix ?? null) . 'address2'] ?? null),
|
||||||
|
'disabled' => $disabled ?? false,
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-6 form-group">
|
<div class="col-4">
|
||||||
<label class="light" for="{{ $prefix ?? null }}zipcode">{{ __('zipcode') }}</label><br/>
|
@include('components.form.input', [
|
||||||
@include('components.form.input', ['name' => ($prefix ?? null) . (($with_tab ?? false) ? '[zipcode]' : 'zipcode'), 'value' => ($with_tab ?? false) ? $item['zipcode'] : ($item[($prefix ?? null) . 'zipcode'] ?? null), 'disabled' => $disabled ?? false ])
|
'label' => __('zipcode'),
|
||||||
|
'name' => ($prefix ?? null) . (($with_tab ?? false) ? '[zipcode]' : 'zipcode'),
|
||||||
|
'value' => ($with_tab ?? false) ? $item['zipcode'] ?? null : ($item[($prefix ?? null) . 'zipcode'] ?? null),
|
||||||
|
'disabled' => $disabled ?? false,
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 form-group">
|
<div class="col-8">
|
||||||
<label class="light" for="{{ $prefix ?? null }}city">{{ __('city') }}</label><br/>
|
@include('components.form.input', [
|
||||||
@include('components.form.input', ['name' => ($prefix ?? null) . (($with_tab ?? false) ? '[city]' : 'city'), 'value' => ($with_tab ?? false) ? $item['city'] : ($item[($prefix ?? null) . 'city'] ?? null), 'disabled' => $disabled ?? false ])
|
'label' => __('city'),
|
||||||
|
'name' => ($prefix ?? null) . (($with_tab ?? false) ? '[city]' : 'city'),
|
||||||
|
'value' => ($with_tab ?? false) ? $item['city'] ?? null : ($item[($prefix ?? null) . 'city'] ?? null),
|
||||||
|
'disabled' => $disabled ?? false,
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if ($with_country ?? true)
|
@if ($with_country ?? true)
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-12 col-lg-6 form-group">
|
<div class="col-12 col-lg-6">
|
||||||
<label class="light" for="{{ $prefix ?? null }}country">{{ __('country') }}</label><br/>
|
@include('components.form.select', [
|
||||||
@include('components.form.select', ['name' => ($prefix ?? null) . (($with_tab ?? false) ? '[country_id]' : 'country_id'), 'list' => $countries ?? null, 'value' => ($with_tab ?? false) ? $item['country_id'] : ($item[($prefix ?? null) . 'country_id'] ?? null), 'with_empty' => '', 'required' => true, 'disabled' => $disabled ?? false ])
|
'label' => __('country'),
|
||||||
|
'name' => ($prefix ?? null) . (($with_tab ?? false) ? '[country_id]' : 'country_id'),
|
||||||
|
'list' => $countries ?? null,
|
||||||
|
'value' => ($with_tab ?? false) ? $item['country_id'] ?? null : ($item[($prefix ?? null) . 'country_id'] ?? null),
|
||||||
|
'with_empty' => '',
|
||||||
|
'required' => true,
|
||||||
|
'disabled' => $disabled ?? false,
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-6 form-group">
|
<div class="col-12 col-lg-6">
|
||||||
<label class="light" for="{{ $prefix ?? null }}state">{{ __('state') }}</label><br/>
|
@include('components.form.input', [
|
||||||
@include('components.form.input', ['name' => ($prefix ?? null) . (($with_tab ?? false) ? '[state]' : 'state'), 'value' => ($with_tab ?? false) ? $item['state'] : ($item[($prefix ?? null) . 'state'] ?? null), 'disabled' => $disabled ?? false ])
|
'label' => çç('state'),
|
||||||
|
'name' => ($prefix ?? null) . (($with_tab ?? false) ? '[state]' : 'state'),
|
||||||
|
'value' => ($with_tab ?? false) ? $item['state'] ?? null : ($item[($prefix ?? null) . 'state'] ?? null),
|
||||||
|
'disabled' => $disabled ?? false,
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
{!! $tools !!}
|
{!! $tools !!}
|
||||||
</div>
|
</div>
|
||||||
@endisset
|
@endisset
|
||||||
<h3 class="card-title {{ $classTitle ?? '' }}">{{ $title ?? false }}</h3>
|
<h3 class="card-title {{ $classTitle ?? 'mb-0' }}">{{ $title ?? false }}</h3>
|
||||||
@endisset
|
@endisset
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
Route::prefix('Factures')->name('Invoices.')->group(function () {
|
Route::prefix('Factures')->name('Invoices.')->group(function () {
|
||||||
Route::get('show/{id}', 'InvoiceController@show')->name('show');
|
Route::get('show/{uuid?}', 'InvoiceController@show')->name('show');
|
||||||
|
Route::get('pdf/{uuid?}', 'InvoiceController@pdf')->name('pdf');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -6,5 +6,6 @@ Route::prefix('Orders')->name('Orders.')->group(function () {
|
|||||||
Route::post('order', 'OrderController@store')->name('store');
|
Route::post('order', 'OrderController@store')->name('store');
|
||||||
Route::any('', 'OrderController@index')->name('index');
|
Route::any('', 'OrderController@index')->name('index');
|
||||||
Route::get('view/{uuid?}', 'OrderController@view')->name('view');
|
Route::get('view/{uuid?}', 'OrderController@view')->name('view');
|
||||||
|
Route::get('pdf/{uuid?}', 'OrderController@pdf')->name('pdf');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user