Kategorien dazu
This commit is contained in:
@@ -29,12 +29,7 @@ export default function AusgabenList({ entries, onDelete, onEdit }: AusgabenList
|
||||
};
|
||||
|
||||
const formatDate = (dateStr: string) => {
|
||||
const date = new Date(dateStr);
|
||||
return date.toLocaleDateString('de-DE', {
|
||||
day: '2-digit',
|
||||
month: '2-digit',
|
||||
year: 'numeric',
|
||||
});
|
||||
return dateStr.toString().split('T')[0];
|
||||
};
|
||||
|
||||
const formatAmount = (amount: number) => {
|
||||
@@ -53,6 +48,7 @@ export default function AusgabenList({ entries, onDelete, onEdit }: AusgabenList
|
||||
<th className="border-b-2 border-black p-2 w-12">Tag</th>
|
||||
<th className="border-b-2 border-black p-2 w-36">Wo</th>
|
||||
<th className="border-b-2 border-black p-2 w-48">Was</th>
|
||||
<th className="border-b-2 border-black p-2 w-12">Kat.</th>
|
||||
<th className="border-b-2 border-black p-2 w-8">Betrag</th>
|
||||
<th className="border-b-2 border-black p-2 w-16">Wie</th>
|
||||
<th className="border-b-2 border-black p-2 w-38">Aktion</th>
|
||||
@@ -61,7 +57,7 @@ export default function AusgabenList({ entries, onDelete, onEdit }: AusgabenList
|
||||
<tbody>
|
||||
{entries.length === 0 ? (
|
||||
<tr>
|
||||
<td colSpan={7} className="text-center p-4 text-gray-500">
|
||||
<td colSpan={8} className="text-center p-4 text-gray-500">
|
||||
Keine Einträge vorhanden
|
||||
</td>
|
||||
</tr>
|
||||
@@ -74,6 +70,7 @@ export default function AusgabenList({ entries, onDelete, onEdit }: AusgabenList
|
||||
<td className="border-y border-black p-2 text-center">{entry.WochTag.slice(0, 2)}</td>
|
||||
<td className="border-y border-black p-2">{entry.Wo}</td>
|
||||
<td className="border-y border-black p-2">{entry.Was}</td>
|
||||
<td className="border-y border-black p-2 text-center">{entry.Kat}</td>
|
||||
<td className="border-y border-black p-2 text-right">
|
||||
{formatAmount(entry.Wieviel)}
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user