show worker
This commit is contained in:
@@ -447,6 +447,11 @@ function renderInvoiceRow(invoice) {
|
||||
|
||||
const rowClass = paid ? (invoice.payment_status === 'Deposited' ? 'bg-blue-50/50' : 'bg-green-50/50') : partial ? 'bg-yellow-50/30' : overdue ? 'bg-red-50/50' : '';
|
||||
|
||||
// Erstellt einen kleinen runden Badge mit dem ersten Buchstaben, falls ein Worker gesetzt ist
|
||||
const workerBadge = invoice.worker
|
||||
? `<span title="Worker: ${invoice.worker}" class="ml-4 inline-flex items-center justify-center w-6 h-6 rounded-full bg-gray-200 text-gray-700 text-xs font-bold border border-gray-300 shrink-0 cursor-help">${invoice.worker.charAt(0).toUpperCase()}</span>`
|
||||
: '';
|
||||
|
||||
return `
|
||||
<tr class="${rowClass}">
|
||||
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium text-gray-900">${invNumDisplay} ${statusBadge}</td>
|
||||
@@ -454,10 +459,16 @@ function renderInvoiceRow(invoice) {
|
||||
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">${formatDate(invoice.invoice_date)}</td>
|
||||
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">
|
||||
${sendDateCell}
|
||||
</td> <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">${invoice.terms}</td>
|
||||
</td>
|
||||
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">${invoice.terms}</td>
|
||||
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-900 font-semibold">${amountDisplay}</td>
|
||||
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium space-x-1">
|
||||
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">
|
||||
<div class="flex items-center justify-between min-w-max">
|
||||
<div class="space-x-1">
|
||||
${editBtn} ${qboBtn} ${pdfBtn} ${htmlBtn} ${stripeEmailBtn} ${stripeCheckBtn} ${paidBtn} ${delBtn}
|
||||
</div>
|
||||
${workerBadge}
|
||||
</div>
|
||||
</td>
|
||||
</tr>`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user