small fixes

This commit is contained in:
2024-12-23 18:10:29 -05:00
parent bf49bf5711
commit 01c448f368
5 changed files with 152 additions and 79 deletions

View File

@@ -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,