lead/customer logic for new client in backend

This commit is contained in:
Casey 2025-12-12 15:55:26 -06:00
parent 0c55c9996f
commit ae5cb23e6e

View File

@ -175,6 +175,7 @@
> >
<template #title>Confirm Send Estimate</template> <template #title>Confirm Send Estimate</template>
<div class="modal-content"> <div class="modal-content">
<div class="company-banner">Company: {{ company.currentCompany }}</div>
<h4>Does this information look correct?</h4> <h4>Does this information look correct?</h4>
<p><strong>Address:</strong> {{ formData.address }}</p> <p><strong>Address:</strong> {{ formData.address }}</p>
<p> <p>
@ -226,11 +227,13 @@ import Api from "../../api";
import DataUtils from "../../utils"; import DataUtils from "../../utils";
import { useLoadingStore } from "../../stores/loading"; import { useLoadingStore } from "../../stores/loading";
import { useNotificationStore } from "../../stores/notifications-primevue"; import { useNotificationStore } from "../../stores/notifications-primevue";
import { useCompanyStore } from "../../stores/company";
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const loadingStore = useLoadingStore(); const loadingStore = useLoadingStore();
const notificationStore = useNotificationStore(); const notificationStore = useNotificationStore();
const company = useCompanyStore();
const addressQuery = computed(() => route.query.address || ""); const addressQuery = computed(() => route.query.address || "");
const isNew = computed(() => route.query.new === "true"); const isNew = computed(() => route.query.new === "true");
@ -364,6 +367,7 @@ const saveDraft = async () => {
contactName: selectedContact.value.name, contactName: selectedContact.value.name,
items: selectedItems.value.map((i) => ({ itemCode: i.itemCode, qty: i.qty })), items: selectedItems.value.map((i) => ({ itemCode: i.itemCode, qty: i.qty })),
estimateName: formData.estimateName, estimateName: formData.estimateName,
company: company.currentCompany
}; };
estimate.value = await Api.createEstimate(data); estimate.value = await Api.createEstimate(data);
notificationStore.addSuccess( notificationStore.addSuccess(
@ -716,6 +720,19 @@ onMounted(async () => {
color: #856404; color: #856404;
} }
.company-banner {
margin-bottom: 0.75rem;
padding: 0.6rem 0.9rem;
background: linear-gradient(135deg, var(--theme-gradient-start), var(--theme-secondary-gradient-end));
border: 1px solid var(--theme-primary-strong);
border-radius: 8px;
color: var(--theme-text-light);
font-weight: 700;
letter-spacing: 0.03em;
text-transform: uppercase;
box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}
.response-status { .response-status {
margin-top: 1rem; margin-top: 1rem;
padding: 1rem; padding: 1rem;