working on notification part
This commit is contained in:
parent
38306a444d
commit
de746ed6b8
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class Notifications extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('notifications', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('type');
|
||||
$table->boolean('read')->default(0);
|
||||
$table->integer('order_id')->unsigned();
|
||||
$table->foreign('order_id')->references('id')->on('orders')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('notifications');
|
||||
}
|
||||
}
|
||||
|
|
@ -85,7 +85,7 @@ class AdminServiceProvider extends ServiceProvider
|
|||
*/
|
||||
protected function composeView()
|
||||
{
|
||||
view()->composer(['admin::layouts.nav-left', 'admin::layouts.nav-aside', 'admin::layouts.tabs','admin::layouts.mobile-nav'], function ($view) {
|
||||
view()->composer(['admin::layouts.nav-left','admin::layouts.tabs','admin::layouts.mobile-nav'], function ($view) {
|
||||
$tree = Tree::create();
|
||||
|
||||
$permissionType = auth()->guard('admin')->user()->role->permission_type;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import Vue from 'vue';
|
|||
import VeeValidate from 'vee-validate';
|
||||
import './bootstrap';
|
||||
import Echo from 'laravel-echo';
|
||||
import pagination from 'laravel-vue-pagination'
|
||||
|
||||
/**
|
||||
* Lang imports.
|
||||
|
|
@ -64,11 +65,11 @@ Vue.component(
|
|||
'notification',
|
||||
require('./components/navigation/notification').default
|
||||
);
|
||||
|
||||
Vue.component(
|
||||
'notification-list',
|
||||
require('./components/navigation/notification-list').default
|
||||
);
|
||||
Vue.component('pagination', pagination);
|
||||
|
||||
$(function() {
|
||||
Vue.config.ignoredElements = ['option-wrapper', 'group-form', 'group-list'];
|
||||
|
|
|
|||
|
|
@ -173,7 +173,6 @@
|
|||
background-color: $drak-bg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.nav-container {
|
||||
|
||||
|
|
@ -254,9 +253,10 @@
|
|||
|
||||
.table{
|
||||
background-color: #04101b;
|
||||
|
||||
table {
|
||||
background-color: #04101b;
|
||||
thead th {
|
||||
background-color: rgba(7, 30, 55,0.2) !important;
|
||||
color: rgba(255,255,255,.8);
|
||||
}
|
||||
tbody td {
|
||||
|
|
@ -280,6 +280,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
.accordian, accordian {
|
||||
.accordian-header, div[slot*="header"] {
|
||||
color: $font-color;
|
||||
border-top: solid 1px $border-color;
|
||||
border-bottom: solid 1px $border-color;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1300px) {
|
||||
.table {
|
||||
table {
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ return [
|
|||
|
||||
'layouts' => [
|
||||
'app-version' => 'Version : :version',
|
||||
'account-title' => 'Account',
|
||||
'my-account' => 'My Account',
|
||||
'logout' => 'Logout',
|
||||
'visit-shop' => 'Visit Shop',
|
||||
|
|
@ -84,6 +85,7 @@ return [
|
|||
'cms' => 'CMS',
|
||||
'transactions' => 'Transactions',
|
||||
'newsletter-subscriptions' => 'Newsletter Subscriptions',
|
||||
'mode' => 'Mode'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
$config = $tree;
|
||||
|
||||
|
||||
$allLocales = core()->getAllLocales()->pluck('name', 'code');
|
||||
|
||||
$currentLocaleCode = core()->getRequestedLocaleCode('admin_locale');
|
||||
|
|
@ -105,17 +104,17 @@
|
|||
<a class="nav-tab-name">
|
||||
<span class="icon-menu icon accounts-icon"
|
||||
style="margin-right:10px; display: inline-block;vertical-align: middle;transform: scale(0.8);"></span>
|
||||
<span class="menu-label">Account</span>
|
||||
<span class="menu-label">{{ __('admin::app.layouts.account-title') }}</span>
|
||||
<span class="icon arrow-icon"></span>
|
||||
</a>
|
||||
<ul>
|
||||
<li class="navbar-child">
|
||||
<a>
|
||||
<span style="display:flex;justify-content:space-between">
|
||||
<span style="display:flex;justify-content:space-between;height:20px">
|
||||
<div style="margin-top:12px;margin-left:47px">
|
||||
<span>Mode</span>
|
||||
<span>{{ __('admin::app.layouts.mode') }}</span>
|
||||
</div>
|
||||
<dark></dark>
|
||||
<dark style="margin-left:13%"></dark>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
<div class="aside-nav active">
|
||||
|
||||
{{-- button for collapsing aside nav --}}
|
||||
<nav-slide-button icon-class="accordian-left-icon"></nav-slide-button>
|
||||
|
||||
<ul>
|
||||
@if (request()->route()->getName() != 'admin.configuration.index')
|
||||
<?php $keys = explode('.', $menu->currentKey); ?>
|
||||
|
||||
@if(isset($keys) && strlen($keys[0]))
|
||||
@foreach (\Illuminate\Support\Arr::get($menu->items, current($keys) . '.children') as $item)
|
||||
<li class="{{ $menu->getActive($item) }}">
|
||||
<a href="{{ $item['url'] }}">
|
||||
{{ trans($item['name']) }}
|
||||
|
||||
@if ($menu->getActive($item))
|
||||
<i class="angle-right-icon"></i>
|
||||
@endif
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
@endif
|
||||
@else
|
||||
@foreach ($config->items as $key => $item)
|
||||
<li class="{{ $item['key'] == request()->route('slug') ? 'active' : '' }}">
|
||||
<a href="{{ route('admin.configuration.index', $item['key']) }}">
|
||||
{{ isset($item['name']) ? trans($item['name']) : '' }}
|
||||
|
||||
@if ($item['key'] == request()->route('slug'))
|
||||
<i class="angle-right-icon"></i>
|
||||
@endif
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
<span class="app-version">{{ __('admin::app.layouts.app-version', ['version' => 'v' . config('app.version')]) }}</span>
|
||||
|
||||
<div class="dropdown-container">
|
||||
<label>Account</label>
|
||||
<label>{{ __('admin::app.layouts.account-title') }}</label>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route('shop.home.index') }}" target="_blank">{{ __('admin::app.layouts.visit-shop') }}</a>
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
<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">Mode : </div>
|
||||
<div style="margin-top:7px">{{ __('admin::app.layouts.mode') }}</div>
|
||||
<dark style="margin-top: -9px;width: 83px;"></dark>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
@extends('admin::layouts.content')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.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')
|
||||
];
|
||||
@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('/') }}/admin/viewed-notifications/"
|
||||
pusher-key="{{ env('PUSHER_APP_KEY') }}"
|
||||
pusher-cluster="{{ env('PUSHER_APP_CLUSTER') }}"
|
||||
title=" {{ __('admin::app.notification.title') }}"
|
||||
order-status="{{ json_encode($orderStatus) }}"
|
||||
no-record-text="{{ __('admin::app.notification.no-record') }}">
|
||||
</notification-list>
|
||||
@endsection
|
||||
|
|
@ -377,7 +377,7 @@
|
|||
}
|
||||
|
||||
> .arrow-down-icon {
|
||||
background-image: url("../images/Arrow-Down.svg");
|
||||
background-image: url("../images/Arrow-Down-Light.svg");
|
||||
width: 14px;
|
||||
height: 8px;
|
||||
}
|
||||
|
|
@ -408,7 +408,7 @@
|
|||
}
|
||||
|
||||
&.arrow-down-icon {
|
||||
background-image: url("../images/Arrow-Down.svg");
|
||||
background-image: url("../images/Arrow-Down-Light.svg");
|
||||
width: 14px;
|
||||
height: 8px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue