;
+ defaultPreset: string;
+ firstDayOfWeek: number; // ISO: 1=Monday
+}
+
+/**
+ * Grid display settings section
+ */
+export interface IGridSettings {
+ dayStartHour: number;
+ dayEndHour: number;
+ workStartHour: number;
+ workEndHour: number;
+ hourHeight: number;
+ snapInterval: number;
+}
+
+/**
+ * Time format settings section
+ */
+export interface ITimeFormatSettings {
+ timezone: string;
+ locale: string;
+ use24HourFormat: boolean;
+}
+
+/**
+ * View settings section
+ */
+export interface IViewSettings {
+ availableViews: string[];
+ defaultView: string;
+}
+
+/**
+ * ITenantSettings - Complete tenant configuration
+ *
+ * Single document stored in IndexedDB 'settings' store.
+ * Sections can be extended as needed without schema changes.
+ */
+export interface ITenantSettings extends ISync {
+ id: string;
+ lastModified?: string;
+
+ workweek: IWorkweekSettings;
+ grid: IGridSettings;
+ timeFormat: ITimeFormatSettings;
+ views: IViewSettings;
+}
diff --git a/wwwroot/css/v2/calendar-v2-layout.css b/wwwroot/css/v2/calendar-v2-layout.css
index 3ef668c..5dedc79 100644
--- a/wwwroot/css/v2/calendar-v2-layout.css
+++ b/wwwroot/css/v2/calendar-v2-layout.css
@@ -16,20 +16,78 @@ swp-calendar {
/* Nav */
swp-calendar-nav {
display: flex;
- gap: 16px;
- padding: 12px 16px;
+ gap: 12px;
+ padding: 8px 16px;
border-bottom: 1px solid var(--color-border);
align-items: center;
+ font-size: 13px;
+}
+
+/* View switcher - small chips */
+swp-view-switcher {
+ display: flex;
+ gap: 4px;
+ background: var(--color-background-alt);
+ padding: 3px;
+ border-radius: 6px;
+}
+
+.view-chip {
+ padding: 4px 10px;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+ background: transparent;
+ color: var(--color-text-secondary);
+ font-size: 12px;
+ font-weight: 500;
+ transition: all 0.15s ease;
+
+ &:hover {
+ background: var(--color-surface);
+ color: var(--color-text);
+ }
+
+ &.active {
+ background: var(--color-surface);
+ color: var(--color-text);
+ box-shadow: 0 1px 2px rgba(0,0,0,0.1);
+ }
+}
+
+/* Workweek dropdown */
+.workweek-dropdown {
+ padding: 4px 8px;
+ border: 1px solid var(--color-border);
+ border-radius: 4px;
+ background: var(--color-surface);
+ font-size: 12px;
+ cursor: pointer;
+
+ &:hover { border-color: var(--color-text-secondary); }
+ &:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
+}
+
+/* Navigation group */
+swp-nav-group {
+ display: flex;
+ gap: 2px;
}
swp-nav-button {
- padding: 8px 16px;
+ padding: 6px 12px;
border: 1px solid var(--color-border);
border-radius: 4px;
cursor: pointer;
background: var(--color-surface);
+ font-size: 12px;
&:hover { background: var(--color-background-hover); }
+
+ &.btn-small {
+ padding: 4px 8px;
+ font-size: 11px;
+ }
}
swp-week-info {
@@ -38,11 +96,12 @@ swp-week-info {
swp-week-number {
font-weight: 600;
+ font-size: 12px;
display: block;
}
swp-date-range {
- font-size: 12px;
+ font-size: 11px;
color: var(--color-text-secondary);
}
}
@@ -70,6 +129,8 @@ swp-time-axis {
swp-header-spacer {
border-bottom: 1px solid var(--color-border);
+ background: var(--color-surface);
+ z-index: 1;
}
swp-header-drawer {
diff --git a/wwwroot/data/tenant-settings.json b/wwwroot/data/tenant-settings.json
new file mode 100644
index 0000000..be14e4c
--- /dev/null
+++ b/wwwroot/data/tenant-settings.json
@@ -0,0 +1,57 @@
+{
+ "id": "tenant-settings",
+ "syncStatus": "synced",
+ "lastModified": "2025-12-15T10:00:00Z",
+
+ "workweek": {
+ "presets": {
+ "standard": {
+ "id": "standard",
+ "workDays": [1, 2, 3, 4, 5],
+ "label": "Man-Fre"
+ },
+ "compressed": {
+ "id": "compressed",
+ "workDays": [1, 2, 3, 4],
+ "label": "Man-Tor"
+ },
+ "midweek": {
+ "id": "midweek",
+ "workDays": [3, 4, 5],
+ "label": "Ons-Fre"
+ },
+ "weekend": {
+ "id": "weekend",
+ "workDays": [6, 7],
+ "label": "Weekend"
+ },
+ "fullweek": {
+ "id": "fullweek",
+ "workDays": [1, 2, 3, 4, 5, 6, 7],
+ "label": "Alle dage"
+ }
+ },
+ "defaultPreset": "standard",
+ "firstDayOfWeek": 1
+ },
+
+ "grid": {
+ "dayStartHour": 6,
+ "dayEndHour": 22,
+ "workStartHour": 8,
+ "workEndHour": 17,
+ "hourHeight": 80,
+ "snapInterval": 15
+ },
+
+ "timeFormat": {
+ "timezone": "Europe/Copenhagen",
+ "locale": "da-DK",
+ "use24HourFormat": true
+ },
+
+ "views": {
+ "availableViews": ["simple", "resource", "team", "department"],
+ "defaultView": "simple"
+ }
+}
diff --git a/wwwroot/v2.html b/wwwroot/v2.html
index a3f57d2..c19150c 100644
--- a/wwwroot/v2.html
+++ b/wwwroot/v2.html
@@ -10,18 +10,36 @@
- Dag
- Datoer
- Resources
- Teams
- Departments
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ←
+ →
+
+
- V2
+ V2 Demo
- ←
- →
- Toggle
+
+ Drawer