commit
a60ca52eb6
|
|
@ -4,6 +4,14 @@
|
|||
|
||||
## **v0.1.2(30th of November, 2018)** - *Release*
|
||||
|
||||
* [feature] Paypal integration for online payments
|
||||
|
||||
* [feature] Newsletter subscription
|
||||
|
||||
* [feature] Email Verification for customers
|
||||
|
||||
* [feature] News letter grid for Admin
|
||||
|
||||
* #185 - [fixed] Search not working in responsive mode
|
||||
|
||||
* #187 - [fixed] We can add column "Group Name" instead of Group Id and also add this column in filter in Customers Grid
|
||||
|
|
@ -126,14 +134,6 @@
|
|||
|
||||
* [fixes] More ACL added.
|
||||
|
||||
* [feature] Paypal integration.
|
||||
|
||||
* [feature] Newsletter subscription.
|
||||
|
||||
* [feature] Email Verification for customers.
|
||||
|
||||
* [feature] News letter grid for Admin.
|
||||
|
||||
|
||||
## **v0.1.1(13th of November, 2018)** - *Release*
|
||||
|
||||
|
|
|
|||
173
config/jwt.php
173
config/jwt.php
|
|
@ -1,173 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT Authentication Secret
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Don't forget to set this, as it will be used to sign your tokens.
|
||||
| A helper command is provided for this: `php artisan jwt:generate`
|
||||
|
|
||||
*/
|
||||
|
||||
'secret' => env('JWT_SECRET', 'changeme'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT time to live
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the length of time (in minutes) that the token will be valid for.
|
||||
| Defaults to 1 hour
|
||||
|
|
||||
*/
|
||||
|
||||
'ttl' => env('JWT_TTL', 120),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Refresh time to live
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the length of time (in minutes) that the token can be refreshed
|
||||
| within. I.E. The user can refresh their token within a 2 week window of
|
||||
| the original token being created until they must re-authenticate.
|
||||
| Defaults to 2 weeks
|
||||
|
|
||||
*/
|
||||
|
||||
'refresh_ttl' => env('JWT_REFRESH_TTL', 86400),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT hashing algorithm
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the hashing algorithm that will be used to sign the token.
|
||||
|
|
||||
| See here: https://github.com/namshi/jose/tree/2.2.0/src/Namshi/JOSE/Signer
|
||||
| for possible values
|
||||
|
|
||||
*/
|
||||
|
||||
'algo' => 'HS256',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| User Model namespace
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the full namespace to your User model.
|
||||
| e.g. 'Acme\Entities\User'
|
||||
|
|
||||
*/
|
||||
|
||||
'user' => 'App\User',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| User identifier
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify a unique property of the user that will be added as the 'sub'
|
||||
| claim of the token payload.
|
||||
|
|
||||
*/
|
||||
|
||||
'identifier' => 'id',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Required Claims
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the required claims that must exist in any token.
|
||||
| A TokenInvalidException will be thrown if any of these claims are not
|
||||
| present in the payload.
|
||||
|
|
||||
*/
|
||||
|
||||
'required_claims' => ['iss', 'iat', 'exp', 'nbf', 'sub', 'jti'],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Blacklist Enabled
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| In order to invalidate tokens, you must have the blacklist enabled.
|
||||
| If you do not want or need this functionality, then set this to false.
|
||||
|
|
||||
*/
|
||||
|
||||
'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the various providers used throughout the package.
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| User Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to find the user based
|
||||
| on the subject claim
|
||||
|
|
||||
*/
|
||||
|
||||
'user' => 'Tymon\JWTAuth\Providers\User\EloquentUserAdapter',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to create and decode the tokens.
|
||||
|
|
||||
*/
|
||||
|
||||
'jwt' => 'Tymon\JWTAuth\Providers\JWT\Namshi',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to authenticate users.
|
||||
|
|
||||
*/
|
||||
|
||||
'auth' => 'Tymon\JWTAuth\Providers\Auth\Illuminate',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Storage Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to store tokens in the blacklist
|
||||
|
|
||||
*/
|
||||
|
||||
'storage' => 'Tymon\JWTAuth\Providers\Storage\Illuminate'
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'name' => 'Test'
|
||||
];
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/admin.js": "/js/admin.js?id=463fcd59d49e91caa65c",
|
||||
"/css/admin.css": "/css/admin.css?id=201f91bc553baa11139f"
|
||||
"/css/admin.css": "/css/admin.css?id=affdaf4eec255546f6e6"
|
||||
}
|
||||
|
|
@ -32,23 +32,23 @@ class AttributeDataGrid
|
|||
'aliased' => true,
|
||||
|
||||
'massoperations' => [
|
||||
// [
|
||||
// 'route' => route('admin.datagrid.delete'),
|
||||
// 'method' => 'DELETE',
|
||||
// 'label' => 'Delete',
|
||||
// 'type' => 'button',
|
||||
// ],
|
||||
[
|
||||
'route' => route('admin.catalog.attributes.massdelete'),
|
||||
'method' => 'DELETE',
|
||||
'label' => 'Delete',
|
||||
'type' => 'button',
|
||||
]
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.catalog.attributes.edit',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.catalog.attributes.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
@ -57,7 +57,6 @@ class AttributeDataGrid
|
|||
'join' => [],
|
||||
|
||||
//use aliasing on secodary columns if join is performed
|
||||
|
||||
'columns' => [
|
||||
[
|
||||
'name' => 'id',
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@ class AttributeFamilyDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.catalog.families.edit',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.catalog.families.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@ class CategoryDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.catalog.categories.edit',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.catalog.categories.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@ class ChannelDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.channels.edit',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.channels.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class CurrencyDataGrid
|
|||
public function createCurrencyDataGrid()
|
||||
{
|
||||
|
||||
return DataGrid::make([
|
||||
return DataGrid::make([
|
||||
'name' => 'Currencies',
|
||||
'table' => 'currencies',
|
||||
'select' => 'id',
|
||||
|
|
@ -32,23 +32,23 @@ class CurrencyDataGrid
|
|||
'aliased' => false, //use this with false as default and true in case of joins
|
||||
|
||||
'massoperations' =>[
|
||||
// [
|
||||
// 'route' => route('admin.datagrid.delete'),
|
||||
// 'method' => 'DELETE',
|
||||
// 'label' => 'Delete',
|
||||
// 'type' => 'button',
|
||||
// ],
|
||||
[
|
||||
'route' => route('admin.currencies.massdelete'),
|
||||
'method' => 'DELETE',
|
||||
'label' => 'Delete',
|
||||
'type' => 'button',
|
||||
]
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'route' => 'admin.currencies.edit',
|
||||
// 'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.currencies.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
@ -65,9 +65,7 @@ class CurrencyDataGrid
|
|||
],
|
||||
|
||||
//use aliasing on secodary columns if join is performed
|
||||
|
||||
'columns' => [
|
||||
|
||||
[
|
||||
'name' => 'id',
|
||||
'alias' => 'currencyId',
|
||||
|
|
|
|||
|
|
@ -31,23 +31,23 @@ class CustomerDataGrid
|
|||
'aliased' => true, //use this with false as default and true in case of joins
|
||||
|
||||
'massoperations' =>[
|
||||
[
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'method' => 'DELETE',
|
||||
'label' => 'Delete',
|
||||
'type' => 'button', //select || button only
|
||||
],
|
||||
// [
|
||||
// 'route' => route('admin.datagrid.delete'),
|
||||
// 'method' => 'DELETE',
|
||||
// 'label' => 'Delete',
|
||||
// 'type' => 'button', //select || button only
|
||||
// ],
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.customer.edit',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.customer.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -53,13 +53,13 @@ class CustomerGroupDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.groups.edit',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
],
|
||||
[
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.groups.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@ use Webkul\Ui\DataGrid\Facades\DataGrid;
|
|||
|
||||
|
||||
/**
|
||||
* Review DataGrid
|
||||
* CustomerReview DataGrid
|
||||
*
|
||||
* @author Rahul Shukla <rahulshukla.symfony517@webkul.com> @rahul-webkul
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
|
||||
class ProductReviewDataGrid
|
||||
class CustomerReviewDataGrid
|
||||
{
|
||||
/**
|
||||
* The ProductReviewDataGrid
|
||||
|
|
@ -23,7 +23,7 @@ class ProductReviewDataGrid
|
|||
* for Reviews
|
||||
*/
|
||||
|
||||
public function createProductReviewDataGrid()
|
||||
public function createCustomerReviewDataGrid()
|
||||
{
|
||||
|
||||
return DataGrid::make([
|
||||
|
|
@ -45,12 +45,12 @@ class ProductReviewDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.customer.review.edit',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.customer.review.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
@ -176,6 +176,6 @@ class ProductReviewDataGrid
|
|||
|
||||
public function render()
|
||||
{
|
||||
return $this->createProductReviewDataGrid()->render();
|
||||
return $this->createCustomerReviewDataGrid()->render();
|
||||
}
|
||||
}
|
||||
|
|
@ -44,12 +44,12 @@ class ExchangeRatesDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.exchange_rates.edit',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.exchange_rates.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -42,12 +42,12 @@ class InventorySourcesDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.edit'),
|
||||
'route' => 'admin.inventory_sources.edit',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.inventory_sources.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -43,12 +43,12 @@ class LocalesDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'route' => 'admin.locales.edit',
|
||||
// 'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.locales.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -42,8 +42,13 @@ class NewsLetterDataGrid
|
|||
|
||||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => 'admin.customers.subscribers.edit',
|
||||
// 'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.customers.subscribers.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -43,9 +43,10 @@ class OrderDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'View',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to view this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
'route' => 'admin.sales.orders.view',
|
||||
// 'confirm_text' => 'Do you really want to view this record?',
|
||||
'icon' => 'icon eye-icon',
|
||||
'icon-alt' => 'View'
|
||||
],
|
||||
// [
|
||||
// 'type' => 'Delete',
|
||||
|
|
|
|||
|
|
@ -42,16 +42,11 @@ class OrderInvoicesDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'View',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to view this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
'route' => 'admin.sales.invoices.view',
|
||||
// 'confirm_text' => 'Do you really want to view this record?',
|
||||
'icon' => 'icon eye-icon',
|
||||
'icon-alt' => 'View'
|
||||
],
|
||||
// [
|
||||
// 'type' => 'Delete',
|
||||
// 'route' => route('admin.datagrid.delete'),
|
||||
// 'confirm_text' => 'Do you really want to do this?',
|
||||
// 'icon' => 'icon trash-icon',
|
||||
// ]
|
||||
],
|
||||
|
||||
'join' => [
|
||||
|
|
|
|||
|
|
@ -42,9 +42,10 @@ class OrderShipmentsDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'View',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to view this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
'route' => 'admin.sales.shipments.view',
|
||||
// 'confirm_text' => 'Do you really want to view this record?',
|
||||
'icon' => 'icon eye-icon',
|
||||
'icon-alt' => 'View'
|
||||
],
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -36,12 +36,12 @@ class ProductDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.catalog.products.edit',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.catalog.products.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -44,15 +44,10 @@ class RolesDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.roles.edit',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
]
|
||||
],
|
||||
|
||||
'join' => [
|
||||
|
|
|
|||
|
|
@ -43,12 +43,12 @@ class SliderDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.sliders.edit',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.sliders.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -53,13 +53,13 @@ class TaxCategoryDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.tax-categories.edit',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
],
|
||||
[
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.tax-categories.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -52,13 +52,13 @@ class TaxRateDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.tax-rates.store',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
],
|
||||
[
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.tax-rates.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -55,13 +55,13 @@ class UserDataGrid
|
|||
'actions' => [
|
||||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.users.edit',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
],
|
||||
[
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'route' => 'admin.users.delete',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -75,7 +75,11 @@ class CustomerGroupController extends Controller
|
|||
'name' => 'string|required',
|
||||
]);
|
||||
|
||||
$this->customerGroup->create(request()->all());
|
||||
$data = request()->all();
|
||||
|
||||
$data['is_user_defined'] = 1;
|
||||
|
||||
$this->customerGroup->create($data);
|
||||
|
||||
session()->flash('success', 'Customer Group created successfully.');
|
||||
|
||||
|
|
@ -123,14 +127,14 @@ class CustomerGroupController extends Controller
|
|||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
$group = $this->customerGroup->findOneWhere(['id'=>$id]);
|
||||
$group = $this->customerGroup->findOneByField('id', $id);
|
||||
|
||||
if(!$group->is_user_defined) {
|
||||
session()->flash('error', 'This Customer Group can not be deleted');
|
||||
if($group->is_user_defined == 0) {
|
||||
session()->flash('warning', 'Cannot delete the default group');
|
||||
} else {
|
||||
$this->customerGroup->delete($id);
|
||||
session()->flash('success', 'Customer Group deleted successfully');
|
||||
|
||||
session()->flash('success', 'Customer Group deleted successfully.');
|
||||
$this->customerGroup->delete($id);
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
|
|
|
|||
|
|
@ -11,172 +11,16 @@ use Webkul\Ui\DataGrid\Facades\DataGrid;
|
|||
* DataGrid controller
|
||||
*
|
||||
* @author Nikhil Malik <nikhil@webkul.com> @ysmnikhil
|
||||
* @author Prashant Singh <prashant.singh852@webkul.com> @prashant-webkul
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
class DataGridController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
DataGrid::make([
|
||||
'name' => 'Admin Datagrid',
|
||||
'table' => 'admins as u',
|
||||
'select' => 'u.id',
|
||||
'aliased' => true , //boolean to validate aliasing on the basis of this.
|
||||
'perpage' => 2,
|
||||
'filterable' => [
|
||||
[
|
||||
'column' => 'u.id',
|
||||
'type' => 'integer',
|
||||
'label' => 'Admin ID'
|
||||
], [
|
||||
'column' => 'u.email',
|
||||
'type' => 'string',
|
||||
'label' => 'Admin Email',
|
||||
], [
|
||||
'column' => 'u.name',
|
||||
'type' => 'string',
|
||||
'label' => 'Admin Name',
|
||||
]
|
||||
],
|
||||
'searchables' =>[
|
||||
[
|
||||
'name' => 'u.id',
|
||||
'label' => 'ID',
|
||||
'label' => 'Admin ID',
|
||||
],
|
||||
[
|
||||
'name' => 'u.name',
|
||||
'label' => 'Name',
|
||||
'label' => 'Admin Name',
|
||||
]
|
||||
],
|
||||
'join' => [
|
||||
[
|
||||
'join' => 'leftjoin',
|
||||
'table' => 'roles as r',
|
||||
'primaryKey' => 'u.role_id',
|
||||
'condition' => '=',
|
||||
'secondaryKey' => 'r.id',
|
||||
]
|
||||
],
|
||||
'columns' => [
|
||||
[
|
||||
'name' => 'u.id',
|
||||
'type' => 'string',
|
||||
'label' => 'Admin ID',
|
||||
'sortable' => true,
|
||||
'filterable' => true
|
||||
],
|
||||
[
|
||||
'name' => 'u.email',
|
||||
'type' => 'string',
|
||||
'label' => 'Admin Email',
|
||||
'sortable' => true,
|
||||
'filterable' => true
|
||||
],
|
||||
[
|
||||
'name' => 'u.name',
|
||||
'type' => 'string',
|
||||
'label' => 'Admin Name',
|
||||
'sortable' => true,
|
||||
'filterable' => true,
|
||||
// will create on run time query
|
||||
// 'filter' => [
|
||||
// 'function' => 'orwhere', // orwhere
|
||||
// 'condition' => ['name', 'like', 'u'] // multiarray
|
||||
// ],
|
||||
'attributes' => [
|
||||
'class' => 'class-a class-b',
|
||||
'data-attr' => 'whatever you want',
|
||||
'onclick' => "window.alert('alert from datagrid column')"
|
||||
],
|
||||
'wrapper' => function ($value, $object) {
|
||||
return '<a href="'.$value.'">' . $object->name . '</a>';
|
||||
},
|
||||
],
|
||||
[
|
||||
'name' => 'r.name as x',
|
||||
'type' => 'string',
|
||||
'label' => 'Admin\'s Role',
|
||||
'sortable' => true,
|
||||
'filterable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'r.id as xx',
|
||||
'type' => 'integer',
|
||||
'label' => 'Role ID',
|
||||
'sortable' => false,
|
||||
'filterable' => false
|
||||
],
|
||||
],
|
||||
|
||||
'operators' => [
|
||||
'eq' => "=",
|
||||
'lt' => "<",
|
||||
'gt' => ">",
|
||||
'lte' => "<=",
|
||||
'gte' => ">=",
|
||||
'neqn' => "!=",
|
||||
'ceq' => "<=>",
|
||||
'like' => "like",
|
||||
'nlike' => "not like",
|
||||
],
|
||||
'mass_operations' =>[
|
||||
[
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'method' => 'DELETE',
|
||||
'label' => 'Delete',
|
||||
'type' => 'button',
|
||||
|
||||
]
|
||||
],
|
||||
// 'css' => []
|
||||
|
||||
]);
|
||||
$result = DataGrid::render();
|
||||
return $result;
|
||||
public function massDelete() {
|
||||
dd(request()->all());
|
||||
}
|
||||
|
||||
//for performing mass actions
|
||||
public function massAction()
|
||||
{
|
||||
$make = [
|
||||
'operations' =>[
|
||||
// [
|
||||
// 'route' => 'datagrid/update',
|
||||
// 'method' => 'post',
|
||||
// 'label' => 'Update',
|
||||
// 'type' => 'select',
|
||||
// 'name' => 'status',
|
||||
// 'values' => [
|
||||
// [
|
||||
// 'label' => 'Enable',
|
||||
// 'value' => 1
|
||||
// ], [
|
||||
// 'label' => 'Disable',
|
||||
// 'value' => 0
|
||||
// ]
|
||||
// ],
|
||||
// ],
|
||||
[
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'method' => 'DELETE',
|
||||
'label' => 'Delete',
|
||||
'type' => 'button'
|
||||
]
|
||||
]
|
||||
];
|
||||
$result = DataGrid::makeMassAction($make);
|
||||
}
|
||||
|
||||
public function massDelete(Request $r)
|
||||
{
|
||||
return $r;
|
||||
public function massUpdate() {
|
||||
dd(request()->all());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ Route::group(['middleware' => ['web']], function () {
|
|||
'view' => 'admin::users.sessions.create'
|
||||
])->name('admin.session.create');
|
||||
|
||||
//login post route to admin auth controller
|
||||
Route::post('/login', 'Webkul\User\Http\Controllers\SessionController@store')->defaults('_config', [
|
||||
'redirect' => 'admin.dashboard.index'
|
||||
])->name('admin.session.store');
|
||||
|
||||
|
||||
// Forget Password Routes
|
||||
Route::get('/forget-password', 'Webkul\User\Http\Controllers\ForgetPasswordController@create')->defaults('_config', [
|
||||
'view' => 'admin::users.forget-password.create'
|
||||
|
|
@ -19,7 +19,6 @@ Route::group(['middleware' => ['web']], function () {
|
|||
|
||||
Route::post('/forget-password', 'Webkul\User\Http\Controllers\ForgetPasswordController@store')->name('admin.forget-password.store');
|
||||
|
||||
|
||||
// Reset Password Routes
|
||||
Route::get('/reset-password/{token}', 'Webkul\User\Http\Controllers\ResetPasswordController@create')->defaults('_config', [
|
||||
'view' => 'admin::users.reset-password.create'
|
||||
|
|
@ -36,13 +35,11 @@ Route::group(['middleware' => ['web']], function () {
|
|||
'redirect' => 'admin.session.create'
|
||||
])->name('admin.session.destroy');
|
||||
|
||||
|
||||
// Dashboard Route
|
||||
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'
|
||||
|
|
@ -250,6 +247,7 @@ Route::group(['middleware' => ['web']], function () {
|
|||
|
||||
Route::get('/attributes/delete/{id}', 'Webkul\Attribute\Http\Controllers\AttributeController@destroy')->name('admin.catalog.attributes.delete');
|
||||
|
||||
Route::delete('/attributes/massdelete', 'Webkul\Attribute\Http\Controllers\AttributeController@massDestroy')->name('admin.catalog.attributes.massdelete');
|
||||
|
||||
// Catalog Family Routes
|
||||
Route::get('/families', 'Webkul\Attribute\Http\Controllers\AttributeFamilyController@index')->defaults('_config', [
|
||||
|
|
@ -275,17 +273,6 @@ Route::group(['middleware' => ['web']], function () {
|
|||
Route::get('/families/delete/{id}', 'Webkul\Attribute\Http\Controllers\AttributeFamilyController@destroy')->name('admin.catalog.families.delete');
|
||||
});
|
||||
|
||||
|
||||
// Datagrid Routes
|
||||
|
||||
//for datagrid and its loading, filtering, sorting and queries
|
||||
Route::get('datagrid', 'Webkul\Admin\Http\Controllers\DataGridController@index')->name('admin.datagrid.index');
|
||||
|
||||
Route::any('datagrid/massaction/delete', 'Webkul\Admin\Http\Controllers\DataGridController@massDelete')->name('admin.datagrid.delete');
|
||||
|
||||
Route::any('datagrid/massaction/edit','Webkul\Admin\Http\Controllers\DataGridController@massUpdate')->name('admin.datagrid.edit');
|
||||
|
||||
|
||||
// User Routes
|
||||
Route::get('/users', 'Webkul\User\Http\Controllers\UserController@index')->defaults('_config', [
|
||||
'view' => 'admin::users.users.index'
|
||||
|
|
@ -379,6 +366,8 @@ Route::group(['middleware' => ['web']], function () {
|
|||
|
||||
Route::get('/currencies/delete/{id}', 'Webkul\Core\Http\Controllers\CurrencyController@destroy')->name('admin.currencies.delete');
|
||||
|
||||
Route::any('/currencies/massdelete', 'Webkul\Core\Http\Controllers\CurrencyController@massDestroy')->name('admin.currencies.massdelete');
|
||||
|
||||
|
||||
// Exchange Rates Routes
|
||||
Route::get('/exchange_rates', 'Webkul\Core\Http\Controllers\ExchangeRateController@index')->defaults('_config', [
|
||||
|
|
@ -476,11 +465,19 @@ Route::group(['middleware' => ['web']], function () {
|
|||
|
||||
// Admin Store Front Settings Route
|
||||
Route::get('/subscribers','Webkul\Core\Http\Controllers\SubscriptionController@index')->defaults('_config',[
|
||||
'view' => 'admin::settings.subscribers.index'
|
||||
])->name('admin.subscribers.index');
|
||||
'view' => 'admin::customers.subscribers.index'
|
||||
])->name('admin.customers.subscribers.index');
|
||||
|
||||
//destroy a newsletter subscription item
|
||||
Route::get('subscribers/delete/{id}', 'Webkul\Core\Http\Controllers\SubscriptionController@destroy');
|
||||
Route::get('subscribers/delete/{id}', 'Webkul\Core\Http\Controllers\SubscriptionController@destroy')->name('admin.customers.subscribers.delete');
|
||||
|
||||
Route::get('subscribers/edit/{id}', 'Webkul\Core\Http\Controllers\SubscriptionController@edit')->defaults('_config', [
|
||||
'view' => 'admin::customers.subscribers.edit'
|
||||
])->name('admin.customers.subscribers.edit');
|
||||
|
||||
Route::put('subscribers/update/{id}', 'Webkul\Core\Http\Controllers\SubscriptionController@update')->defaults('_config', [
|
||||
'redirect' => 'admin.customers.subscribers.index'
|
||||
])->name('admin.customers.subscribers.update');
|
||||
|
||||
//slider index
|
||||
Route::get('/slider','Webkul\Shop\Http\Controllers\SliderController@index')->defaults('_config',[
|
||||
|
|
@ -508,7 +505,7 @@ Route::group(['middleware' => ['web']], function () {
|
|||
])->name('admin.sliders.update');
|
||||
|
||||
//destroy a slider item
|
||||
Route::get('slider/delete/{id}', 'Webkul\Shop\Http\Controllers\SliderController@destroy');
|
||||
Route::get('slider/delete/{id}', 'Webkul\Shop\Http\Controllers\SliderController@destroy')->name('admin.sliders.delete');
|
||||
|
||||
//tax routes
|
||||
Route::get('/tax-categories', 'Webkul\Tax\Http\Controllers\TaxController@index')->defaults('_config', [
|
||||
|
|
|
|||
|
|
@ -96,6 +96,12 @@ class EventServiceProvider extends ServiceProvider
|
|||
'route' => 'admin.customer.review.index',
|
||||
'sort' => 3,
|
||||
'icon-class' => '',
|
||||
], [
|
||||
'key' => 'customers.subscribers',
|
||||
'name' => 'Newsletter Subscription',
|
||||
'route' => 'admin.customers.subscribers.index',
|
||||
'sort' => 4,
|
||||
'icon-class' => '',
|
||||
], [
|
||||
'key' => 'configuration',
|
||||
'name' => 'Configure',
|
||||
|
|
@ -200,13 +206,7 @@ class EventServiceProvider extends ServiceProvider
|
|||
'route' => 'admin.tax-rates.index',
|
||||
'sort' => 2,
|
||||
'icon-class' => '',
|
||||
], [
|
||||
'key' => 'settings.subscribers',
|
||||
'name' => 'Newsletter Subscription',
|
||||
'route' => 'admin.subscribers.index',
|
||||
'sort' => 9,
|
||||
'icon-class' => '',
|
||||
],
|
||||
]
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
|
||||
return [
|
||||
'common' => [
|
||||
'no-result-found' => 'We couldn\'t find any records.',
|
||||
'no-result-found' => 'We could not find any records.',
|
||||
'country' => 'Country',
|
||||
'state' => 'State'
|
||||
'state' => 'State',
|
||||
'true' => 'True',
|
||||
'false' => 'False'
|
||||
],
|
||||
'dashboard' => [
|
||||
'title' => 'Dashboard',
|
||||
|
|
@ -27,6 +29,15 @@ return [
|
|||
'stock-threshold' => 'Stock Threshold',
|
||||
'qty-left' => ':qty Left',
|
||||
],
|
||||
|
||||
'datagrid' => [
|
||||
'mass-ops' => [
|
||||
'method-error' => 'Error! Wrong method detected, please check mass action configuration',
|
||||
'delete-success' => 'Selected index of :resource were successfully deleted',
|
||||
'partial-action' => 'Some actions were not performed due restricted system constraints on :resource'
|
||||
]
|
||||
],
|
||||
|
||||
'account' => [
|
||||
'title' => 'My Account',
|
||||
'save-btn-title' => 'Save',
|
||||
|
|
@ -498,10 +509,6 @@ return [
|
|||
'update-error' => 'Error! Tax Rate Cannot Be Updated',
|
||||
'delete' => 'Tax Rate Deleted Successfully',
|
||||
'atleast-one' => 'Cannot Delete Last Tax Rate'
|
||||
],
|
||||
|
||||
'subscribers' => [
|
||||
'title' => 'News Letter Subscribers'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
@ -540,6 +547,15 @@ return [
|
|||
'rating' => 'Rating',
|
||||
'status' => 'Status',
|
||||
'comment' => 'Comment'
|
||||
],
|
||||
'subscribers' => [
|
||||
'title' => 'News Letter Subscribers',
|
||||
'title-edit' => 'Edit News Letter Subscriber',
|
||||
'email' => 'Email',
|
||||
'is_subscribed' => 'Subscribed',
|
||||
'edit-btn-title' => 'Update Subscriber',
|
||||
'update-success' => 'You updated subscriber',
|
||||
'update-failed' => 'Error! You cannot unsubscribed the subscriber'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
@inject('review','Webkul\Admin\DataGrids\ProductReviewDataGrid')
|
||||
@inject('review','Webkul\Admin\DataGrids\CustomerReviewDataGrid')
|
||||
{!! $review->render() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
@extends('admin::layouts.content')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.customers.subscribers.title-edit') }}
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="content">
|
||||
<form method="POST" action="{{ route('admin.customers.subscribers.update', $subscriber->id) }}" @submit.prevent="onSubmit" enctype="multipart/form-data">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.customers.subscribers.title-edit') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
<button type="submit" class="btn btn-lg btn-primary">
|
||||
{{ __('admin::app.customers.subscribers.edit-btn-title') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@csrf
|
||||
@method('PUT')
|
||||
|
||||
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
|
||||
<label for="title">{{ __('admin::app.customers.subscribers.email') }}</label>
|
||||
<input type="text" class="control" name="email" v-validate="'required'" data-vv-as=""{{ __('admin::app.customers.subscribers.email') }}"" value="{{ $subscriber->email ?: old('email') }}" disabled>
|
||||
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('is_subscribed') ? 'has-error' : '']">
|
||||
<label for="title">{{ __('admin::app.customers.subscribers.is_subscribed') }}</label>
|
||||
|
||||
<select class="control" name="is_subscribed" v-validate="'required'" data-vv-as=""{{ __('admin::app.customers.subscribers.is_subscribed') }}"">
|
||||
<option value="1" @if($subscriber->is_subscribed == 1) selected @endif>{{ __('admin::app.common.true') }}</option>
|
||||
<option value="0" @if($subscriber->is_subscribed == 0) selected @endif>{{ __('admin::app.common.false') }}</option>
|
||||
</select>
|
||||
|
||||
<span class="control-error" v-if="errors.has('is_subscribed')">@{{ errors.first('is_subscribed') }}</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('admin::layouts.content')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.settings.subscribers.title') }}
|
||||
{{ __('admin::app.customers.subscribers.title') }}
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
|
@ -10,12 +10,12 @@
|
|||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.settings.subscribers.title') }}</h1>
|
||||
<h1>{{ __('admin::app.customers.subscribers.title') }}</h1>
|
||||
</div>
|
||||
|
||||
{{-- <div class="page-action">
|
||||
<a href="{{ route('admin.subscribers.store') }}" class="btn btn-lg btn-primary">
|
||||
{{ __('admin::app.settings.subscribers.add-title') }}
|
||||
{{ __('admin::app.customers.subscribers.add-title') }}
|
||||
</a>
|
||||
</div> --}}
|
||||
</div>
|
||||
|
|
@ -42,6 +42,8 @@
|
|||
window.flashMessages = [{'type': 'alert-warning', 'message': "{{ $warning }}" }];
|
||||
@elseif($error = session('error'))
|
||||
window.flashMessages = [{'type': 'alert-error', 'message': "{{ $error }}" }];
|
||||
@elseif($info = session('info'))
|
||||
window.flashMessages = [{'type': 'alert-error', 'message': "{{ $info }}" }];
|
||||
@endif
|
||||
|
||||
window.serverErrors = [];
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
@stop
|
||||
|
||||
@section('content')
|
||||
<div class="content full-page">
|
||||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.sales.invoices.title') }}</h1>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
@stop
|
||||
|
||||
@section('content')
|
||||
<div class="content full-page">
|
||||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.sales.orders.title') }}</h1>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
@stop
|
||||
|
||||
@section('content')
|
||||
<div class="content full-page">
|
||||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.sales.shipments.title') }}</h1>
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ class AttributeController extends Controller
|
|||
public function destroy($id)
|
||||
{
|
||||
$attribute = $this->attribute->findOrFail($id);
|
||||
|
||||
|
||||
if(!$attribute->is_user_defined) {
|
||||
session()->flash('error', 'Can not delete system attribute.');
|
||||
} else {
|
||||
|
|
@ -143,4 +143,38 @@ class AttributeController extends Controller
|
|||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resources from database
|
||||
*
|
||||
* @return response \Illuminate\Http\Response
|
||||
*/
|
||||
public function massDestroy() {
|
||||
$suppressFlash = false;
|
||||
|
||||
if(request()->isMethod('delete')) {
|
||||
$indexes = explode(',', request()->input('indexes'));
|
||||
|
||||
foreach($indexes as $key => $value) {
|
||||
try {
|
||||
$this->attribute->delete($value);
|
||||
} catch(\Exception $e) {
|
||||
$suppressFlash = true;
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$suppressFlash)
|
||||
session()->flash('success', trans('admin::app.datagrid.mass-ops.delete-success'));
|
||||
else
|
||||
session()->flash('info', trans('admin::app.datagrid.mass-ops.partial-action', ['resource' => 'attributes']));
|
||||
|
||||
return redirect()->back();
|
||||
} else {
|
||||
session()->flash('error', trans('admin::app.datagrid.mass-ops.method-error'));
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -149,4 +149,38 @@ class AttributeFamilyController extends Controller
|
|||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resources from database
|
||||
*
|
||||
* @return response \Illuminate\Http\Response
|
||||
*/
|
||||
public function massDestroy() {
|
||||
$suppressFlash = false;
|
||||
|
||||
if(request()->isMethod('delete')) {
|
||||
$indexes = explode(',', request()->input('indexes'));
|
||||
|
||||
foreach($indexes as $key => $value) {
|
||||
try {
|
||||
$this->attributeFamily->delete($value);
|
||||
} catch(\Exception $e) {
|
||||
$suppressFlash = true;
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$suppressFlash)
|
||||
session()->flash('success', trans('admin::app.datagrid.mass-ops.delete-success'));
|
||||
else
|
||||
session()->flash('info', trans('admin::app.datagrid.mass-ops.partial-action', ['resource' => 'Attribute Family']));
|
||||
|
||||
return redirect()->back();
|
||||
} else {
|
||||
session()->flash('error', trans('admin::app.datagrid.mass-ops.method-error'));
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -139,4 +139,38 @@ class CategoryController extends Controller
|
|||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resources from database
|
||||
*
|
||||
* @return response \Illuminate\Http\Response
|
||||
*/
|
||||
public function massDestroy() {
|
||||
$suppressFlash = false;
|
||||
|
||||
if(request()->isMethod('delete')) {
|
||||
$indexes = explode(',', request()->input('indexes'));
|
||||
|
||||
foreach($indexes as $key => $value) {
|
||||
try {
|
||||
$this->category->delete($value);
|
||||
} catch(\Exception $e) {
|
||||
$suppressFlash = true;
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$suppressFlash)
|
||||
session()->flash('success', trans('admin::app.datagrid.mass-ops.delete-success'));
|
||||
else
|
||||
session()->flash('info', trans('admin::app.datagrid.mass-ops.partial-action', ['resource' => 'Attribute Family']));
|
||||
|
||||
return redirect()->back();
|
||||
} else {
|
||||
session()->flash('error', trans('admin::app.datagrid.mass-ops.method-error'));
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -409,12 +409,18 @@ class Cart {
|
|||
public function mergeCart()
|
||||
{
|
||||
if(session()->has('cart')) {
|
||||
$cart = $this->cart->findOneByField('customer_id', auth()->guard('customer')->user()->id);
|
||||
$cart = $this->cart->findWhere(['customer_id' => auth()->guard('customer')->user()->id, 'is_active' => 1]);
|
||||
|
||||
if($cart->count()) {
|
||||
$cart = $cart->first();
|
||||
} else {
|
||||
$cart = false;
|
||||
}
|
||||
|
||||
$guestCart = session()->get('cart');
|
||||
|
||||
//when the logged in customer is not having any of the cart instance previously and are active.
|
||||
if(!isset($cart)) {
|
||||
if(!$cart) {
|
||||
$guestCart->update([
|
||||
'customer_id' => auth()->guard('customer')->user()->id,
|
||||
'is_guest' => 0,
|
||||
|
|
|
|||
|
|
@ -125,14 +125,47 @@ class CurrencyController extends Controller
|
|||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
if($this->currency->count() == 1) {
|
||||
session()->flash('error', 'At least one currency is required.');
|
||||
} else {
|
||||
$this->currency->delete($id);
|
||||
$result = $this->currency->delete($id);
|
||||
|
||||
if($result)
|
||||
session()->flash('success', 'Currency deleted successfully.');
|
||||
}
|
||||
else
|
||||
session()->flash('error', 'At least one currency is required.');
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resources from database
|
||||
*
|
||||
* @return response \Illuminate\Http\Response
|
||||
*/
|
||||
public function massDestroy() {
|
||||
$suppressFlash = false;
|
||||
|
||||
if(request()->isMethod('delete')) {
|
||||
$indexes = explode(',', request()->input('indexes'));
|
||||
|
||||
foreach($indexes as $key => $value) {
|
||||
try {
|
||||
$this->currency->delete($value);
|
||||
} catch(\Exception $e) {
|
||||
$suppressFlash = true;
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$suppressFlash)
|
||||
session()->flash('success', trans('admin::app.datagrid.mass-ops.delete-success', ['resource' => 'currencies']));
|
||||
else
|
||||
session()->flash('info', trans('admin::app.datagrid.mass-ops.partial-action', ['resource' => 'currencies']));
|
||||
|
||||
return redirect()->back();
|
||||
} else {
|
||||
session()->flash('error', trans('admin::app.datagrid.mass-ops.method-error'));
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -46,6 +46,41 @@ class SubscriptionController extends Controller
|
|||
return view($this->_config['view']);
|
||||
}
|
||||
|
||||
/**
|
||||
* To unsubscribe the user without deleting the resource of the subscribed user
|
||||
*
|
||||
* @param integer $id
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function edit($id) {
|
||||
$subscriber = $this->subscribers->findOneByField('id', $id);
|
||||
|
||||
return view($this->_config['view'])->with('subscriber', $subscriber);
|
||||
}
|
||||
|
||||
/**
|
||||
* To unsubscribe the user without deleting the resource of the subscribed user
|
||||
*
|
||||
* @param integer $id
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function update($id) {
|
||||
$data = request()->all();
|
||||
|
||||
$subscriber = $this->subscribers->findOneByField('id', $id);
|
||||
|
||||
$result = $subscriber->update($data);
|
||||
|
||||
if($result)
|
||||
session()->flash('success', trans('admin::app.settings.subscribers.update-success'));
|
||||
else
|
||||
session()->flash('error', trans('admin::app.settings.subscribers.update-failed'));
|
||||
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
<?php
|
||||
|
||||
namespace Webkul\Core\Repositories;
|
||||
|
||||
|
||||
use Webkul\Core\Eloquent\Repository;
|
||||
|
||||
/**
|
||||
|
|
@ -21,4 +21,17 @@ class CurrencyRepository extends Repository
|
|||
{
|
||||
return 'Webkul\Core\Models\Currency';
|
||||
}
|
||||
|
||||
public function delete($id) {
|
||||
if($this->model->count() == 1) {
|
||||
return false;
|
||||
} else {
|
||||
if($this->model->destroy($id)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -29,14 +29,16 @@
|
|||
@php
|
||||
$image = $productImageHelper->getProductBaseImage($item->product);
|
||||
@endphp
|
||||
<a href="{{ url()->to('/').'/products/'.$item->product->url_key }}" title="{{ $item->product->name }}">
|
||||
<img class="media" src="{{ $image['small_image_url'] }}" />
|
||||
</a>
|
||||
{{-- <a href="{{ url()->to('/').'/products/'.$item->product->url_key }}" title="{{ $item->product->name }}">
|
||||
|
||||
</a> --}}
|
||||
<div class="info">
|
||||
<div class="product-name">
|
||||
<a href="{{ url()->to('/').'/products/'.$item->product->url_key }}" title="{{ $item->product->name }}">
|
||||
{{$item->product->name}}
|
||||
</a>
|
||||
{{$item->product->name}}
|
||||
{{-- <a href="{{ url()->to('/').'/products/'.$item->product->url_key }}" title="{{ $item->product->name }}">
|
||||
|
||||
</a> --}}
|
||||
</div>
|
||||
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
|
||||
<span class="stars" style="display: inline">
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,11 @@
|
|||
<?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 51.1 (57501) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>Icon-Delete</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Icon-Delete" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M12.5,18 C15.9978034,18 19.1644701,16 22,12 C19.1644701,8 15.9978034,6 12.5,6 C9.00219658,6 5.83552992,8 3,12 C5.83552992,16 9.00219658,18 12.5,18 Z" id="Oval" stroke="#979797" stroke-width="2"></path>
|
||||
<circle id="Oval-13" stroke="#979797" stroke-width="2" cx="12.1389974" cy="12.1389974" r="2.1389974"></circle>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 842 B |
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/ui.js": "/js/ui.js?id=b25a07d206dd0b89048f",
|
||||
"/css/ui.css": "/css/ui.css?id=856413ffffbe95f7b91d"
|
||||
"/css/ui.css": "/css/ui.css?id=8d70cfd8a1966fa0e9f8"
|
||||
}
|
||||
|
|
@ -749,8 +749,6 @@ class DataGrid
|
|||
$this->getQueryWithFilters();
|
||||
}
|
||||
|
||||
$this->results = $this->query->get();
|
||||
|
||||
$this->results = $this->query->paginate($this->perpage)->appends(request()->except('page'));
|
||||
|
||||
return $this->results;
|
||||
|
|
@ -767,8 +765,6 @@ class DataGrid
|
|||
$this->getQueryWithFilters();
|
||||
}
|
||||
|
||||
$this->results = $this->query->get();
|
||||
|
||||
$this->results = $this->query->paginate($this->perpage)->appends(request()->except('page'));
|
||||
|
||||
return $this->results;
|
||||
|
|
@ -782,13 +778,14 @@ class DataGrid
|
|||
*
|
||||
* @return view
|
||||
*/
|
||||
|
||||
public function render()
|
||||
{
|
||||
$this->getDbQueryResults();
|
||||
|
||||
return view('ui::datagrid.index', [
|
||||
'css' => $this->css,
|
||||
'table' => $this->table,
|
||||
'name' => $this->name,
|
||||
'results' => $this->results,
|
||||
'columns' => $this->columns,
|
||||
'filterable' =>$this->filterable,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
<?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 51.1 (57501) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>Icon-Delete</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Icon-Delete" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M12.5,18 C15.9978034,18 19.1644701,16 22,12 C19.1644701,8 15.9978034,6 12.5,6 C9.00219658,6 5.83552992,8 3,12 C5.83552992,16 9.00219658,18 12.5,18 Z" id="Oval" stroke="#979797" stroke-width="2"></path>
|
||||
<circle id="Oval-13" stroke="#979797" stroke-width="2" cx="12.1389974" cy="12.1389974" r="2.1389974"></circle>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 842 B |
|
|
@ -353,6 +353,8 @@ h2 {
|
|||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -209,14 +209,10 @@
|
|||
align-items: center;
|
||||
|
||||
.massaction-remove {
|
||||
margin-top: 10px;
|
||||
margin-top: 4px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
form {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.selected-items {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,6 +99,12 @@
|
|||
height: 24px;
|
||||
}
|
||||
|
||||
.eye-icon {
|
||||
background-image: url("../images/Icon-eye.svg");
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.search-icon {
|
||||
background-image: url("../images/icon-search.svg");
|
||||
width: 24px;
|
||||
|
|
|
|||
|
|
@ -8,26 +8,39 @@
|
|||
@endif
|
||||
@foreach ($results as $result)
|
||||
<tr>
|
||||
{{-- <td class="">
|
||||
@if(count($massoperations))
|
||||
<td>
|
||||
<span class="checkbox">
|
||||
<input type="checkbox" class="indexers" id="{{ $result->id }}" name="checkbox[]">
|
||||
<label class="checkbox-view" for="checkbox1"></label>
|
||||
</span>
|
||||
</td> --}}
|
||||
</td>
|
||||
@endif
|
||||
@foreach ($columns as $column)
|
||||
@if(isset($column->closure))
|
||||
@if($column->closure == true)
|
||||
<td class="">{!! $column->render($result) !!}</td>
|
||||
<td>{!! $column->render($result) !!}</td>
|
||||
@endif
|
||||
@else
|
||||
<td class="">{{ $column->render($result) }}</td>
|
||||
<td>{{ $column->render($result) }}</td>
|
||||
@endif
|
||||
@endforeach
|
||||
@if(count($actions))
|
||||
<td class="action">
|
||||
@foreach($actions as $action)
|
||||
<a @if($action['type'] == "Edit") href="{{ url()->current().'/edit/'.$result->id }}" @elseif($action['type'] == "View") href="{{ url()->current().'/view/'.$result->id }}" @elseif($action['type']=="Delete") href="{{ url()->current().'/delete/'.$result->id }}" @endif class="Action-{{ $action['type'] }}" id="{{ $result->id }}" onclick="return confirm_click('{{ $action['confirm_text'] }}');">
|
||||
<i class="{{ $action['icon'] }}"></i>
|
||||
<a
|
||||
href="{{ route($action['route'], $result->id) }}"
|
||||
class="Action-{{ $action['type'] }}"
|
||||
id="{{ $result->id }}"
|
||||
@if(isset($action['confirm_text']))
|
||||
onclick="return confirm_click('{{ $action['confirm_text'] }}');"
|
||||
@endif
|
||||
>
|
||||
<i
|
||||
@if(isset($action['icon-alt']))
|
||||
title="{{ $action['icon-alt'] }}"
|
||||
@endif
|
||||
class="{{ $action['icon'] }}"></i>
|
||||
</a>
|
||||
@endforeach
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<thead>
|
||||
{{-- <tr class="mass-action" style="display: none; height:63px;">
|
||||
<th colspan="{{ count($columns)+1 }}">
|
||||
@if(count($massoperations))
|
||||
<tr class="mass-action" style="display: none; height:63px;">
|
||||
<th colspan="{{ count($columns)+1 }}" style="width: 100%;">
|
||||
<div class="mass-action-wrapper">
|
||||
|
||||
<span class="massaction-remove">
|
||||
|
|
@ -11,8 +12,8 @@
|
|||
@if($massoperation['type'] == "button")
|
||||
|
||||
<form onsubmit="return confirm('Are You Sure?');"
|
||||
@if(strtoupper($massoperation[ 'method'])=="GET" || strtoupper($massoperation['method'])=="POST" )
|
||||
method="{{ strtoupper($massoperation['method']) }}"
|
||||
@if(strtoupper($massoperation['method']) == "GET")
|
||||
method="GET"
|
||||
@else
|
||||
method="POST"
|
||||
@endif
|
||||
|
|
@ -27,6 +28,8 @@
|
|||
|
||||
@endif
|
||||
|
||||
<input type="hidden" value="{{ $table }}" name="table_name">
|
||||
|
||||
<input type="hidden" id="indexes" name="indexes" value="">
|
||||
|
||||
<input class="btn btn-primary btn-sm" type="submit" value="Delete">
|
||||
|
|
@ -67,14 +70,17 @@
|
|||
@endforeach
|
||||
</div>
|
||||
</th>
|
||||
</tr> --}}
|
||||
</tr>
|
||||
@endif
|
||||
<tr class="table-grid-header">
|
||||
{{-- <th>
|
||||
@if(count($massoperations))
|
||||
<th>
|
||||
<span class="checkbox">
|
||||
<input type="checkbox" id="mastercheckbox">
|
||||
<label class="checkbox-view" for="checkbox"></label>
|
||||
</span>
|
||||
</th> --}}
|
||||
</th>
|
||||
@endif
|
||||
@foreach ($columns as $column)
|
||||
@if($column->sortable == "true")
|
||||
<th class="grid_head sortable"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace Webkul\User\Http\Middleware;
|
|||
|
||||
use Closure;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Route;
|
||||
|
||||
class Bouncer
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue