Merge branch 'master' of https://github.com/bagisto/bagisto into development
|
|
@ -1,12 +1,12 @@
|
|||
/*!
|
||||
* Sizzle CSS Selector Engine v2.3.5
|
||||
* Sizzle CSS Selector Engine v2.3.6
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://js.foundation/
|
||||
*
|
||||
* Date: 2020-03-14
|
||||
* Date: 2021-02-16
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
|
@ -16,17 +16,17 @@
|
|||
*/
|
||||
|
||||
/*!
|
||||
* jQuery JavaScript Library v3.5.1
|
||||
* jQuery JavaScript Library v3.6.0
|
||||
* https://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Copyright OpenJS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2020-05-04T22:49Z
|
||||
* Date: 2021-03-02T17:08Z
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/admin.js": "/js/admin.js?id=e4c3d46b82083613b407",
|
||||
"/css/admin.css": "/css/admin.css?id=f2b20e4283a639808ef6"
|
||||
"/js/admin.js": "/js/admin.js?id=c156943c5badc7f93027",
|
||||
"/css/admin.css": "/css/admin.css?id=f762f47b1bbc81ec1f84"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ Vue.use(VeeValidate, {
|
|||
});
|
||||
Vue.prototype.$http = axios
|
||||
|
||||
Vue.component('nav-slide-button', require('./components/navigation/nav-slide-button').default);
|
||||
Vue.component('required-if', require('./components/validators/required-if').default);
|
||||
|
||||
window.eventBus = new Vue();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,57 @@
|
|||
<template>
|
||||
<span class="toggle-aside-nav" @click="toggle">
|
||||
<i class="icon" :class="iconClass"></i>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.toggle-aside-nav {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
left: 78px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data: function() {
|
||||
return {
|
||||
iconClass: 'accordian-right-icon'
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
toggle: function () {
|
||||
if ($('.aside-nav').is(':visible')) {
|
||||
this.hide();
|
||||
} else {
|
||||
this.show();
|
||||
}
|
||||
},
|
||||
|
||||
hide: function () {
|
||||
let self = this;
|
||||
|
||||
$('.aside-nav').hide(function () {
|
||||
self.iconClass = 'accordian-right-icon';
|
||||
|
||||
$('.content-wrapper').css({
|
||||
marginLeft: 'unset'
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
show: function () {
|
||||
let self = this;
|
||||
|
||||
$('.aside-nav').show(function () {
|
||||
self.iconClass = 'accordian-left-icon';
|
||||
|
||||
$('.content-wrapper').css({
|
||||
marginLeft: '280px'
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -108,7 +108,7 @@ body {
|
|||
border-right: 1px solid rgba(162, 162, 162, 0.2);
|
||||
height: auto;
|
||||
bottom: 0;
|
||||
z-index: 2;
|
||||
z-index: 5;
|
||||
background-color: $white;
|
||||
|
||||
ul.menubar {
|
||||
|
|
@ -153,6 +153,7 @@ body {
|
|||
}
|
||||
|
||||
.aside-nav {
|
||||
display: none;
|
||||
width: 280px;
|
||||
position: fixed;
|
||||
top: 60px;
|
||||
|
|
@ -189,7 +190,6 @@ body {
|
|||
|
||||
.content-wrapper {
|
||||
padding: 25px 25px 25px 15px;
|
||||
margin-left: 280px;
|
||||
margin-top:1px;
|
||||
background-color: $white;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@
|
|||
<div class="product image">
|
||||
<?php $productBaseImage = productimage()->getProductBaseImage($item->product); ?>
|
||||
|
||||
<img class="item-image" src="{{ $productBaseImage['small_image_url'] }}" />
|
||||
<img class="item-image" src="{{ $productBaseImage['small_image_url'] ?? asset('vendor/webkul/ui/assets/images/product/small-product-placeholder.webp') }}" />
|
||||
</div>
|
||||
|
||||
<div class="description do-not-cross-arrow">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
@section('content-wrapper')
|
||||
<div class="inner-section">
|
||||
|
||||
|
||||
@include ('admin::layouts.nav-aside')
|
||||
|
||||
<div class="content-wrapper">
|
||||
|
|
@ -12,6 +12,6 @@
|
|||
@yield('content')
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -30,8 +30,4 @@
|
|||
@endforeach
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
<!-- <div class="close-nav-aside">
|
||||
<i class="icon angle-left-icon close-icon"></i>
|
||||
</div> -->
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
<div class="navbar-left">
|
||||
{{-- button for toggling aside nav --}}
|
||||
<nav-slide-button></nav-slide-button>
|
||||
|
||||
{{-- left menu bar --}}
|
||||
<ul class="menubar">
|
||||
@foreach ($menu->items as $menuItem)
|
||||
<li class="menu-item {{ $menu->getActive($menuItem) }}">
|
||||
<a href="{{ count($menuItem['children']) ? current($menuItem['children'])['url'] : $menuItem['url'] }}">
|
||||
<span class="icon {{ $menuItem['icon-class'] }}"></span>
|
||||
|
||||
|
||||
<span>{{ trans($menuItem['name']) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,32 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
{{-- meta tags --}}
|
||||
<meta http-equiv="Cache-control" content="no-cache">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
{{-- lang supports inclusion --}}
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: 'Hind';
|
||||
src: url({{ asset('vendor/webkul/ui/assets/fonts/Hind/Hind-Regular.ttf') }}) format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Noto Sans';
|
||||
src: url({{ asset('vendor/webkul/ui/assets/fonts/Noto/NotoSans-Regular.ttf') }}) format('truetype');
|
||||
}
|
||||
</style>
|
||||
|
||||
@php
|
||||
/* main font will be set on locale based */
|
||||
$mainFontFamily = app()->getLocale() === 'ar' ? 'DejaVu Sans' : 'Noto Sans';
|
||||
@endphp
|
||||
|
||||
{{-- main css --}}
|
||||
<style type="text/css">
|
||||
* {
|
||||
font-family: DejaVu Sans;
|
||||
font-family: '{{ $mainFontFamily }}';
|
||||
}
|
||||
|
||||
body, th, td, h5 {
|
||||
|
|
@ -306,7 +326,6 @@
|
|||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class CategoryController extends Controller
|
|||
public function store()
|
||||
{
|
||||
$this->validate(request(), [
|
||||
'slug' => ['required', 'unique:category_translations,slug', new \Webkul\Core\Contracts\Validations\Slug],
|
||||
'slug' => ['required', 'unique:category_translations,slug'],
|
||||
'name' => 'required',
|
||||
'image.*' => 'mimes:bmp,jpeg,jpg,png,webp',
|
||||
'description' => 'required_if:display_mode,==,description_only,products_and_description',
|
||||
|
|
@ -122,7 +122,7 @@ class CategoryController extends Controller
|
|||
$locale = request()->get('locale') ?: app()->getLocale();
|
||||
|
||||
$this->validate(request(), [
|
||||
$locale . '.slug' => ['required', new \Webkul\Core\Contracts\Validations\Slug, function ($attribute, $value, $fail) use ($id) {
|
||||
$locale . '.slug' => ['required', function ($attribute, $value, $fail) use ($id) {
|
||||
if (! $this->categoryRepository->isSlugUnique($id, $value)) {
|
||||
$fail(trans('admin::app.response.already-taken', ['name' => 'Category']));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,19 +2,17 @@
|
|||
|
||||
namespace Webkul\Category\Repositories;
|
||||
|
||||
use Illuminate\Container\Container as App;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Webkul\Core\Eloquent\Repository;
|
||||
use Webkul\Category\Models\Category;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Webkul\Category\Models\CategoryTranslationProxy;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class CategoryRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* Specify Model class name
|
||||
* Specify model class name.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
|
@ -24,6 +22,8 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Create category.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \Webkul\Category\Contracts\Category
|
||||
*/
|
||||
|
|
@ -58,7 +58,7 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Specify category tree
|
||||
* Specify category tree.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Webkul\Category\Contracts\Category
|
||||
|
|
@ -66,12 +66,12 @@ class CategoryRepository extends Repository
|
|||
public function getCategoryTree($id = null)
|
||||
{
|
||||
return $id
|
||||
? $this->model::orderBy('position', 'ASC')->where('id', '!=', $id)->get()->toTree()
|
||||
: $this->model::orderBy('position', 'ASC')->get()->toTree();
|
||||
? $this->model::orderBy('position', 'ASC')->where('id', '!=', $id)->get()->toTree()
|
||||
: $this->model::orderBy('position', 'ASC')->get()->toTree();
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify category tree
|
||||
* Specify category tree.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Support\Collection
|
||||
|
|
@ -84,7 +84,7 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Get root categories
|
||||
* Get root categories.
|
||||
*
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
|
|
@ -94,7 +94,7 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* get visible category tree
|
||||
* get visible category tree.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Support\Collection
|
||||
|
|
@ -108,19 +108,19 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
return $categories[$id] = $id
|
||||
? $this->model::orderBy('position', 'ASC')->where('status', 1)->descendantsAndSelf($id)->toTree($id)
|
||||
: $this->model::orderBy('position', 'ASC')->where('status', 1)->get()->toTree();
|
||||
? $this->model::orderBy('position', 'ASC')->where('status', 1)->descendantsAndSelf($id)->toTree($id)
|
||||
: $this->model::orderBy('position', 'ASC')->where('status', 1)->get()->toTree();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks slug is unique or not based on locale
|
||||
* Checks slug is unique or not based on locale.
|
||||
*
|
||||
* @param int $id
|
||||
* @param string $slug
|
||||
* @return bool
|
||||
*/
|
||||
public function isSlugUnique($id, $slug)
|
||||
{
|
||||
{
|
||||
$exists = CategoryTranslationProxy::modelClass()::where('category_id', '<>', $id)
|
||||
->where('slug', $slug)
|
||||
->limit(1)
|
||||
|
|
@ -131,7 +131,7 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Retrive category from slug
|
||||
* Retrive category from slug.
|
||||
*
|
||||
* @param string $slug
|
||||
* @return \Webkul\Category\Contracts\Category
|
||||
|
|
@ -150,6 +150,8 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Find by path.
|
||||
*
|
||||
* @param string $urlPath
|
||||
* @return \Webkul\Category\Contracts\Category
|
||||
*/
|
||||
|
|
@ -159,6 +161,8 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Update category.
|
||||
*
|
||||
* @param array $data
|
||||
* @param int $id
|
||||
* @param string $attribute
|
||||
|
|
@ -170,6 +174,8 @@ class CategoryRepository extends Repository
|
|||
|
||||
Event::dispatch('catalog.category.update.before', $id);
|
||||
|
||||
$data = $this->setSameAttributeValueToAllLocale($data, 'slug');
|
||||
|
||||
$category->update($data);
|
||||
|
||||
$this->uploadImages($data, $category);
|
||||
|
|
@ -184,6 +190,8 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Delete category.
|
||||
*
|
||||
* @param int $id
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -197,8 +205,11 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Upload category's images.
|
||||
*
|
||||
* @param array $data
|
||||
* @param \Webkul\Category\Contracts\Category $category
|
||||
* @param string $type
|
||||
* @return void
|
||||
*/
|
||||
public function uploadImages($data, $category, $type = "image")
|
||||
|
|
@ -230,6 +241,8 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Get partials.
|
||||
*
|
||||
* @param array|null $columns
|
||||
* @return array
|
||||
*/
|
||||
|
|
@ -251,4 +264,33 @@ class CategoryRepository extends Repository
|
|||
|
||||
return $trimmed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set same value to all locales in category.
|
||||
*
|
||||
* To Do: Move column from the `category_translations` to `category` table. And remove
|
||||
* this created method.
|
||||
*
|
||||
* @param array $data
|
||||
* @param string $attributeNames
|
||||
* @return array
|
||||
*/
|
||||
private function setSameAttributeValueToAllLocale(array $data, ...$attributeNames)
|
||||
{
|
||||
$requestedLocale = request()->get('locale') ?: app()->getLocale();
|
||||
|
||||
$model = app()->make($this->model());
|
||||
|
||||
foreach ($attributeNames as $attributeName) {
|
||||
foreach (core()->getAllLocales() as $locale) {
|
||||
foreach ($model->translatedAttributes as $attribute) {
|
||||
if ($attribute === $attributeName) {
|
||||
$data[$locale->code][$attribute] = $data[$requestedLocale][$attribute];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
|
@ -3974,5 +3974,131 @@
|
|||
"code":"WB",
|
||||
"default_name":"West Bengal",
|
||||
"country_id":106
|
||||
},
|
||||
{
|
||||
"id":569,
|
||||
"country_code":"PY",
|
||||
"code":"PY-16",
|
||||
"default_name":"Alto Paraguay",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":570,
|
||||
"country_code":"PY",
|
||||
"code":"PY-10",
|
||||
"default_name":"Alto Paran\u00e1",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":571,
|
||||
"country_code":"PY",
|
||||
"code":"PY-13",
|
||||
"default_name":"Amambay",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":572,
|
||||
"country_code":"PY",
|
||||
"code":"PY-ASU",
|
||||
"default_name":"Asunci\u00f3n",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":573,
|
||||
"country_code":"PY",
|
||||
"code":"PY-19",
|
||||
"default_name":"Boquer\u00f3n",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":574,
|
||||
"country_code":"PY",
|
||||
"code":"PY-5",
|
||||
"default_name":"Caaguaz\u00fa",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":575,
|
||||
"country_code":"PY",
|
||||
"code":"PY-6",
|
||||
"default_name":"Caazap\u00e1",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":576,
|
||||
"country_code":"PY",
|
||||
"code":"PY-14",
|
||||
"default_name":"Canindey\u00fa",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":577,
|
||||
"country_code":"PY",
|
||||
"code":"PY-11",
|
||||
"default_name":"Central",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":578,
|
||||
"country_code":"PY",
|
||||
"code":"PY-1",
|
||||
"default_name":"Concepci\u00f3n",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":579,
|
||||
"country_code":"PY",
|
||||
"code":"PY-3",
|
||||
"default_name":"Cordillera",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":580,
|
||||
"country_code":"PY",
|
||||
"code":"PY-4",
|
||||
"default_name":"Guair\u00e1",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":581,
|
||||
"country_code":"PY",
|
||||
"code":"PY-7",
|
||||
"default_name":"Itap\u00faa",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":582,
|
||||
"country_code":"PY",
|
||||
"code":"PY-8",
|
||||
"default_name":"Misiones",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":583,
|
||||
"country_code":"PY",
|
||||
"code":"PY-9",
|
||||
"default_name":"Paraguar\u00ed",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":584,
|
||||
"country_code":"PY",
|
||||
"code":"PY-15",
|
||||
"default_name":"Presidente Hayes",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":585,
|
||||
"country_code":"PY",
|
||||
"code":"PY-2",
|
||||
"default_name":"San Pedro",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":586,
|
||||
"country_code":"PY",
|
||||
"code":"PY-12",
|
||||
"default_name":"\u00d1eembuc\u00fa",
|
||||
"country_id":176
|
||||
}
|
||||
]
|
||||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
namespace Webkul\Customer\Http\Controllers;
|
||||
|
||||
use Cart;
|
||||
use Webkul\Product\Repositories\ProductRepository;
|
||||
use Webkul\Customer\Repositories\WishlistRepository;
|
||||
use Cart;
|
||||
|
||||
class WishlistController extends Controller
|
||||
{
|
||||
/**
|
||||
* Contains route related configuration
|
||||
* Contains route related configuration.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
|
|
@ -57,7 +57,7 @@ class WishlistController extends Controller
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
$wishlistItems = $this->wishlistRepository->getCustomerWhishlist();
|
||||
$wishlistItems = $this->wishlistRepository->getCustomerWishlist();
|
||||
|
||||
if (! core()->getConfigData('general.content.shop.wishlist_option')) {
|
||||
abort(404);
|
||||
|
|
@ -91,7 +91,7 @@ class WishlistController extends Controller
|
|||
'customer_id' => auth()->guard('customer')->user()->id,
|
||||
]);
|
||||
|
||||
//accidental case if some one adds id of the product in the anchor tag amd gives id of a variant.
|
||||
// accidental case if some one adds id of the product in the anchor tag amd gives id of a variant.
|
||||
if ($product->parent_id != null) {
|
||||
$product = $this->productRepository->findOneByField('id', $product->parent_id);
|
||||
$data['product_id'] = $product->id;
|
||||
|
|
@ -152,9 +152,9 @@ class WishlistController extends Controller
|
|||
public function move($itemId)
|
||||
{
|
||||
$wishlistItem = $this->wishlistRepository->findOneWhere([
|
||||
'id' => $itemId,
|
||||
'customer_id' => auth()->guard('customer')->user()->id,
|
||||
]);
|
||||
'id' => $itemId,
|
||||
'customer_id' => auth()->guard('customer')->user()->id,
|
||||
]);
|
||||
|
||||
if (! $wishlistItem) {
|
||||
abort(404);
|
||||
|
|
@ -182,7 +182,7 @@ class WishlistController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Function to remove all of the items items in the customer's wishlist
|
||||
* Function to remove all of the items items in the customer's wishlist.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -7,17 +7,18 @@ use Webkul\Core\Eloquent\Repository;
|
|||
class WishlistRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* Specify Model class name
|
||||
* Specify model class name.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
function model()
|
||||
{
|
||||
return 'Webkul\Customer\Contracts\Wishlist';
|
||||
}
|
||||
|
||||
/**
|
||||
* Create wishlist.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \Webkul\Customer\Contracts\Wishlist
|
||||
*/
|
||||
|
|
@ -29,6 +30,8 @@ class WishlistRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Update wishlist.
|
||||
*
|
||||
* @param array $data
|
||||
* @param int $id
|
||||
* @param string $attribute
|
||||
|
|
@ -55,25 +58,28 @@ class WishlistRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* get customer wishlist Items.
|
||||
* Get customer wishlist items.
|
||||
*
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function getCustomerWhishlist()
|
||||
public function getCustomerWishlist()
|
||||
{
|
||||
$query = $this->model;
|
||||
/* due to ambigious ids only selecting from wishlist table */
|
||||
$query = $this->model->select('wishlist.*');
|
||||
|
||||
/* don't add product repository method as that one will need a product flat table */
|
||||
if (! core()->getConfigData('catalog.products.homepage.out_of_stock_items')) {
|
||||
$query = $this->model
|
||||
->leftJoin('products as ps', 'wishlist.product_id', '=', 'ps.id')
|
||||
->leftJoin('product_inventories as pv', 'ps.id', '=', 'pv.product_id')
|
||||
->where(function ($qb) {
|
||||
$qb
|
||||
->WhereIn('ps.type', ['configurable', 'grouped', 'downloadable', 'bundle', 'booking'])
|
||||
->orwhereIn('ps.type', ['simple', 'virtual'])->where('pv.qty' , '>' , 0);
|
||||
});
|
||||
$query = $query
|
||||
->leftJoin('products as ps', 'wishlist.product_id', '=', 'ps.id')
|
||||
->leftJoin('product_inventories as pv', 'ps.id', '=', 'pv.product_id')
|
||||
->where(function ($qb) {
|
||||
$qb
|
||||
->WhereIn('ps.type', ['configurable', 'grouped', 'downloadable', 'bundle', 'booking'])
|
||||
->orwhereIn('ps.type', ['simple', 'virtual'])->where('pv.qty' , '>' , 0);
|
||||
});
|
||||
}
|
||||
|
||||
/* main check to determine the wishlist */
|
||||
return $query->where([
|
||||
'channel_id' => core()->getCurrentChannel()->id,
|
||||
'customer_id' => auth()->guard('customer')->user()->id,
|
||||
|
|
|
|||
|
|
@ -70,6 +70,15 @@ class ProductImage extends AbstractProduct
|
|||
];
|
||||
}
|
||||
|
||||
/*
|
||||
* Product parent checked already above. If the case reached here that means the
|
||||
* parent is available. So recursing the method for getting the parent image if
|
||||
* images of the child are not found.
|
||||
*/
|
||||
if (empty($images)) {
|
||||
$images = $this->getGalleryImages($product->parent);
|
||||
}
|
||||
|
||||
return $loadedGalleryImages[$product->id] = $images;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,26 +2,26 @@
|
|||
|
||||
namespace Webkul\Sales\Repositories;
|
||||
|
||||
use Illuminate\Container\Container as App;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Webkul\Core\Eloquent\Repository;
|
||||
use Webkul\Sales\Contracts\Order;
|
||||
use Webkul\Sales\Models\Order as OrderModel;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Webkul\Core\Eloquent\Repository;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Webkul\Shop\Generators\Sequencer;
|
||||
use Illuminate\Container\Container as App;
|
||||
use Webkul\Shop\Generators\OrderNumberIdSequencer;
|
||||
|
||||
class OrderRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* OrderItemRepository object
|
||||
* OrderItemRepository $orderItemRepository
|
||||
*
|
||||
* @var \Webkul\Sales\Repositories\OrderItemRepository
|
||||
*/
|
||||
protected $orderItemRepository;
|
||||
|
||||
/**
|
||||
* DownloadableLinkPurchasedRepository object
|
||||
* DownloadableLinkPurchasedRepository $downloadableLinkPurchasedRepository
|
||||
*
|
||||
* @var \Webkul\Sales\Repositories\DownloadableLinkPurchasedRepository
|
||||
*/
|
||||
|
|
@ -32,6 +32,7 @@ class OrderRepository extends Repository
|
|||
*
|
||||
* @param \Webkul\Sales\Repositories\OrderItemRepository $orderItemRepository
|
||||
* @param \Webkul\Sales\Repositories\DownloadableLinkPurchasedRepository $downloadableLinkPurchasedRepository
|
||||
* @param \Illuminate\Container\Container $app
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
|
|
@ -47,7 +48,7 @@ class OrderRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Specify Model class name
|
||||
* Specify model class name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
|
@ -57,10 +58,11 @@ class OrderRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* This method will try attempt to a create order.
|
||||
*
|
||||
* @return \Webkul\Sales\Contracts\Order
|
||||
*/
|
||||
public function create(array $data)
|
||||
public function createOrderIfNotThenRetry(array $data)
|
||||
{
|
||||
DB::beginTransaction();
|
||||
|
||||
|
|
@ -114,24 +116,46 @@ class OrderRepository extends Repository
|
|||
|
||||
Event::dispatch('checkout.order.save.after', $order);
|
||||
} catch (\Exception $e) {
|
||||
/* rolling back first */
|
||||
DB::rollBack();
|
||||
|
||||
throw $e;
|
||||
}
|
||||
/* storing log for errors */
|
||||
Log::error('OrderRepository:createOrderIfNotThenRetry: ' . $e->getMessage(),
|
||||
['data' => $data]);
|
||||
|
||||
DB::commit();
|
||||
/* recalling */
|
||||
$this->createOrderIfNotThenRetry($data);
|
||||
} finally {
|
||||
/* commit in each case */
|
||||
DB::commit();
|
||||
}
|
||||
|
||||
return $order;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $orderId
|
||||
* Create order.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \Webkul\Sales\Contracts\Order
|
||||
*/
|
||||
public function cancel($orderId)
|
||||
public function create(array $data)
|
||||
{
|
||||
$order = $this->findOrFail($orderId);
|
||||
return $this->createOrderIfNotThenRetry($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel order. This method should be independent as admin also can cancel the order.
|
||||
*
|
||||
* @param \Webkul\Sales\Models\Order|int $orderOrId
|
||||
* @return \Webkul\Sales\Contracts\Order
|
||||
*/
|
||||
public function cancel($orderOrId)
|
||||
{
|
||||
/* order */
|
||||
$order = $this->resolveOrderInstance($orderOrId);
|
||||
|
||||
/* check wether order can be cancelled or not */
|
||||
if (! $order->canCancel()) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -183,17 +207,21 @@ class OrderRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Generate increment id.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function generateIncrementId()
|
||||
{
|
||||
/**
|
||||
* @var $generatorClass Sequencer
|
||||
*/
|
||||
$generatorClass = core()->getConfigData('sales.orderSettings.order_number.order_number_generator-class') ?: false;
|
||||
|
||||
if ($generatorClass !== false
|
||||
&& class_exists($generatorClass)
|
||||
&& in_array(Sequencer::class, class_implements($generatorClass), true)
|
||||
) {
|
||||
/** @var $generatorClass Sequencer */
|
||||
return $generatorClass::generate();
|
||||
}
|
||||
|
||||
|
|
@ -201,6 +229,8 @@ class OrderRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Is order in completed state.
|
||||
*
|
||||
* @param \Webkul\Sales\Contracts\Order $order
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -232,6 +262,8 @@ class OrderRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Is order in cancelled state.
|
||||
*
|
||||
* @param \Webkul\Sales\Contracts\Order $order
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -248,8 +280,9 @@ class OrderRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* @param mixed $order
|
||||
* Is order in closed state.
|
||||
*
|
||||
* @param mixed $order
|
||||
* @return void
|
||||
*/
|
||||
public function isInClosedState($order)
|
||||
|
|
@ -266,6 +299,8 @@ class OrderRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Update order status.
|
||||
*
|
||||
* @param \Webkul\Sales\Contracts\Order $order
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -288,12 +323,14 @@ class OrderRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Collect totals.
|
||||
*
|
||||
* @param \Webkul\Sales\Contracts\Order $order
|
||||
* @return mixed
|
||||
*/
|
||||
public function collectTotals($order)
|
||||
{
|
||||
//Order invoice total
|
||||
// order invoice total
|
||||
$order->sub_total_invoiced = $order->base_sub_total_invoiced = 0;
|
||||
$order->shipping_invoiced = $order->base_shipping_invoiced = 0;
|
||||
$order->tax_amount_invoiced = $order->base_tax_amount_invoiced = 0;
|
||||
|
|
@ -316,7 +353,7 @@ class OrderRepository extends Repository
|
|||
$order->grand_total_invoiced = $order->sub_total_invoiced + $order->shipping_invoiced + $order->tax_amount_invoiced - $order->discount_invoiced;
|
||||
$order->base_grand_total_invoiced = $order->base_sub_total_invoiced + $order->base_shipping_invoiced + $order->base_tax_amount_invoiced - $order->base_discount_invoiced;
|
||||
|
||||
//Order refund total
|
||||
// order refund total
|
||||
$order->sub_total_refunded = $order->base_sub_total_refunded = 0;
|
||||
$order->shipping_refunded = $order->base_shipping_refunded = 0;
|
||||
$order->tax_amount_refunded = $order->base_tax_amount_refunded = 0;
|
||||
|
|
@ -347,4 +384,17 @@ class OrderRepository extends Repository
|
|||
|
||||
return $order;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will find order if id is given else pass the order as it is.
|
||||
*
|
||||
* @param \Webkul\Sales\Models\Order|int $orderOrId
|
||||
* @return \Webkul\Sales\Contracts\Order
|
||||
*/
|
||||
private function resolveOrderInstance($orderOrId)
|
||||
{
|
||||
return $orderOrId instanceof \Webkul\Sales\Models\Order
|
||||
? $orderOrId
|
||||
: $this->findOrFail($orderOrId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,11 @@ use Webkul\Sales\Repositories\InvoiceRepository;
|
|||
|
||||
class OrderController extends Controller
|
||||
{
|
||||
/**
|
||||
* Current customer.
|
||||
*/
|
||||
protected $currentCustomer;
|
||||
|
||||
/**
|
||||
* OrderrRepository object
|
||||
*
|
||||
|
|
@ -36,6 +41,8 @@ class OrderController extends Controller
|
|||
{
|
||||
$this->middleware('customer');
|
||||
|
||||
$this->currentCustomer = auth()->guard('customer')->user();
|
||||
|
||||
$this->orderRepository = $orderRepository;
|
||||
|
||||
$this->invoiceRepository = $invoiceRepository;
|
||||
|
|
@ -62,7 +69,7 @@ class OrderController extends Controller
|
|||
public function view($id)
|
||||
{
|
||||
$order = $this->orderRepository->findOneWhere([
|
||||
'customer_id' => auth()->guard('customer')->user()->id,
|
||||
'customer_id' => $this->currentCustomer->id,
|
||||
'id' => $id,
|
||||
]);
|
||||
|
||||
|
|
@ -83,7 +90,7 @@ class OrderController extends Controller
|
|||
{
|
||||
$invoice = $this->invoiceRepository->findOrFail($id);
|
||||
|
||||
if ($invoice->order->customer_id !== auth()->guard('customer')->user()->id) {
|
||||
if ($invoice->order->customer_id !== $this->currentCustomer->id) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
|
|
@ -100,7 +107,15 @@ class OrderController extends Controller
|
|||
*/
|
||||
public function cancel($id)
|
||||
{
|
||||
$result = $this->orderRepository->cancel($id);
|
||||
/* find by order id in customer's order */
|
||||
$order = $this->currentCustomer->all_orders()->find($id);
|
||||
|
||||
/* if order id not found then process should be aborted with 404 page */
|
||||
if (! $order) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
$result = $this->orderRepository->cancel($order);
|
||||
|
||||
if ($result) {
|
||||
session()->flash('success', trans('admin::app.response.cancel-success', ['name' => 'Order']));
|
||||
|
|
|
|||
|
|
@ -1,12 +1,32 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
{{-- meta tags --}}
|
||||
<meta http-equiv="Cache-control" content="no-cache">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
{{-- lang supports inclusion --}}
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: 'Hind';
|
||||
src: url({{ asset('vendor/webkul/ui/assets/fonts/Hind/Hind-Regular.ttf') }}) format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Noto Sans';
|
||||
src: url({{ asset('vendor/webkul/ui/assets/fonts/Noto/NotoSans-Regular.ttf') }}) format('truetype');
|
||||
}
|
||||
</style>
|
||||
|
||||
@php
|
||||
/* main font will be set on locale based */
|
||||
$mainFontFamily = app()->getLocale() === 'ar' ? 'DejaVu Sans' : 'Noto Sans';
|
||||
@endphp
|
||||
|
||||
{{-- main css --}}
|
||||
<style type="text/css">
|
||||
* {
|
||||
font-family: DejaVu Sans;
|
||||
font-family: '{{ $mainFontFamily }}';
|
||||
}
|
||||
|
||||
body, th, td, h5 {
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
|
||||
@case('addToCartHtml')
|
||||
<div class="action">
|
||||
<div v-html="addToCartHtml"></div>
|
||||
<div v-html="product.addToCartHtml"></div>
|
||||
|
||||
<span class="icon white-cross-sm-icon remove-product" @click="removeProductCompare(product.id)"></span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -94,8 +94,6 @@
|
|||
},
|
||||
|
||||
created: function() {
|
||||
this.galleryImages = galleryImages.slice(0)
|
||||
|
||||
var config = @json($config);
|
||||
|
||||
var childAttributes = this.childAttributes,
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
</script>
|
||||
|
||||
<script>
|
||||
var galleryImages = @json($images);
|
||||
let galleryImages = @json($images);
|
||||
|
||||
Vue.component('product-gallery', {
|
||||
|
||||
|
|
@ -122,12 +122,12 @@
|
|||
|
||||
methods: {
|
||||
prepareThumbs: function() {
|
||||
var this_this = this;
|
||||
let self = this;
|
||||
|
||||
this_this.thumbs = [];
|
||||
self.thumbs = [];
|
||||
|
||||
this.images.forEach(function(image) {
|
||||
this_this.thumbs.push(image);
|
||||
self.thumbs.push(image);
|
||||
});
|
||||
},
|
||||
|
||||
|
|
@ -194,25 +194,29 @@
|
|||
$('img#pro-img').data('zoom-image', $('img#pro-img').data('image')).ezPlus();
|
||||
}
|
||||
|
||||
var wishlist = "{{ $wishListHelper->getWishlistProduct($product) ? 'true' : 'false' }}";
|
||||
@if (auth()->guard('customer')->user())
|
||||
|
||||
$(document).mousemove(function(event) {
|
||||
if ($('.add-to-wishlist').length || wishlist != 0) {
|
||||
if (event.pageX > $('.add-to-wishlist').offset().left && event.pageX < $('.add-to-wishlist').offset().left+32 && event.pageY > $('.add-to-wishlist').offset().top && event.pageY < $('.add-to-wishlist').offset().top+32) {
|
||||
let wishlist = "{{ $wishListHelper->getWishlistProduct($product) ? 'true' : 'false' }}";
|
||||
|
||||
$(".zoomContainer").addClass("show-wishlist");
|
||||
$(document).mousemove(function(event) {
|
||||
if ($('.add-to-wishlist').length || wishlist != 0) {
|
||||
if (event.pageX > $('.add-to-wishlist').offset().left && event.pageX < $('.add-to-wishlist').offset().left+32 && event.pageY > $('.add-to-wishlist').offset().top && event.pageY < $('.add-to-wishlist').offset().top+32) {
|
||||
|
||||
$(".zoomContainer").addClass("show-wishlist");
|
||||
|
||||
} else {
|
||||
$(".zoomContainer").removeClass("show-wishlist");
|
||||
}
|
||||
};
|
||||
|
||||
if ($("body").hasClass("rtl")) {
|
||||
$(".zoomWindow").addClass("zoom-image-direction");
|
||||
} else {
|
||||
$(".zoomContainer").removeClass("show-wishlist");
|
||||
$(".zoomWindow").removeClass("zoom-image-direction");
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
if ($("body").hasClass("rtl")) {
|
||||
$(".zoomWindow").addClass("zoom-image-direction");
|
||||
} else {
|
||||
$(".zoomWindow").removeClass("zoom-image-direction");
|
||||
}
|
||||
});
|
||||
@endif
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 518 B |
|
|
@ -0,0 +1,4 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="12" transform="rotate(-180 12 12)" fill="#0041FF"/>
|
||||
<path d="M13.5 17.5L8.5 12.5L13.5 7.5" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 302 B |
|
After Width: | Height: | Size: 513 B |
|
|
@ -0,0 +1,4 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="12" transform="rotate(-180 12 12)" fill="#0041FF"/>
|
||||
<path d="M10.5 17.5L15.5 12.5L10.5 7.5" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 303 B |
|
|
@ -1,20 +1,3 @@
|
|||
/* flatpickr v4.6.6, @license MIT */
|
||||
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/ui.js": "/js/ui.js?id=8eae585f880f44e9aa39",
|
||||
"/css/ui.css": "/css/ui.css?id=72e23fc21cf1623e7aff"
|
||||
"/js/ui.js": "/js/ui.js?id=ab1dd431924ced0d89c3",
|
||||
"/css/ui.css": "/css/ui.css?id=6d93a4a052e38d6aa795"
|
||||
}
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 518 B |
|
|
@ -0,0 +1,4 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="12" transform="rotate(-180 12 12)" fill="#0041FF"/>
|
||||
<path d="M13.5 17.5L8.5 12.5L13.5 7.5" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 302 B |
|
After Width: | Height: | Size: 513 B |
|
|
@ -0,0 +1,4 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="12" transform="rotate(-180 12 12)" fill="#0041FF"/>
|
||||
<path d="M10.5 17.5L15.5 12.5L10.5 7.5" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 303 B |
|
|
@ -1,10 +1,13 @@
|
|||
// Icon scss
|
||||
@import "icons";
|
||||
@import "variables";
|
||||
@import "components";
|
||||
@import "mixins";
|
||||
@import "animations";
|
||||
/* main imports */
|
||||
@import "main/icons";
|
||||
@import "main/variables";
|
||||
@import "main/mixins";
|
||||
|
||||
/* includes */
|
||||
@import "includes/animations";
|
||||
@import "includes/components";
|
||||
|
||||
/* start from here */
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
|
|
@ -15,7 +18,7 @@
|
|||
outline: none;
|
||||
}
|
||||
|
||||
//margin bottom classes
|
||||
// margin bottom classes
|
||||
.mb-10 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
|
@ -68,7 +71,7 @@
|
|||
margin-bottom: 90px;
|
||||
}
|
||||
|
||||
//margin-top
|
||||
// margin-top
|
||||
.mt-5 {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
|
@ -141,8 +144,8 @@ a:active {
|
|||
|
||||
::selection {
|
||||
background-color: $selection-color;
|
||||
color: $color-white;
|
||||
}
|
||||
color: $white-color;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: none;
|
||||
|
|
@ -198,7 +201,7 @@ h5 {
|
|||
);
|
||||
@include border-radius(3px);
|
||||
border: none;
|
||||
color: #fff;
|
||||
color: $white-color;
|
||||
cursor: pointer;
|
||||
transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
font: inherit;
|
||||
|
|
@ -214,12 +217,15 @@ h5 {
|
|||
&.btn-sm {
|
||||
padding: 6px 12px;
|
||||
}
|
||||
|
||||
&.btn-md {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
&.btn-lg {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
&.btn-xl {
|
||||
padding: 12px 24px;
|
||||
font-size: 16px;
|
||||
|
|
@ -227,17 +233,17 @@ h5 {
|
|||
|
||||
&.btn-primary {
|
||||
background: $brand-color;
|
||||
color: #ffffff;
|
||||
color: $white-color;
|
||||
}
|
||||
|
||||
&.btn-black {
|
||||
background: #000;
|
||||
color: #ffffff;
|
||||
background: $black-color;
|
||||
color: $white-color;
|
||||
}
|
||||
|
||||
&.btn-white {
|
||||
background: #ffffff;
|
||||
color: #000;
|
||||
background: $white-color;
|
||||
color: $black-color;
|
||||
}
|
||||
|
||||
&:disabled,
|
||||
|
|
@ -254,7 +260,7 @@ h5 {
|
|||
.dropdown-btn {
|
||||
min-width: 150px;
|
||||
text-align: left;
|
||||
background: #ffffff;
|
||||
background: $white-color;
|
||||
border: 2px solid $control-border-color;
|
||||
@include border-radius(3px);
|
||||
font-size: 14px;
|
||||
|
|
@ -293,7 +299,7 @@ h5 {
|
|||
0 0 9px 0 rgba(0, 0, 0, 0.16)
|
||||
);
|
||||
@include border-radius(3px);
|
||||
background-color: #ffffff;
|
||||
background-color: $white-color;
|
||||
position: absolute;
|
||||
display: none;
|
||||
z-index: 10;
|
||||
|
|
@ -303,14 +309,17 @@ h5 {
|
|||
top: 42px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
&.bottom-right {
|
||||
top: 42px;
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
&.top-left {
|
||||
bottom: 0px;
|
||||
left: 42px;
|
||||
}
|
||||
|
||||
&.top-right {
|
||||
bottom: 0px;
|
||||
right: 42px;
|
||||
|
|
@ -321,7 +330,7 @@ h5 {
|
|||
border-bottom: 1px solid $border-color;
|
||||
|
||||
.control {
|
||||
background: #fff;
|
||||
background: $white-color;
|
||||
border: 2px solid $control-border-color;
|
||||
@include border-radius(3px);
|
||||
width: 100%;
|
||||
|
|
@ -363,9 +372,10 @@ h5 {
|
|||
a:active,
|
||||
a:visited,
|
||||
a:focus {
|
||||
color: #333333;
|
||||
color: $font-color;
|
||||
display: block;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: $brand-color;
|
||||
}
|
||||
|
|
@ -392,11 +402,9 @@ h5 {
|
|||
}
|
||||
|
||||
.section {
|
||||
// font-size: 16px;
|
||||
|
||||
.secton-title {
|
||||
font-size: 18px;
|
||||
color: #8E8E8E;
|
||||
color: $font-color;
|
||||
padding: 15px 0;
|
||||
border-bottom: 1px solid $border-color;
|
||||
}
|
||||
|
|
@ -427,7 +435,6 @@ h5 {
|
|||
|
||||
.table {
|
||||
width: 100%;
|
||||
// overflow-x: auto !important;
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
|
|
@ -483,14 +490,14 @@ h5 {
|
|||
|
||||
.pagination {
|
||||
.page-item {
|
||||
background: #ffffff;
|
||||
background: $white-color;
|
||||
border: 2px solid $control-border-color;
|
||||
@include border-radius(3px);
|
||||
padding: 7px 14px;
|
||||
margin-right: 5px;
|
||||
font-size: 16px;
|
||||
display: inline-block;
|
||||
color: #8e8e8e;
|
||||
color: $font-color;
|
||||
vertical-align: middle;
|
||||
text-decoration: none;
|
||||
|
||||
|
|
@ -500,9 +507,9 @@ h5 {
|
|||
}
|
||||
|
||||
&.active {
|
||||
background: #0041ff;
|
||||
color: #fff;
|
||||
border-color: #0041ff;
|
||||
background: $brand-color;
|
||||
color: $white-color;
|
||||
border-color: $brand-color;
|
||||
}
|
||||
|
||||
.icon {
|
||||
|
|
@ -515,7 +522,6 @@ h5 {
|
|||
.checkbox {
|
||||
position: relative;
|
||||
display: block;
|
||||
// vertical-align: middle;
|
||||
|
||||
input {
|
||||
left: 0;
|
||||
|
|
@ -585,7 +591,7 @@ h5 {
|
|||
display: block;
|
||||
margin-bottom: 25px;
|
||||
font-size: 15px;
|
||||
color: #333333;
|
||||
color: $font-color;
|
||||
width: 750px;
|
||||
max-width: 100%;
|
||||
position: relative;
|
||||
|
|
@ -608,7 +614,7 @@ h5 {
|
|||
}
|
||||
|
||||
.control {
|
||||
background: #fff;
|
||||
background: $white-color;
|
||||
border: 2px solid $control-border-color;
|
||||
@include border-radius(3px);
|
||||
width: 70%;
|
||||
|
|
@ -672,7 +678,7 @@ h5 {
|
|||
|
||||
.control-error {
|
||||
display: none;
|
||||
color: #ff5656;
|
||||
color: $danger-color;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
|
|
@ -786,7 +792,7 @@ h5 {
|
|||
width: 26px;
|
||||
left: 4px;
|
||||
bottom: 4px;
|
||||
background-color: $color-white;
|
||||
background-color: $white-color;
|
||||
-webkit-transition: .2s;
|
||||
transition: .2s;
|
||||
}
|
||||
|
|
@ -805,7 +811,7 @@ h5 {
|
|||
transform: translateX(26px);
|
||||
}
|
||||
|
||||
/* Rounded sliders */
|
||||
/* rounded sliders */
|
||||
.slider.round {
|
||||
border-radius: 34px;
|
||||
}
|
||||
|
|
@ -867,7 +873,7 @@ h5 {
|
|||
}
|
||||
|
||||
p {
|
||||
color: #ffffff;
|
||||
color: $white-color;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: 15px;
|
||||
|
|
@ -887,7 +893,7 @@ h5 {
|
|||
cursor: pointer;
|
||||
margin: 0px 2px;
|
||||
text-align: center;
|
||||
color: #000311;
|
||||
color: $black-color-shade;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
|
@ -1012,7 +1018,7 @@ h5 {
|
|||
.panel {
|
||||
@include box-shadow(0 2px 25px 0 rgba(0, 0, 0, 0.15));
|
||||
@include border-radius(5px);
|
||||
background: #fff;
|
||||
background: $white-color;
|
||||
|
||||
.panel-content {
|
||||
padding: 20px;
|
||||
|
|
@ -1036,7 +1042,7 @@ modal {
|
|||
bottom: 0px;
|
||||
left: 0px;
|
||||
position: fixed;
|
||||
background: #000;
|
||||
background: $black-color;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
|
|
@ -1045,7 +1051,7 @@ modal {
|
|||
}
|
||||
|
||||
.modal-container {
|
||||
background: #ffffff;
|
||||
background: $white-color;
|
||||
top: 100px;
|
||||
width: 600px;
|
||||
max-width: 80%;
|
||||
|
|
@ -1101,7 +1107,7 @@ modal {
|
|||
background: #E7E7E7;
|
||||
@include border-radius(2px);
|
||||
padding: 8px;
|
||||
color: #000311;
|
||||
color: $black-color-shade;
|
||||
display: inline-block;
|
||||
|
||||
&.label-sm {
|
||||
|
|
@ -1160,7 +1166,7 @@ modal {
|
|||
}
|
||||
}
|
||||
|
||||
//Image wrapper
|
||||
// image wrapper
|
||||
.image-wrapper {
|
||||
margin-bottom: 20px;
|
||||
margin-top: 10px;
|
||||
|
|
@ -1198,7 +1204,7 @@ modal {
|
|||
width: 100%;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
color: $white-color;
|
||||
text-shadow: 0 1px 2px rgba(0,0,0,0.24);
|
||||
margin-right: 20px;
|
||||
cursor: pointer;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes jelly-out {
|
||||
0% {
|
||||
transform: translateY(0px) scale(1);
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@import "mixins";
|
||||
@import "main/mixins";
|
||||
|
||||
.grid-container {
|
||||
display: block;
|
||||
|
|
@ -22,10 +22,10 @@
|
|||
|
||||
.dropdown-filters {
|
||||
display: inline-block;
|
||||
|
||||
|
||||
&.per-page {
|
||||
margin-right: 10px;
|
||||
|
||||
|
||||
.control-group {
|
||||
label {
|
||||
width: auto;
|
||||
|
|
@ -43,6 +43,29 @@
|
|||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1192px) {
|
||||
.datagrid-filters {
|
||||
flex-direction: column;
|
||||
margin-bottom: unset;
|
||||
|
||||
.filter-left {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.filter-right {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 720px) {
|
||||
.datagrid-filters {
|
||||
.dropdown-filters {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filtered-tags {
|
||||
display: inline-flex;
|
||||
align-items: flex-start;
|
||||
|
|
@ -79,6 +102,15 @@
|
|||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 720px) {
|
||||
.search-filter {
|
||||
.control {
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.grid-dropdown-header {
|
||||
display: inline-flex;
|
||||
justify-content: space-between;
|
||||
|
|
@ -166,7 +198,7 @@
|
|||
|
||||
.dropdown-filters {
|
||||
display: inline-block;
|
||||
|
||||
|
||||
&.per-page {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
|
|
@ -1,34 +1,40 @@
|
|||
// Left Side Menu Icon
|
||||
%menu-properties {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
display: inline-block;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: inline-block;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.dashboard-icon {
|
||||
@extend %menu-properties;
|
||||
background-image: url("../images/Icon-Dashboard.svg");
|
||||
}
|
||||
|
||||
.sales-icon {
|
||||
@extend %menu-properties;
|
||||
background-image: url("../images/Icon-Sales.svg");
|
||||
}
|
||||
|
||||
.catalog-icon {
|
||||
@extend %menu-properties;
|
||||
background-image: url("../images/Icon-Catalog.svg");
|
||||
}
|
||||
|
||||
.customer-icon {
|
||||
@extend %menu-properties;
|
||||
background-image: url("../images/Icon-Customers.svg");
|
||||
}
|
||||
|
||||
.configuration-icon {
|
||||
@extend %menu-properties;
|
||||
background-image: url("../images/Icon-Configure.svg");
|
||||
}
|
||||
|
||||
.settings-icon {
|
||||
@extend %menu-properties;
|
||||
background-image: url("../images/Icon-Settings.svg");
|
||||
|
|
@ -79,12 +85,25 @@
|
|||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.accordian-down-icon {
|
||||
background-image: url("../images/Accordion-Arrow-Down.svg");
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.accordian-left-icon {
|
||||
background-image: url("../images/chevron-left.svg");
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.accordian-right-icon {
|
||||
background-image: url("../images/chevron-right.png");
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.cross-icon {
|
||||
background-image: url("../images/Icon-Crossed.svg");
|
||||
width: 18px;
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
// Mixins
|
||||
@mixin box-shadow($shadows...) {
|
||||
-webkit-box-shadow: $shadows;
|
||||
-moz-box-shadow: $shadows;
|
||||
|
|
@ -8,7 +8,7 @@ $warning-color: #FFC107;
|
|||
$control-border-color: #C7C7C7;
|
||||
$border-color: rgba(162, 162, 162, 0.2);
|
||||
$filter-toggle-color : #8e8e8e;
|
||||
$color-white: #ffffff;
|
||||
$color-black: #000000;
|
||||
$color-black-shade : #000311;
|
||||
$white-color: #ffffff;
|
||||
$black-color: #000000;
|
||||
$black-color-shade : #000311;
|
||||
$border-color: #e8e8e8;
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
.color-red {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.color-default {
|
||||
color: $font-color;
|
||||
}
|
||||
|
||||
.color-brand {
|
||||
color: $brand-color;
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
||||