changes 0328092025

This commit is contained in:
Simon Pocrnjič
2025-09-28 22:36:47 +02:00
parent b40ee9dcde
commit 7e8e0a479b
61 changed files with 4306 additions and 654 deletions
@@ -16,7 +16,8 @@ let header = [
C_TD.make('Odločitev', 'header'),
C_TD.make('Opomba', 'header'),
C_TD.make('Datum zapadlosti', 'header'),
C_TD.make('Znesek obljube', 'header')
C_TD.make('Znesek obljube', 'header'),
C_TD.make('Dodal', 'header')
];
const createBody = (data) => {
@@ -25,6 +26,7 @@ const createBody = (data) => {
data.forEach((p) => {
const createdDate = new Date(p.created_at).toLocaleDateString('de');
const dueDate = (p.due_date) ? new Date().toLocaleDateString('de') : null;
const userName = (p.user && p.user.name) ? p.user.name : (p.user_name || '');
const cols = [
C_TD.make(p.contract?.reference ?? ''),
@@ -33,7 +35,8 @@ const createBody = (data) => {
C_TD.make(p.decision.name, 'body'),
C_TD.make(p.note, 'body' ),
C_TD.make(dueDate, 'body' ),
C_TD.make(Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(p.amount), 'body' )
C_TD.make(Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(p.amount), 'body' ),
C_TD.make(userName, 'body')
];
body.push(