import fix for update so it does not insert person and client case
This commit is contained in:
@@ -24,6 +24,16 @@ const fmtCurrency = (v) => {
|
||||
return `${n.toFixed(2)} €`;
|
||||
}
|
||||
};
|
||||
|
||||
const fmtDateDMY = (v) => {
|
||||
if (!v) return "-";
|
||||
const d = new Date(v);
|
||||
if (isNaN(d)) return "-";
|
||||
const dd = String(d.getDate()).padStart(2, "0");
|
||||
const mm = String(d.getMonth() + 1).padStart(2, "0");
|
||||
const yyyy = d.getFullYear();
|
||||
return `${dd}.${mm}.${yyyy}`;
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<AppLayout title="Client cases">
|
||||
@@ -43,6 +53,7 @@ const fmtCurrency = (v) => {
|
||||
{ key: 'case', label: 'Primer', sortable: false },
|
||||
{ key: 'client', label: 'Stranka', sortable: false },
|
||||
{ key: 'tax', label: 'Davčna', sortable: false },
|
||||
{ key: 'created_at', label: 'Ustvarjeno', sortable: false },
|
||||
{
|
||||
key: 'active_contracts',
|
||||
label: 'Aktivne pogodbe',
|
||||
@@ -97,6 +108,9 @@ const fmtCurrency = (v) => {
|
||||
<template #cell-tax="{ row }">
|
||||
{{ row.person?.tax_number || "-" }}
|
||||
</template>
|
||||
<template #cell-created_at="{ row }">
|
||||
{{ fmtDateDMY(row.created_at) }}
|
||||
</template>
|
||||
<template #cell-active_contracts="{ row }">
|
||||
<div class="text-right">{{ row.active_contracts_count ?? 0 }}</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user