small fixes
This commit is contained in:
@@ -165,6 +165,8 @@ import SideBar from '../../layouts/sidebar/sidebar.vue'
|
||||
import Footer from '../../layouts/footers/footer.vue'
|
||||
import useValidate from "@vuelidate/core";
|
||||
import { email, minLength, required } from "@vuelidate/validators";
|
||||
import { notify } from "@kyvg/vue3-notification";
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CustomerCreate',
|
||||
@@ -291,7 +293,11 @@ export default defineComponent({
|
||||
customer_state: number;
|
||||
customer_description: string;
|
||||
|
||||
}) {
|
||||
})
|
||||
|
||||
{
|
||||
|
||||
|
||||
let path = import.meta.env.VITE_BASE_URL + "/customer/create";
|
||||
axios({
|
||||
method: "post",
|
||||
@@ -311,6 +317,27 @@ export default defineComponent({
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
if (this.CreateCustomerForm.basicInfo.customer_zip === ''){
|
||||
notify({
|
||||
title: "Error",
|
||||
text: "No zip code added!",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
if (this.CreateCustomerForm.basicInfo.customer_last_name === ''){
|
||||
notify({
|
||||
title: "Error",
|
||||
text: "No last name added!",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
if (this.CreateCustomerForm.basicInfo.customer_address === ''){
|
||||
notify({
|
||||
title: "Error",
|
||||
text: "No address added!",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
let payload = {
|
||||
customer_last_name: this.CreateCustomerForm.basicInfo.customer_last_name,
|
||||
customer_first_name: this.CreateCustomerForm.basicInfo.customer_first_name,
|
||||
|
||||
Reference in New Issue
Block a user