Merge branch 'main' of https://githaven.org/CaWittMN08/custom_ui
This commit is contained in:
commit
25f6d73fc7
13 changed files with 289 additions and 143 deletions
|
|
@ -87,6 +87,13 @@
|
|||
<div class="total-section">
|
||||
<strong>Total Cost: ${{ totalCost.toFixed(2) }}</strong>
|
||||
</div>
|
||||
<div class="half-payment-section">
|
||||
<v-checkbox
|
||||
v-model="formData.requiresHalfPayment"
|
||||
label="Requires Half Payment"
|
||||
:disabled="!isEditable"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="isEditable" class="action-buttons">
|
||||
<Button label="Clear Items" @click="clearItems" severity="secondary" />
|
||||
<Button
|
||||
|
|
@ -199,6 +206,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
<p><strong>Total:</strong> ${{ totalCost.toFixed(2) }}</p>
|
||||
<p><strong>Requires Half Payment:</strong> {{ formData.requiresHalfPayment ? 'Yes' : 'No' }}</p>
|
||||
<p class="warning-text"><strong>⚠️ Warning:</strong> After sending this estimate, it will be locked and cannot be edited.</p>
|
||||
<div class="confirmation-buttons">
|
||||
<Button
|
||||
|
|
@ -247,6 +255,7 @@ const formData = reactive({
|
|||
addressName: "",
|
||||
contact: "",
|
||||
estimateName: null,
|
||||
requiresHalfPayment: false,
|
||||
});
|
||||
|
||||
const selectedAddress = ref(null);
|
||||
|
|
@ -367,6 +376,7 @@ const saveDraft = async () => {
|
|||
contactName: selectedContact.value.name,
|
||||
items: selectedItems.value.map((i) => ({ itemCode: i.itemCode, qty: i.qty })),
|
||||
estimateName: formData.estimateName,
|
||||
requiresHalfPayment: formData.requiresHalfPayment,
|
||||
company: company.currentCompany
|
||||
};
|
||||
estimate.value = await Api.createEstimate(data);
|
||||
|
|
@ -517,6 +527,7 @@ watch(
|
|||
};
|
||||
});
|
||||
}
|
||||
formData.requiresHalfPayment = estimate.value.custom_requires_half_payment || false;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error loading estimate:", error);
|
||||
|
|
@ -570,6 +581,7 @@ onMounted(async () => {
|
|||
};
|
||||
});
|
||||
}
|
||||
formData.requiresHalfPayment = estimate.value.custom_requires_half_payment || false;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error loading estimate:", error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue