merged with master

This commit is contained in:
prashant-webkul 2018-10-23 17:19:13 +05:30
commit 2c32f510b2
35 changed files with 1228 additions and 766 deletions

View File

@ -14,12 +14,10 @@ class Kernel extends HttpKernel
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\TrustProxies::class,
// \Illuminate\Session\Middleware\StartSession::class,
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
];
/**
@ -29,9 +27,6 @@ class Kernel extends HttpKernel
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,

View File

@ -50,7 +50,7 @@ return [
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => true,
'strict' => false,
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
],

View File

@ -73,7 +73,7 @@ class CustomerController extends Controller
{
$customerGroup = $this->customerGroup->all();
return view($this->_config['view'],compact('customerGroup'));
return view($this->_config['view'], compact('customerGroup'));
}
/**

View File

@ -5,6 +5,12 @@ namespace Webkul\Admin\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\DB;
use Carbon\Carbon;
use Webkul\Sales\Repositories\OrderRepository as Order;
use Webkul\Sales\Repositories\OrderItemRepository as OrderItem;
use Webkul\Customer\Repositories\CustomerRepository as Customer;
use Webkul\Product\Repositories\ProductInventoryRepository as ProductInventory;
/**
* Dashboard controller
@ -21,14 +27,275 @@ class DashboardController extends Controller
*/
protected $_config;
public function __construct()
/**
* OrderRepository object
*
* @var array
*/
protected $order;
/**
* OrderItemRepository object
*
* @var array
*/
protected $orderItem;
/**
* CustomerRepository object
*
* @var array
*/
protected $customer;
/**
* ProductInventoryRepository object
*
* @var array
*/
protected $productInventory;
/**
* string object
*
* @var array
*/
protected $startDate;
/**
* string object
*
* @var array
*/
protected $lastStartDate;
/**
* string object
*
* @var array
*/
protected $endDate;
/**
* string object
*
* @var array
*/
protected $lastEndDate;
/**
* Create a new controller instance.
*
* @param Webkul\Sales\Repositories\OrderRepository $order
* @param Webkul\Sales\Repositories\OrderItemRepository $orderItem
* @param Webkul\Customer\Repositories\CustomerRepository $customer
* @param Webkul\Product\Repositories\ProductInventoryRepository $productInventory
* @return void
*/
public function __construct(
Order $order,
OrderItem $orderItem,
Customer $customer,
ProductInventory $productInventory
)
{
$this->_config = request('_config');
$this->middleware('admin');
$this->order = $order;
$this->orderItem = $orderItem;
$this->customer = $customer;
$this->productInventory = $productInventory;
}
public function getPercentageChange($previous, $current)
{
if(!$previous)
return $current ? 100 : 0;
return ($current - $previous) / $previous * 100;
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('admin::dashboard.index');
$this->setStartEndDate();
$statistics = [
'total_customers' => [
'previous' => $previous = $this->customer->scopeQuery(function($query) {
return $query->where('customers.created_at', '>=', $this->lastStartDate)
->where('customers.created_at', '<=', $this->lastEndDate);
})->count(),
'current' => $current = $this->customer->scopeQuery(function($query) {
return $query->where('customers.created_at', '>=', $this->startDate)
->where('customers.created_at', '<=', $this->endDate);
})->count(),
'progress' => $this->getPercentageChange($previous, $current)
],
'total_orders' => [
'previous' => $previous = $this->order->scopeQuery(function($query) {
return $query->where('orders.created_at', '>=', $this->lastStartDate)
->where('orders.created_at', '<=', $this->lastEndDate);
})->count(),
'current' => $current = $this->order->scopeQuery(function($query) {
return $query->where('orders.created_at', '>=', $this->startDate)
->where('orders.created_at', '<=', $this->endDate);
})->count(),
'progress' => $this->getPercentageChange($previous, $current)
],
'total_sales' => [
'previous' => $previous = $this->order->scopeQuery(function($query) {
return $query->where('orders.created_at', '>=', $this->lastStartDate)
->where('orders.created_at', '<=', $this->lastEndDate);
})->sum('base_grand_total'),
'current' => $current = $this->order->scopeQuery(function($query) {
return $query->where('orders.created_at', '>=', $this->startDate)
->where('orders.created_at', '<=', $this->endDate);
})->sum('base_grand_total'),
'progress' => $this->getPercentageChange($previous, $current)
],
'avg_sales' => [
'previous' => $previous = $this->order->scopeQuery(function($query) {
return $query->where('orders.created_at', '>=', $this->lastStartDate)
->where('orders.created_at', '<=', $this->lastEndDate);
})->avg('base_grand_total'),
'current' => $current = $this->order->scopeQuery(function($query) {
return $query->where('orders.created_at', '>=', $this->startDate)
->where('orders.created_at', '<=', $this->endDate);
})->avg('base_grand_total'),
'progress' => $this->getPercentageChange($previous, $current)
],
'top_selling_categories' => $this->getTopSellingCategories(),
'top_selling_products' => $this->getTopSellingProducts(),
'customer_with_most_sales' => $this->getCustomerWithMostSales(),
'stock_threshold' => $this->getStockThreshold(),
];
foreach (core()->getTimeInterval($this->startDate, $this->endDate) as $interval) {
$statistics['sale_graph']['label'][] = $interval['start']->format('d M');
$total = number_format($this->order->scopeQuery(function($query) use($interval) {
return $query->where('orders.created_at', '>=', $interval['start'])
->where('orders.created_at', '<=', $interval['end']);
})->sum('base_grand_total'), 2);
$statistics['sale_graph']['total'][] = $total;
$statistics['sale_graph']['formated_total'][] = core()->formatBasePrice($total);
}
return view($this->_config['view'], compact('statistics'))->with(['startDate' => $this->startDate, 'endDate' => $this->endDate]);
}
}
/**
* Returns the list of top selling categories
*
* @return mixed
*/
public function getTopSellingCategories()
{
return $this->orderItem->getModel()
->leftJoin('products', 'order_items.product_id', 'products.id')
->leftJoin('product_categories', 'products.id', 'product_categories.product_id')
->leftJoin('categories', 'product_categories.category_id', 'categories.id')
->leftJoin('category_translations', 'categories.id', 'category_translations.category_id')
->where('category_translations.locale', app()->getLocale())
->where('order_items.created_at', '>=', $this->startDate)
->where('order_items.created_at', '<=', $this->endDate)
->addSelect(DB::raw('SUM(qty_ordered) as total_qty_ordered'))
->addSelect(DB::raw('COUNT(products.id) as total_products'))
->addSelect('order_items.id', 'categories.id as category_id', 'category_translations.name')
->groupBy('category_id')
->orderBy('total_qty_ordered', 'DESC')
->limit(5)
->get();
}
/**
* Return stock threshold.
*
* @return mixed
*/
public function getStockThreshold()
{
return $this->productInventory->getModel()
->leftJoin('products', 'product_inventories.product_id', 'products.id')
->select(DB::raw('SUM(qty) as total_qty'))
->addSelect('product_inventories.product_id')
->where('products.type', '!=', 'configurable')
->groupBy('product_id')
->orderBy('total_qty', 'ASC')
->limit(5)
->get();
}
/**
* Returns top selling products
* @return mixed
*/
public function getTopSellingProducts()
{
return $this->orderItem->getModel()
->select(DB::raw('SUM(qty_ordered) as total_qty_ordered'))
->addSelect('id', 'product_id', 'product_type', 'name')
->where('order_items.created_at', '>=', $this->startDate)
->where('order_items.created_at', '<=', $this->endDate)
->whereNull('parent_id')
->groupBy('product_id')
->orderBy('total_qty_ordered', 'DESC')
->limit(5)
->get();
}
/**
* Returns top selling products
*
* @return mixed
*/
public function getCustomerWithMostSales()
{
return $this->order->getModel()
->select(DB::raw('SUM(base_grand_total) as total_base_grand_total'))
->addSelect(DB::raw('COUNT(id) as total_orders'))
->addSelect('id', 'customer_id', 'customer_email', 'customer_first_name', 'customer_last_name')
->where('orders.created_at', '>=', $this->startDate)
->where('orders.created_at', '<=', $this->endDate)
->groupBy('customer_email')
->orderBy('total_base_grand_total', 'DESC')
->limit(5)
->get();
}
/**
* Sets start and end date
*
* @return void
*/
public function setStartEndDate()
{
$this->startDate = request()->get('start')
? Carbon::createFromTimeString(request()->get('start') . " 00:00:01")
: Carbon::createFromTimeString(Carbon::now()->subDays(30)->format('Y-m-d') . " 00:00:01");
$this->endDate = request()->get('end')
? Carbon::createFromTimeString(request()->get('end') . " 23:59:59")
: Carbon::now();
if($this->endDate > Carbon::now())
$this->endDate = Carbon::now();
$this->lastStartDate = clone $this->startDate;
$this->lastEndDate = clone $this->endDate;
$this->lastStartDate->subDays($this->lastStartDate->diffInDays($this->lastEndDate));
$this->lastEndDate->subDays($this->lastStartDate->diffInDays($this->lastEndDate));
}
}

View File

@ -39,17 +39,15 @@ Route::group(['middleware' => ['web']], function () {
])->name('admin.session.destroy');
// Dashboard Route
Route::get('dashboard', 'Webkul\Admin\Http\Controllers\DashboardController@index')->name('admin.dashboard.index');
Route::get('dashboard', 'Webkul\Admin\Http\Controllers\DashboardController@index')->defaults('_config', [
'view' => 'admin::dashboard.index'
])->name('admin.dashboard.index');
//Customers Management Routes
Route::get('customers', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@index')->defaults('_config', [
'view' => 'admin::customers.index'
])->name('admin.customer.index');
Route::get('customers/orders', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@index')->defaults('_config',[
'view' => 'admin::customers.orders.index'
])->name('admin.customer.orders.index');
Route::get('customers/create', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@create')->defaults('_config',[
'view' => 'admin::customers.create'
])->name('admin.customer.create');

View File

@ -46,6 +46,6 @@ class NewInvoiceNotification extends Mailable
return $this->to($order->customer_email, $order->customer_full_name)
->subject(trans('admin::app.mail.invoice.subject', ['order_id' => $order->id]))
->view('admin::emails.sales.new-invoice');
->view('shop::emails.sales.new-invoice');
}
}

View File

@ -43,6 +43,6 @@ class NewOrderNotification extends Mailable
{
return $this->to($this->order->customer_email, $this->order->customer_full_name)
->subject(trans('admin::app.mail.order.subject'))
->view('admin::emails.sales.new-order');
->view('shop::emails.sales.new-order');
}
}

View File

@ -46,6 +46,6 @@ class NewShipmentNotification extends Mailable
return $this->to($order->customer_email, $order->customer_full_name)
->subject(trans('admin::app.mail.shipment.subject', ['order_id' => $order->id]))
->view('admin::emails.sales.new-shipment');
->view('shop::emails.sales.new-shipment');
}
}

View File

@ -22,12 +22,16 @@
},
mounted () {
var this_this = this;
var element = this.$el.getElementsByTagName('input')[0];
this.datepicker = new Flatpickr(
element, {
allowInput: true,
altFormat: 'Y-m-d H:i:s',
dateFormat: 'Y-m-d H:i:s'
altFormat: 'Y-m-d',
dateFormat: 'Y-m-d',
onChange: function(selectedDates, dateStr, instance) {
this_this.$emit('onChange', dateStr)
},
});
}
};

View File

@ -10,25 +10,30 @@
import Flatpickr from "flatpickr";
export default {
props: {
name: String,
value: String
},
props: {
name: String,
value: String
},
data() {
return {
datepicker: null
};
},
data() {
return {
datepicker: null
};
},
mounted() {
var element = this.$el.getElementsByTagName("input")[0];
this.datepicker = new Flatpickr(element, {
allowInput: true,
altFormat: "Y-m-d H:i:s",
dateFormat: "Y-m-d H:i:s",
enableTime: true
});
}
mounted() {
var this_this = this;
var element = this.$el.getElementsByTagName("input")[0];
this.datepicker = new Flatpickr(element, {
allowInput: true,
altFormat: "Y-m-d H:i:s",
dateFormat: "Y-m-d H:i:s",
enableTime: true,
onChange: function(selectedDates, dateStr, instance) {
this_this.$emit('onChange', dateStr)
},
});
}
};
</script>

View File

@ -258,273 +258,174 @@ body {
// admin dashboard css
.dashboard-content {
.dashboard {
.dashboard-stats {
display: flex;
.page-header {
margin-bottom: 0 !important;
padding-bottom: 15px;
border-bottom: 1px solid $border-color;
}
.graph-category {
display: flex;
margin-top: 25px;
.page-content {
margin-top: 15px;
}
.card {
height: 445px;
background: #FFFFFF;
border: 1px solid #E7E7E7;
box-shadow: 0 5px 10px 2px rgba(0,0,0,0.08);
border-radius: 2px;
padding: 20px 0px 0px 20px;
.card-title {
font-size: 14px;
color: #A2A2A2;
letter-spacing: -0.26px;
text-transform: uppercase;
}
.card-info {
width: 100%;
height: 100%;
display: inline-block;
&.center {
text-align: center;
}
ul {
li {
border-bottom: 1px solid $border-color;
width: 100%;
display: inline-block;
padding: 10px 0;
position: relative;
.image {
height: 60px;
width: 60px;
float: left;
margin-right: 15px;
&.product {
background: #F2F2F2;
}
img {
width: 100%;
}
}
.description {
margin-top: 10px;
.name {
color: #0041FF;
}
.info {
color: #3A3A3A;
margin-top: 5px;
}
}
.icon.angle-right-icon {
position: absolute;
right: 30px;
top: 50%;
margin-top: -8px;
}
&:last-child {
border-bottom: 0;
}
}
}
.no-result-found {
margin-top: 146px;
p {
margin: 0;
color: #A2A2A2;
}
}
}
}
.dashboard-stats {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
grid-auto-rows: auto;
grid-column-gap: 30px;
grid-row-gap: 15px;
.dashboard-card {
height: 100px;
background: #FFFFFF;
border: 1px solid #E7E7E7;
box-shadow: 0 5px 10px 2px rgba(0,0,0,0.08);
border-radius: 5px;
position: relative;
padding: 15px;
.title {
font-size: 14px;
color: #A2A2A2;
text-transform: uppercase;
}
.data {
padding-top: 3px;
font-size: 32px;
color: #0041FF;
.progress {
font-size: 14px;
color: #8E8E8E;
float: right;
margin-top: 9px;
.icon {
vertical-align: middle;
}
}
}
}
}
.graph-stats {
margin-top: 30px;
width: 100%;
display: inline-block;
.left-card-container {
float: left;
width: 75%;
padding-right: 9px;
}
.right-card-container {
float: left;
width: 25%;
padding-left: 21px;
}
}
.sale-stock {
display: flex;
margin-top: 25px;
width: 100%;
display: inline-block;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(435px, 1fr));
grid-auto-rows: auto;
grid-column-gap: 30px;
grid-row-gap: 15px;
margin-top: 30px;
}
}
// admin dashboard css ends here
// admin dashboard component
.dashboard-card {
height: 100px;
width: 22%;
background: #FFFFFF;
border: 1px solid #E7E7E7;
box-shadow: 0 5px 10px 2px rgba(0,0,0,0.08);
border-radius: 5px;
.visitor-content {
padding: 15px;
.title {
span {
padding-top:10px;
font-size: 14px;
color: #A2A2A2;
letter-spacing: -0.26px;
}
}
.data {
padding-top: 3px;
span {
font-size: 32px;
color: #0041FF;
letter-spacing: -0.6px;
img {
margin-left: 75px;
height: 24px;
width:24px;
}
}
span.right {
padding-top: 12px;
float: right;
font-size: 14px;
color: #8E8E8E;
letter-spacing: -0.7px;
}
}
}
}
.dashboard-card:nth-last-child(1) {
margin-left: 30px;
}
.dashboard-card:nth-last-child(2) {
margin-left: 30px;
}
.dashboard-card:nth-last-child(3) {
margin-left: 30px;
}
.dashboard-graph {
height: 413px;
width: 70.5%;
background: #FFFFFF;
border: 1px solid #E7E7E7;
box-shadow: 0 5px 10px 2px rgba(0,0,0,0.08);
border-radius: 2px;
}
.sale {
height: 465px;
width: 30.1%;
background: #FFFFFF;
border: 1px solid #E7E7E7;
box-shadow: 0 5px 10px 2px rgba(0,0,0,0.08);
border-radius: 2px;
.top-sale {
margin-left: 20px;
margin-top: 27px;
.title {
span {
font-size: 14px;
color: #A2A2A2;
letter-spacing: -0.26px;
}
}
.sale-info {
ul {
li {
.pro-attribute{
display: flex;
margin-top: 10px;
.pro-img {
height: 60px;
width: 60px;
border: 1px solid green;
}
.product-description {
margin-left: 15px;
margin-top: 8px;
width: 75%;
.product-name {
span {
font-size: 14px;
color: #0041FF;
letter-spacing: -0.26px;
}
.right-side {
float: right;
margin-top: 10px;
height: 20px;
width: 20px;
}
}
.product-info {
span {
font-size: 14px;
color: #3A3A3A;
letter-spacing: -0.26px;
}
}
}
}
.horizontal-rule {
border: .5px solid #A2A2A2;
opacity: 0.2;
margin-top: 10px;
}
}
li:last-child {
.horizontal-rule {
display: none;
}
}
}
}
}
}
.sale:nth-last-child(1) {
margin-left: 31px;
}
.sale:nth-last-child(2) {
margin-left: 31px;
}
// admin dashboard css ends here
.performing-category {
height: 413px;
width: 22%;
margin-left: 30px;
background: #FFFFFF;
border: 1px solid #E7E7E7;
box-shadow: 0 5px 10px 2px rgba(0,0,0,0.08);
border-radius: 2px;
.category {
margin-left: 20px;
margin-top: 20px;
.title {
span {
font-size: 14px;
color: #A2A2A2;
letter-spacing: -0.26px;
}
}
.category-info {
margin-top: 30px;
ul {
li {
.category-list {
margin-top: 10px;
.cat-name {
span {
font-size: 16px;
color: #0041FF;
letter-spacing: -0.3px;
}
.right-side {
float: right;
margin-right: 12px;
margin-top: 10px;
height: 20px;
width: 20px;
}
}
.product-info {
margin-top: 5px;
span {
font-size: 16px;
color: #3A3A3A;
letter-spacing: -0.3px;
}
}
.horizon-rule {
margin-top: 8px;
border: .7px solid #D8D8D8;
}
}
}
li:last-child {
.category-list {
.horizon-rule {
display: none;
}
}
}
}
}
}
}
// customer oder css for admin start here
.sale-container {

View File

@ -7,7 +7,25 @@ return [
'state' => 'State'
],
'dashboard' => [
'title' => 'Dashboard'
'title' => 'Dashboard',
'from' => 'From',
'to' => 'To',
'total-customers' => 'Total Customers',
'total-orders' => 'Total Orders',
'total-sale' => 'Total Sale',
'average-sale' => 'Average Order Sale',
'increased' => ':progress% Increased',
'decreased' => ':progress% Decreased',
'sales' => 'Sales',
'top-performing-categories' => 'Top Performing Categories',
'product-count' => ':count Products',
'top-selling-products' => 'Top Selling Products',
'sale-count' => ':count Sales',
'customer-with-most-sales' => 'Customer With Most Sales',
'order-count' => ':count Orders',
'revenue' => 'Revenue :total',
'stock-threshold' => 'Stock Threshold',
'qty-left' => ':qty Left',
],
'account' => [
'title' => 'My Account',
@ -32,6 +50,8 @@ return [
'title' => 'Reset Password',
'title' => 'Reset Password',
'email' => 'Registered Email',
'password' => 'Password',
'confirm-password' => 'Confirm Password',
'back-link-title' => 'Back to Sign In',
'submit-btn-title' => 'Reset Password'
],
@ -457,6 +477,13 @@ return [
'summary' => 'Summary of Shipment',
'carrier' => 'Carrier',
'tracking-number' => 'Tracking Number'
],
'forget-password' => [
'dear' => 'Dear :name',
'info' => 'You are receiving this email because we received a password reset request for your account.',
'reset-password' => 'Reset Password',
'final-summary' => 'If you did not request a password reset, no further action is required.',
'thanks' => 'Thanks!'
]
]
];

View File

@ -5,497 +5,452 @@
@stop
@section('content-wrapper')
<div class="content full-page">
<h1>Dashboard</h1>
<div class="dashboard-content">
<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>
</div>
<div class="page-content">
<div class="dashboard-stats">
<div class="dashboard-card">
<div class="visitor-content">
<div class="title">
<span>NEW VISITORS </span>
</div>
<div class="data">
<span>450 </span>
<span>
<img src="{{asset('themes/default/assets/images/complete.svg')}}" />
</span>
<span class="right">
12.5% Increased
</span>
</div>
<div class="title">
{{ __('admin::app.dashboard.total-customers') }}
</div>
<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>
</div>
<div class="dashboard-card">
<div class="visitor-content">
<div class="title">
<span>NEW VISITORS </span>
</div>
<div class="data">
<span>450 </span>
<span>
<img src="{{asset('themes/default/assets/images/complete.svg')}}" />
</span>
<span class="right">
12.5% Increased
</span>
</div>
<div class="title">
{{ __('admin::app.dashboard.total-orders') }}
</div>
<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>
</div>
<div class="dashboard-card">
<div class="visitor-content">
<div class="title">
<span>NEW VISITORS </span>
</div>
<div class="data">
<span>450 </span>
<span>
<img src="{{asset('themes/default/assets/images/complete.svg')}}" />
</span>
<span class="right">
12.5% Increased
</span>
</div>
<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="visitor-content">
<div class="title">
<span>NEW VISITORS </span>
</div>
<div class="data">
<span>450 </span>
<span>
<img src="{{asset('themes/default/assets/images/complete.svg')}}" />
</span>
<span class="right">
12.5% Increased
</span>
</div>
<div class="title">
{{ __('admin::app.dashboard.average-sale') }}
</div>
<div class="data">
{{ core()->formatBasePrice($statistics['avg_sales']['current']) }}
<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>
<div class="graph-category">
<div class="dashboard-graph">
</div>
<div class="graph-stats">
<div class="performing-category">
<div class="category">
<div class="title">
<span> TOP PERFORMING CATEGORIES </span>
<div class="left-card-container graph">
<div class="card">
<div class="card-title" style="margin-bottom: 30px;">
{{ __('admin::app.dashboard.sales') }}
</div>
<div class="category-info">
<ul>
<div class="card-info">
<li>
<div class="category-list">
<div class="cat-name">
<span> Men </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span>250 Products . 290 Sales </span>
</div>
<div class="horizon-rule">
</div>
</div>
</li>
<li>
<div class="category-list">
<div class="cat-name">
<span> Women </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span>375 Products . 350 Sales </span>
</div>
<div class="horizon-rule">
</div>
</div>
</li>
<li>
<div class="category-list">
<div class="cat-name">
<span> Electronics </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span>200 Products . 214 Sales </span>
</div>
<div class="horizon-rule">
</div>
</div>
</li>
<li>
<div class="category-list">
<div class="cat-name">
<span> Accessories </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span>180 Products . 180 Sales </span>
</div>
<div class="horizon-rule">
</div>
</div>
</li>
</ul>
<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]) }}
&nbsp;.&nbsp;
{{ __('admin::app.dashboard.sale-count', ['count' => $item->total_qty_ordered]) }}
</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>
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
<div class="sale-stock">
<div class="sale">
<div class="top-sale">
<div class="title">
<span> TOP SELLING PRODUCTS </span>
</div>
<div class="card">
<div class="card-title">
{{ __('admin::app.dashboard.top-selling-products') }}
</div>
<div class="sale-info">
<ul>
<li>
<div class="pro-attribute">
<div class="pro-img">
<!-- <span class="icon settings-icon"></span> -->
</div>
<div class="product-description">
<div class="product-name">
<span> Men's Olive Denim Jacket </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span>250 Sales . In Stock - 500 </span>
</div>
</div>
</div>
<div class="horizontal-rule">
</div>
</li>
<div class="card-info {{ !count($statistics['top_selling_products']) ? 'center' : '' }}">
<ul>
<li>
<div class="pro-attribute">
<div class="pro-img">
<!-- <span class="icon settings-icon"></span> -->
</div>
<div class="product-description">
<div class="product-name">
<span> Apple iPhone 8 Plus - 64GB </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span>250 Sales . In Stock - 500 </span>
</div>
</div>
</div>
<div class="horizontal-rule">
</div>
</li>
@foreach ($statistics['top_selling_products'] as $item)
<li>
<a href="{{ route('admin.catalog.products.edit', $item->product_id) }}">
<div class="product image">
<?php $productBaseImage = $productImageHelper->getProductBaseImage($item->product); ?>
<li>
<div class="pro-attribute">
<div class="pro-img">
<!-- <span class="icon settings-icon"></span> -->
<img class="item-image" src="{{ $productBaseImage['small_image_url'] }}" />
</div>
<div class="product-description">
<div class="product-name">
<span> Long Lenngth Printed Shrug </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span>250 Products . In Stock - 500 </span>
</div>
</div>
</div>
<div class="horizontal-rule">
</div>
</li>
<li>
<div class="pro-attribute">
<div class="pro-img">
<!-- <span class="icon settings-icon"></span> -->
</div>
<div class="product-description">
<div class="product-name">
<span> Black Round Neck T-Shirt for Men </span>
<span class="icon angle-right-icon right-side"></span>
<div class="description">
<div class="name">
{{ $item->name }}
</div>
<div class="product-info">
<span>250 Products . In Stock - 500 </span>
</div>
</div>
</div>
<div class="horizontal-rule">
</div>
</li>
<li>
<div class="pro-attribute">
<div class="pro-img">
<!-- <span class="icon settings-icon"></span> -->
</div>
<div class="product-description">
<div class="product-name">
<span> Men's Linnen Shirt -Regular Fit </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span>250 Products . In Stock - 500 </span>
<div class="info">
{{ __('admin::app.dashboard.sale-count', ['count' => $item->total_qty_ordered]) }}
</div>
</div>
</div>
<div class="horizontal-rule">
</div>
<span class="icon angle-right-icon"></span>
</a>
</li>
</ul>
</div>
@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="sale">
<div class="top-sale">
<div class="title">
<span> CUSTOMERS WITH MOST SALES </span>
</div>
<div class="sale-info">
<ul>
<li>
<div class="pro-attribute">
<div class="pro-img">
<!-- <span class="icon settings-icon"></span> -->
</div>
<div class="product-description">
<div class="product-name">
<span> Emma Wagner </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span> 24 Orders . Revenue $450.00 </span>
</div>
</div>
</div>
<div class="horizontal-rule">
</div>
</li>
<li>
<div class="pro-attribute">
<div class="pro-img">
<!-- <span class="icon settings-icon"></span> -->
</div>
<div class="product-description">
<div class="product-name">
<span> Emma Wagner </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span> 24 Orders . Revenue $450.00 </span>
</div>
</div>
</div>
<div class="horizontal-rule">
</div>
</li>
<li>
<div class="pro-attribute">
<div class="pro-img">
<!-- <span class="icon settings-icon"></span> -->
</div>
<div class="product-description">
<div class="product-name">
<span> Emma Wagner </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span> 24 Orders . Revenue $450.00 </span>
</div>
</div>
</div>
<div class="horizontal-rule">
</div>
</li>
<li>
<div class="pro-attribute">
<div class="pro-img">
<!-- <span class="icon settings-icon"></span> -->
</div>
<div class="product-description">
<div class="product-name">
<span> Emma Wagner </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span> 24 Orders . Revenue $450.00 </span>
</div>
</div>
</div>
<div class="horizontal-rule">
</div>
</li>
<li>
<div class="pro-attribute">
<div class="pro-img">
<!-- <span class="icon settings-icon"></span> -->
</div>
<div class="product-description">
<div class="product-name">
<span> Emma Wagner </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span> 24 Orders . Revenue $450.00 </span>
</div>
</div>
</div>
<div class="horizontal-rule">
</div>
</li>
</ul>
</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">
<div class="name">
{{ $item->customer_full_name }}
</div>
<div class="info">
{{ __('admin::app.dashboard.order-count', ['count' => $item->total_orders]) }}
&nbsp;.&nbsp;
{{ __('admin::app.dashboard.revenue', [
'total' => core()->formatBasePrice($item->total_base_grand_total)
])
}}
</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="sale">
<div class="top-sale">
<div class="title">
<span> TOP SELLING PRODUCTS </span>
</div>
<div class="sale-info">
<ul>
<li>
<div class="pro-attribute">
<div class="pro-img">
<!-- <span class="icon settings-icon"></span> -->
</div>
<div class="product-description">
<div class="product-name">
<span> Men's Olive Denim Jacket </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span>7 left </span>
</div>
</div>
</div>
<div class="horizontal-rule">
</div>
</li>
<li>
<div class="pro-attribute">
<div class="pro-img">
<!-- <span class="icon settings-icon"></span> -->
</div>
<div class="product-description">
<div class="product-name">
<span> Apple iPhone 8 Plus - 64GB </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span>250 Sales . In Stock - 500 </span>
</div>
</div>
</div>
<div class="horizontal-rule">
</div>
</li>
<li>
<div class="pro-attribute">
<div class="pro-img">
<!-- <span class="icon settings-icon"></span> -->
</div>
<div class="product-description">
<div class="product-name">
<span> Long Lenngth Printed Shrug </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span>250 Products . In Stock - 500 </span>
</div>
</div>
</div>
<div class="horizontal-rule">
</div>
</li>
<li>
<div class="pro-attribute">
<div class="pro-img">
<!-- <span class="icon settings-icon"></span> -->
</div>
<div class="product-description">
<div class="product-name">
<span> Black Round Neck T-Shirt for Men </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span>250 Products . In Stock - 500 </span>
</div>
</div>
</div>
<div class="horizontal-rule">
</div>
</li>
<li>
<div class="pro-attribute">
<div class="pro-img">
<!-- <span class="icon settings-icon"></span> -->
</div>
<div class="product-description">
<div class="product-name">
<span> Men's Linnen Shirt -Regular Fit </span>
<span class="icon angle-right-icon right-side"></span>
</div>
<div class="product-info">
<span>250 Products . In Stock - 500 </span>
</div>
</div>
</div>
<div class="horizontal-rule">
</div>
</li>
</ul>
</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 = $productImageHelper->getProductBaseImage($item->product); ?>
<img class="item-image" src="{{ $productBaseImage['small_image_url'] }}" />
</div>
<div class="description">
<div class="name">
{{ $item->product->name }}
</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>
<div class="control-group date">
<date @onChange="applyFilter('start', $event)"><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)"><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>
Vue.component('date-filter', {
template: '#date-filter-template',
data: () => ({
start: "{{ $startDate->format('Y-m-d') }}",
end: "{{ $endDate->format('Y-m-d') }}",
}),
methods: {
applyFilter(field, date) {
this[field] = date;
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

View File

@ -7,6 +7,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<link rel="icon" sizes="16x16" href="{{ asset('vendor/webkul/ui/assets/images/favicon.ico') }}" />
<link rel="stylesheet" href="{{ asset('vendor/webkul/admin/assets/css/admin.css') }}">
<link rel="stylesheet" href="{{ asset('vendor/webkul/ui/assets/css/ui.css') }}">

View File

@ -512,4 +512,77 @@ class Core
return $collection;
}
/**
* Returns time intervals
*
* @return array
*/
public function getTimeInterval($startDate, $endDate) {
$timeIntervals = [];
$totalDays = $startDate->diffInDays($endDate);
$totalMonths = $startDate->diffInMonths($endDate);
$startWeekDay = Carbon::createFromTimeString($this->xWeekRange($startDate, 0) . ' 00:00:01');
$endWeekDay = Carbon::createFromTimeString($this->xWeekRange($endDate, 1) . ' 23:59:59');
$totalWeeks = $startWeekDay->diffInWeeks($endWeekDay);
if($totalMonths > 5) {
for ($i = 0; $i < $totalMonths; $i++) {
$date = clone $startDate;
$date->addMonths($i);
$start = Carbon::createFromTimeString($date->format('Y-m-d') . ' 00:00:01');
$end = $totalMonths - 1 == $i
? $endDate
: Carbon::createFromTimeString($date->format('Y-m-d') . ' 23:59:59');
$timeIntervals[] = ['start' => $start, 'end' => $end, 'formatedDate' => $date->format('M')];
}
} elseif($totalWeeks > 6) {
for ($i = 0; $i < $totalWeeks; $i++) {
$date = clone $startDate;
$date->addWeeks($i);
$start = $i == 0
? $startDate
: Carbon::createFromTimeString($this->xWeekRange($date, 0) . ' 00:00:01');
$end = $totalWeeks - 1 == $i
? $endDate
: Carbon::createFromTimeString($this->xWeekRange($date, 1) . ' 23:59:59');
$timeIntervals[] = ['start' => $start, 'end' => $end, 'formatedDate' => $date->format('d M')];
}
} else {
for ($i = 0; $i < $totalDays; $i++) {
$date = clone $startDate;
$date->addDays($i);
$start = Carbon::createFromTimeString($date->format('Y-m-d') . ' 00:00:01');
$end = Carbon::createFromTimeString($date->format('Y-m-d') . ' 23:59:59');
$timeIntervals[] = ['start' => $start, 'end' => $end, 'formatedDate' => $date->format('d M')];
}
}
return $timeIntervals;
}
/**
* @return string
*/
public function xWeekRange($date, $day) {
$ts = strtotime($date);
if(!$day) {
$start = (date('D', $ts) == 'Sun') ? $ts : strtotime('last sunday', $ts);
return date('Y-m-d', $start);
} else {
$end = (date('D', $ts) == 'Sat') ? $ts : strtotime('next saturday', $ts);
return date('Y-m-d', $end);
}
}
}

View File

@ -87,7 +87,41 @@ abstract class Repository extends BaseRepository {
*/
public function count()
{
return $this->model->count();
$this->applyCriteria();
$this->applyScope();
$total = $this->model->count();
$this->resetModel();
return $total;
}
/**
* @return mixed
*/
public function sum($columns)
{
$this->applyCriteria();
$this->applyScope();
$sum = $this->model->sum($columns);
$this->resetModel();
return $sum;
}
/**
* @return mixed
*/
public function avg($columns)
{
$this->applyCriteria();
$this->applyScope();
$avg = $this->model->avg($columns);
$this->resetModel();
return $avg;
}
/**

View File

@ -18,9 +18,9 @@ class Customer extends Authenticatable
protected $table = 'customers';
protected $fillable = ['first_name', 'channel_id', 'last_name', 'gender', 'date_of_birth','phone','email','password','customer_group_id','subscribed_to_news_letter'];
protected $fillable = ['first_name', 'channel_id', 'last_name', 'gender', 'date_of_birth', 'phone', 'email', 'password', 'customer_group_id', 'subscribed_to_news_letter'];
protected $hidden = ['password','remember_token'];
protected $hidden = ['password', 'remember_token'];
protected $with = ['customerGroup'];

View File

@ -21,8 +21,9 @@ class CustomerResetPassword extends ResetPassword
}
return (new MailMessage)
->line('You are receiving this email because we received a password reset request for your account.')
->action('Reset Password', route('customer.reset-password.create', $this->token))
->line('If you did not request a password reset, no further action is required.');
->view('shop::emails.customer.forget-password')->with([
'user_name' => $notifiable->name,
'token' => $this->token
]);
}
}

View File

@ -10,19 +10,7 @@ class ProductInventory extends Model
public $timestamps = false;
protected $fillable = ['qty', 'product_id', 'inventory_source_id'];
/**
* Use by cart for
* checking the
* inventory source
* status
*
* @return Collection
*/
// public function checkInventoryStatus() {
// return $this->leftjoin('inventory_sources', 'inventory_sources.id', 'inventory_source_id')->select('status')->where('status', '=','1');
// }
/**
* Get the product attribute family that owns the product.
*/
@ -30,4 +18,12 @@ class ProductInventory extends Model
{
return $this->belongsTo(InventorySource::class);
}
/**
* Get the product that owns the product inventory.
*/
public function product()
{
return $this->belongsTo(Product::class);
}
}

View File

@ -4,6 +4,7 @@ namespace Webkul\Sales\Models;
use Illuminate\Database\Eloquent\Model;
use Webkul\Sales\Contracts\OrderItem as OrderItemContract;
use Webkul\Product\Models\Product;
class OrderItem extends Model implements OrderItemContract
{

View File

@ -76,7 +76,7 @@ Route::group(['middleware' => ['web', 'theme', 'locale', 'currency']], function
//Reset Password create
Route::get('/reset-password/{token}', 'Webkul\Customer\Http\Controllers\ResetPasswordController@create')->defaults('_config', [
'view' => 'shop::customers.signup.reset-password'
])->name('password.reset');
])->name('customer.reset-password.create');
Route::post('/reset-password', 'Webkul\Customer\Http\Controllers\ResetPasswordController@store')->defaults('_config', [
'redirect' => 'customer.session.index'

View File

@ -0,0 +1,34 @@
@component('admin::emails.layouts.master')
<div style="text-align: center;">
<a href="{{ config('app.url') }}">
<img src="{{ bagisto_asset('vendor/webkul/shop/assets/images/logo.svg') }}">
</a>
</div>
<div style="padding: 30px;">
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{{ __('admin::app.mail.forget-password.dear', ['name' => $user_name]) }},
</p>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{{ __('admin::app.mail.forget-password.info') }}
</p>
<p style="text-align: center;padding: 20px 0;">
<a href="{{ route('admin.reset-password.create', $token) }}" style="padding: 10px 20px;background: #0041FF;color: #ffffff;text-transform: uppercase;text-decoration: none; font-size: 16px">
{{ __('admin::app.mail.forget-password.reset-password') }}
</a>
</p>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{{ __('admin::app.mail.forget-password.final-summary') }}
</p>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{{ __('admin::app.mail.forget-password.thanks') }}
</p>
</div>
</div>
@endcomponent

View File

@ -0,0 +1,34 @@
@component('admin::emails.layouts.master')
<div style="text-align: center;">
<a href="{{ config('app.url') }}">
<img src="{{ bagisto_asset('vendor/webkul/shop/assets/images/logo.svg') }}">
</a>
</div>
<div style="padding: 30px;">
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{{ __('admin::app.mail.forget-password.dear', ['name' => $user_name]) }},
</p>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{{ __('admin::app.mail.forget-password.info') }}
</p>
<p style="text-align: center;padding: 20px 0;">
<a href="{{ route('customer.reset-password.create', $token) }}" style="padding: 10px 20px;background: #0041FF;color: #ffffff;text-transform: uppercase;text-decoration: none; font-size: 16px">
{{ __('admin::app.mail.forget-password.reset-password') }}
</a>
</p>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{{ __('admin::app.mail.forget-password.final-summary') }}
</p>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
{{ __('admin::app.mail.forget-password.thanks') }}
</p>
</div>
</div>
@endcomponent

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 50 (54983) - http://www.bohemiancoding.com/sketch -->
<title>Icon-Calendar</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Icon-Calendar" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(3.000000, 2.000000)">
<path d="M2,9 L4,9 L4,11 L2,11 L2,9 Z M5,9 L7,9 L7,11 L5,11 L5,9 Z M8,9 L10,9 L10,11 L8,11 L8,9 Z M11,9 L13,9 L13,11 L11,11 L11,9 Z M14,9 L16,9 L16,11 L14,11 L14,9 Z M2,12 L4,12 L4,14 L2,14 L2,12 Z M5,12 L7,12 L7,14 L5,14 L5,12 Z M8,12 L10,12 L10,14 L8,14 L8,12 Z M11,12 L13,12 L13,14 L11,14 L11,12 Z M14,12 L16,12 L16,14 L14,14 L14,12 Z M11,15 L13,15 L13,17 L11,17 L11,15 Z M2,15 L4,15 L4,17 L2,17 L2,15 Z M5,15 L7,15 L7,17 L5,17 L5,15 Z M8,15 L10,15 L10,17 L8,17 L8,15 Z" id="Combined-Shape" fill="#8E8E8E"></path>
<rect id="Rectangle-6" stroke="#8E8E8E" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" x="0" y="2" width="18" height="18" rx="2"></rect>
<path d="M0,7 L17.2233522,7" id="Path-2" stroke="#8E8E8E" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M5.05517578,0.0166015625 L5.05517578,2" id="Path-3" stroke="#8E8E8E" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M13,0 L13,1.91914536" id="Path-3-Copy" stroke="#8E8E8E" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 50 (54983) - http://www.bohemiancoding.com/sketch -->
<title>Icon-Graph-Green</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Icon-Graph-Green" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
<g transform="translate(8.000000, 5.000000)" stroke="#00C357" stroke-width="2">
<path d="M4,0 L4,14" id="Path-2"></path>
<path d="M4,0 L0,4" id="Path-3"></path>
<path d="M7.92330631,0 L3.92330631,4" id="Path-3-Copy" transform="translate(5.961653, 2.000000) scale(-1, 1) translate(-5.961653, -2.000000) "></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 881 B

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 50 (54983) - http://www.bohemiancoding.com/sketch -->
<title>Icon-Graph-Red</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Icon-Graph-Red" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
<g transform="translate(12.500000, 12.000000) scale(1, -1) translate(-12.500000, -12.000000) translate(8.000000, 5.000000)" stroke="#FC6868" stroke-width="2">
<path d="M4,0 L4,14" id="Path-2"></path>
<path d="M4,0 L0,4" id="Path-3"></path>
<path d="M7.92330631,0 L3.92330631,4" id="Path-3-Copy" transform="translate(5.961653, 2.000000) scale(-1, 1) translate(-5.961653, -2.000000) "></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 956 B

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 50 (54983) - http://www.bohemiancoding.com/sketch -->
<title>Profile-Pic</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Profile-Pic" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g>
<circle id="Oval-3" fill="#E7E7E7" cx="24" cy="24" r="24"></circle>
<g id="Icon-Profile" transform="translate(12.000000, 11.000000)" stroke="#8E8E8E" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<path d="M4,21 C4.49209809,17.0536884 7.85848859,14 11.9381062,14 C16.0177239,14 19.3841144,17.0536884 19.8762125,21 L4,21 Z M11.9381062,11 C9.72896725,11 7.93810625,9.209139 7.93810625,7 C7.93810625,4.790861 9.72896725,3 11.9381062,3 C14.1472452,3 15.9381062,4.790861 15.9381062,7 C15.9381062,9.209139 14.1472452,11 11.9381062,11 Z" id="Combined-Shape"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,39 @@
<svg xmlns="http://www.w3.org/2000/svg" width="47" height="41.969" viewBox="0 0 47 41.969">
<metadata><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c140 79.160451, 2017/05/06-01:08:21 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?></metadata>
<defs>
<style>
.cls-1 {
fill: #c7c7c7;
fill-rule: evenodd;
}
</style>
</defs>
<path id="Rounded_Rectangle_1" data-name="Rounded Rectangle 1" class="cls-1" d="M1246.4,242h-41.75a2.635,2.635,0,0,1-2.25-4.049c0.91-1.614,19.26-33.851,20.83-36.6a2.581,2.581,0,0,1,4.53,0c1.15,1.981,19.6,34.342,20.88,36.685A2.623,2.623,0,0,1,1246.4,242Zm-1.4-2h-39c-1.61,0-2.33-.36-1.38-2.038,0.73-1.3,17.65-31.586,19-33.863,1.69-2.849,2.17-2.784,3.75,0,0.95,1.658,17.57,31.947,18.63,33.9C1246.78,239.431,1246.77,240,1245,240Zm-19-24a1,1,0,0,1,1,1v11a1,1,0,0,1-2,0V217A1,1,0,0,1,1226,216Zm0,15a1,1,0,1,1-1,1A1,1,0,0,1,1226,231Z" transform="translate(-1202 -200.031)"/>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -462,6 +462,19 @@ h2 {
}
}
&.date, &.datetime {
&::after {
background-image: url("../images/Icon-Calendar.svg");
width: 24px;
height: 24px;
content: '';
display: inline-block;
vertical-align: middle;
margin-left: -34px;
margin-top: 2px;
}
}
.control-info {
display: block;
font-style: italic;

View File

@ -190,6 +190,30 @@
height: 13px;
}
.profile-pic-icon {
background-image: url("../images/Profile-Pic.svg");
width: 60px;
height: 60px;
}
.graph-up-icon {
background-image: url("../images/Icon-Graph-Green.svg");
width: 24px;
height: 24px;
}
.graph-down-icon {
background-image: url("../images/Icon-Graph-Red.svg");
width: 24px;
height: 24px;
}
.no-result-icon {
background-image: url("../images/limited-icon.svg");
width: 52px;
height: 47px;
}
.active {
.dashboard-icon {
background-image: url("../images/Icon-Dashboard-Active.svg");

View File

@ -7,7 +7,6 @@ use Illuminate\Auth\Notifications\ResetPassword;
class AdminResetPassword extends ResetPassword
{
/**
* Build the mail representation of the notification.
*
@ -21,8 +20,9 @@ class AdminResetPassword extends ResetPassword
}
return (new MailMessage)
->line('You are receiving this email because we received a password reset request for your account.')
->action('Reset Password', route('admin.reset-password.create', $this->token))
->line('If you did not request a password reset, no further action is required.');
->view('shop::emails.admin.forget-password')->with([
'user_name' => $notifiable->name,
'token' => $this->token
]);
}
}