Merge pull request #289 from bagisto/jitendra
Issues #286, #284, #279, #277, #276, #273, #270, #279, #226, #182, #165
This commit is contained in:
commit
afa69be0ce
|
|
@ -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
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/admin.js": "/js/admin.js?id=1d3c0ea423bffae501e9",
|
||||
"/js/admin.js": "/js/admin.js?id=c70dacdf945a32e04b77",
|
||||
"/css/admin.css": "/css/admin.css?id=201f91bc553baa11139f"
|
||||
}
|
||||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -149,18 +149,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>
|
||||
<select class="control" id="value_per_locale" name="value_per_locale" disabled>
|
||||
|
|
|
|||
|
|
@ -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=""{{ __('admin::app.catalog.categories.description') }}"">
|
||||
{{ old('description') }}</textarea>
|
||||
<textarea v-validate="'required'" class="control" id="description" name="description" data-vv-as=""{{ __('admin::app.catalog.categories.description') }}"">{{ old('description') }}</textarea>
|
||||
<span class="control-error" v-if="errors.has('description')">@{{ errors.first('description') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -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=""{{ __('admin::app.catalog.categories.description') }}"">
|
||||
{{ old($locale)['description'] ?: $category->translate($locale)['description'] }}
|
||||
</textarea>
|
||||
<textarea v-validate="'required'" class="control" id="description" name="{{$locale}}[description]" data-vv-as=""{{ __('admin::app.catalog.categories.description') }}"">{{ old($locale)['description'] ?: $category->translate($locale)['description'] }}</textarea>
|
||||
<span class="control-error" v-if="errors.has('{{$locale}}[description]')">@{{ errors.first('{!!$locale!!}[description]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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=""{{ __('admin::app.settings.inventory_sources.contact_email') }}"" value="{{ old('contact_email') }}"/>
|
||||
<input class="control" v-validate="'required|email'" class="required" id="contact_email" name="contact_email" data-vv-as=""{{ __('admin::app.settings.inventory_sources.contact_email') }}"" value="{{ old('contact_email') }}"/>
|
||||
<span class="control-error" v-if="errors.has('contact_email')">@{{ errors.first('contact_email') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -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=""{{ __('admin::app.settings.inventory_sources.contact_email') }}"" value="{{ old('contact_email') ?: $inventorySource->symbol }}"/>
|
||||
<input class="control" v-validate="'required|email'" id="contact_email" name="contact_email" data-vv-as=""{{ __('admin::app.settings.inventory_sources.contact_email') }}"" value="{{ old('contact_email') ?: $inventorySource->contact_email }}"/>
|
||||
<span class="control-error" v-if="errors.has('contact_email')">@{{ errors.first('contact_email') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -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=""{{ __('admin::app.configuration.tax-categories.description') }}"">
|
||||
{{ $taxCategory->description }}
|
||||
</textarea>
|
||||
<textarea v-validate="'required'" class="control" id="description" name="description" data-vv-as=""{{ __('admin::app.configuration.tax-categories.description') }}"">{{ $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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -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'];
|
||||
|
||||
|
|
|
|||
|
|
@ -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.');
|
||||
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/shop.js": "/js/shop.js?id=c6ba9f43bd31f175a665",
|
||||
"/css/shop.css": "/css/shop.css?id=0f78d361a01660ffd946"
|
||||
"/css/shop.css": "/css/shop.css?id=637386a2fb6b1de9c4c4"
|
||||
}
|
||||
|
|
@ -2815,6 +2815,16 @@ section.review {
|
|||
}
|
||||
|
||||
.menu-block {
|
||||
margin-bottom: 30px;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.menu-block-title {
|
||||
padding-bottom: 10px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.menubar {
|
||||
border: 1px solid $border-color;
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
<tr>
|
||||
<td>{{ $attribute['label'] }}</td>
|
||||
<td> - {{ $attribute['value'] }}</td>
|
||||
<td>{{ $attribute['value'] }}</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/ui.js": "/js/ui.js?id=b25a07d206dd0b89048f",
|
||||
"/css/ui.css": "/css/ui.css?id=8d70cfd8a1966fa0e9f8"
|
||||
"/js/ui.js": "/js/ui.js?id=1fdce572fb02cd8c7dad",
|
||||
"/css/ui.css": "/css/ui.css?id=b3cbccc46dcd819d21ab"
|
||||
}
|
||||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ export default {
|
|||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
return {
|
||||
datepicker: null
|
||||
};
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue