catalog rule form changed to muliti attribute set for single condition
This commit is contained in:
parent
a36776732b
commit
3115722fc8
|
|
@ -173,23 +173,6 @@ body {
|
|||
height: 90%;
|
||||
}
|
||||
|
||||
// .close-nav-aside {
|
||||
// width: 100%;
|
||||
// padding: 20px;
|
||||
// text-align: center;
|
||||
// border: 1px solid $border-color;
|
||||
|
||||
// .icon {
|
||||
// height: 24px;
|
||||
// width: 24px;
|
||||
// }
|
||||
// }
|
||||
|
||||
// .close-nav-aside:hover {
|
||||
// background: white;
|
||||
// cursor: pointer;
|
||||
// }
|
||||
|
||||
a {
|
||||
padding: 15px;
|
||||
display: block;
|
||||
|
|
@ -277,6 +260,27 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
.control-container {
|
||||
border: 1px solid #c7c7c7;
|
||||
padding: 20px;
|
||||
width: 50%;
|
||||
|
||||
.control-group {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-content: center;
|
||||
justify-content: flex-start;
|
||||
padding: 10px;
|
||||
border: 1px solid #c7c7c7;
|
||||
border-radius: 2px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.control-group::last-child {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.control-group {
|
||||
label {
|
||||
width: 70%;
|
||||
|
|
|
|||
|
|
@ -40,30 +40,34 @@
|
|||
{{-- <accordian :active="true" title="Information"> --}}
|
||||
<div class="control-group" :class="[errors.has('name') ? 'has-error' : '']">
|
||||
<label for="name" class="required">{{ __('admin::app.promotion.general-info.name') }}</label>
|
||||
|
||||
<input type="text" class="control" name="name" v-model="name" v-validate="'required'" value="{{ old('name') }}" data-vv-as=""{{ __('admin::app.promotion.general-info.firstname') }}"">
|
||||
<span class="control-error" v-if="errors.has('name')">@{{ errors.first('name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('description') ? 'has-error' : '']">
|
||||
<label for="description">{{ __('admin::app.promotion.general-info.description') }}</label>
|
||||
|
||||
<textarea class="control" name="description" v-model="description" v-validate="'required'" value="{{ old('description') }}" data-vv-as=""{{ __('admin::app.promotion.general-info.description') }}""></textarea>
|
||||
<span class="control-error" v-if="errors.has('description')">@{{ errors.first('description') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('customer_groups[]') ? 'has-error' : '']">
|
||||
<label for="customer_groups" class="required">{{ __('admin::app.promotion.general-info.cust-groups') }}</label>
|
||||
|
||||
<select type="text" class="control" name="customer_groups[]" v-model="customer_groups" v-validate="'required'" value="{{ old('customer_groups') }}" data-vv-as=""{{ __('admin::app.promotion.general-info.cust-groups') }}"" multiple="multiple">
|
||||
<option disabled="disabled">Select Customer Groups</option>
|
||||
@foreach(app('Webkul\Customer\Repositories\CustomerGroupRepository')->all() as $channel)
|
||||
<option value="{{ $channel->id }}">{{ $channel->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<span class="control-error" v-if="errors.has('customer_groups[]')">@{{ errors.first('customer_groups') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('channels') ? 'has-error' : '']">
|
||||
<label for="channels" class="required">{{ __('admin::app.promotion.general-info.channels') }}</label>
|
||||
<select type="text" class="control" name="channels" v-model="channels" v-validate="'required'" value="{{ old('channels') }}" data-vv-as=""{{ __('admin::app.promotion.general-info.cust-groups') }}"" multiple="multiple">
|
||||
<select type="text" class="control" name="channels[]" v-model="channels" v-validate="'required'" value="{{ old('channels') }}" data-vv-as=""{{ __('admin::app.promotion.general-info.cust-groups') }}"" multiple="multiple">
|
||||
<option disabled="disabled">Select Channels</option>
|
||||
@foreach(app('Webkul\Core\Repositories\ChannelRepository')->all() as $channel)
|
||||
<option value="{{ $channel->id }}">{{ $channel->name }}</option>
|
||||
|
|
@ -109,41 +113,50 @@
|
|||
</div>
|
||||
|
||||
<div class="condition-set">
|
||||
<!-- Attribute -->
|
||||
<div v-for="(attr, index) in attrs" :key="index">
|
||||
<div class="control-group" :key="index" style="display: flex; flex-direction: row; align-content: center; justify-content: flex-start;">
|
||||
<span style="padding-top: 18px; margin-right: 15px;">Attribute is </span>
|
||||
|
||||
<select class="control" name="attributes[][attribute]" v-model="attrs[index].attribute" v-validate="'required'" style="width: 120px; height: 60px; margin-right: 15px;" title="You Can Make Multiple Selections Here" multiple>
|
||||
<option disabled="disabled">Select attribute</option>
|
||||
<option v-for="attribute in attributes" :value="attribute.id">@{{ attribute.name }}</option>
|
||||
</select>
|
||||
|
||||
<select class="control" name="attributes[][condition]" v-model="attrs[index].condition" v-validate="'required'" style="width: 120px; margin-right: 15px;">
|
||||
<option>contains</option>
|
||||
<option>is any of</option>
|
||||
</select>
|
||||
|
||||
<input type="text" class="control" name="attributes[][value]" v-model="attrs[index].value" placeholder="Enter Value(s)" title="Use comma for multiple values" style="width: 180px;">
|
||||
<div class="control-container mt-20">
|
||||
<span>Attribute is </span>
|
||||
|
||||
<span class="icon cross-icon" style="margin-top: 12px; height: 32px; width: 32px;" v-on:click="removeAttr(index)"></span>
|
||||
|
||||
<div class="control-group mt-10" :key="index">
|
||||
<select class="control" name="attributes[attribute][][]" v-model="attrs[index].attribute" v-validate="'required'" title="You Can Make Multiple Selections Here" multiple>
|
||||
<option disabled="disabled">Select attribute</option>
|
||||
<option v-for="attribute in attributes" :value="attribute.id">@{{ attribute.name }}</option>
|
||||
</select>
|
||||
|
||||
<select class="control" name="attributes[condition][]" v-model="attrs[index].condition" v-validate="'required'" style="margin-right: 15px;">
|
||||
<option>is</option>
|
||||
<option>is any of</option>
|
||||
<option>contains</option>
|
||||
</select>
|
||||
|
||||
<input type="text" class="control" name="attributes[value][]" v-model="attrs[index].value" placeholder="Enter Value(s)" title="Use comma for multiple values">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- category -->
|
||||
<div v-for="(cat, index) in cats">
|
||||
<div class="control-group" :key="index" style="display: flex; flex-direction: row; align-content: center; justify-content: flex-start;">
|
||||
<span style="padding-top: 18px; height: 60px; margin-right: 15px;">Category </span>
|
||||
<div class="control-container mt-20">
|
||||
<span>Category </span>
|
||||
|
||||
<select class="control" name="attributes[][condition]" v-model="cats[index].condition" v-validate="'required'" style="width: 120px; margin-right: 15px;" title="You Can Make Multiple Selections Here" multiple>
|
||||
<option>is</option>
|
||||
<option>is any of</option>
|
||||
</select>
|
||||
<span class="icon cross-icon" style="height: 32px; width: 32px;" v-on:click="removeCat(index)"></span>
|
||||
|
||||
<select class="control" name="categories[][category]" v-model="cats[index].category" v-validate="'required'" value="{{ old('category') }}" data-vv-as=""{{ __('admin::app.promotion.category') }}"" style="width: 120px; margin-right: 15px;">
|
||||
<option disabled="disabled">Select Category</option>
|
||||
<option v-for="category in categories" :value="category.id">@{{ category.name }}</option>
|
||||
</select>
|
||||
<div class="control-group mt-15" :key="index">
|
||||
<select class="control" name="categories[condition][]" v-model="cats[index].condition" v-validate="'required'" title="You Can Make Multiple Selections Here">
|
||||
<option>is</option>
|
||||
<option>is any of</option>
|
||||
<option>contains</option>
|
||||
</select>
|
||||
|
||||
<span class="icon cross-icon" style="margin-top: 12px; height: 32px; width: 32px;" v-on:click="removeCat(index)"></span>
|
||||
<select class="control" name="categories[category][]" v-model="cats[index].category" v-validate="'required'" value="{{ old('category') }}" data-vv-as=""{{ __('admin::app.promotion.category') }}"" style="margin-right: 15px;" multiple>
|
||||
<option disabled="disabled">Select Category</option>
|
||||
<option v-for="category in categories" :value="category.id">@{{ category.name }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -164,11 +177,11 @@
|
|||
conditions: [],
|
||||
attrs_count: 0,
|
||||
cats_count: 0,
|
||||
name: null,
|
||||
priority: 0,
|
||||
starts_from: null,
|
||||
ends_till: null,
|
||||
description: null,
|
||||
name: '10% OFF',
|
||||
priority: 1,
|
||||
starts_from: 'a',
|
||||
ends_till: 'b',
|
||||
description: 'something',
|
||||
customer_groups: [],
|
||||
criteria: null,
|
||||
attr: {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,49 @@
|
|||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<catalog-rule></catalog-rule>
|
||||
<div class="form-container">
|
||||
@method('PUT')
|
||||
|
||||
@csrf()
|
||||
|
||||
<div class="control-group" :class="[errors.has('identifier') ? 'has-error' : '']">
|
||||
<label for="identifier" class="required">{{ __('admin::app.configuration.tax-rates.identifier') }}</label>
|
||||
<input v-validate="'required'" class="control" id="identifier" name="identifier" data-vv-as=""{{ __('admin::app.configuration.tax-rates.identifier') }}"" value="{{ $taxRate->identifier }}" disabled="disabled"/>
|
||||
<input type="hidden" name="identifier" value="{{ $taxRate->identifier }}"/>
|
||||
<span class="control-error" v-if="errors.has('identifier')">@{{ errors.first('identifier') }}</span>
|
||||
</div>
|
||||
|
||||
@include ('admin::customers.country-state', ['countryCode' => old('country') ?? $taxRate->country, 'stateCode' => old('state') ?? $taxRate->state])
|
||||
|
||||
@if ($taxRate->is_zip)
|
||||
<input type="hidden" id="is_zip" name="is_zip" value="{{ $taxRate->is_zip }}">
|
||||
|
||||
<div class="control-group" :class="[errors.has('zip_from') ? 'has-error' : '']">
|
||||
<label for="zip_from" class="required">{{ __('admin::app.configuration.tax-rates.zip_from') }}</label>
|
||||
<input v-validate="'required'" class="control" id="zip_from" name="zip_from" data-vv-as=""{{ __('admin::app.configuration.tax-rates.zip_from') }}"" value="{{ $taxRate->zip_from }}" />
|
||||
<span class="control-error" v-if="errors.has('zip_from')">@{{ errors.first('zip_from') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('zip_to') ? 'has-error' : '']">
|
||||
<label for="zip_to" class="required">{{ __('admin::app.configuration.tax-rates.zip_to') }}</label>
|
||||
<input v-validate="'required'" class="control" id="zip_to" name="zip_to" data-vv-as=""{{ __('admin::app.configuration.tax-rates.zip_to') }}"" value="{{ $taxRate->zip_to }}" />
|
||||
<span class="control-error" v-if="errors.has('zip_to')">@{{ errors.first('zip_to') }}</span>
|
||||
</div>
|
||||
@else
|
||||
<div class="control-group" :class="[errors.has('zip_code') ? 'has-error' : '']">
|
||||
<label for="zip_code" class="required">{{ __('admin::app.configuration.tax-rates.zip_code') }}</label>
|
||||
<input v-validate="'required'" class="control" id="zip_code" name="zip_code" data-vv-as=""{{ __('admin::app.configuration.tax-rates.zip_code') }}"" value="{{ $taxRate->zip_code }}" />
|
||||
<span class="control-error" v-if="errors.has('zip_code')">@{{ errors.first('zip_code') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="control-group" :class="[errors.has('tax_rate') ? 'has-error' : '']">
|
||||
<label for="tax_rate" class="required">{{ __('admin::app.configuration.tax-rates.tax_rate') }}</label>
|
||||
<input v-validate="'required|min_value:0.0001'" class="control" id="tax_rate" name="tax_rate" data-vv-as=""{{ __('admin::app.configuration.tax-rates.tax_rate') }}"" value="{{ $taxRate->tax_rate }}" />
|
||||
<span class="control-error" v-if="errors.has('tax_rate')">@{{ errors.first('tax_rate') }}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -38,116 +38,6 @@ input {
|
|||
border-radius: 0px !important;
|
||||
}
|
||||
|
||||
//margin bottom classes
|
||||
.mb-10 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.mb-15 {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.mb-20 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mb-25 {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.mb-30 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.mb-35 {
|
||||
margin-bottom: 35px;
|
||||
}
|
||||
|
||||
.mb-40 {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.mb-45 {
|
||||
margin-bottom: 45px;
|
||||
}
|
||||
|
||||
.mb-50 {
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.mb-60 {
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
.mb-70 {
|
||||
margin-bottom: 70px;
|
||||
}
|
||||
|
||||
.mb-80 {
|
||||
margin-bottom: 80px;
|
||||
}
|
||||
|
||||
.mb-90 {
|
||||
margin-bottom: 90px;
|
||||
}
|
||||
|
||||
//margin-top
|
||||
.mt-5 {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.mt-10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.mt-15 {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.mt-20 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.mt-25 {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.mt-30 {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.mt-35 {
|
||||
margin-top: 35px;
|
||||
}
|
||||
|
||||
.mt-40 {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.mt-45 {
|
||||
margin-top: 45px;
|
||||
}
|
||||
|
||||
.mt-50 {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.mt-60 {
|
||||
margin-top: 60px;
|
||||
}
|
||||
|
||||
.mt-70 {
|
||||
margin-top: 70px;
|
||||
}
|
||||
|
||||
.mt-80 {
|
||||
margin-top: 80px;
|
||||
}
|
||||
|
||||
.mt-90 {
|
||||
margin-top: 90px;
|
||||
}
|
||||
|
||||
//pagination
|
||||
.pagination.shop{
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,116 @@
|
|||
outline: none;
|
||||
}
|
||||
|
||||
//margin bottom classes
|
||||
.mb-10 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.mb-15 {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.mb-20 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mb-25 {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.mb-30 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.mb-35 {
|
||||
margin-bottom: 35px;
|
||||
}
|
||||
|
||||
.mb-40 {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.mb-45 {
|
||||
margin-bottom: 45px;
|
||||
}
|
||||
|
||||
.mb-50 {
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.mb-60 {
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
.mb-70 {
|
||||
margin-bottom: 70px;
|
||||
}
|
||||
|
||||
.mb-80 {
|
||||
margin-bottom: 80px;
|
||||
}
|
||||
|
||||
.mb-90 {
|
||||
margin-bottom: 90px;
|
||||
}
|
||||
|
||||
//margin-top
|
||||
.mt-5 {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.mt-10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.mt-15 {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.mt-20 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.mt-25 {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.mt-30 {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.mt-35 {
|
||||
margin-top: 35px;
|
||||
}
|
||||
|
||||
.mt-40 {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.mt-45 {
|
||||
margin-top: 45px;
|
||||
}
|
||||
|
||||
.mt-50 {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.mt-60 {
|
||||
margin-top: 60px;
|
||||
}
|
||||
|
||||
.mt-70 {
|
||||
margin-top: 70px;
|
||||
}
|
||||
|
||||
.mt-80 {
|
||||
margin-top: 80px;
|
||||
}
|
||||
|
||||
.mt-90 {
|
||||
margin-top: 90px;
|
||||
}
|
||||
|
||||
body {
|
||||
letter-spacing: -0.26px;
|
||||
line-height: 19px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue