merge with master

This commit is contained in:
rahul shukla 2018-12-07 11:00:02 +05:30
commit c90789a210
74 changed files with 799 additions and 204 deletions

View File

@ -18,7 +18,6 @@
"vue": "^2.1.10"
},
"dependencies": {
"vee-validate": "2.0.0-rc.26",
"flatpickr": "^4.4.6"
"vee-validate": "2.0.0-rc.26"
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/admin.js": "/js/admin.js?id=c39e24a0b4b238a175fb",
"/css/admin.css": "/css/admin.css?id=201f91bc553baa11139f"
"/js/admin.js": "/js/admin.js",
"/css/admin.css": "/css/admin.css"
}

View File

@ -5,10 +5,6 @@ require("./bootstrap");
Vue.use(VeeValidate);
Vue.component("datetime", require("./components/datetime"));
Vue.component("date", require("./components/date"));
require('flatpickr/dist/flatpickr.css');
$(document).ready(function () {
Vue.config.ignoredElements = [
'option-wrapper',

View File

@ -103,6 +103,7 @@
<select class="control" id="validation" name="validation">
<option value=""></option>
<option value="numeric">{{ __('admin::app.catalog.attributes.number') }}</option>
<option value="decimal">{{ __('admin::app.catalog.attributes.decimal') }}</option>
<option value="email">{{ __('admin::app.catalog.attributes.email') }}</option>
<option value="url">{{ __('admin::app.catalog.attributes.url') }}</option>
</select>
@ -114,14 +115,6 @@
<accordian :title="'{{ __('admin::app.catalog.attributes.configuration') }}'" :active="true">
<div slot="body">
<div class="control-group">
<label for="status">{{ __('admin::app.catalog.attributes.status') }}</label>
<select class="control" id="status" name="status">
<option value="1">{{ __('admin::app.catalog.attributes.yes') }}</option>
<option value="0">{{ __('admin::app.catalog.attributes.no') }}</option>
</select>
</div>
<div class="control-group">
<label for="value_per_locale">{{ __('admin::app.catalog.attributes.value_per_locale') }}</label>
<select class="control" id="value_per_locale" name="value_per_locale">

View File

@ -124,7 +124,7 @@
</div>
<div class="control-group">
<?php $selectedValidation = old('input_validation') ?: $attribute->input_validation ?>
<?php $selectedValidation = old('validation') ?: $attribute->validation ?>
<label for="validation">{{ __('admin::app.catalog.attributes.input_validation') }}</label>
<select class="control" id="validation" name="validation">
<option value=""></option>
@ -148,18 +148,6 @@
<accordian :title="'{{ __('admin::app.catalog.attributes.configuration') }}'" :active="true">
<div slot="body">
<div class="control-group">
<label for="status">{{ __('admin::app.catalog.attributes.status') }}</label>
<select class="control" id="status" name="status">
<option value="1" {{ $attribute->status ? 'selected' : '' }}>
{{ __('admin::app.catalog.attributes.yes') }}
</option>
<option value="0" {{ $attribute->status ? '' : 'selected' }}>
{{ __('admin::app.catalog.attributes.no') }}
</option>
</select>
</div>
<div class="control-group">
<label for="value_per_locale">{{ __('admin::app.catalog.attributes.value_per_locale') }}</label>

View File

@ -62,8 +62,7 @@
<div class="control-group" :class="[errors.has('description') ? 'has-error' : '']">
<label for="description" class="required">{{ __('admin::app.catalog.categories.description') }}</label>
<textarea v-validate="'required'" class="control" id="description" name="description" data-vv-as="&quot;{{ __('admin::app.catalog.categories.description') }}&quot;">
{{ old('description') }}</textarea>
<textarea v-validate="'required'" class="control" id="description" name="description" data-vv-as="&quot;{{ __('admin::app.catalog.categories.description') }}&quot;">{{ old('description') }}</textarea>
<span class="control-error" v-if="errors.has('description')">@{{ errors.first('description') }}</span>
</div>

View File

@ -75,9 +75,7 @@
<div class="control-group" :class="[errors.has('{{$locale}}[description]') ? 'has-error' : '']">
<label for="description" class="required">{{ __('admin::app.catalog.categories.description') }}</label>
<textarea v-validate="'required'" class="control" id="description" name="{{$locale}}[description]" data-vv-as="&quot;{{ __('admin::app.catalog.categories.description') }}&quot;">
{{ old($locale)['description'] ?: $category->translate($locale)['description'] }}
</textarea>
<textarea v-validate="'required'" class="control" id="description" name="{{$locale}}[description]" data-vv-as="&quot;{{ __('admin::app.catalog.categories.description') }}&quot;">{{ old($locale)['description'] ?: $category->translate($locale)['description'] }}</textarea>
<span class="control-error" v-if="errors.has('{{$locale}}[description]')">@{{ errors.first('{!!$locale!!}[description]') }}</span>
</div>

View File

@ -71,10 +71,14 @@
$disabled = true;
} else {
if($attribute->is_required) {
if ($attribute->is_required) {
array_push($validations, 'required');
}
if ($attribute->type == 'price') {
array_push($validations, 'decimal');
}
array_push($validations, $attribute->validation);
}

View File

@ -121,16 +121,12 @@
<div class="control-group">
<label for="home_page_content">{{ __('admin::app.settings.channels.home_page_content') }}</label>
<textarea class="control" id="home_page_content" name="home_page_content">
{{ old('home_page_content') }}
</textarea>
<textarea class="control" id="home_page_content" name="home_page_content">{{ old('home_page_content') }}</textarea>
</div>
<div class="control-group">
<label for="footer_content">{{ __('admin::app.settings.channels.footer_content') }}</label>
<textarea class="control" id="footer_content" name="footer_content">
{{ old('footer_content') }}
</textarea>
<textarea class="control" id="footer_content" name="footer_content">{{ old('footer_content') }}</textarea>
</div>
<div class="control-group">

View File

@ -130,16 +130,12 @@
<div class="control-group">
<label for="home_page_content">{{ __('admin::app.settings.channels.home_page_content') }}</label>
<textarea class="control" id="home_page_content" name="home_page_content">
{{ old('home_page_content') ?: $channel->home_page_content }}
</textarea>
<textarea class="control" id="home_page_content" name="home_page_content">{{ old('home_page_content') ?: $channel->home_page_content }}</textarea>
</div>
<div class="control-group">
<label for="footer_content">{{ __('admin::app.settings.channels.footer_content') }}</label>
<textarea class="control" id="footer_content" name="footer_content">
{{ old('footer_content') ?: $channel->footer_content }}
</textarea>
<textarea class="control" id="footer_content" name="footer_content">{{ old('footer_content') ?: $channel->footer_content }}</textarea>
</div>
<div class="control-group">

View File

@ -82,7 +82,7 @@
<div class="control-group" :class="[errors.has('contact_email') ? 'has-error' : '']">
<label for="contact_email" class="required">{{ __('admin::app.settings.inventory_sources.contact_email') }}</label>
<input class="control" v-validate="'required'" class="required" id="contact_email" name="contact_email" data-vv-as="&quot;{{ __('admin::app.settings.inventory_sources.contact_email') }}&quot;" value="{{ old('contact_email') }}"/>
<input class="control" v-validate="'required|email'" class="required" id="contact_email" name="contact_email" data-vv-as="&quot;{{ __('admin::app.settings.inventory_sources.contact_email') }}&quot;" value="{{ old('contact_email') }}"/>
<span class="control-error" v-if="errors.has('contact_email')">@{{ errors.first('contact_email') }}</span>
</div>

View File

@ -83,7 +83,7 @@
<div class="control-group" :class="[errors.has('contact_email') ? 'has-error' : '']">
<label for="contact_email" class="required">{{ __('admin::app.settings.inventory_sources.contact_email') }}</label>
<input class="control" v-validate="'required'" id="contact_email" name="contact_email" data-vv-as="&quot;{{ __('admin::app.settings.inventory_sources.contact_email') }}&quot;" value="{{ old('contact_email') ?: $inventorySource->symbol }}"/>
<input class="control" v-validate="'required|email'" id="contact_email" name="contact_email" data-vv-as="&quot;{{ __('admin::app.settings.inventory_sources.contact_email') }}&quot;" value="{{ old('contact_email') ?: $inventorySource->contact_email }}"/>
<span class="control-error" v-if="errors.has('contact_email')">@{{ errors.first('contact_email') }}</span>
</div>

View File

@ -50,9 +50,7 @@
<div class="control-group" :class="[errors.has('description') ? 'has-error' : '']">
<label for="description" class="required">{{ __('admin::app.settings.tax-categories.description') }}</label>
<textarea v-validate="'required'" class="control" id="description" name="description" data-vv-as="&quot;{{ __('admin::app.configuration.tax-categories.description') }}&quot;">
{{ $taxCategory->description }}
</textarea>
<textarea v-validate="'required'" class="control" id="description" name="description" data-vv-as="&quot;{{ __('admin::app.configuration.tax-categories.description') }}&quot;">{{ $taxCategory->description }}</textarea>
<div class="control-group" :class="[errors.has('taxrates[]') ? 'has-error' : '']">
<label for="taxrates" class="required">{{ __('admin::app.settings.tax-categories.select-taxrates') }}</label>

View File

@ -34,9 +34,7 @@
<div class="control-group">
<label for="description">{{ __('admin::app.users.roles.description') }}</label>
<textarea class="control" id="description" name="description">
{{ old('description') }}
</textarea>
<textarea class="control" id="description" name="description">{{ old('description') }}</textarea>
</div>
</div>
</accordian>

View File

@ -36,9 +36,7 @@
<div class="control-group">
<label for="description">{{ __('admin::app.users.roles.description') }}</label>
<textarea class="control" id="description" name="description">
{{ old('description') ?: $role->description }}
</textarea>
<textarea class="control" id="description" name="description">{{ old('description') ?: $role->description }}</textarea>
</div>
</div>
</accordian>

View File

@ -37,7 +37,7 @@ class AttributeTableSeeder extends Seeder
['id' => '19','code' => 'width','admin_name' => 'Width','type' => 'text','validation' => NULL,'position' => '19','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '1','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
['id' => '20','code' => 'height','admin_name' => 'Height','type' => 'text','validation' => NULL,'position' => '20','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '1','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
['id' => '21','code' => 'depth','admin_name' => 'Depth','type' => 'text','validation' => NULL,'position' => '21','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '1','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
['id' => '22','code' => 'weight','admin_name' => 'Weight','type' => 'text','validation' => NULL,'position' => '22','is_required' => '1','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
['id' => '22','code' => 'weight','admin_name' => 'Weight','type' => 'text','validation' => 'decimal','position' => '22','is_required' => '1','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
['id' => '23','code' => 'color','admin_name' => 'Color','type' => 'select','validation' => NULL,'position' => '23','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '1','is_configurable' => '1','is_user_defined' => '1','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
['id' => '24','code' => 'size','admin_name' => 'Size','type' => 'select','validation' => NULL,'position' => '24','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '1','is_configurable' => '1','is_user_defined' => '1','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now]
]);

View File

@ -10,7 +10,7 @@ class Attribute extends TranslatableModel
{
public $translatedAttributes = ['name'];
protected $fillable = ['code', 'admin_name', 'type', 'position', 'is_required', 'is_unique', 'value_per_locale', 'value_per_channel', 'is_filterable', 'is_configurable', 'is_visible_on_front', 'is_user_defined'];
protected $fillable = ['code', 'admin_name', 'type', 'position', 'is_required', 'is_unique', 'validation', 'value_per_locale', 'value_per_channel', 'is_filterable', 'is_configurable', 'is_visible_on_front', 'is_user_defined'];
protected $with = ['options'];

View File

@ -72,7 +72,7 @@ class InventorySourceController extends Controller
'code' => ['required', 'unique:inventory_sources,code', new \Webkul\Core\Contracts\Validations\Code],
'name' => 'required',
'contact_name' => 'required',
'contact_email' => 'required',
'contact_email' => 'required|email',
'contact_number' => 'required',
'street' => 'required',
'country' => 'required',
@ -81,7 +81,11 @@ class InventorySourceController extends Controller
'postcode' => 'required'
]);
$this->inventorySource->create(request()->all());
$data = request()->all();
$data['status'] = !isset($data['status']) ? 0 : 1;
$this->inventorySource->create($data);
session()->flash('success', 'Inventory source created successfully.');
@ -114,7 +118,7 @@ class InventorySourceController extends Controller
'code' => ['required', 'unique:inventory_sources,code,' . $id, new \Webkul\Core\Contracts\Validations\Code],
'name' => 'required',
'contact_name' => 'required',
'contact_email' => 'required',
'contact_email' => 'required|email',
'contact_number' => 'required',
'street' => 'required',
'country' => 'required',
@ -123,7 +127,11 @@ class InventorySourceController extends Controller
'postcode' => 'required'
]);
$this->inventorySource->update(request()->all(), $id);
$data = request()->all();
$data['status'] = !isset($data['status']) ? 0 : 1;
$this->inventorySource->update($data, $id);
session()->flash('success', 'Inventory source updated successfully.');

View File

@ -0,0 +1,59 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateProductFlatTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('product_flat', function (Blueprint $table) {
$table->increments('id');
$table->string('sku');
$table->string('name')->nullable();
$table->string('description')->nullable();
$table->string('url_key')->nullable();
$table->boolean('new')->nullable();
$table->boolean('featured')->nullable();
$table->boolean('visibility')->nullable();
$table->boolean('status')->nullable();
$table->string('thumbnail')->nullable();
$table->decimal('price', 12, 4)->nullable();
$table->decimal('cost', 12, 4)->nullable();
$table->boolean('special_price')->nullable();
$table->date('special_price_from')->nullable();
$table->date('special_price_to')->nullable();
$table->decimal('weight', 12, 4)->nullable();
$table->integer('color')->nullable();
$table->string('color_label')->nullable();
$table->integer('size')->nullable();
$table->integer('size_label')->nullable();
$table->date('created_at')->nullable();
$table->string('locale')->nullable();
$table->string('channel')->nullable();
$table->integer('product_id')->unsigned();
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('product_flat');
}
}

View File

@ -83,24 +83,28 @@ class ProductForm extends FormRequest
$attributes = $product->attribute_family->custom_attributes;
foreach ($attributes as $attribute) {
if($attribute->code == 'sku')
if ($attribute->code == 'sku')
continue;
if($product->type == 'configurable' && in_array($attribute->code, ['price', 'cost', 'special_price', 'special_price_from', 'special_price_to', 'width', 'height', 'depth', 'weight']))
if ($product->type == 'configurable' && in_array($attribute->code, ['price', 'cost', 'special_price', 'special_price_from', 'special_price_to', 'width', 'height', 'depth', 'weight']))
continue;
$validations = [];
if($attribute->is_required) {
if ($attribute->is_required) {
array_push($validations, 'required');
} else {
array_push($validations, 'nullable');
}
if($attribute->type == 'text' && $attribute->validation) {
if ($attribute->type == 'text' && $attribute->validation) {
array_push($validations, $attribute->validation);
}
if($attribute->is_unique) {
if ($attribute->type == 'price') {
array_push($validations, 'decimal');
}
if ($attribute->is_unique) {
array_push($validations, function ($field, $value, $fail) use ($inputs, $attribute) {
$column = ProductAttributeValue::$attributeTypeFields[$attribute->type];

View File

@ -93,7 +93,7 @@ class InvoiceRepository extends Repository
$invoice = $this->model->create([
'order_id' => $order->id,
'total_qty' => $totalQty,
'status' => 'paid',
'state' => 'paid',
'base_currency_code' => $order->base_currency_code,
'channel_currency_code' => $order->channel_currency_code,
'order_currency_code' => $order->order_currency_code,
@ -111,7 +111,6 @@ class InvoiceRepository extends Repository
$invoiceItem = $this->invoiceItem->create([
'invoice_id' => $invoice->id,
'order_item_id' => $orderItem->id,
'state' => 'paid',
'name' => $orderItem->name,
'sku' => $orderItem->sku,
'qty' => $qty,

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,10 @@
{
<<<<<<< HEAD
"/js/shop.js": "/js/shop.js?id=c7fe085a512d913b6670",
"/css/shop.css": "/css/shop.css?id=77c5b3c611d7a0e05d7e"
}
=======
"/js/shop.js": "/js/shop.js?id=c6ba9f43bd31f175a665",
"/css/shop.css": "/css/shop.css?id=637386a2fb6b1de9c4c4"
}
>>>>>>> 5f5249abe4a1447708683968edd5ea610d7d25dc

View File

@ -84,15 +84,17 @@ class ShopServiceProvider extends ServiceProvider
});
Event::listen('customer.menu.build', function ($menu) {
$menu->add('profile', 'Profile', 'customer.profile.index', 1);
$menu->add('account', 'My Account', 'customer.profile.index', 1);
$menu->add('orders', 'Orders', 'customer.orders.index', 2);
$menu->add('account.profile', 'Profile', 'customer.profile.index', 1);
$menu->add('address', 'Address', 'customer.address.index', 3);
$menu->add('account.orders', 'Orders', 'customer.orders.index', 2);
$menu->add('reviews', 'Reviews', 'customer.reviews.index', 4);
$menu->add('account.address', 'Address', 'customer.address.index', 3);
$menu->add('wishlist', 'Wishlist', 'customer.wishlist.index', 5);
$menu->add('account.reviews', 'Reviews', 'customer.reviews.index', 4);
$menu->add('account.wishlist', 'Wishlist', 'customer.wishlist.index', 5);
});
}
}

View File

@ -2806,54 +2806,70 @@ section.review {
margin-top: 5.5%;
margin-bottom: 5.5%;
.account-side-menu {
.sidebar {
display: flex;
flex-direction: column;
align-content: center;
justify-content: flex-start;
border: 1px solid $border-color;
width: 25%;
height: 100%;
color: $font-color-light;
position: relative;
}
li {
width: 95%;
height: 50px;
margin-left: 5%;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
border-bottom: 1px solid $border-color;
text-align: center;
.menu-block {
margin-bottom: 30px;
a {
color: $other-font-color;
}
.icon {
display: none;
position: absolute;
right: 12px;
}
&:last-child {
margin-bottom: 0;
}
li:first-child {
border-top: none;
.menu-block-title {
padding-bottom: 10px;
font-size: 18px;
}
li:last-child {
border-bottom: none;
}
.menubar {
border: 1px solid $border-color;
color: $font-color-light;
position: relative;
li.active {
a {
color: $brand-color;
li {
width: 95%;
height: 50px;
margin-left: 5%;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
border-bottom: 1px solid $border-color;
text-align: center;
a {
color: $other-font-color;
}
.icon {
display: none;
position: absolute;
right: 12px;
}
}
.icon {
display: inline-block;
li:first-child {
border-top: none;
}
li:last-child {
border-bottom: none;
}
li.active {
a {
color: $brand-color;
}
.icon {
display: inline-block;
}
}
}
}

View File

@ -279,7 +279,7 @@ return [
'newest-first' => 'Newest First',
'oldest-first' => 'Oldest First',
'cheapest-first' => 'Cheapest First',
'expansive-first' => 'Expansive First',
'expensive-first' => 'Expensive First',
'show' => 'Show',
'pager-info' => 'Showing :showing of :total Items',
'description' => 'Description',

View File

@ -17,11 +17,15 @@
<span></span>
</div>
{!! view_render_event('bagisto.shop.customers.account.address.create.before') !!}
<form method="post" action="{{ route('customer.address.create') }}" @submit.prevent="onSubmit">
<div class="account-table-content">
@csrf
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.before') !!}
<div class="control-group" :class="[errors.has('address1') ? 'has-error' : '']">
<label for="address1" class="required">{{ __('shop::app.customer.account.address.create.address1') }}</label>
<input type="text" class="control" name="address1" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.address1') }}&quot;">
@ -54,6 +58,8 @@
<span class="control-error" v-if="errors.has('phone')">@{{ errors.first('phone') }}</span>
</div>
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.after') !!}
<div class="button-group">
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.account.address.create.submit') }}">
{{-- <button class="btn btn-primary btn-lg" type="submit">
@ -65,6 +71,8 @@
</form>
{!! view_render_event('bagisto.shop.customers.account.address.create.after') !!}
</div>
</div>

View File

@ -17,12 +17,16 @@
<span></span>
</div>
{!! view_render_event('bagisto.shop.customers.account.address.edit.before', ['address' => $address]) !!}
<form method="post" action="{{ route('customer.address.edit', $address->id) }}" @submit.prevent="onSubmit">
<div class="account-table-content">
@method('PUT')
@csrf
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.before', ['address' => $address]) !!}
<div class="control-group" :class="[errors.has('address1') ? 'has-error' : '']">
<label for="first_name" class="required">{{ __('shop::app.customer.account.address.create.address1') }}</label>
<input type="text" class="control" name="address1" v-validate="'required'" value="{{ $address->address1 }}" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.address1') }}&quot;">
@ -55,6 +59,8 @@
<span class="control-error" v-if="errors.has('phone')">@{{ errors.first('phone') }}</span>
</div>
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.after', ['address' => $address]) !!}
<div class="button-group">
<button class="btn btn-primary btn-lg" type="submit">
{{ __('shop::app.customer.account.address.create.submit') }}
@ -64,6 +70,8 @@
</form>
{!! view_render_event('bagisto.shop.customers.account.address.edit.after', ['address' => $address]) !!}
</div>
</div>

View File

@ -26,6 +26,8 @@
<div class="horizontal-rule"></div>
</div>
{!! view_render_event('bagisto.shop.customers.account.address.list.before', ['addresses' => $addresses]) !!}
<div class="account-table-content">
@if($addresses->isEmpty())
<div>{{ __('shop::app.customer.account.address.index.empty') }}</div>
@ -72,6 +74,8 @@
</div>
@endif
</div>
{!! view_render_event('bagisto.shop.customers.account.address.list.after', ['addresses' => $addresses]) !!}
</div>
</div>
@endsection

View File

@ -20,6 +20,8 @@
<div class="horizontal-rule"></div>
</div>
{!! view_render_event('bagisto.shop.customers.account.orders.list.before', ['orders' => $orders]) !!}
<div class="account-items-list">
<div class="table">
@ -60,6 +62,10 @@
<span class="badge badge-md badge-info">Closed</span>
@elseif($order->status == "pending")
<span class="badge badge-md badge-warning">Pending</span>
@elseif($order->status == "pending_payment")
<span class="badge badge-md badge-warning">Pending Payment</span>
@elseif($order->status == "fraud")
<span class="badge badge-md badge-danger">Fraud</span>
@endif
</td>
</tr>
@ -120,6 +126,8 @@
</div>
{!! view_render_event('bagisto.shop.customers.account.orders.list.after', ['orders' => $orders]) !!}
</div>
</div>

View File

@ -19,6 +19,8 @@
<span></span>
</div>
{!! view_render_event('bagisto.shop.customers.account.orders.view.before', ['order' => $order]) !!}
<div class="sale-container">
<tabs>
@ -490,6 +492,8 @@
</div>
{!! view_render_event('bagisto.shop.customers.account.orders.view.after', ['order' => $order]) !!}
</div>
</div>

View File

@ -3,17 +3,30 @@
<i class="icon icon-arrow-down right" id="down-icon"></i>
</div>
<ul class="account-side-menu">
@foreach($menu->items as $menuItem)
<li class="menu-item {{ $menu->getActive($menuItem) }}">
<a href="{{ $menuItem['url'] }}">
{{ $menuItem['name'] }}
</a>
<i class="icon angle-right-icon"></i>
</li>
<div class="sidebar">
@foreach($menu->items as $menuItem)
<div class="menu-block">
<div class="menu-block-title">
{{ $menuItem['name'] }}
</div>
<div class="menu-block-content">
<ul class="menubar">
@foreach($menuItem['children'] as $subMenuItem)
<li class="menu-item {{ $menu->getActive($subMenuItem) }}">
<a href="{{ $subMenuItem['url'] }}">
{{ $subMenuItem['name'] }}
</a>
<i class="icon angle-right-icon"></i>
</li>
@endforeach
</ul>
</div>
</div>
@endforeach
</ul>
</div>
@push('scripts')
<script>

View File

@ -19,11 +19,15 @@
<span></span>
</div>
{!! view_render_event('bagisto.shop.customers.account.profile.edit.before', ['customer' => $customer]) !!}
<form method="post" action="{{ route('customer.profile.edit') }}">
<div class="edit-form">
@csrf
{!! view_render_event('bagisto.shop.customers.account.profile.edit_form_controls.before', ['customer' => $customer]) !!}
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
<label for="first_name" class="required">{{ __('shop::app.customer.account.profile.fname') }}</label>
<input type="text" class="control" name="first_name" value="{{ old('first_name') ?? $customer->first_name }}" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.profile.fname') }}&quot;">
@ -76,6 +80,8 @@
<span class="control-error" v-if="errors.has('password_confirmation')">@{{ errors.first('password_confirmation') }}</span>
</div>
{!! view_render_event('bagisto.shop.customers.account.profile.edit_form_controls.after', ['customer' => $customer]) !!}
<div class="button-group">
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.account.profile.submit') }}">
</div>
@ -83,6 +89,8 @@
</form>
{!! view_render_event('bagisto.shop.customers.account.profile.edit.after', ['customer' => $customer]) !!}
</div>
</div>

View File

@ -25,6 +25,8 @@
<div class="horizontal-rule"></div>
</div>
{!! view_render_event('bagisto.shop.customers.account.profile.view.before', ['customer' => $customer]) !!}
<div class="account-table-content">
<table>
<tbody>
@ -65,6 +67,9 @@
</tbody>
</table>
</div>
{!! view_render_event('bagisto.shop.customers.account.profile.view.after', ['customer' => $customer]) !!}
</div>
</div>
@endsection

View File

@ -20,6 +20,8 @@
<div class="horizontal-rule"></div>
</div>
{!! view_render_event('bagisto.shop.customers.account.reviews.list.before', ['reviews' => $reviews]) !!}
<div class="account-items-list">
@if(!$reviews->isEmpty())
@foreach($reviews as $review)
@ -63,6 +65,8 @@
@endif
</div>
{!! view_render_event('bagisto.shop.customers.account.reviews.list.after', ['reviews' => $reviews]) !!}
</div>
</div>
@endsection

View File

@ -20,6 +20,8 @@
<div class="horizontal-rule"></div>
</div>
{!! view_render_event('bagisto.shop.customers.account.wishlist.list.before', ['wishlist' => $items]) !!}
<div class="account-items-list">
@if($items->count())
@ -63,6 +65,9 @@
</div>
@endif
</div>
{!! view_render_event('bagisto.shop.customers.account.wishlist.list.after', ['wishlist' => $items]) !!}
</div>
</div>
@endsection

View File

@ -9,11 +9,15 @@
{{ __('shop::app.customer.login-text.no_account') }} - <a href="{{ route('customer.register.index') }}">{{ __('shop::app.customer.login-text.title') }}</a>
</div>
{!! view_render_event('bagisto.shop.customers.login.before') !!}
<form method="POST" action="{{ route('customer.session.create') }}" @submit.prevent="onSubmit">
{{ csrf_field() }}
<div class="login-form">
<div class="login-text">{{ __('shop::app.customer.login-form.title') }}</div>
{!! view_render_event('bagisto.shop.customers.login_form_controls.before') !!}
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
<label for="email" class="required">{{ __('shop::app.customer.login-form.email') }}</label>
<input type="text" class="control" name="email" v-validate="'required|email'" value="{{ old('email') }}" data-vv-as="&quot;{{ __('shop::app.customer.login-form.email') }}&quot;">
@ -26,6 +30,8 @@
<span class="control-error" v-if="errors.has('password')">@{{ errors.first('password') }}</span>
</div>
{!! view_render_event('bagisto.shop.customers.login_form_controls.after') !!}
<div class="forgot-password-link">
<a href="{{ route('customer.forgot-password.create') }}">{{ __('shop::app.customer.login-form.forgot_pass') }}</a>
@ -41,6 +47,8 @@
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.login-form.button_title') }}">
</div>
</form>
{!! view_render_event('bagisto.shop.customers.login.after') !!}
</div>
@endsection

View File

@ -19,6 +19,8 @@
<div class="auth-content">
{!! view_render_event('bagisto.shop.customers.forget_password.before') !!}
<form method="post" action="{{ route('customer.forgot-password.store') }}">
{{ csrf_field() }}
@ -27,12 +29,16 @@
<div class="login-text">{{ __('shop::app.customer.forgot-password.title') }}</div>
{!! view_render_event('bagisto.shop.customers.forget_password_form_controls.before') !!}
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
<label for="email">{{ __('shop::app.customer.forgot-password.email') }}</label>
<input type="email" class="control" name="email" v-validate="'required|email'">
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
</div>
{!! view_render_event('bagisto.shop.customers.forget_password_form_controls.before') !!}
<div class="button-group">
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.forgot-password.submit') }}">
</div>
@ -46,5 +52,8 @@
</div>
</form>
{!! view_render_event('bagisto.shop.customers.forget_password.before') !!}
</div>
@endsection

View File

@ -10,6 +10,8 @@
{{ __('shop::app.customer.signup-text.account_exists') }} - <a href="{{ route('customer.session.index') }}">{{ __('shop::app.customer.signup-text.title') }}</a>
</div>
{!! view_render_event('bagisto.shop.customers.signup.before') !!}
<form method="post" action="{{ route('customer.register.create') }}" @submit.prevent="onSubmit">
{{ csrf_field() }}
@ -17,6 +19,8 @@
<div class="login-form">
<div class="login-text">{{ __('shop::app.customer.signup-form.title') }}</div>
{!! view_render_event('bagisto.shop.customers.signup_form_controls.before') !!}
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
<label for="first_name" class="required">{{ __('shop::app.customer.signup-form.firstname') }}</label>
<input type="text" class="control" name="first_name" v-validate="'required'" value="{{ old('first_name') }}" data-vv-as="&quot;{{ __('shop::app.customer.signup-form.firstname') }}&quot;">
@ -57,6 +61,9 @@
</span>
<span class="control-error" v-if="errors.has('agreement')">@{{ errors.first('agreement') }}</span>
</div> --}}
{!! view_render_event('bagisto.shop.customers.signup_form_controls.after') !!}
<div class="control-group" :class="[errors.has('agreement') ? 'has-error' : '']">
<input type="checkbox" id="checkbox2" name="agreement" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.signup-form.agreement') }}&quot;">
@ -70,5 +77,7 @@
</div>
</form>
{!! view_render_event('bagisto.shop.customers.signup.after') !!}
</div>
@endsection

View File

@ -8,6 +8,8 @@
<div class="auth-content">
{!! view_render_event('bagisto.shop.customers.reset_password.before') !!}
<form method="post" action="{{ route('customer.reset-password.store') }}" >
{{ csrf_field() }}
@ -18,6 +20,8 @@
<input type="hidden" name="token" value="{{ $token }}">
{!! view_render_event('bagisto.shop.customers.reset_password_form_controls.before') !!}
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
<label for="email">{{ __('shop::app.customer.reset-password.email') }}</label>
<input type="text" v-validate="'required|email'" class="control" id="email" name="email" value="{{ old('email') }}"/>
@ -36,9 +40,13 @@
<span class="control-error" v-if="errors.has('confirm_password')">@{{ errors.first('confirm_password') }}</span>
</div>
{!! view_render_event('bagisto.shop.customers.reset_password_form_controls.before') !!}
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.reset-password.submit-btn-title') }}">
</div>
</form>
{!! view_render_event('bagisto.shop.customers.reset_password.before') !!}
</div>
@endsection

View File

@ -6,6 +6,10 @@
@section('content-wrapper')
{!! view_render_event('bagisto.shop.home.content.before') !!}
{!! DbView::make(core()->getCurrentChannel())->field('home_page_content')->with(['sliderData' => $sliderData])->render() !!}
{{ view_render_event('bagisto.shop.home.content.after') }}
@endsection

View File

@ -1 +1,5 @@
<category-nav categories='@json($categories)' url="{{url()->to('/')}}"></category-nav>
{!! view_render_event('bagisto.shop.layout.header.category.before') !!}
<category-nav categories='@json($categories)' url="{{url()->to('/')}}"></category-nav>
{!! view_render_event('bagisto.shop.layout.header.category.after') !!}

View File

@ -25,32 +25,51 @@
@yield('css')
{!! view_render_event('bagisto.shop.layout.head') !!}
</head>
<body>
{!! view_render_event('bagisto.shop.layout.body.before') !!}
<div id="app">
<flash-wrapper ref='flashes'></flash-wrapper>
<div class="main-container-wrapper">
{!! view_render_event('bagisto.shop.layout.header.before') !!}
@include('shop::layouts.header.index')
{!! view_render_event('bagisto.shop.layout.header.after') !!}
@yield('slider')
<div class="content-container">
{!! view_render_event('bagisto.shop.layout.content.before') !!}
@yield('content-wrapper')
{!! view_render_event('bagisto.shop.layout.content.after') !!}
</div>
</div>
{!! view_render_event('bagisto.shop.layout.footer.before') !!}
@include('shop::layouts.footer.footer')
{!! view_render_event('bagisto.shop.layout.footer.after') !!}
<div class="footer-bottom">
<p>
{{ __('shop::app.webkul.copy-right') }}
</p>
</div>
</div>
<script type="text/javascript">
window.flashMessages = [];
@ -80,6 +99,8 @@
@stack('scripts')
{!! view_render_event('bagisto.shop.layout.body.after') !!}
</body>
</html>

View File

@ -1,3 +1,7 @@
{!! view_render_event('bagisto.shop.products.add_to_cart.before', ['product' => $product]) !!}
<button type="submit" class="btn btn-lg btn-primary addtocart" {{ $product->type != 'configurable' && !$product->haveSufficientQuantity(1) ? 'disabled' : '' }}>
{{ __('shop::app.products.add-to-cart') }}
</button>
</button>
{!! view_render_event('bagisto.shop.products.add_to_cart.after', ['product' => $product]) !!}

View File

@ -1,5 +1,9 @@
{!! view_render_event('bagisto.shop.products.add_to.before', ['product' => $product]) !!}
<div class="cart-fav-seg">
@include ('shop::products.add-to-cart', ['product' => $product])
@include('shop::products.wishlist')
</div>
</div>
{!! view_render_event('bagisto.shop.products.add_to.after', ['product' => $product]) !!}

View File

@ -1,3 +1,7 @@
{!! view_render_event('bagisto.shop.products.buy_now.before', ['product' => $product]) !!}
<button type="submit" data-href="{{ route('shop.product.buynow', $product->id)}}" class="btn btn-lg btn-primary buynow" {{ $product->type != 'configurable' && !$product->haveSufficientQuantity(1) ? 'disabled' : '' }}>
{{ __('shop::app.products.buy-now') }}
</button>
</button>
{!! view_render_event('bagisto.shop.products.buy_now.after', ['product' => $product]) !!}

View File

@ -13,6 +13,8 @@
@inject ('productRepository', 'Webkul\Product\Repositories\ProductRepository')
<div class="main">
{!! view_render_event('bagisto.shop.products.index.before', ['category' => $category]) !!}
<div class="category-container">
@include ('shop::products.list.layered-navigation')
@ -48,10 +50,14 @@
</div>
@endif
{!! view_render_event('bagisto.shop.products.index.pagination.before') !!}
<div class="bottom-toolbar">
{{ $products->appends(request()->input())->links() }}
</div>
{!! view_render_event('bagisto.shop.products.index.pagination.after') !!}
@else
<div class="product-list empty">
@ -65,6 +71,8 @@
@endif
</div>
</div>
{!! view_render_event('bagisto.shop.products.index.after', ['category' => $category]) !!}
</div>
@stop

View File

@ -1,3 +1,5 @@
{!! view_render_event('bagisto.shop.products.list.card.before', ['product' => $product]) !!}
<div class="product-card">
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
@ -59,4 +61,6 @@
@endif
</div>
</div>
</div>
{!! view_render_event('bagisto.shop.products.list.card.after', ['product' => $product]) !!}

View File

@ -2,8 +2,12 @@
<div class="layered-filter-wrapper">
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.before') !!}
<layered-navigation></layered-navigation>
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.after') !!}
</div>
@push('scripts')

View File

@ -1,5 +1,7 @@
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
{!! view_render_event('bagisto.shop.products.list.toolbar.before') !!}
<div class="top-toolbar mb-35">
<div class="page-info">
@ -75,6 +77,8 @@
</div>
{!! view_render_event('bagisto.shop.products.list.toolbar.after') !!}
<div class="responsive-layred-filter mb-20">
<layered-navigation></layered-navigation>

View File

@ -1,3 +1,5 @@
{!! view_render_event('bagisto.shop.products.price.before', ['product' => $product]) !!}
<div class="product-price">
@inject ('priceHelper', 'Webkul\Product\Helpers\Price')
@ -28,4 +30,6 @@
@endif
</div>
</div>
{!! view_render_event('bagisto.shop.products.price.after', ['product' => $product]) !!}

View File

@ -1,4 +1,7 @@
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
{!! view_render_event('bagisto.shop.products.review.before', ['product' => $product]) !!}
@if ($total = $reviewHelper->getTotalReviews($product))
<div class="product-ratings mb-10">
@ -16,4 +19,6 @@
</div>
</div>
@endif
@endif
{!! view_render_event('bagisto.shop.products.review.after', ['product' => $product]) !!}

View File

@ -1,8 +1,11 @@
@extends('shop::layouts.master')
@section('page_title')
{{ __('shop::app.reviews.add-review-page-title') }} - {{ $product->name }}
@endsection
@section('content-wrapper')
<section class="review">
{{-- <div class="category-breadcrumbs">
@ -101,26 +104,29 @@
</div>
</section>
@endsection
@push('scripts')
<script>
function calculateRating(id){
<script>
var a=document.getElementById(id);
document.getElementById("rating").value = id;
function calculateRating(id){
for (let i=1 ; i <= 5 ; i++){
var a=document.getElementById(id);
document.getElementById("rating").value = id;
if(id >= i){
document.getElementById(i).style.color="#242424";
}else{
document.getElementById(i).style.color="#d4d4d4";
for (let i=1 ; i <= 5 ; i++){
if(id >= i){
document.getElementById(i).style.color="#242424";
}else{
document.getElementById(i).style.color="#d4d4d4";
}
}
}
}
</script>
</script>
@endpush

View File

@ -10,6 +10,9 @@
@stop
@section('content-wrapper')
{!! view_render_event('bagisto.shop.products.view.before', ['product' => $product]) !!}
<section class="product-detail">
<div class="layouter">
@ -33,10 +36,17 @@
@include ('shop::products.view.stock', ['product' => $product])
{!! view_render_event('bagisto.shop.products.view.short_description.before', ['product' => $product]) !!}
<div class="description">
{!! $product->short_description !!}
</div>
{!! view_render_event('bagisto.shop.products.view.short_description.after', ['product' => $product]) !!}
{!! view_render_event('bagisto.shop.products.view.quantity.before', ['product' => $product]) !!}
<div class="quantity control-group" :class="[errors.has('quantity') ? 'has-error' : '']">
<label class="required">{{ __('shop::app.products.quantity') }}</label>
@ -46,6 +56,8 @@
<span class="control-error" v-if="errors.has('quantity')">@{{ errors.first('quantity') }}</span>
</div>
{!! view_render_event('bagisto.shop.products.view.quantity.after', ['product' => $product]) !!}
@if ($product->type == 'configurable')
<input type="hidden" value="true" name="is_configurable">
@else
@ -54,6 +66,9 @@
@include ('shop::products.view.configurable-options')
{!! view_render_event('bagisto.shop.products.view.description.before', ['product' => $product]) !!}
<accordian :title="'{{ __('shop::app.products.description') }}'" :active="true">
<div slot="header">
{{ __('shop::app.products.description') }}
@ -67,6 +82,8 @@
</div>
</accordian>
{!! view_render_event('bagisto.shop.products.view.description.before', ['product' => $product]) !!}
@include ('shop::products.view.attributes')
@include ('shop::products.view.reviews')
@ -78,6 +95,8 @@
@include ('shop::products.view.up-sells')
</section>
{!! view_render_event('bagisto.shop.products.view.after', ['product' => $product]) !!}
@endsection
@push('scripts')

View File

@ -1,5 +1,7 @@
@inject ('productViewHelper', 'Webkul\Product\Helpers\View')
{!! view_render_event('bagisto.shop.products.view.attributes.before', ['product' => $product]) !!}
@if ($customAttributeValues = $productViewHelper->getAdditionalData($product))
<accordian :title="'{{ __('shop::app.products.specification') }}'" :active="false">
<div slot="header">
@ -14,7 +16,7 @@
<tr>
<td>{{ $attribute['label'] }}</td>
<td> - {{ $attribute['value'] }}</td>
<td>{{ $attribute['value'] }}</td>
</tr>
@endforeach
@ -22,4 +24,6 @@
</table>
</div>
</accordian>
@endif
@endif
{!! view_render_event('bagisto.shop.products.view.attributes.after', ['product' => $product]) !!}

View File

@ -2,8 +2,12 @@
@inject ('configurableOptionHelper', 'Webkul\Product\Helpers\ConfigurableOption')
{!! view_render_event('bagisto.shop.products.view.configurable-options.before', ['product' => $product]) !!}
<product-options></product-options>
{!! view_render_event('bagisto.shop.products.view.configurable-options.after', ['product' => $product]) !!}
@push('scripts')
<script type="text/x-template" id="product-options-template">

View File

@ -1,6 +1,8 @@
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
<?php $images = $productImageHelper->getGalleryImages($product); ?>
{!! view_render_event('bagisto.shop.products.view.gallery.before', ['product' => $product]) !!}
<div class="product-image-group">
<div class="cp-spinner cp-round" id="loader">
@ -12,6 +14,8 @@
</div>
{!! view_render_event('bagisto.shop.products.view.gallery.after', ['product' => $product]) !!}
@push('scripts')
<script type="text/x-template" id="product-gallery-template">

View File

@ -1,5 +1,9 @@
{!! view_render_event('bagisto.shop.products.view.product-add.after', ['product' => $product]) !!}
<div class="add-to-buttons">
@include ('shop::products.add-to-cart', ['product' => $product])
@include ('shop::products.buy-now')
</div>
</div>
{!! view_render_event('bagisto.shop.products.view.product-add.after', ['product' => $product]) !!}

View File

@ -1,5 +1,7 @@
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
{!! view_render_event('bagisto.shop.products.view.reviews.after', ['product' => $product]) !!}
@if ($total = $reviewHelper->getTotalReviews($product))
<div class="rating-reviews">
<div class="rating-header">
@ -81,4 +83,6 @@
</div>
</div>
@endauth
@endif
@endif
{!! view_render_event('bagisto.shop.products.view.reviews.after', ['product' => $product]) !!}

View File

@ -1,3 +1,7 @@
{!! view_render_event('bagisto.shop.products.view.stock.before', ['product' => $product]) !!}
<div class="stock-status {{ $product->type != 'configurable' && !$product->haveSufficientQuantity(1) ? '' : 'active' }}">
{{ $product->type != 'configurable' && !$product->haveSufficientQuantity(1) ? __('shop::app.products.out-of-stock') : __('shop::app.products.in-stock') }}
</div>
</div>
{!! view_render_event('bagisto.shop.products.view.stock.after', ['product' => $product]) !!}

View File

@ -1,3 +1,5 @@
{!! view_render_event('bagisto.shop.products.view.up-sells.after', ['product' => $product]) !!}
@if ($product->up_sells()->count())
<div class="attached-products-wrapper">
@ -17,4 +19,6 @@
</div>
</div>
@endif
@endif
{!! view_render_event('bagisto.shop.products.view.up-sells.after', ['product' => $product]) !!}

View File

@ -1,5 +1,9 @@
@auth('customer')
{!! view_render_event('bagisto.shop.products.wishlist.before') !!}
<a class="add-to-wishlist" href="{{ route('customer.wishlist.add', $product->id) }}" id="wishlist-changer">
<span class="icon wishlist-icon"></span>
</a>
{!! view_render_event('bagisto.shop.products.wishlist.after') !!}
@endauth

View File

@ -8,7 +8,9 @@
@if(!$products)
{{ __('shop::app.search.no-results') }}
@endif
<div class="main mb-30" style="min-height: 27vh;">
@if($products->isEmpty())
<div class="search-result-status">
<h2>{{ __('shop::app.products.whoops') }}</h2>
@ -34,4 +36,5 @@
</div>
@endif
</div>
@endsection

View File

@ -1,50 +0,0 @@
@extends('shop::layouts.master')
@section('page_title')
{{ __('shop::app.home.page-title') }}
@endsection
@section('content-wrapper')
{{-- <ul>
@foreach ($statesCountries as $key => $stateCountry)
<li><h3>{{ $key }}</h3></li>
<select>
@foreach ($stateCountry as $key1 => $state)
<option value="{{$key1}}">{{ $state }}</option>
@endforeach
</select>
@endforeach
</ul> --}}
<script type="text/x-template" id="country-state-select">
<div>
<li>
<h3>{{ $key }}</h3>
</li>
<select v-model="country">
</select>
</div>
</script>
<script>
var countryState = @json($statesCountries);
Vue.component('country-state-select', {
template: '#country-state-select',
data: () => ({
country: '',
state: ''
});
mounted: function() {
for(country in statesCountries) {
console.log(country);
}
}
});
</script>
@endsection

View File

@ -1,5 +1,7 @@
<?php
use Webkul\Theme\ViewRenderEventManager;
if (! function_exists('themes')) {
function themes()
{
@ -10,6 +12,19 @@ if (! function_exists('themes')) {
if (!function_exists('bagisto_asset')) {
function bagisto_asset($path, $secure = null)
{
return app()->make('themes')->url($path, $secure);
return themes()->url($path, $secure);
}
}
if (!function_exists('view_render_event')) {
function view_render_event($eventName, $params = null)
{
app()->singleton(ViewRenderEventManager::class);
$viewEventMagnager = app()->make(ViewRenderEventManager::class);
$viewEventMagnager->handleRenderEvent($eventName, $params);
return $viewEventMagnager->render();
}
}

View File

@ -0,0 +1,67 @@
<?php
namespace Webkul\Theme;
use Illuminate\Support\Facades\Event;
class ViewRenderEventManager
{
/**
* Contains all themes
*
* @var array
*/
protected $templates = [];
/**
* Paramters passed with event
*
* @var array
*/
protected $params;
/**
* Fires event for rendering template
*
* @param string $eventName
* @param array|null $params
* @return string
*/
public function handleRenderEvent($eventName, $params = null)
{
$this->params = $params ?? [];
Event::fire($eventName, $this);
return $this->templates;
}
/**
* Add templates for render
*
* @param string $template
* @return void
*/
public function addTemplate($template)
{
array_push($this->templates, $template);
}
/**
* Renders templates
*
* @return string
*/
public function render()
{
$string = "";
foreach ($this->templates as $template) {
if (view()->exists($template)) {
$string .= view($template, $this->params)->render();
}
}
return $string;
}
}

View File

@ -15,6 +15,7 @@
"laravel-mix": "^2.1",
"laravel-mix-merge-manifest": "^0.1.1",
"jquery": "^3.2",
"vue": "^2.1.10"
"vue": "^2.1.10",
"flatpickr": "^4.4.6"
}
}

View File

@ -903,7 +903,7 @@ h2 {
padding: 10px;
border-bottom: solid 1px #d3d3d3;
color: #3a3a3a;
vertical-align: middle;
vertical-align: top;
}
.table table tbody td.actions {
@ -1112,6 +1112,18 @@ h2 {
height: 100px;
}
.control-group.date::after, .control-group.datetime::after {
background-image: url("../images/Icon-Calendar.svg");
width: 24px;
height: 24px;
content: '';
display: inline-block;
vertical-align: middle;
margin-left: -34px;
margin-top: 2px;
pointer-events: none;
}
.control-group .control-info {
display: block;
font-style: italic;

View File

@ -177,8 +177,8 @@ module.exports = function normalizeComponent (
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(2);
__webpack_require__(51);
module.exports = __webpack_require__(52);
__webpack_require__(57);
module.exports = __webpack_require__(58);
/***/ }),
@ -201,6 +201,10 @@ Vue.component("image-item", __webpack_require__(42));
Vue.directive("slugify", __webpack_require__(45));
Vue.directive("code", __webpack_require__(47));
Vue.directive("alert", __webpack_require__(49));
Vue.component("datetime", __webpack_require__(51));
Vue.component("date", __webpack_require__(54));
__webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"flatpickr/dist/flatpickr.css\""); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
/***/ }),
/* 3 */
@ -2928,6 +2932,252 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {
var disposed = false
var normalizeComponent = __webpack_require__(0)
/* script */
var __vue_script__ = __webpack_require__(52)
/* template */
var __vue_template__ = __webpack_require__(53)
/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = null
/* scopeId */
var __vue_scopeId__ = null
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
__vue_script__,
__vue_template__,
__vue_template_functional__,
__vue_styles__,
__vue_scopeId__,
__vue_module_identifier__
)
Component.options.__file = "src/Resources/assets/js/components/datetime.vue"
/* hot reload */
if (false) {(function () {
var hotAPI = require("vue-hot-reload-api")
hotAPI.install(require("vue"), false)
if (!hotAPI.compatible) return
module.hot.accept()
if (!module.hot.data) {
hotAPI.createRecord("data-v-4ff36e47", Component.options)
} else {
hotAPI.reload("data-v-4ff36e47", Component.options)
}
module.hot.dispose(function (data) {
disposed = true
})
})()}
module.exports = Component.exports
/***/ }),
/* 52 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
throw new Error("Cannot find module \"flatpickr\"");
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
props: {
name: String,
value: String
},
data: function data() {
return {
datepicker: null
};
},
mounted: function mounted() {
var this_this = this;
var element = this.$el.getElementsByTagName("input")[0];
this.datepicker = new __WEBPACK_IMPORTED_MODULE_0_flatpickr___default.a(element, {
allowInput: true,
altFormat: "Y-m-d H:i:s",
dateFormat: "Y-m-d H:i:s",
enableTime: true,
onChange: function onChange(selectedDates, dateStr, instance) {
this_this.$emit('onChange', dateStr);
}
});
}
});
/***/ }),
/* 53 */
/***/ (function(module, exports, __webpack_require__) {
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"span",
[
_vm._t("default", [
_c("input", {
staticClass: "control",
attrs: { type: "text", name: _vm.name, "data-input": "" },
domProps: { value: _vm.value }
})
])
],
2
)
}
var staticRenderFns = []
render._withStripped = true
module.exports = { render: render, staticRenderFns: staticRenderFns }
if (false) {
module.hot.accept()
if (module.hot.data) {
require("vue-hot-reload-api") .rerender("data-v-4ff36e47", module.exports)
}
}
/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {
var disposed = false
var normalizeComponent = __webpack_require__(0)
/* script */
var __vue_script__ = __webpack_require__(55)
/* template */
var __vue_template__ = __webpack_require__(56)
/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = null
/* scopeId */
var __vue_scopeId__ = null
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
__vue_script__,
__vue_template__,
__vue_template_functional__,
__vue_styles__,
__vue_scopeId__,
__vue_module_identifier__
)
Component.options.__file = "src/Resources/assets/js/components/date.vue"
/* hot reload */
if (false) {(function () {
var hotAPI = require("vue-hot-reload-api")
hotAPI.install(require("vue"), false)
if (!hotAPI.compatible) return
module.hot.accept()
if (!module.hot.data) {
hotAPI.createRecord("data-v-2f144afa", Component.options)
} else {
hotAPI.reload("data-v-2f144afa", Component.options)
}
module.hot.dispose(function (data) {
disposed = true
})
})()}
module.exports = Component.exports
/***/ }),
/* 55 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
throw new Error("Cannot find module \"flatpickr\"");
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
props: {
name: String,
value: String
},
data: function data() {
return {
datepicker: null
};
},
mounted: function mounted() {
var this_this = this;
var element = this.$el.getElementsByTagName('input')[0];
this.datepicker = new __WEBPACK_IMPORTED_MODULE_0_flatpickr___default.a(element, {
altFormat: 'Y-m-d',
dateFormat: 'Y-m-d',
onChange: function onChange(selectedDates, dateStr, instance) {
this_this.$emit('onChange', dateStr);
}
});
}
});
/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"span",
[
_vm._t("default", [
_c("input", {
staticClass: "control",
attrs: { type: "text", name: _vm.name, "data-input": "" },
domProps: { value: _vm.value }
})
])
],
2
)
}
var staticRenderFns = []
render._withStripped = true
module.exports = { render: render, staticRenderFns: staticRenderFns }
if (false) {
module.hot.accept()
if (module.hot.data) {
require("vue-hot-reload-api") .rerender("data-v-2f144afa", module.exports)
}
}
/***/ }),
/* 57 */
/***/ (function(module, exports) {
$(function () {
@ -3018,7 +3268,7 @@ $(function () {
});
/***/ }),
/* 52 */
/* 58 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin

View File

@ -14,3 +14,7 @@ Vue.component("image-item", require("./components/image/image-item"));
Vue.directive("slugify", require("./directives/slugify"));
Vue.directive("code", require("./directives/code"));
Vue.directive("alert", require("./directives/alert"));
Vue.component("datetime", require("./components/datetime"));
Vue.component("date", require("./components/date"));
require('flatpickr/dist/flatpickr.css');

View File

@ -16,9 +16,9 @@ export default {
},
data() {
return {
return {
datepicker: null
};
};
},
mounted() {

View File

@ -253,7 +253,7 @@ h2 {
padding: 10px;
border-bottom: solid 1px #d3d3d3;
color: $font-color;
vertical-align: middle;
vertical-align: top;
&.actions {
text-align: right;