This commit is contained in:
rahul shukla 2019-07-30 13:45:13 +05:30
parent c73e12a052
commit 39139f26ca
4 changed files with 31 additions and 24 deletions

View File

@ -396,7 +396,7 @@ return [
'product-search-hint' => 'Start typing product name',
'no-result-found' => 'Products not found with same name.',
'searching' => 'Searching ...',
'channel' => 'Channel'
'channel' => 'Channels'
],
'attributes' => [

View File

@ -438,16 +438,16 @@
this_this.isRequire = true;
}
var dependentElement = document.getElementById(this_this.depand);
var depandValue = this_this.value;
if (depandValue == 'true') {
depandValue = 1;
} else if (depandValue == 'false') {
depandValue = 0;
}
$(document).ready(function(){
var dependentElement = document.getElementById(this_this.depand);
var depandValue = this_this.value;
if (depandValue == 'true') {
depandValue = 1;
} else if (depandValue == 'false') {
depandValue = 0;
}
$(document).on("change", "select.control", function() {
if (this_this.depand == this.name) {
if (this_this.value == this.value) {
@ -457,17 +457,21 @@
}
}
})
if (dependentElement && dependentElement.value == depandValue) {
this_this.isVisible = true;
} else {
this_this.isVisible = false;
}
if (this_this.result) {
if (dependentElement.value == this_this.value) {
this_this.isVisible = true;
} else {
this_this.isVisible = false;
}
}
});
if (dependentElement && dependentElement.value == depandValue) {
this_this.isVisible = true;
} else {
this_this.isVisible = false;
}
if (this_this.result) {
this_this.isVisible = true;
}
}
});
</script>

View File

@ -18,7 +18,7 @@ class RedirectIfNotCustomer
public function handle($request, Closure $next, $guard = 'customer')
{
if (! Auth::guard($guard)->check()) {
return redirect()->route('customer.profile.index');
return redirect()->route('customer.session.index');
} else {
if (Auth::guard($guard)->user()->status == 0) {
Auth::guard($guard)->logout();

View File

@ -20,7 +20,7 @@ class OrderDataGrid extends DataGrid
public function prepareQueryBuilder()
{
$queryBuilder = DB::table('orders as order')
->addSelect('order.id', 'order.status', 'order.created_at', 'order.grand_total')
->addSelect('order.id', 'order.status', 'order.created_at', 'order.grand_total', 'order.order_currency_code')
->where('customer_id', auth()->guard('customer')->user()->id);
$this->setQueryBuilder($queryBuilder);
@ -49,10 +49,13 @@ class OrderDataGrid extends DataGrid
$this->addColumn([
'index' => 'grand_total',
'label' => trans('shop::app.customer.account.order.index.total'),
'type' => 'price',
'type' => 'number',
'searchable' => true,
'sortable' => true,
'filterable' => true
'filterable' => true,
'wrapper' => function ($value) {
return core()->formatPrice($value->grand_total, $value->order_currency_code);
}
]);
$this->addColumn([