Resolved conflict
This commit is contained in:
commit
41ba735f05
|
|
@ -5,7 +5,6 @@
|
|||
class="control"
|
||||
id="{{ $attribute->code }}"
|
||||
|
||||
{{-- To Do (@devansh-webkul): Need to handle from the backend. --}}
|
||||
@if ($attribute->code === 'sku')
|
||||
v-validate="{ required: true, regex: /^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$/ }"
|
||||
@else
|
||||
|
|
@ -13,5 +12,7 @@
|
|||
@endif
|
||||
|
||||
data-vv-as=""{{ $attribute->admin_name }}""
|
||||
|
||||
{{ in_array($attribute->code, ['url_key']) ? 'v-slugify' : '' }}
|
||||
{{ $attribute->code == 'name' && ! $product[$attribute->code] ? 'v-slugify-target=\'url_key\'' : '' }}>
|
||||
{{ $attribute->code == 'name' && ! $product->url_key ? 'v-slugify-target=\'url_key\'' : '' }}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -123,16 +123,18 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-group" :class="[errors.has('uses_per_coupon') ? 'has-error' : '']">
|
||||
<label for="uses_per_coupon">{{ __('admin::app.promotions.cart-rules.uses-per-coupon') }}</label>
|
||||
<input class="control" id="uses_per_coupon" name="uses_per_coupon" value="{{ old('uses_per_coupon') }}"/>
|
||||
<input v-validate="'numeric'" class="control" id="uses_per_coupon" name="uses_per_coupon" data-vv-as=""{{ __('admin::app.promotions.cart-rules.uses-per-coupon') }}"" value="{{ old('uses_per_coupon') }}"/>
|
||||
<span class="control-error" v-if="errors.has('uses_per_coupon')">@{{ errors.first('uses_per_coupon') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-group" :class="[errors.has('usage_per_customer') ? 'has-error' : '']">
|
||||
<label for="usage_per_customer">{{ __('admin::app.promotions.cart-rules.uses-per-customer') }}</label>
|
||||
<input class="control" id="usage_per_customer" name="usage_per_customer" value="{{ old('usage_per_customer') }}"/>
|
||||
<input v-validate="'numeric'" class="control" id="usage_per_customer" name="usage_per_customer" data-vv-as=""{{ __('admin::app.promotions.cart-rules.uses-per-customer') }}"" value="{{ old('usage_per_customer') }}"/>
|
||||
<span class="control-info">{{ __('admin::app.promotions.cart-rules.uses-per-customer-control-info') }}</span>
|
||||
<span class="control-error" v-if="errors.has('usage_per_customer')">@{{ errors.first('usage_per_customer') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group date">
|
||||
|
|
|
|||
|
|
@ -135,19 +135,22 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-group" :class="[errors.has('uses_per_coupon') ? 'has-error' : '']">
|
||||
<label for="uses_per_coupon">{{ __('admin::app.promotions.cart-rules.uses-per-coupon') }}</label>
|
||||
|
||||
<input class="control" id="uses_per_coupon" name="uses_per_coupon" value="{{ old('uses_per_coupon') ?: $cartRule->uses_per_coupon }}"/>
|
||||
<input v-validate="'numeric'" class="control" id="uses_per_coupon" name="uses_per_coupon" data-vv-as=""{{ __('admin::app.promotions.cart-rules.uses-per-coupon') }}"" value="{{ old('uses_per_coupon') ?: $cartRule->uses_per_coupon }}"/>
|
||||
|
||||
<span class="control-error" v-if="errors.has('uses_per_coupon')">@{{ errors.first('uses_per_coupon') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-group" :class="[errors.has('usage_per_customer') ? 'has-error' : '']">
|
||||
<label for="usage_per_customer">{{ __('admin::app.promotions.cart-rules.uses-per-customer') }}</label>
|
||||
|
||||
<input class="control" id="usage_per_customer" name="usage_per_customer" value="{{ old('usage_per_customer') ?: $cartRule->usage_per_customer }}"/>
|
||||
<input v-validate="'numeric'" class="control" id="usage_per_customer" name="usage_per_customer" data-vv-as=""{{ __('admin::app.promotions.cart-rules.uses-per-customer') }}"" value="{{ old('usage_per_customer') ?: $cartRule->usage_per_customer }}"/>
|
||||
|
||||
<span class="control-info">{{ __('admin::app.promotions.cart-rules.uses-per-customer-control-info') }}</span>
|
||||
<span class="control-error" v-if="errors.has('usage_per_customer')">@{{ errors.first('usage_per_customer') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group date">
|
||||
|
|
|
|||
|
|
@ -218,8 +218,9 @@
|
|||
</div>
|
||||
|
||||
<div v-else>
|
||||
<div class="control-group" v-if="matchedAttribute.type == 'text' || matchedAttribute.type == 'price' || matchedAttribute.type == 'decimal' || matchedAttribute.type == 'integer'">
|
||||
<input class="control" :name="['conditions[' + index + '][value]']" v-model="condition.value"/>
|
||||
<div class="control-group" :class="[errors.has('value') ? 'has-error' : '']" v-if="matchedAttribute.type == 'text' || matchedAttribute.type == 'price' || matchedAttribute.type == 'decimal' || matchedAttribute.type == 'integer'">
|
||||
<input v-validate="matchedAttribute.type == 'price' ? 'decimal: 2' : '' || matchedAttribute.type == 'decimal' ? 'decimal: 2' : '' || matchedAttribute.type == 'integer' ? 'decimal: 2' : '' || matchedAttribute.type == 'text' ? 'alpha_num' : ''" class="control" :name="['conditions[' + index + '][value]']" v-model="condition.value" name="value"/>
|
||||
<span class="control-error" v-if="errors.has('value')" v-text="errors.first('value')"></span>
|
||||
</div>
|
||||
|
||||
<div class="control-group date" v-if="matchedAttribute.type == 'date'">
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class CartRule
|
|||
/**
|
||||
* Collect discount on cart
|
||||
*
|
||||
* @param \Webkul\Cart\Contracts\Cart $cart
|
||||
* @param \Webkul\Checkout\Contracts\Cart $cart
|
||||
* @return void
|
||||
*/
|
||||
public function collect($cart)
|
||||
|
|
@ -84,7 +84,7 @@ class CartRule
|
|||
/**
|
||||
* Returns cart rules
|
||||
*
|
||||
* @param \Webkul\Cart\Contracts\Cart $cart
|
||||
* @param \Webkul\Checkout\Contracts\Cart $cart
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function getCartRules($cart)
|
||||
|
|
@ -125,7 +125,7 @@ class CartRule
|
|||
/**
|
||||
* Check if cart rule can be applied
|
||||
*
|
||||
* @param \Webkul\Cart\Contracts\Cart $cart
|
||||
* @param \Webkul\Checkout\Contracts\Cart $cart
|
||||
* @param \Webkul\CartRule\Contracts\CartRule $rule
|
||||
* @return bool
|
||||
*/
|
||||
|
|
@ -193,7 +193,7 @@ class CartRule
|
|||
/**
|
||||
* Cart item discount calculation process
|
||||
*
|
||||
* @param \Webkul\Cart\Contracts\Cart $cart
|
||||
* @param \Webkul\Checkout\Contracts\Cart $cart
|
||||
* @param \Webkul\Checkout\Models\CartItem $item
|
||||
* @return array
|
||||
*/
|
||||
|
|
@ -465,7 +465,7 @@ class CartRule
|
|||
/**
|
||||
* Calculate cart item totals for each rule
|
||||
*
|
||||
* @param \Webkul\Cart\Contracts\Cart $cart
|
||||
* @param \Webkul\Checkout\Contracts\Cart $cart
|
||||
* @param \Illuminate\Support\Collecton $items
|
||||
* @return \Webkul\Rule\Helpers\Validator
|
||||
*/
|
||||
|
|
@ -502,7 +502,7 @@ class CartRule
|
|||
/**
|
||||
* Check if coupon code is applied or not
|
||||
*
|
||||
* @param \Webkul\Cart\Contracts\Cart $cart
|
||||
* @param \Webkul\Checkout\Contracts\Cart $cart
|
||||
* @return bool
|
||||
*/
|
||||
public function checkCouponCode($cart): bool
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@
|
|||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="dropdown-toggle" style="pointer-events: none;">
|
||||
<div style="display: inline-block; cursor: pointer;">
|
||||
<div class="dropdown-toggle">
|
||||
<div style="display: inline-block; cursor: not-allowed">
|
||||
<span class="icon cart-icon"></span>
|
||||
<span class="name">{{ __('shop::app.minicart.cart') }}<span class="count"> ({{ __('shop::app.minicart.zero') }}) </span></span>
|
||||
</div>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/ui.js": "/js/ui.js?id=28450da875b7d84b30dd",
|
||||
"/css/ui.css": "/css/ui.css?id=1ed0d19988916084ff87"
|
||||
"/js/ui.js": "/js/ui.js?id=994a0d7537c0f196b1e0",
|
||||
"/css/ui.css": "/css/ui.css?id=d5a5781ad0a890301ed3"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,6 +155,8 @@ trait ProvideDataGridPlus
|
|||
'recordsFound' => __('admin::app.admin.system.records-found'),
|
||||
'norecords' => __('ui::app.datagrid.no-records'),
|
||||
'massActionDelete' => __('ui::app.datagrid.massaction.delete'),
|
||||
'emptyField' => __('ui::app.datagrid.empty-field'),
|
||||
'emptyValue' => __('ui::app.datagrid.empty-value'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -514,6 +514,10 @@ export default {
|
|||
},
|
||||
|
||||
getResponse: function() {
|
||||
if (this.type == null) {
|
||||
alert(this.translations.emptyField);
|
||||
}
|
||||
|
||||
let label = '';
|
||||
|
||||
for (let colIndex in this.columns) {
|
||||
|
|
@ -527,6 +531,8 @@ export default {
|
|||
case 'string': {
|
||||
if (this.types.string.value !== null) {
|
||||
this.emitOnFilterEvent('string', label, true);
|
||||
} else {
|
||||
alert(this.translations.emptyValue);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -542,6 +548,8 @@ export default {
|
|||
indexConditions = false;
|
||||
|
||||
alert(this.translations.zeroIndex);
|
||||
} else {
|
||||
alert(this.translations.emptyValue);
|
||||
}
|
||||
|
||||
if (indexConditions) {
|
||||
|
|
|
|||
|
|
@ -756,6 +756,7 @@ h5 {
|
|||
label {
|
||||
display: block;
|
||||
color: $font-color;
|
||||
pointer-events: none;
|
||||
|
||||
&.required::after {
|
||||
content: '*';
|
||||
|
|
@ -998,6 +999,7 @@ h5 {
|
|||
height: 34px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 5px;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.switch input {
|
||||
|
|
|
|||
|
|
@ -51,5 +51,7 @@ return [
|
|||
'edit' => 'Edit',
|
||||
'delete' => 'Delete',
|
||||
'view' => 'View',
|
||||
'empty-field' => 'Please select the filter',
|
||||
'empty-value' => 'Please enter the value',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -4,7 +4,7 @@
|
|||
"/js/velocity.js": "/js/velocity.js?id=f655ac65cbd1aa549cba57f77b9a4344",
|
||||
"/js/manifest.js": "/js/manifest.js?id=e069a8f952a02ea0f290bcca8fab930e",
|
||||
"/js/components.js": "/js/components.js?id=13ebf112e40292178d2386143e9d75cd",
|
||||
"/css/velocity.css": "/css/velocity.css?id=3782152edbfd13cf86571135a2bd80b1",
|
||||
"/css/velocity.css": "/css/velocity.css?id=5030f150ab3064aac9f3e83cfa4b3041",
|
||||
"/css/velocity-admin.css": "/css/velocity-admin.css?id=b67a82956e53163b5e3ff45a44f9778f",
|
||||
"/images/icon-calendar.svg": "/images/icon-calendar.svg?id=870d0f733a58377422766f3152e15486",
|
||||
"/images/icon-camera.svg": "/images/icon-camera.svg?id=b2fd2f9e17e1ccee96e29f6c6cec91e8",
|
||||
|
|
|
|||
|
|
@ -853,6 +853,9 @@
|
|||
border-right: 1px solid $border-general;
|
||||
|
||||
.customer-sidebar {
|
||||
position: sticky;
|
||||
top: 40px;
|
||||
|
||||
.account-details {
|
||||
text-align: center;
|
||||
padding: 25px 20px;
|
||||
|
|
|
|||
|
|
@ -297,6 +297,7 @@
|
|||
background-color: $white-color !important;
|
||||
box-shadow: 0 1px 0 0 #CFCFCF;
|
||||
border: 1px solid rgba(0,0,0,0.12);
|
||||
z-index: 0;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
|
|
|
|||
|
|
@ -78,9 +78,11 @@
|
|||
this.applied_coupon = this.coupon_code;
|
||||
this.coupon_code = '';
|
||||
|
||||
window.flashMessages = [{'type': 'alert-success', 'message': response.data.message}];
|
||||
|
||||
this.$root.addFlashMessages();
|
||||
window.showAlert(
|
||||
'alert-success',
|
||||
response.data.label,
|
||||
response.data.message
|
||||
);
|
||||
|
||||
this.redirectIfCartPage();
|
||||
} else {
|
||||
|
|
@ -107,9 +109,11 @@
|
|||
|
||||
self.disable_button = false;
|
||||
|
||||
window.flashMessages = [{'type': 'alert-success', 'message': response.data.message}];
|
||||
|
||||
self.$root.addFlashMessages();
|
||||
window.showAlert(
|
||||
'alert-success',
|
||||
response.data.label,
|
||||
response.data.message
|
||||
);
|
||||
|
||||
self.redirectIfCartPage();
|
||||
})
|
||||
|
|
|
|||
|
|
@ -219,6 +219,11 @@
|
|||
let maxPrice = response.data.max_price;
|
||||
|
||||
this.sliderConfig.max = maxPrice ? ((parseInt(maxPrice) !== 0 || maxPrice) ? parseInt(maxPrice) : 500) : 500;
|
||||
|
||||
if (! this.appliedFilterValues) {
|
||||
this.sliderConfig.value = [0, this.sliderConfig.max];
|
||||
this.sliderConfig.priceTo = this.sliderConfig.max;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue