Merge branch 'master' of https://github.com/bagisto/bagisto into development

This commit is contained in:
Prashant Singh 2019-06-19 18:21:26 +05:30
commit acad17af67
5 changed files with 43 additions and 7 deletions

View File

@ -152,7 +152,6 @@ class CustomerController extends Controller
'first_name' => 'string|required',
'last_name' => 'string|required',
'gender' => 'required',
'phone' => 'nullable|numeric|unique:customers,phone,'. $id,
'email' => 'required|unique:customers,email,'. $id,
'date_of_birth' => 'date|before:today'
]);

View File

@ -66,7 +66,7 @@
<div class="control-group" :class="[errors.has('phone') ? 'has-error' : '']">
<label for="phone">{{ __('admin::app.customers.customers.phone') }}</label>
<input type="text" class="control" name="phone" v-validate="'numeric|max:10'" value="{{ old('phone') }}" data-vv-as="&quot;{{ __('admin::app.customers.customers.phone') }}&quot;">
<input type="text" class="control" name="phone" value="{{ old('phone') }}" data-vv-as="&quot;{{ __('admin::app.customers.customers.phone') }}&quot;">
<span class="control-error" v-if="errors.has('phone')">@{{ errors.first('phone') }}</span>
</div>

View File

@ -72,7 +72,7 @@
<div class="control-group" :class="[errors.has('phone') ? 'has-error' : '']">
<label for="phone">{{ __('admin::app.customers.customers.phone') }}</label>
<input type="text" class="control" name="phone" v-validate="'numeric|max:10'" value="{{ $customer->phone }}" data-vv-as="&quot;{{ __('admin::app.customers.customers.phone') }}&quot;">
<input type="text" class="control" name="phone" value="{{ $customer->phone }}" data-vv-as="&quot;{{ __('admin::app.customers.customers.phone') }}&quot;">
<span class="control-error" v-if="errors.has('phone')">@{{ errors.first('phone') }}</span>
</div>

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class RemoveUniqueInPhoneColumnInCustomersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('customers', function (Blueprint $table) {
$table->dropUnique('customers_phone_unique');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('customers', function (Blueprint $table) {
//
});
}
}

View File

@ -72,7 +72,7 @@
</div>
<div class="step-content review" v-show="currentStep == 4" id="summary-section">
<review-section v-if="currentStep == 4">
<review-section v-if="currentStep == 4" :key="reviewComponentKey">
<div slot="summary-section">
<summary-section
discount="1"
@ -140,7 +140,8 @@
allAddress: {},
countryStates: @json(core()->groupedStatesByCountries()),
country: @json(core()->countries()),
summeryComponentKey: 0
summeryComponentKey: 0,
reviewComponentKey: 0
}
},
@ -209,6 +210,7 @@
summaryHtml = Vue.compile(response.data.html)
this_this.summeryComponentKey++;
this_this.reviewComponentKey++;
})
.catch(function (error) {})
},
@ -456,8 +458,11 @@
this.templateRender = reviewHtml.render;
for (var i in reviewHtml.staticRenderFns) {
reviewTemplateRenderFns.push(reviewHtml.staticRenderFns[i]);
// reviewTemplateRenderFns.push(reviewHtml.staticRenderFns[i]);
reviewTemplateRenderFns[i] = reviewHtml.staticRenderFns[i];
}
this.$forceUpdate();
}
});
@ -489,7 +494,7 @@
mounted: function() {
this.templateRender = summaryHtml.render;
for (var i in summaryHtml.staticRenderFns) {
// summaryTemplateRenderFns.push(summaryHtml.staticRenderFns[i]);
summaryTemplateRenderFns[i] = summaryHtml.staticRenderFns[i];