delete lishniy +mobile link
This commit is contained in:
parent
ef4781c57d
commit
cd5b12d606
|
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
|
||||
namespace TPS\API\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
||||
class FilterOptions extends \Webkul\RestApi\Http\Controllers\V1\Shop\ResourceController
|
||||
{
|
||||
protected $requestException = ['page', 'limit', 'pagination', 'sort', 'order', 'token','locale','search','category'];
|
||||
/**
|
||||
* Repository class name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
// public function repository()
|
||||
// {
|
||||
// return AttributeOptionRepository::class;
|
||||
// }
|
||||
// /**
|
||||
// * Resource class name.
|
||||
// *
|
||||
// * @return string
|
||||
// */
|
||||
// public function resource()
|
||||
// {
|
||||
// return AttributeOption::class;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Is resource authorized.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isAuthorized()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function allResources(Request $request)
|
||||
{
|
||||
$query = $this->getRepositoryInstance()
|
||||
->where('attribute_options.attribute_id',$request->get('attribute_id'))
|
||||
->whereIn('attribute_options.id',function ($q) {
|
||||
$q->distinct()->select('integer_value')
|
||||
->from('product_attribute_values')
|
||||
->whereNotNull('product_attribute_values.integer_value');
|
||||
|
||||
if(request()->has('category')){
|
||||
// $q->join('product_categories','product_attribute_values.product_id','=','product_categories.product_id')
|
||||
// ->where('product_categories.category_id',request()->get('category'));
|
||||
$q->whereIn('product_attribute_values.product_id',function ($q) {
|
||||
$q->select('product_categories.product_id')->from('product_categories')
|
||||
->where('product_categories.category_id',request()->get('category'));
|
||||
});
|
||||
}
|
||||
|
||||
if(request()->has('brand')){
|
||||
$q->whereIn('product_attribute_values.product_id',function ($q) {
|
||||
$q->select('products.id')->from('products')
|
||||
->where('products.brand_id',request()->get('brand'));
|
||||
});
|
||||
}
|
||||
|
||||
$q->groupBy('integer_value');
|
||||
});
|
||||
|
||||
//Log::info($query->toSql());
|
||||
|
||||
if($key = $request->get('search')){
|
||||
$query->where('admin_name','LIKE', '%'.$key.'%');
|
||||
}
|
||||
|
||||
if ($sort = $request->input('sort')) {
|
||||
$query->orderBy($sort, $request->input('order') ?? 'desc');
|
||||
} else {
|
||||
$query->orderBy('sort_order', 'asc');
|
||||
}
|
||||
|
||||
// Log::info($query->toSql());
|
||||
if (is_null($request->input('pagination')) || $request->input('pagination')) {
|
||||
$results = $query->paginate($request->input('limit') ?? 20);
|
||||
} else {
|
||||
$results = $query->get();
|
||||
}
|
||||
|
||||
return $this->getResourceCollection($results);
|
||||
}
|
||||
}
|
||||
|
|
@ -16,12 +16,15 @@ class AdminServiceProvider extends ServiceProvider
|
|||
$this->loadRoutesFrom(__DIR__ . '/../Routes/web.php');
|
||||
|
||||
$this->publishes([
|
||||
__DIR__ . '/../Resources/views/settings' => resource_path('views/vendor/admin/settings'),
|
||||
// __DIR__ . '/../Resources/views/settings' => resource_path('views/vendor/admin/settings'),
|
||||
__DIR__ . '/../Resources/views/sales' => resource_path('views/vendor/admin/sales'),
|
||||
__DIR__ . '/../Resources/views/notifications' => resource_path('views/vendor/admin/notifications'),
|
||||
__DIR__ . '/../Resources/views/layouts' => resource_path('views/vendor/admin/layouts'),
|
||||
__DIR__ . '/../Resources/views/dashboard' => resource_path('views/vendor/admin/dashboard'),
|
||||
// __DIR__ . '/../Resources/views/notifications' => resource_path('views/vendor/admin/notifications'),
|
||||
// __DIR__ . '/../Resources/views/layouts' => resource_path('views/vendor/admin/layouts'),
|
||||
// __DIR__ . '/../Resources/views/dashboard' => resource_path('views/vendor/admin/dashboard'),
|
||||
],'admin');
|
||||
|
||||
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'elektronika');
|
||||
$this->app->register(EventServiceProvider::class);
|
||||
}
|
||||
/**
|
||||
* Register services.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace TPS\Admin\Providers;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
Event::listen([
|
||||
'bagisto.admin.catalog.category.edit_form_accordian.description_images.controls.after',
|
||||
'bagisto.admin.catalog.category.create_form_accordian.description_images.controls.after',
|
||||
], function ($viewRenderEventManager) {
|
||||
$viewRenderEventManager->addTemplate(
|
||||
'elektronika::settings.sliders.slider-dop'
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,541 +0,0 @@
|
|||
@extends('admin::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.dashboard.title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="content full-page dashboard">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.dashboard.title') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
<date-filter></date-filter>
|
||||
|
||||
</div>
|
||||
|
||||
<date-mobile-filter></date-mobile-filter>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<div class="dashboard-stats">
|
||||
|
||||
<div class="dashboard-card">
|
||||
<div class="title">
|
||||
{{ __('admin::app.dashboard.total-customers') }}
|
||||
</div>
|
||||
<a href="{{ route('admin.customer.index') }}">
|
||||
<div class="data">
|
||||
{{ $statistics['total_customers']['current'] }}
|
||||
|
||||
<span class="progress">
|
||||
@if ($statistics['total_customers']['progress'] < 0)
|
||||
<span class="icon graph-down-icon"></span>
|
||||
{{ __('admin::app.dashboard.decreased', [
|
||||
'progress' => -number_format($statistics['total_customers']['progress'], 1)
|
||||
])
|
||||
}}
|
||||
@else
|
||||
<span class="icon graph-up-icon"></span>
|
||||
{{ __('admin::app.dashboard.increased', [
|
||||
'progress' => number_format($statistics['total_customers']['progress'], 1)
|
||||
])
|
||||
}}
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-card">
|
||||
<div class="title">
|
||||
{{ __('admin::app.dashboard.total-orders') }}
|
||||
</div>
|
||||
<a href="{{ route('admin.sales.orders.index') }}">
|
||||
<div class="data">
|
||||
{{ $statistics['total_orders']['current'] }}
|
||||
|
||||
<span class="progress">
|
||||
@if ($statistics['total_orders']['progress'] < 0)
|
||||
<span class="icon graph-down-icon"></span>
|
||||
{{ __('admin::app.dashboard.decreased', [
|
||||
'progress' => -number_format($statistics['total_orders']['progress'], 1)
|
||||
])
|
||||
}}
|
||||
@else
|
||||
<span class="icon graph-up-icon"></span>
|
||||
{{ __('admin::app.dashboard.increased', [
|
||||
'progress' => number_format($statistics['total_orders']['progress'], 1)
|
||||
])
|
||||
}}
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-card">
|
||||
<div class="title">
|
||||
{{ __('admin::app.dashboard.total-sale') }}
|
||||
</div>
|
||||
|
||||
<div class="data">
|
||||
{{ core()->formatBasePrice($statistics['total_sales']['current']) }}
|
||||
|
||||
<span class="progress">
|
||||
@if ($statistics['total_sales']['progress'] < 0)
|
||||
<span class="icon graph-down-icon"></span>
|
||||
{{ __('admin::app.dashboard.decreased', [
|
||||
'progress' => -number_format($statistics['total_sales']['progress'], 1)
|
||||
])
|
||||
}}
|
||||
@else
|
||||
<span class="icon graph-up-icon"></span>
|
||||
{{ __('admin::app.dashboard.increased', [
|
||||
'progress' => number_format($statistics['total_sales']['progress'], 1)
|
||||
])
|
||||
}}
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-card">
|
||||
<div class="title">
|
||||
{{ __('admin::app.dashboard.average-sale') }}
|
||||
</div>
|
||||
|
||||
<div class="data">
|
||||
{{ core()->formatPrice($statistics['avg_sales']['current'],"TMT") }}
|
||||
|
||||
<span class="progress">
|
||||
@if ($statistics['avg_sales']['progress'] < 0)
|
||||
<span class="icon graph-down-icon"></span>
|
||||
{{ __('admin::app.dashboard.decreased', [
|
||||
'progress' => -number_format($statistics['avg_sales']['progress'], 1)
|
||||
])
|
||||
}}
|
||||
@else
|
||||
<span class="icon graph-up-icon"></span>
|
||||
{{ __('admin::app.dashboard.increased', [
|
||||
'progress' => number_format($statistics['avg_sales']['progress'], 1)
|
||||
])
|
||||
}}
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-card">
|
||||
<div class="title">
|
||||
{{ __('admin::app.dashboard.total-unpaid-invoices') }}
|
||||
</div>
|
||||
|
||||
<div class="data">
|
||||
{{ core()->formatPrice($statistics['total_unpaid_invoices'],'TMT') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="graph-stats">
|
||||
|
||||
<div class="left-card-container graph">
|
||||
<div class="card" style="overflow: hidden;">
|
||||
<div class="card-title" style="margin-bottom: 30px;">
|
||||
{{ __('admin::app.dashboard.sales') }}
|
||||
</div>
|
||||
|
||||
<div class="card-info" style="height: 100%;">
|
||||
|
||||
<canvas id="myChart" style="width: 100%; height: 87%"></canvas>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="right-card-container category">
|
||||
<div class="card">
|
||||
<div class="card-title">
|
||||
{{ __('admin::app.dashboard.top-performing-categories') }}
|
||||
</div>
|
||||
|
||||
<div class="card-info {{ !count($statistics['top_selling_categories']) ? 'center' : '' }}">
|
||||
<ul>
|
||||
|
||||
@foreach ($statistics['top_selling_categories'] as $item)
|
||||
|
||||
<li>
|
||||
<a href="{{ route('admin.catalog.categories.edit', $item->category_id) }}">
|
||||
<div class="description">
|
||||
<div class="name">
|
||||
{{ $item->name }}
|
||||
</div>
|
||||
|
||||
<div class="info">
|
||||
{{ __('admin::app.dashboard.product-count', ['count' => $item->total_products]) }}
|
||||
.
|
||||
{{ __('admin::app.dashboard.sale-count', ['count' => $item->total_qty_invoiced]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="icon angle-right-icon"></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@endforeach
|
||||
|
||||
</ul>
|
||||
|
||||
@if (! count($statistics['top_selling_categories']))
|
||||
|
||||
<div class="no-result-found">
|
||||
|
||||
<i class="icon no-result-icon"></i>
|
||||
<p>{{ __('admin::app.common.no-result-found') }}</p>
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sale-stock">
|
||||
<div class="card">
|
||||
<div class="card-title">
|
||||
{{ __('admin::app.dashboard.top-selling-products') }}
|
||||
</div>
|
||||
|
||||
<div class="card-info {{ !count($statistics['top_selling_products']) ? 'center' : '' }}">
|
||||
<ul>
|
||||
|
||||
@foreach ($statistics['top_selling_products'] as $item)
|
||||
|
||||
<li>
|
||||
<a href="{{ route('admin.catalog.products.edit', $item->product_id) }}">
|
||||
<div class="product image">
|
||||
<?php $productBaseImage = productimage()->getProductBaseImage($item->product); ?>
|
||||
|
||||
<img class="item-image" src="{{ $productBaseImage['small_image_url'] ?? asset('vendor/webkul/ui/assets/images/product/small-product-placeholder.webp') }}" />
|
||||
</div>
|
||||
|
||||
<div class="description do-not-cross-arrow">
|
||||
<div class="name ellipsis">
|
||||
@if (isset($item->name))
|
||||
{{ $item->name }}
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="info">
|
||||
{{ __('admin::app.dashboard.sale-count', ['count' => $item->total_qty_invoiced]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="icon angle-right-icon"></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@endforeach
|
||||
|
||||
</ul>
|
||||
|
||||
@if (! count($statistics['top_selling_products']))
|
||||
|
||||
<div class="no-result-found">
|
||||
|
||||
<i class="icon no-result-icon"></i>
|
||||
<p>{{ __('admin::app.common.no-result-found') }}</p>
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-title">
|
||||
{{ __('admin::app.dashboard.customer-with-most-sales') }}
|
||||
</div>
|
||||
|
||||
<div class="card-info {{ !count($statistics['customer_with_most_sales']) ? 'center' : '' }}">
|
||||
<ul>
|
||||
|
||||
@foreach ($statistics['customer_with_most_sales'] as $item)
|
||||
|
||||
<li>
|
||||
@if ($item->customer_id)
|
||||
<a href="{{ route('admin.customer.edit', $item->customer_id) }}">
|
||||
@endif
|
||||
|
||||
<div class="image">
|
||||
<span class="icon profile-pic-icon"></span>
|
||||
</div>
|
||||
|
||||
<div class="description do-not-cross-arrow">
|
||||
<div class="name ellipsis">
|
||||
{{ $item->customer_full_name }}
|
||||
</div>
|
||||
|
||||
<div class="info">
|
||||
{{ __('admin::app.dashboard.order-count', ['count' => $item->total_orders]) }}
|
||||
.
|
||||
{{ __('admin::app.dashboard.revenue', [
|
||||
'total' => core()->formatPrice($item->total_base_grand_total,'TMT')
|
||||
])
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="icon angle-right-icon"></span>
|
||||
|
||||
@if ($item->customer_id)
|
||||
</a>
|
||||
@endif
|
||||
</li>
|
||||
|
||||
@endforeach
|
||||
|
||||
</ul>
|
||||
|
||||
@if (! count($statistics['customer_with_most_sales']))
|
||||
|
||||
<div class="no-result-found">
|
||||
|
||||
<i class="icon no-result-icon"></i>
|
||||
<p>{{ __('admin::app.common.no-result-found') }}</p>
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-title">
|
||||
{{ __('admin::app.dashboard.stock-threshold') }}
|
||||
</div>
|
||||
|
||||
<div class="card-info {{ !count($statistics['stock_threshold']) ? 'center' : '' }}">
|
||||
<ul>
|
||||
|
||||
@foreach ($statistics['stock_threshold'] as $item)
|
||||
|
||||
<li>
|
||||
<a href="{{ route('admin.catalog.products.edit', $item->product_id) }}">
|
||||
<div class="image">
|
||||
<?php $productBaseImage = productimage()->getProductBaseImage($item->product); ?>
|
||||
|
||||
<img class="item-image" src="{{ $productBaseImage['small_image_url'] }}" />
|
||||
</div>
|
||||
|
||||
<div class="description do-not-cross-arrow">
|
||||
<div class="name ellipsis">
|
||||
@if (isset($item->product->name))
|
||||
{{ $item->product->name }}
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="info">
|
||||
{{ __('admin::app.dashboard.qty-left', ['qty' => $item->total_qty]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="icon angle-right-icon"></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@endforeach
|
||||
|
||||
</ul>
|
||||
|
||||
@if (! count($statistics['stock_threshold']))
|
||||
|
||||
<div class="no-result-found">
|
||||
|
||||
<i class="icon no-result-icon"></i>
|
||||
<p>{{ __('admin::app.common.no-result-found') }}</p>
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js"></script>
|
||||
|
||||
<script type="text/x-template" id="date-filter-template">
|
||||
<div id="calender-destop">
|
||||
<div class="control-group date">
|
||||
<date @onChange="applyFilter('start', $event)" hide-remove-button="1"><input type="text" class="control" id="start_date" value="{{ $startDate->format('Y-m-d') }}" placeholder="{{ __('admin::app.dashboard.from') }}" v-model="start"/></date>
|
||||
</div>
|
||||
|
||||
<div class="control-group date">
|
||||
<date @onChange="applyFilter('end', $event)" hide-remove-button="1"><input type="text" class="control" id="end_date" value="{{ $endDate->format('Y-m-d') }}" placeholder="{{ __('admin::app.dashboard.to') }}" v-model="end"/></date>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-template" id="date-mobile-filter-template">
|
||||
<div>
|
||||
<div id="calender-mobile">
|
||||
<span @click="openCalender()"></span>
|
||||
</div>
|
||||
<div v-if="toggleCalenderIcon">
|
||||
<div id="date-start" style="">
|
||||
<div class="control-group start-date" style="margin-top:15px">
|
||||
<label for="type">{{ __('admin::app.dashboard.from') }}</label>
|
||||
<date @onChange="setDate('start', $event)" hide-remove-button="1">
|
||||
<input type="text" class="control" id="start_date" value="{{ $startDate->format('Y-m-d') }}" placeholder="{{ __('admin::app.dashboard.from') }}" v-model="start"/>
|
||||
</date>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="date-end" style="">
|
||||
<div class="control-group end-date" style="margin-top:15px">
|
||||
<label for="type">{{ __('admin::app.dashboard.to') }}</label>
|
||||
<date @onChange="setDate('end', $event)" hide-remove-button="1">
|
||||
<input type="text" class="control" id="end_date" value="{{ $endDate->format('Y-m-d') }}" placeholder="{{ __('admin::app.dashboard.to') }}" v-model="end"/>
|
||||
</date>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="date-submit" style="">
|
||||
<button class="btn btn-lg btn-primary" @click="applyFilter">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('date-filter', {
|
||||
|
||||
template: '#date-filter-template',
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
start: "{{ $startDate->format('Y-m-d') }}",
|
||||
end: "{{ $endDate->format('Y-m-d') }}",
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
applyFilter: function(field, date) {
|
||||
this[field] = date;
|
||||
|
||||
window.location.href = "?start=" + this.start + '&end=' + this.end;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Vue.component('date-mobile-filter', {
|
||||
|
||||
template: '#date-mobile-filter-template',
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
start: "{{ $startDate->format('Y-m-d') }}",
|
||||
end: "{{ $endDate->format('Y-m-d') }}",
|
||||
toggleCalenderIcon : 0
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
openCalender: function(){
|
||||
|
||||
if(this.toggleCalenderIcon){
|
||||
this.toggleCalenderIcon = 0;
|
||||
$('#calender-mobile span').css('top','0');
|
||||
}else{
|
||||
this.toggleCalenderIcon = 1;
|
||||
$('#calender-mobile span').css('top','-40px');
|
||||
}
|
||||
},
|
||||
|
||||
setDate: function(field, date) {
|
||||
this[field] = date;
|
||||
},
|
||||
|
||||
applyFilter: function() {
|
||||
window.location.href = "?start=" + this.start + '&end=' + this.end;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
var ctx = document.getElementById("myChart").getContext('2d');
|
||||
|
||||
var data = @json($statistics['sale_graph']);
|
||||
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: data['label'],
|
||||
datasets: [{
|
||||
data: data['total'],
|
||||
backgroundColor: 'rgba(34, 201, 93, 1)',
|
||||
borderColor: 'rgba(34, 201, 93, 1)',
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
scales: {
|
||||
xAxes: [{
|
||||
maxBarThickness: 20,
|
||||
gridLines : {
|
||||
display : false,
|
||||
drawBorder: false,
|
||||
},
|
||||
ticks: {
|
||||
beginAtZero: true,
|
||||
fontColor: 'rgba(162, 162, 162, 1)'
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
gridLines: {
|
||||
drawBorder: false,
|
||||
},
|
||||
ticks: {
|
||||
padding: 20,
|
||||
beginAtZero: true,
|
||||
fontColor: 'rgba(162, 162, 162, 1)'
|
||||
}
|
||||
}]
|
||||
},
|
||||
tooltips: {
|
||||
mode: 'index',
|
||||
intersect: false,
|
||||
displayColors: false,
|
||||
callbacks: {
|
||||
label: function(tooltipItem, dataTemp) {
|
||||
return data['formated_total'][tooltipItem.index];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
|
@ -1,117 +0,0 @@
|
|||
@php
|
||||
$orderStatusMessages = [
|
||||
'pending' => trans('admin::app.notification.order-status-messages.pending'),
|
||||
'canceled'=> trans('admin::app.notification.order-status-messages.canceled'),
|
||||
'closed' => trans('admin::app.notification.order-status-messages.closed'),
|
||||
'completed'=> trans('admin::app.notification.order-status-messages.completed'),
|
||||
'processing' => trans('admin::app.notification.order-status-messages.processing')
|
||||
];
|
||||
$allLocales = core()->getAllLocales()->pluck('name', 'code');
|
||||
@endphp
|
||||
|
||||
<div class="navbar-top">
|
||||
<div class="navbar-top-left">
|
||||
@include ('admin::layouts.mobile-nav')
|
||||
|
||||
<div class="brand-logo">
|
||||
<a href="{{ route('admin.dashboard.index') }}">
|
||||
@if (core()->getConfigData('general.design.admin_logo.logo_image', core()->getCurrentChannelCode()))
|
||||
<img src="{{ \Illuminate\Support\Facades\Storage::url(core()->getConfigData('general.design.admin_logo.logo_image', core()->getCurrentChannelCode())) }}"
|
||||
alt="{{ config('app.name') }}" style="max-height: 40px;"/>
|
||||
@else
|
||||
<default-image
|
||||
light-theme-image-url="{{ asset('vendor/webkul/ui/assets/images/logo.svg') }}"
|
||||
dark-theme-image-url="{{ asset('vendor/webkul/ui/assets/images/logo.svg') }}"
|
||||
></default-image>
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="navbar-top-right">
|
||||
<div class="profile">
|
||||
<span class="avatar">
|
||||
</span>
|
||||
|
||||
<div class="store">
|
||||
<div>
|
||||
<a href="{{ route('shop.home.index') }}" target="_blank" style="display: inline-block; vertical-align: middle;">
|
||||
<span class="icon store-icon" data-toggle="tooltip" data-placement="bottom" title="{{ __('admin::app.layouts.visit-shop') }}"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<notification
|
||||
notif-title="{{ __('admin::app.notification.notification-title', ['read' => 0]) }}"
|
||||
get-notification-url="{{ route('admin.notification.get-notification') }}"
|
||||
view-all="{{ route('admin.notification.index') }}"
|
||||
order-view-url="{{ \URL::to(config('app.admin_url')) }}/viewed-notifications/"
|
||||
pusher-key="{{ env('PUSHER_APP_KEY') }}"
|
||||
pusher-cluster="{{ env('PUSHER_APP_CLUSTER') }}"
|
||||
title="{{ __('admin::app.notification.title-plural') }}"
|
||||
view-all-title="{{ __('admin::app.notification.view-all') }}"
|
||||
get-read-all-url="{{ route('admin.notification.read-all') }}"
|
||||
order-status-messages="{{ json_encode($orderStatusMessages) }}"
|
||||
read-all-title="{{ __('admin::app.notification.read-all') }}"
|
||||
locale-code={{ core()->getCurrentLocale()->code }}>
|
||||
|
||||
<div class="notifications">
|
||||
<div class="dropdown-toggle">
|
||||
<i class="icon notification-icon active" style="margin-left: 0px;"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</notification>
|
||||
|
||||
<div class="profile-info">
|
||||
<div class="dropdown-toggle">
|
||||
<div style="display: inline-block; vertical-align: middle;">
|
||||
<div class="profile-info-div">
|
||||
@if (auth()->guard('admin')->user()->image)
|
||||
<div class="profile-info-icon">
|
||||
<img src="{{ auth()->guard('admin')->user()->image_url }}"/>
|
||||
</div>
|
||||
@else
|
||||
<div class="profile-info-icon">
|
||||
<span>{{ substr(auth()->guard('admin')->user()->name, 0, 1) }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<div class="profile-info-desc">
|
||||
<span class="name">
|
||||
{{ auth()->guard('admin')->user()->name }}
|
||||
</span>
|
||||
|
||||
<span class="role">
|
||||
{{ auth()->guard('admin')->user()->role['name'] }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<i class="icon arrow-down-icon active"></i>
|
||||
</div>
|
||||
|
||||
<div class="dropdown-list bottom-right">
|
||||
<span class="app-version">{{ __('admin::app.layouts.app-version', ['version' => 'v' . core()->version()]) }}</span>
|
||||
|
||||
<div class="dropdown-container">
|
||||
<label>{{ __('admin::app.layouts.account-title') }}</label>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route('admin.account.edit') }}">{{ __('admin::app.layouts.my-account') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('admin.session.destroy') }}">{{ __('admin::app.layouts.logout') }}</a>
|
||||
</li>
|
||||
<li v-if="!isMobile()" style="display: flex;justify-content: space-between;">
|
||||
<div style="margin-top:7px">{{ __('admin::app.layouts.mode') }}</div>
|
||||
<dark style="margin-top: -9px;width: 83px;"></dark>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
@extends('admin::layouts.content')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.notification.notification-title') }}
|
||||
@endsection
|
||||
|
||||
@php
|
||||
$orderStatus = [
|
||||
'all' => trans('admin::app.notification.status.all'),
|
||||
'pending' => trans('admin::app.notification.status.pending'),
|
||||
'canceled'=> trans('admin::app.notification.status.canceled'),
|
||||
'closed' => trans('admin::app.notification.status.closed'),
|
||||
'completed'=> trans('admin::app.notification.status.completed'),
|
||||
'processing' => trans('admin::app.notification.status.processing')
|
||||
];
|
||||
|
||||
$orderStatusMessages = [
|
||||
'pending' => trans('admin::app.notification.order-status-messages.pending'),
|
||||
'canceled'=> trans('admin::app.notification.order-status-messages.canceled'),
|
||||
'closed' => trans('admin::app.notification.order-status-messages.closed'),
|
||||
'completed'=> trans('admin::app.notification.order-status-messages.completed'),
|
||||
'processing' => trans('admin::app.notification.order-status-messages.processing')
|
||||
];
|
||||
@endphp
|
||||
|
||||
@push('css')
|
||||
<style>
|
||||
.sr-only{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.pagination .page-item {
|
||||
height: 40px !important;
|
||||
width: 40px !important;
|
||||
margin-right: 5px;
|
||||
font-size: 16px;
|
||||
display: inline-block;
|
||||
color: #3a3a3a;
|
||||
vertical-align: middle;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.page-item .pagination-page-nav .active .page-link {
|
||||
color:#fff !important;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<notification-list
|
||||
url="{{ route('admin.notification.get-notification') }}"
|
||||
order-view-url="{{ \URL::to(config('app.admin_url')) }}/viewed-notifications/"
|
||||
pusher-key="{{ env('PUSHER_APP_KEY') }}"
|
||||
pusher-cluster="{{ env('PUSHER_APP_CLUSTER') }}"
|
||||
title=" {{ __('admin::app.notification.notification-title') }}"
|
||||
order-status="{{ json_encode($orderStatus) }}"
|
||||
order-status-messages="{{ json_encode($orderStatusMessages) }}"
|
||||
no-record-text="{{ __('admin::app.notification.no-record') }}"
|
||||
locale-code={{ core()->getCurrentLocale()->code }}>
|
||||
</notification-list>
|
||||
@endsection
|
||||
|
|
@ -37,5 +37,5 @@
|
|||
@stop
|
||||
|
||||
@push('scripts')
|
||||
@include('admin::export.export', ['gridName' => app('Webkul\Admin\DataGrids\OrderInvoicesDataGrid')])
|
||||
@include('admin::export.export', ['gridName' => app('TPS\Admin\DataGrids\OrderInvoicesDataGrid')])
|
||||
@endpush
|
||||
|
|
|
|||
|
|
@ -1,43 +0,0 @@
|
|||
@extends('admin::layouts.content')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.settings.sliders.title') }}
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<div class="content">
|
||||
@php
|
||||
$locale = core()->getRequestedLocaleCode('locale', false);
|
||||
|
||||
$channel = core()->getRequestedChannelCode(false);
|
||||
@endphp
|
||||
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.settings.sliders.title') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
<a href="{{ route('admin.sliders.store') }}" class="btn btn-lg btn-primary">
|
||||
{{ __('admin::app.settings.sliders.add-title') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<datagrid-plus src="{{ route('admin.sliders.index') }}"></datagrid-plus>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
function reloadPage(getVar, getVal) {
|
||||
let url = new URL(window.location.href);
|
||||
|
||||
url.searchParams.set(getVar, getVal);
|
||||
|
||||
window.location.href = url.href;
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<div class="control-group {!! $errors->has('mobile_image.*') ? 'has-error' : '' !!}">
|
||||
<label class="required">Mobile image</label>
|
||||
<image-wrapper button-label="{{ __('admin::app.settings.sliders.image') }}" input-name="mobile_image" :multiple="false"
|
||||
@if(isset($slider) && $slider->mobile_path)
|
||||
:images='"{{ Storage::url($slider->mobile_path) }}"'>
|
||||
@endif
|
||||
</image-wrapper>
|
||||
<span class="control-error" v-if="{!! $errors->has('mobile_image.*') !!}">
|
||||
@foreach ($errors->get('mobile_image.*') as $key => $message)
|
||||
@php echo str_replace($key, 'Image', $message[0]); @endphp
|
||||
@endforeach
|
||||
</span>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label>Mobile Link</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="control"
|
||||
name="slider_path"
|
||||
value="{{ (isset($slider) && $slider->mobile_link) ? $slider->mobile_link : '' }}" />
|
||||
</div>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('sliders', function (Blueprint $table) {
|
||||
$table->string('mobile_link')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropColumn('mobile_link');
|
||||
}
|
||||
};
|
||||
|
|
@ -15,7 +15,8 @@ class Slider extends SliderModel
|
|||
'expired_at',
|
||||
'sort_order',
|
||||
'type',
|
||||
'mobile_path'
|
||||
'mobile_path',
|
||||
'mobile_link'
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue