Renames danish to english

This commit is contained in:
Janus C. H. Knudsen 2026-01-11 21:42:24 +01:00
parent 754681059d
commit 5e0bd9db74
29 changed files with 405 additions and 438 deletions

View file

@ -1,11 +1,11 @@
/**
* Kasse Controller
* Cash Controller
*
* Handles tab switching, cash calculations, and form interactions
* for the Kasse (Cash Register) page.
* for the Cash Register page.
*/
export class KasseController {
export class CashController {
// Base values (from system - would come from server in real app)
private readonly startBalance = 2000;
private readonly cashSales = 3540;
@ -42,7 +42,7 @@ export class KasseController {
private switchToTab(targetTab: string): void {
const tabs = document.querySelectorAll<HTMLElement>('swp-tab[data-tab]');
const contents = document.querySelectorAll<HTMLElement>('swp-tab-content[data-tab]');
const statsBars = document.querySelectorAll<HTMLElement>('swp-kasse-stats[data-for-tab]');
const statsBars = document.querySelectorAll<HTMLElement>('swp-cash-stats[data-for-tab]');
// Update tab states
tabs.forEach(t => {
@ -243,13 +243,13 @@ export class KasseController {
* Setup row toggle for expandable details
*/
private setupRowToggle(): void {
const rows = document.querySelectorAll<HTMLElement>('swp-kasse-table-row[data-id]:not(.draft-row)');
const rows = document.querySelectorAll<HTMLElement>('swp-cash-table-row[data-id]:not(.draft-row)');
rows.forEach(row => {
const rowId = row.getAttribute('data-id');
if (!rowId) return;
const detail = document.querySelector<HTMLElement>(`swp-kasse-row-detail[data-for="${rowId}"]`);
const detail = document.querySelector<HTMLElement>(`swp-cash-row-detail[data-for="${rowId}"]`);
if (!detail) return;
row.addEventListener('click', (e) => {
@ -260,11 +260,11 @@ export class KasseController {
const isExpanded = row.classList.contains('expanded');
// Close other expanded rows
document.querySelectorAll('swp-kasse-table-row.expanded').forEach(r => {
document.querySelectorAll('swp-cash-table-row.expanded').forEach(r => {
if (r !== row) {
const otherId = r.getAttribute('data-id');
if (otherId) {
const otherDetail = document.querySelector<HTMLElement>(`swp-kasse-row-detail[data-for="${otherId}"]`);
const otherDetail = document.querySelector<HTMLElement>(`swp-cash-row-detail[data-for="${otherId}"]`);
const otherIcon = r.querySelector('swp-row-toggle i');
if (otherDetail && otherIcon) {
this.collapseRow(r, otherDetail, otherIcon as HTMLElement);
@ -353,10 +353,10 @@ export class KasseController {
}
/**
* Setup draft row click to navigate to Kasseafstemning tab
* Setup draft row click to navigate to reconciliation tab
*/
private setupDraftRowClick(): void {
const draftRow = document.querySelector<HTMLElement>('swp-kasse-table-row.draft-row');
const draftRow = document.querySelector<HTMLElement>('swp-cash-table-row.draft-row');
if (!draftRow) return;
draftRow.style.cursor = 'pointer';