Added a button to create an invoice. VERY PLACEHOLDER.

This commit is contained in:
rocketdebris 2026-01-24 17:11:05 -05:00
parent c682ee8ccb
commit 5ed964b49d

View file

@ -13,7 +13,7 @@
</template> </template>
<template #content> <template #content>
<div class="widget-content"> <div class="widget-content">
{{ job.customInstallationAddress || "" }} {{ job.jobAddress["fullAddress"] || "" }}
</div> </div>
</template> </template>
</Card> </Card>
@ -32,6 +32,26 @@
</template> </template>
</Card> </Card>
</div> </div>
<div class="job-info">
<Card>
<template #header>
<div class="widget-header">
<h3>Job Status</h3>
</div>
</template>
<template #content>
<div class="widget-content">
Job is {{ job.status }}.
<button
class="sidebar-button"
@click="createInvoiceForJob()"
>
Create Invoice
</button>
</div>
</template>
</Card>
</div>
</div> </div>
<div class="task-list"> <div class="task-list">
<DataTable <DataTable
@ -124,6 +144,11 @@ const tableActions = computed(() => [
}, },
]); ]);
const createInvoiceForJob = async () => {
console.log(job);
await Api.createInvoiceForJob(job.value.name);
}
const handleLazyLoad = async (event) => { const handleLazyLoad = async (event) => {
console.log("Task list on Job Page - handling lazy load:", event); console.log("Task list on Job Page - handling lazy load:", event);
try { try {
@ -232,7 +257,7 @@ const handleLazyLoad = async (event) => {
onMounted(async () => { onMounted(async () => {
console.log("DEBUG: Query params:", route.query); console.log("DEBUG: Query params:", route.query);
try { try {
const optionsResult = await Api.getTaskStatusOptions(); const optionsResult = await Api.getTaskStatusOptions();
if (optionsResult && optionsResult.length > 0) { if (optionsResult && optionsResult.length > 0) {