Merge pull request #2560 from rahulshukla-webkul/development

Development
This commit is contained in:
Jitendra Singh 2020-02-26 17:20:01 +05:30 committed by GitHub
commit 68011106cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 54 additions and 50 deletions

View File

@ -56,7 +56,7 @@
<div class="control-group">
<label for="status">{{ __('admin::app.promotions.cart-rules.status') }}</label>
<label class="switch">
<input type="checkbox" id="status" name="status" value="1" {{ old('status') ? 'checked' : '' }}>
<span class="slider round"></span>
@ -140,16 +140,16 @@
<div class="control-group date">
<label for="starts_from">{{ __('admin::app.promotions.cart-rules.from') }}</label>
<date>
<datetime>
<input type="text" name="starts_from" class="control" value="{{ old('starts_from') }}"/>
</date>
</datetime>
</div>
<div class="control-group date">
<label for="ends_till">{{ __('admin::app.promotions.cart-rules.to') }}</label>
<date>
<datetime>
<input type="text" name="ends_till" class="control" value="{{ old('ends_till') }}"/>
</date>
</datetime>
</div>
<div class="control-group">
@ -427,11 +427,11 @@
attribute_type_indexes: {
'cart': 0,
'cart_item': 1,
'product': 2
},
},
condition_operators: {
'price': [{

View File

@ -56,7 +56,7 @@
<div class="control-group">
<label for="status">{{ __('admin::app.promotions.cart-rules.status') }}</label>
<label class="switch">
<input type="checkbox" id="status" name="status" value="{{ $cartRule->status }}" {{ $cartRule->status ? 'checked' : '' }}>
<span class="slider round"></span>
@ -144,16 +144,16 @@
<div class="control-group date">
<label for="starts_from">{{ __('admin::app.promotions.cart-rules.from') }}</label>
<date>
<datetime>
<input type="text" name="starts_from" class="control" value="{{ old('starts_from') ?: $cartRule->starts_from }}"/>
</date>
</datetime>
</div>
<div class="control-group date">
<label for="ends_till">{{ __('admin::app.promotions.cart-rules.to') }}</label>
<date>
<datetime>
<input type="text" name="ends_till" class="control" value="{{ old('ends_till') ?: $cartRule->ends_till }}"/>
</date>
</datetime>
</div>
<div class="control-group">

View File

@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class ChangeColumnTypeInCartRulesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('cart_rules', function (Blueprint $table) {
$table->dateTime('starts_from')->change();
$table->dateTime('ends_till')->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('cart_rules', function (Blueprint $table) {
$table->dateTime('starts_from')->change();
$table->dateTime('ends_till')->change();
});
}
}

View File

@ -152,10 +152,10 @@ class CartRule
->where('cart_rule_customer_groups.customer_group_id', $customerGroupId)
->where('cart_rule_channels.channel_id', core()->getCurrentChannel()->id)
->where(function ($query1) {
$query1->where('cart_rules.starts_from', '<=', Carbon::now()->format('Y-m-d'))->orWhereNull('cart_rules.starts_from');
$query1->where('cart_rules.starts_from', '<=', Carbon::now()->format('Y-m-d H:i:s'))->orWhereNull('cart_rules.starts_from');
})
->where(function ($query2) {
$query2->where('cart_rules.ends_till', '>=', Carbon::now()->format('Y-m-d'))->orWhereNull('cart_rules.ends_till');
$query2->where('cart_rules.ends_till', '>=', Carbon::now()->format('Y-m-d H:i:s'))->orWhereNull('cart_rules.ends_till');
})
->orderBy('sort_order', 'asc');
})->findWhere(['status' => 1]);

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/shop.js": "/js/shop.js?id=6e1a07cb1d6814d16f70",
"/js/shop.js": "/js/shop.js?id=6bb928c2e527b045a56b",
"/css/shop.css": "/css/shop.css?id=ccf417b825955d8bd301"
}

View File

@ -1,13 +1,12 @@
import $ from 'jquery';
import Vue from 'vue';
import VeeValidate, { Validator } from 'vee-validate';
import VeeValidate from 'vee-validate';
import de from 'vee-validate/dist/locale/de';
import ar from 'vee-validate/dist/locale/ar';
import axios from 'axios';
import VueSlider from 'vue-slider-component';
import accounting from 'accounting';
import ImageSlider from './components/image-slider';
import { messages as localeMessages } from './lang/locales';
window.jQuery = window.$ = $;
window.Vue = Vue;
@ -16,11 +15,10 @@ window.axios = axios;
require("./bootstrap");
require("ez-plus/src/jquery.ez-plus.js");
Validator.localize('de', de);
Vue.use(VeeValidate, {
dictionary: {
ar: { messages: localeMessages.ar }
ar: ar,
de: de,
},
events: 'input|change|blur',
});

View File

@ -1,28 +0,0 @@
export const messages = {
ar: {
required : (field) => 'حقل' + field + ' مطلوب',
alpha : (field) => field + ' يجب ان يحتوي على حروف فقط',
alpha_num : (field) => field + ' قد يحتوي فقط على حروف وارقام',
min : (field, length) => 'الحقل ' + field + ' يجب ان يحتوي على ' + length + ' حروف على الأقل',
numeric : (field) => field + ' يمكن ان يحتوي فقط على ارقام',
oneOf : (field) => 'الحقل ' + field + 'يجب ان يكون قيمة صحيحة',
regex : (field) => 'الحقل' + field+ ' غير صحيح',
required_if : (field) => 'حقل' + field + ' مطلوب',
size : (field, size) => field + ' يجب ان يكون اقل من ' + size + ' كيلوبايت',
min_value : (field, min) => 'قيمة الحقل' + field + ' يجب ان تكون اكبر من ' + min + ' او تساويها',
alpha_spaces : (field) => field + ' قد يحتوي فقط على حروف ومسافات',
between : (field, min, max) => 'قيمة ' +field+ ' يجب ان تكون ما بين ' + min + ' و ' + max,
confirmed : (field) => field + ' لا يماثل التأكيد',
digits : (field, length) => field + ' يجب ان تحتوي فقط على ارقام والا يزيد عددها عن ' + length + ' رقم',
dimensions : (field, width, height) => field + ' يجب ان تكون بمقاس ' + width + ' بكسل في ' + height + ' بكسل',
email : (field) => field + ' يجب ان يكون بريدا اليكتروني صحيح',
excluded : (field) => 'الحقل' + field +'غير صحيح',
ext : (field) =>'نوع مل'+ field + 'غير صحيح',
image : (field) => field + ' يجب ان تكون صورة',
integer : (field) => 'الحقل ' +field + ' يجب ان يكون عدداً صحيحاً',
length : (field, length) => 'حقل'+ field + ' يجب الا يزيد عن ' + length,
max_value : (field, min) => 'قيمة الحقل '+ field + ' يجب ان تكون اصغر من ' + min + ' او تساويها',
max : (field, length) => 'الحقل' + field + 'يجب ان يحتوي على ' + length + ' حروف على الأكثر',
mimes : (field) => 'نوع ملف' + field + 'غير صحيح'
}
}