mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
code review update id number, min length
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.orderNo">
|
||||
<validation-wrapper-component class="m-b-15" :validator="$v.parameters.reference_id">
|
||||
<label class="text-primary">Order Number</label>
|
||||
<input class="form-control" name="orderNo" v-model="parameters.orderNo">
|
||||
<input class="form-control" v-model="parameters.reference_id">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
@@ -27,20 +27,28 @@
|
||||
</template>
|
||||
<script>
|
||||
import modalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
import { required, minLength } from "vuelidate/lib/validators";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
parameters: {
|
||||
id: this.data.id,
|
||||
orderNo: this.orderNo,
|
||||
reference_id: '',
|
||||
}
|
||||
};
|
||||
},
|
||||
validations: {
|
||||
parameters: {
|
||||
orderNo: { required },
|
||||
reference_id: {
|
||||
required,
|
||||
minLength: minLength(8)
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
successHandler(response) {
|
||||
window.location.replace(this.route('order.show', response.payload.data.reference));
|
||||
}
|
||||
},
|
||||
mixins: [modalFormHandler]
|
||||
|
||||
Reference in New Issue
Block a user