laoder changes
This commit is contained in:
parent
997a55e26e
commit
dde2a626e6
|
|
@ -64,8 +64,7 @@ Route::group(['middleware' => ['web']], function () {
|
|||
'redirect' => 'admin.customer.index'
|
||||
])->name('admin.customer.update');
|
||||
|
||||
Route::get('customers/delete/{id}', 'Webkul\Admin\Http\Controllers\CustomerController@destroy')->name('admin.customer.delete');
|
||||
|
||||
Route::get('customer/delete/{id}', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@destroy')->name('admin.customer.delete');
|
||||
|
||||
Route::get('reviews', 'Webkul\Product\Http\Controllers\ReviewController@index')->defaults('_config',[
|
||||
'view' => 'admin::customers.review.index'
|
||||
|
|
@ -262,6 +261,8 @@ Route::group(['middleware' => ['web']], function () {
|
|||
'redirect' => 'admin.users.index'
|
||||
])->name('admin.users.update');
|
||||
|
||||
Route::get('/users/delete/{id}', 'Webkul\User\Http\Controllers\UserController@destroy')->name('admin.users.delete');
|
||||
|
||||
|
||||
// User Role Routes
|
||||
Route::get('/roles', 'Webkul\User\Http\Controllers\RoleController@index')->defaults('_config', [
|
||||
|
|
@ -410,6 +411,7 @@ Route::group(['middleware' => ['web']], function () {
|
|||
'redirect' => 'admin::sliders.index'
|
||||
])->name('admin.sliders.store');
|
||||
|
||||
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', [
|
||||
|
|
@ -433,6 +435,8 @@ Route::group(['middleware' => ['web']], function () {
|
|||
'redirect' => 'admin.tax-categories.index'
|
||||
])->name('admin.tax-categories.update');
|
||||
|
||||
Route::get('/tax-categories/delete/{id}', 'Webkul\Tax\Http\Controllers\TaxCategoryController@destroy')->name('admin.tax-categories.delete');
|
||||
|
||||
//tax category ends
|
||||
|
||||
|
||||
|
|
@ -456,6 +460,8 @@ Route::group(['middleware' => ['web']], function () {
|
|||
Route::put('tax-rates/update/{id}', 'Webkul\Tax\Http\Controllers\TaxRateController@update')->defaults('_config', [
|
||||
'redirect' => 'admin.tax-rates.index'
|
||||
])->name('admin.tax-rates.update');
|
||||
|
||||
Route::get('/tax-rates/delete/{id}', 'Webkul\Tax\Http\Controllers\TaxRateController@destroy')->name('admin.tax-rates.delete');
|
||||
//tax rate ends
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -265,6 +265,7 @@ return [
|
|||
'meta_title' => 'Meta Title',
|
||||
'meta_description' => 'Meta Description',
|
||||
'meta_keywords' => 'Meta Keywords',
|
||||
'image' => 'Image',
|
||||
]
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,12 @@
|
|||
<span class="control-error" v-if="errors.has('description')">@{{ errors.first('description') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{ __('admin::app.catalog.categories.image') }}
|
||||
|
||||
<image-wrapper :button-label="'{{ __('admin::app.catalog.products.add-image-btn-title') }}'" input-name="image" :multiple="false"></image-wrapper>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<div class="content">
|
||||
<?php $locale = request()->get('locale') ?: app()->getLocale(); ?>
|
||||
|
||||
<form method="POST" action="" @submit.prevent="onSubmit">
|
||||
<form method="POST" action="" @submit.prevent="onSubmit" enctype="multipart/form-data">
|
||||
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
|
|
@ -79,6 +79,13 @@
|
|||
<span class="control-error" v-if="errors.has('{{$locale}}[description]')">@{{ errors.first('{!!$locale!!}[description]') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{ __('admin::app.catalog.categories.image') }}
|
||||
|
||||
<image-wrapper :button-label="'{{ __('admin::app.catalog.products.add-image-btn-title') }}'" input-name="image" :multiple="false"></image-wrapper>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,5 +11,5 @@ class Category extends TranslatableModel
|
|||
|
||||
public $translatedAttributes = ['name', 'description', 'slug', 'meta_title', 'meta_description', 'meta_keywords'];
|
||||
|
||||
protected $fillable = ['position', 'status', 'parent_id','image'];
|
||||
protected $fillable = ['position', 'status', 'parent_id'];
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
<?php
|
||||
|
||||
namespace Webkul\Category\Repositories;
|
||||
|
||||
|
||||
use Webkul\Core\Eloquent\Repository;
|
||||
use Webkul\Category\Models\Category;
|
||||
use Illuminate\Container\Container as App;
|
||||
|
|
@ -44,7 +44,7 @@ class CategoryRepository extends Repository
|
|||
{
|
||||
if(isset($data['locale']) && $data['locale'] == 'all') {
|
||||
$model = app()->make($this->model());
|
||||
|
||||
|
||||
foreach(core()->getAllLocales() as $locale) {
|
||||
foreach ($model->translatedAttributes as $attribute) {
|
||||
if(isset($data[$attribute])) {
|
||||
|
|
@ -54,7 +54,11 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
}
|
||||
|
||||
return $this->model->create($data);
|
||||
$category = $this->model->create($data);
|
||||
|
||||
$this->uploadImages($data, $category);
|
||||
|
||||
return $category;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -99,4 +103,52 @@ class CategoryRepository extends Repository
|
|||
get_class($this->model), $slug
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @param $id
|
||||
* @param string $attribute
|
||||
* @return mixed
|
||||
*/
|
||||
public function update(array $data, $id, $attribute = "id")
|
||||
{
|
||||
$category = $this->find($id);
|
||||
|
||||
$category->update($data);
|
||||
|
||||
$this->uploadImages($data, $category);
|
||||
|
||||
return $category;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @param mixed $category
|
||||
* @return void
|
||||
*/
|
||||
public function uploadImages($data, $category,$type = "image")
|
||||
{
|
||||
if(isset($data[$type])) {
|
||||
foreach ($data[$type] as $imageId => $image) {
|
||||
$file = $type . '.' . $imageId;
|
||||
$dir = 'category/' . $category->id;
|
||||
|
||||
if(request()->hasFile($file)) {
|
||||
if($category->{$type}) {
|
||||
Storage::delete($category->{$type});
|
||||
}
|
||||
|
||||
$category->{$type} = request()->file($file)->store($dir);
|
||||
$category->save();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if($category->{$type}) {
|
||||
Storage::delete($category->{$type});
|
||||
}
|
||||
|
||||
$category->{$type} = null;
|
||||
$category->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -79,7 +79,7 @@ class ChannelController extends Controller
|
|||
'currencies' => 'required|array|min:1',
|
||||
'base_currency_id' => 'required'
|
||||
]);
|
||||
|
||||
|
||||
$this->channel->create(request()->all());
|
||||
|
||||
session()->flash('success', 'Channel created successfully.');
|
||||
|
|
|
|||
|
|
@ -140,6 +140,14 @@ class ExchangeRateController extends Controller
|
|||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->exchangeRate->delete($id);
|
||||
if($this->exchangeRate->count() == 1) {
|
||||
session()->flash('error', 'At least one Exchange rate is required.');
|
||||
} else {
|
||||
$this->exchangeRate->delete($id);
|
||||
|
||||
session()->flash('success', 'Exchange rate deleted successfully.');
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
<?php
|
||||
|
||||
namespace Webkul\Core\Repositories;
|
||||
|
||||
|
||||
use Webkul\Core\Eloquent\Repository;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
|
|
@ -72,6 +72,7 @@ class ChannelRepository extends Repository
|
|||
*/
|
||||
public function uploadImages($data, $channel, $type = "logo")
|
||||
{
|
||||
|
||||
if(isset($data[$type])) {
|
||||
foreach ($data[$type] as $imageId => $image) {
|
||||
$file = $type . '.' . $imageId;
|
||||
|
|
|
|||
|
|
@ -57,4 +57,23 @@ class SliderController extends controller
|
|||
session()->flash('success', 'Slider created successfully.');
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
if($this->slider->count() == 1) {
|
||||
session()->flash('error', 'At least one slider is required.');
|
||||
} else {
|
||||
$this->slider->delete($id);
|
||||
|
||||
session()->flash('success', 'Slider deleted successfully.');
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
|
|
@ -2052,3 +2052,80 @@ section.review {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 770px) {
|
||||
.account-content {
|
||||
flex-direction: column;
|
||||
|
||||
.account-side-menu {
|
||||
display: none;
|
||||
width:100%;
|
||||
border: none;
|
||||
|
||||
li {
|
||||
margin-left: 0%;
|
||||
width: 100%;
|
||||
|
||||
a {
|
||||
color : $font-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.responsive-side-menu {
|
||||
cursor: pointer;
|
||||
padding-top:13px;
|
||||
display: block;
|
||||
height: 46px;
|
||||
border-bottom: 1px solid $border-color;
|
||||
border-top: 1px solid $border-color;
|
||||
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
.account-layout {
|
||||
margin-left: 0%;
|
||||
margin-top: 20px;
|
||||
|
||||
.account-head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid $border-color;
|
||||
border-top: 1px solid $border-color;
|
||||
height: 46px;
|
||||
|
||||
.back-icon {
|
||||
display: block;
|
||||
}
|
||||
|
||||
span {
|
||||
margin-top: 12px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.horizontal-rule {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.account-table-content {
|
||||
margin-top: 2%;
|
||||
|
||||
table tbody tr {
|
||||
display: grid;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.account-items-list , .edit-form {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.control-group .control {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="responsive-side-menu" id="responsive-side-menu">
|
||||
<div class="responsive-side-menu" id="responsive-side-menu" style="display: none">
|
||||
Menu
|
||||
<i class="icon icon-arrow-down right" id="down-icon"></i>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class TaxCategoryController extends Controller
|
|||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
TaxCategory $taxCategory,
|
||||
TaxCategory $taxCategory,
|
||||
TaxRate $taxRate,
|
||||
TaxMap $taxMap
|
||||
)
|
||||
|
|
@ -165,16 +165,21 @@ class TaxCategoryController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Destroy a tax category
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @return mixed
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
if($this->taxCategory->count() == 1) {
|
||||
session()->flash('error', 'At least one tax category is required.');
|
||||
} else {
|
||||
$this->taxCategorye->delete($id);
|
||||
|
||||
public function destroy($id) {
|
||||
if($this->taxCategory()->delete($id)) {
|
||||
session()->flash('success', 'The tax category is successfully deleted');
|
||||
|
||||
return redirect()->back();
|
||||
session()->flash('success', 'Tax category deleted successfully.');
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
|
|
@ -86,7 +86,4 @@ class TaxController extends Controller
|
|||
{
|
||||
return view($this->_config['view']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -152,6 +152,25 @@ class TaxRateController extends Controller
|
|||
return redirect()->back();
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
if($this->taxRate->count() == 1) {
|
||||
session()->flash('error', 'At least one tax rate is required.');
|
||||
} else {
|
||||
$this->taxRate->delete($id);
|
||||
|
||||
session()->flash('success', 'Tax rate deleted successfully.');
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
|
|
@ -825,9 +825,10 @@ h2 {
|
|||
height: 48px;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
margin-left: 18.5%;
|
||||
margin-top: 15%;
|
||||
position: relative;
|
||||
margin-left: 46%;
|
||||
margin-top: 35%;
|
||||
margin-bottom: 35%;
|
||||
}
|
||||
|
||||
.cp-round:before {
|
||||
|
|
|
|||
|
|
@ -2733,3 +2733,73 @@ section.review .review-layouter .review-form .review-detail .rating-calculate .p
|
|||
.sale-container .totals .sale-summary tr.border td {
|
||||
border-bottom: 1px solid #C7C7C7;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 770px) {
|
||||
.account-content {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
.account-content .account-side-menu {
|
||||
display: none;
|
||||
width: 100%;
|
||||
border: none;
|
||||
}
|
||||
.account-content .account-side-menu li {
|
||||
margin-left: 0%;
|
||||
width: 100%;
|
||||
}
|
||||
.account-content .account-side-menu li a {
|
||||
color: #242424;
|
||||
}
|
||||
.account-content .responsive-side-menu {
|
||||
cursor: pointer;
|
||||
padding-top: 13px;
|
||||
display: block;
|
||||
height: 46px;
|
||||
border-bottom: 1px solid #C7C7C7;
|
||||
border-top: 1px solid #C7C7C7;
|
||||
}
|
||||
.account-content .responsive-side-menu .right {
|
||||
float: right;
|
||||
}
|
||||
.account-content .account-layout {
|
||||
margin-left: 0%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.account-content .account-layout .account-head {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #C7C7C7;
|
||||
border-top: 1px solid #C7C7C7;
|
||||
height: 46px;
|
||||
}
|
||||
.account-content .account-layout .account-head .back-icon {
|
||||
display: block;
|
||||
}
|
||||
.account-content .account-layout .account-head span {
|
||||
margin-top: 12px;
|
||||
font-size: 18px;
|
||||
}
|
||||
.account-content .account-layout .account-head .horizontal-rule {
|
||||
display: none;
|
||||
}
|
||||
.account-content .account-layout .account-table-content {
|
||||
margin-top: 2%;
|
||||
}
|
||||
.account-content .account-layout .account-table-content table tbody tr {
|
||||
display: grid;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.account-content .account-items-list, .account-content .edit-form {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.account-content .control-group .control {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/shop.js": "/js/shop.js",
|
||||
"/css/shop.css": "/css/shop.css"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue