feat(web): replace UI with greenfield Stitch sensing-engine hero
Rebuild the web frontend around the Stitch hero design: new app shell header with responsive navigation and a single / page preserving the Stitch main/footer copy. Remove the legacy Onyx pages, components, composables and CSS. Add bundled Tailwind 3.4.17 and @nuxt/icon with a locally bundled Material Symbols collection; no icon CDN at runtime. Include design notes for claims to reconcile before the pitch and verification screenshots.
This commit is contained in:
1 parent
9b61d6859e
commit
836e71c5f4
33 files changed
+1375
-4324
No files matched your search
+2
-79
@@ -1,82 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
iconCalendar,
|
||||
iconChart,
|
||||
iconCircleInformation,
|
||||
iconFlash,
|
||||
iconHome,
|
||||
iconMobileSignal,
|
||||
iconPresentionBoard,
|
||||
} from '@sit-onyx/icons'
|
||||
|
||||
const route = useRoute()
|
||||
const config = useRuntimeConfig()
|
||||
const usingMock = computed(
|
||||
() =>
|
||||
config.public.useMock === true ||
|
||||
config.public.useMock === '1' ||
|
||||
config.public.useMock === 'true',
|
||||
)
|
||||
|
||||
const navigation = [
|
||||
{ to: '/', label: 'Now', icon: iconHome },
|
||||
{ to: '/forecast', label: 'Forecast', icon: iconChart },
|
||||
{ to: '/plan', label: 'Plan', icon: iconCalendar },
|
||||
{ to: '/simulate', label: 'Simulate', icon: iconFlash },
|
||||
{ to: '/stage', label: 'Stage', icon: iconPresentionBoard },
|
||||
{ to: '/live', label: 'Live', icon: iconMobileSignal },
|
||||
{ to: '/about', label: 'About', icon: iconCircleInformation },
|
||||
]
|
||||
|
||||
const hiddenPageLabels: Record<string, string> = { '/control': 'Control' }
|
||||
const activeLabel = computed(
|
||||
() => navigation.find((item) => item.to === route.path)?.label ?? hiddenPageLabels[route.path] ?? 'PulseCast',
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<OnyxAppLayout>
|
||||
<template #navBar>
|
||||
<OnyxNavBar app-name="PulseCast" logo-url="/logo.svg" mobile="sm">
|
||||
<OnyxUnstableNavButton
|
||||
v-for="item in navigation"
|
||||
:key="item.to"
|
||||
:link="item.to"
|
||||
:label="item.label"
|
||||
:icon="item.icon"
|
||||
/>
|
||||
<template #contextArea>
|
||||
<OnyxBadge :color="usingMock ? 'warning' : 'success'">{{ usingMock ? 'Mock data' : 'Go API' }}</OnyxBadge>
|
||||
</template>
|
||||
<template #mobileActivePage>{{ activeLabel }}</template>
|
||||
</OnyxNavBar>
|
||||
</template>
|
||||
|
||||
<OnyxPageLayout>
|
||||
<NuxtLayout>
|
||||
<NuxtPage />
|
||||
<template #footer>
|
||||
<footer class="app-footer">
|
||||
<span><strong>PulseCast</strong> — staff the pulse, not the noise.</span>
|
||||
<span class="muted small">
|
||||
Prototype · forecast from the Go API · estimated devices, not people · 8 sensors in a 580 m cluster
|
||||
</span>
|
||||
</footer>
|
||||
</NuxtLayout>
|
||||
</template>
|
||||
</OnyxPageLayout>
|
||||
</OnyxAppLayout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.app-footer {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
gap: var(--onyx-density-sm);
|
||||
width: 100%;
|
||||
max-width: 1440px;
|
||||
margin-inline: auto;
|
||||
padding-block: var(--onyx-density-sm);
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
</style>
|
||||
@@ -1,555 +0,0 @@
|
||||
html,
|
||||
body,
|
||||
#__nuxt {
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: var(--onyx-color-base-neutral-100);
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 100%;
|
||||
max-width: 1440px;
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
.page-stack {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--onyx-density-xl);
|
||||
}
|
||||
|
||||
.page-header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: var(--onyx-density-md);
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
margin: 0 0 var(--onyx-density-xs);
|
||||
color: var(--onyx-color-text-icons-primary-bold);
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.lede {
|
||||
max-width: 72ch;
|
||||
margin: var(--onyx-density-sm) 0 0;
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.muted {
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.mono {
|
||||
font-family: var(--onyx-font-family-mono);
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.hero {
|
||||
padding: clamp(1.25rem, 2.5vw, 2rem);
|
||||
border: 1px solid var(--onyx-color-base-primary-200);
|
||||
border-radius: var(--onyx-radius-component-container-soft);
|
||||
background:
|
||||
radial-gradient(circle at 100% 0%, var(--onyx-color-base-primary-200), transparent 42%),
|
||||
linear-gradient(135deg, var(--onyx-color-base-primary-100), var(--onyx-color-base-neutral-100) 68%);
|
||||
}
|
||||
|
||||
.hero-grid {
|
||||
display: grid;
|
||||
gap: var(--onyx-density-xl);
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.hero-copy {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--onyx-density-md);
|
||||
}
|
||||
|
||||
.hero-copy h1 {
|
||||
max-width: 22ch;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.hero-copy p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.hero-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
.hero-decision {
|
||||
padding: var(--onyx-density-lg);
|
||||
border: 1px solid var(--onyx-color-base-primary-300);
|
||||
border-radius: var(--onyx-radius-component-container-soft);
|
||||
background: var(--onyx-color-base-neutral-100);
|
||||
}
|
||||
|
||||
.hero-decision__value {
|
||||
margin: 0;
|
||||
font-size: clamp(2rem, 3vw, 3rem);
|
||||
font-weight: 700;
|
||||
line-height: 1.05;
|
||||
color: var(--onyx-color-text-icons-primary-intense);
|
||||
}
|
||||
|
||||
.hero-decision__label {
|
||||
margin: var(--onyx-density-xs) 0 0;
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
}
|
||||
|
||||
.summary-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
.stat-card {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* Onyx badges are flex children inside cards and otherwise stretch to full width. */
|
||||
.onyx-badge {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
margin: 0;
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
margin: var(--onyx-density-xs) 0 0;
|
||||
font-size: clamp(1.35rem, 2vw, 1.75rem);
|
||||
font-weight: 700;
|
||||
line-height: 1.15;
|
||||
}
|
||||
|
||||
.stat-hint {
|
||||
margin: var(--onyx-density-xs) 0 0;
|
||||
color: var(--onyx-color-text-icons-neutral-soft);
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.split-grid {
|
||||
display: grid;
|
||||
gap: var(--onyx-density-lg);
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.card-stack {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
flex-direction: column;
|
||||
gap: var(--onyx-density-md);
|
||||
}
|
||||
|
||||
/* Keep wide Onyx tables scrolling inside their card instead of widening the page
|
||||
(Onyx wrappers are flex items and grid tracks default to min-width: auto). */
|
||||
.split-grid > *,
|
||||
.summary-grid > *,
|
||||
.onyx-card,
|
||||
.onyx-table-wrapper,
|
||||
.onyx-table-wrapper__container {
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Onyx marks some wide tables as "no scroll" before layout settles. Keep the
|
||||
scrollport so a phone never scrolls the whole page sideways. */
|
||||
.onyx-table-wrapper__container,
|
||||
.onyx-table-wrapper__container--no-scroll {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--onyx-density-xs);
|
||||
margin-bottom: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
.card-header h2,
|
||||
.card-header h3 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.form-grid {
|
||||
display: grid;
|
||||
gap: var(--onyx-density-md);
|
||||
}
|
||||
|
||||
.form-grid > *,
|
||||
.onyx-form-element-v2,
|
||||
.onyx-form-element-v2 > * {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
.assumption-grid {
|
||||
display: grid;
|
||||
gap: var(--onyx-density-md);
|
||||
}
|
||||
|
||||
.shift-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--onyx-density-2xs);
|
||||
}
|
||||
|
||||
.day-card-list {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
gap: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
.day-card__header {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
.day-card__date {
|
||||
margin: 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.day-card__metrics {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--onyx-density-sm);
|
||||
margin-top: var(--onyx-density-sm);
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.weather-strip {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
|
||||
gap: var(--onyx-density-2xs);
|
||||
padding-bottom: var(--onyx-density-2xs);
|
||||
}
|
||||
|
||||
.weather-day {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
padding: var(--onyx-density-xs);
|
||||
border: 1px solid var(--onyx-color-base-neutral-300);
|
||||
border-radius: var(--onyx-radius-component-container-soft);
|
||||
background: var(--onyx-color-base-neutral-100);
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.weather-day strong {
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.why-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--onyx-density-sm);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.why-list li {
|
||||
display: flex;
|
||||
gap: var(--onyx-density-xs);
|
||||
align-items: flex-start;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.why-list .onyx-icon {
|
||||
flex: none;
|
||||
margin-top: 0.1rem;
|
||||
}
|
||||
|
||||
.map-frame {
|
||||
position: relative;
|
||||
min-height: 320px;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--onyx-color-base-neutral-300);
|
||||
border-radius: var(--onyx-radius-component-container-soft);
|
||||
background:
|
||||
linear-gradient(var(--onyx-color-base-neutral-200) 1px, transparent 1px),
|
||||
linear-gradient(90deg, var(--onyx-color-base-neutral-200) 1px, transparent 1px),
|
||||
var(--onyx-color-base-neutral-100);
|
||||
background-size: 2.5rem 2.5rem;
|
||||
}
|
||||
|
||||
.map-frame__label {
|
||||
position: absolute;
|
||||
top: var(--onyx-density-sm);
|
||||
left: var(--onyx-density-sm);
|
||||
z-index: 2;
|
||||
max-width: 14rem;
|
||||
}
|
||||
|
||||
.sensor-pin {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.15rem;
|
||||
transform: translate(-50%, -50%);
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
.sensor-pin__dot {
|
||||
display: grid;
|
||||
width: 2.25rem;
|
||||
height: 2.25rem;
|
||||
place-items: center;
|
||||
border: 2px solid var(--onyx-color-base-neutral-100);
|
||||
border-radius: 999px;
|
||||
background: var(--onyx-color-base-primary-600);
|
||||
color: var(--onyx-color-text-icons-neutral-inverted);
|
||||
box-shadow: var(--onyx-shadow-soft-bottom);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sensor-pin--active .sensor-pin__dot {
|
||||
background: var(--onyx-color-base-primary-800);
|
||||
outline: 3px solid var(--onyx-color-base-primary-300);
|
||||
}
|
||||
|
||||
.sensor-pin__name {
|
||||
max-width: 7rem;
|
||||
overflow: hidden;
|
||||
padding: 0.1rem 0.3rem;
|
||||
border-radius: 0.2rem;
|
||||
background: color-mix(in srgb, var(--onyx-color-base-neutral-100) 88%, transparent);
|
||||
font-size: 0.6875rem;
|
||||
line-height: 1.2;
|
||||
text-align: center;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.bar-chart {
|
||||
display: flex;
|
||||
height: 96px;
|
||||
align-items: flex-end;
|
||||
gap: 2px;
|
||||
padding-top: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
.bar-chart__bar {
|
||||
flex: 1;
|
||||
min-width: 3px;
|
||||
border-radius: 2px 2px 0 0;
|
||||
background: var(--onyx-color-base-primary-500);
|
||||
}
|
||||
|
||||
.bar-chart__bar--now {
|
||||
background: var(--onyx-color-base-primary-800);
|
||||
}
|
||||
|
||||
.reading-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: baseline;
|
||||
gap: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
.reading-value {
|
||||
margin: 0;
|
||||
font-size: clamp(2.5rem, 6vw, 4rem);
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.legend {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--onyx-density-sm);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.legend__item {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.legend__swatch {
|
||||
width: 0.75rem;
|
||||
height: 0.75rem;
|
||||
border-radius: 2px;
|
||||
background: var(--onyx-color-base-primary-500);
|
||||
}
|
||||
|
||||
.legend__swatch--under {
|
||||
background: var(--onyx-color-base-danger-500);
|
||||
}
|
||||
|
||||
.legend__swatch--over {
|
||||
background: var(--onyx-color-base-warning-500);
|
||||
}
|
||||
|
||||
.table-note {
|
||||
margin: var(--onyx-density-xs) 0 0;
|
||||
}
|
||||
|
||||
.callout {
|
||||
padding: var(--onyx-density-sm) var(--onyx-density-md);
|
||||
border-left: 3px solid var(--onyx-color-base-primary-500);
|
||||
border-radius: 0 var(--onyx-radius-component-container-soft) var(--onyx-radius-component-container-soft) 0;
|
||||
background: var(--onyx-color-base-primary-100);
|
||||
}
|
||||
|
||||
.callout--warning {
|
||||
border-left-color: var(--onyx-color-base-warning-500);
|
||||
background: var(--onyx-color-base-warning-100);
|
||||
}
|
||||
|
||||
.scenario-grid {
|
||||
display: grid;
|
||||
gap: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
.scenario-card {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.scenario-card--active {
|
||||
outline: 2px solid var(--onyx-color-base-primary-500);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.metric-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: var(--onyx-density-md);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.metric-list div {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.metric-list dt {
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.metric-list dd {
|
||||
margin: 0.15rem 0 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.train-status {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: var(--onyx-density-sm);
|
||||
margin-top: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
@media (min-width: 577px) {
|
||||
.assumption-grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 769px) {
|
||||
.summary-grid {
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.day-card-list {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 993px) {
|
||||
.hero-grid {
|
||||
grid-template-columns: minmax(0, 1.65fr) minmax(18rem, 1fr);
|
||||
}
|
||||
|
||||
.split-grid {
|
||||
grid-template-columns: minmax(0, 1.9fr) minmax(20rem, 1fr);
|
||||
}
|
||||
|
||||
.scenario-grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.desktop-table {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.day-card-list {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.sensor-pin__name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.map-frame {
|
||||
min-height: 360px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.card-header .onyx-badge {
|
||||
align-self: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
.hero-actions,
|
||||
.form-actions,
|
||||
.desktop-table {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@layer base {
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
overscroll-behavior: none;
|
||||
background-color: #081723;
|
||||
color: #FFFFFF;
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
||||
}
|
||||
|
||||
main > :first-child {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
main > :last-child {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { LIVE_COLORS, LIVE_LABELS, liveAge } from '#shared/live'
|
||||
import type { LiveConnection } from '#shared/live'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
status: LiveConnection
|
||||
lastEventAt?: string
|
||||
compact?: boolean
|
||||
}>(),
|
||||
{ lastEventAt: '', compact: false },
|
||||
)
|
||||
|
||||
const color = computed(() => LIVE_COLORS[props.status])
|
||||
const label = computed(() => LIVE_LABELS[props.status])
|
||||
const age = computed(() => (props.lastEventAt ? liveAge(props.lastEventAt) : ''))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span class="live-status" role="status" aria-live="polite" :title="lastEventAt ? `Last event ${age}` : undefined">
|
||||
<OnyxBadge :color="color" :density="compact ? 'compact' : 'default'">{{ label }}</OnyxBadge>
|
||||
<span v-if="lastEventAt && !compact" class="live-status__age">{{ age }}</span>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.live-status {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
}
|
||||
|
||||
.live-status__age {
|
||||
color: var(--onyx-color-text-icons-neutral-soft);
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
</style>
|
||||
@@ -1,33 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
label: string
|
||||
value: string
|
||||
hint?: string
|
||||
badge?: string
|
||||
badgeColor?: 'neutral' | 'danger' | 'success' | 'primary' | 'warning' | 'info'
|
||||
icon?: string
|
||||
}>(),
|
||||
{ badgeColor: 'neutral' },
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<OnyxCard class="stat-card">
|
||||
<p class="stat-label">
|
||||
<OnyxIcon v-if="icon" :icon="icon" size="16px" color="primary" />
|
||||
{{ label }}
|
||||
</p>
|
||||
<p class="stat-value">{{ value }}</p>
|
||||
<OnyxBadge v-if="badge" :color="badgeColor" density="compact">{{ badge }}</OnyxBadge>
|
||||
<p v-if="hint" class="stat-hint">{{ hint }}</p>
|
||||
</OnyxCard>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.stat-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
}
|
||||
</style>
|
||||
@@ -1,57 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import type { Sensor } from '#shared/types'
|
||||
|
||||
const props = defineProps<{
|
||||
sensors: Sensor[]
|
||||
activeId: string
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
select: [sensorId: string]
|
||||
}>()
|
||||
|
||||
const bounds = computed(() => {
|
||||
const lats = props.sensors.map((sensor) => sensor.lat)
|
||||
const lons = props.sensors.map((sensor) => sensor.lon)
|
||||
const pad = 0.0009
|
||||
return {
|
||||
minLat: Math.min(...lats) - pad,
|
||||
maxLat: Math.max(...lats) + pad,
|
||||
minLon: Math.min(...lons) - pad,
|
||||
maxLon: Math.max(...lons) + pad,
|
||||
}
|
||||
})
|
||||
|
||||
function position(sensor: Sensor) {
|
||||
const { minLat, maxLat, minLon, maxLon } = bounds.value
|
||||
const x = ((sensor.lon - minLon) / (maxLon - minLon)) * 76 + 12
|
||||
const y = ((maxLat - sensor.lat) / (maxLat - minLat)) * 52 + 30
|
||||
return { left: `${x}%`, top: `${y}%` }
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="map-frame" role="group" aria-label="Schematic map of the eight Heilbronn sensors">
|
||||
<div class="map-frame__label">
|
||||
<OnyxBadge color="info" density="compact">Schematic</OnyxBadge>
|
||||
<p class="small muted" style="margin: 0.35rem 0 0">
|
||||
Relative sensor positions in the 580 m cluster. Not a city-wide heatmap.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<button
|
||||
v-for="(sensor, index) in props.sensors"
|
||||
:key="sensor.id"
|
||||
type="button"
|
||||
class="sensor-pin"
|
||||
:class="{ 'sensor-pin--active': sensor.id === props.activeId }"
|
||||
:style="position(sensor)"
|
||||
:aria-label="`${sensor.name}: mean ${sensor.mean}, p95 ${sensor.p95}`"
|
||||
:aria-pressed="sensor.id === props.activeId"
|
||||
@click="emit('select', sensor.id)"
|
||||
>
|
||||
<span class="sensor-pin__dot">{{ index + 1 }}</span>
|
||||
<span class="sensor-pin__name">{{ sensor.name }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,168 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { iconUpload } from '@sit-onyx/icons'
|
||||
|
||||
interface TrainResponse {
|
||||
job_id: string
|
||||
status: string
|
||||
model: 'small' | 'forecast'
|
||||
submitted_at: string
|
||||
}
|
||||
|
||||
interface TrainJob {
|
||||
job_id: string
|
||||
status: 'queued' | 'running' | 'succeeded' | 'failed'
|
||||
model: 'small' | 'forecast'
|
||||
metrics: Record<string, number | string> | null
|
||||
model_version: string | null
|
||||
error: string | null
|
||||
}
|
||||
|
||||
const file = ref<File | null>(null)
|
||||
const model = ref<'small' | 'forecast'>('small')
|
||||
const submitting = ref(false)
|
||||
const polling = ref(false)
|
||||
const job = ref<TrainJob | null>(null)
|
||||
const errorMessage = ref('')
|
||||
let pollTimer: ReturnType<typeof setInterval> | undefined
|
||||
|
||||
const modelOptions = [
|
||||
{ label: 'Small busy classifier (fast demo)', value: 'small' },
|
||||
{ label: 'Global forecast model (slower)', value: 'forecast' },
|
||||
]
|
||||
|
||||
const statusColor = computed(() => {
|
||||
switch (job.value?.status) {
|
||||
case 'succeeded':
|
||||
return 'success' as const
|
||||
case 'failed':
|
||||
return 'danger' as const
|
||||
case 'running':
|
||||
return 'info' as const
|
||||
default:
|
||||
return 'neutral' as const
|
||||
}
|
||||
})
|
||||
|
||||
function apiErrorMessage(error: unknown, fallback: string): string {
|
||||
const data = (
|
||||
error as {
|
||||
data?: { error?: { message?: string }; message?: string; statusMessage?: string }
|
||||
}
|
||||
)?.data
|
||||
return data?.error?.message ?? data?.message ?? data?.statusMessage ?? fallback
|
||||
}
|
||||
|
||||
function stopPolling() {
|
||||
if (pollTimer) clearInterval(pollTimer)
|
||||
pollTimer = undefined
|
||||
polling.value = false
|
||||
}
|
||||
|
||||
async function poll(jobId: string) {
|
||||
stopPolling()
|
||||
polling.value = true
|
||||
let attempts = 0
|
||||
pollTimer = setInterval(async () => {
|
||||
attempts += 1
|
||||
try {
|
||||
const result = await $fetch<TrainJob>(`/api/train/${encodeURIComponent(jobId)}`)
|
||||
job.value = result
|
||||
if (result.status === 'succeeded' || result.status === 'failed') stopPolling()
|
||||
} catch (error) {
|
||||
if (attempts >= 30) {
|
||||
stopPolling()
|
||||
errorMessage.value = apiErrorMessage(error, 'Could not read the training job status.')
|
||||
}
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
async function submit() {
|
||||
errorMessage.value = ''
|
||||
job.value = null
|
||||
if (!file.value) {
|
||||
errorMessage.value = 'Choose a CSV file first.'
|
||||
return
|
||||
}
|
||||
|
||||
submitting.value = true
|
||||
try {
|
||||
const formData = new FormData()
|
||||
formData.append('model', model.value)
|
||||
formData.append('file', file.value)
|
||||
const response = await $fetch<TrainResponse>('/api/train', { method: 'POST', body: formData })
|
||||
await poll(response.job_id)
|
||||
} catch (error) {
|
||||
errorMessage.value = apiErrorMessage(
|
||||
error,
|
||||
'Training submission failed. Check the Go API and its FastAPI training upstream.',
|
||||
)
|
||||
} finally {
|
||||
submitting.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onBeforeUnmount(stopPolling)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h3">Train new data</OnyxHeadline>
|
||||
<OnyxBadge color="info" density="compact">Server proxy</OnyxBadge>
|
||||
</div>
|
||||
<p class="small muted" style="margin-top: 0">
|
||||
Uploads through Nitro to Go <code>/api/train</code>. The control credentials stay in the Node process and are
|
||||
never sent to the browser.
|
||||
</p>
|
||||
|
||||
<form class="form-grid" @submit.prevent="submit">
|
||||
<OnyxFileUpload
|
||||
v-model="file"
|
||||
label="Training CSV"
|
||||
message="Challenge CSV schema. Required."
|
||||
:accept="['text/csv']"
|
||||
max-size="50MiB"
|
||||
/>
|
||||
<OnyxSelect
|
||||
v-model="model"
|
||||
label="Model"
|
||||
list-label="Available models"
|
||||
:options="modelOptions"
|
||||
/>
|
||||
<div class="form-actions">
|
||||
<OnyxButton
|
||||
type="submit"
|
||||
label="Start training"
|
||||
:icon="iconUpload"
|
||||
:loading="submitting || polling"
|
||||
/>
|
||||
<span v-if="submitting" class="small muted">Submitting…</span>
|
||||
<span v-else-if="polling" class="small muted">Training job running…</span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p v-if="errorMessage" class="small" style="color: var(--onyx-color-text-icons-danger-intense)">
|
||||
{{ errorMessage }}
|
||||
</p>
|
||||
|
||||
<div v-if="job" class="train-status">
|
||||
<OnyxBadge :color="statusColor">{{ job.status }}</OnyxBadge>
|
||||
<span class="small muted">Job {{ job.job_id }} · {{ job.model }}</span>
|
||||
<OnyxBadge v-if="job.model_version" color="neutral" density="compact">
|
||||
{{ job.model_version }}
|
||||
</OnyxBadge>
|
||||
</div>
|
||||
|
||||
<dl v-if="job?.metrics" class="metric-list" style="margin-top: var(--onyx-density-md)">
|
||||
<div v-for="(value, key) in job.metrics" :key="key">
|
||||
<dt>{{ key }}</dt>
|
||||
<dd>{{ value }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
|
||||
<p v-if="job?.error" class="small" style="color: var(--onyx-color-text-icons-danger-intense)">
|
||||
{{ job.error }}
|
||||
</p>
|
||||
</OnyxCard>
|
||||
</template>
|
||||
@@ -1,25 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { iconCloud, iconSunny } from '@sit-onyx/icons'
|
||||
import type { DailyWeather } from '#shared/insights'
|
||||
import { formatShortDate, formatWeekdayShort } from '~/utils/format'
|
||||
|
||||
const props = defineProps<{
|
||||
days: DailyWeather[]
|
||||
}>()
|
||||
|
||||
function iconFor(kind: DailyWeather['kind']) {
|
||||
return kind === 'sunny' || kind === 'partly-cloudy' ? iconSunny : iconCloud
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="weather-strip" role="list" aria-label="Weather forecast for the plan week">
|
||||
<div v-for="day in props.days" :key="day.date" class="weather-day" role="listitem">
|
||||
<strong>{{ formatWeekdayShort(day.date) }} {{ formatShortDate(day.date) }}</strong>
|
||||
<OnyxIcon :icon="iconFor(day.kind)" size="24px" color="primary" />
|
||||
<span>{{ Math.round(day.tempMin) }}–{{ Math.round(day.tempMax) }} °C</span>
|
||||
<span class="muted">{{ day.precipMm.toFixed(1) }} mm</span>
|
||||
<span class="muted">{{ Math.round(day.cloudPct) }}% cloud</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,276 +0,0 @@
|
||||
import {
|
||||
LIVE_LABELS,
|
||||
liveStatus,
|
||||
parseScenarioEvent,
|
||||
scenarioChanged,
|
||||
SCENARIO_POLL_MS,
|
||||
SSE_FAILURES_BEFORE_POLLING,
|
||||
SSE_STALE_MS,
|
||||
} from '#shared/live'
|
||||
import type { LiveConnection } from '#shared/live'
|
||||
import type { ScenarioState } from '#shared/types'
|
||||
|
||||
interface LiveStore {
|
||||
status: LiveConnection
|
||||
serverScenario: ScenarioState | null
|
||||
lastEventAt: string
|
||||
lastPollAt: string
|
||||
sseFailures: number
|
||||
pollFailures: number
|
||||
revision: number
|
||||
error: string
|
||||
}
|
||||
|
||||
// One stream per browser tab. The module-level store survives page navigation
|
||||
// and is only mutated from onMounted/EventSource callbacks (never during SSR).
|
||||
const store = reactive<LiveStore>({
|
||||
status: 'connecting',
|
||||
serverScenario: null,
|
||||
lastEventAt: '',
|
||||
lastPollAt: '',
|
||||
sseFailures: 0,
|
||||
pollFailures: 0,
|
||||
revision: 0,
|
||||
error: '',
|
||||
})
|
||||
|
||||
let source: EventSource | null = null
|
||||
let pollTimer: ReturnType<typeof setInterval> | null = null
|
||||
let staleTimer: ReturnType<typeof setInterval> | null = null
|
||||
let reconnectTimer: ReturnType<typeof setTimeout> | null = null
|
||||
let subscribers = 0
|
||||
let started = false
|
||||
let lastStaleRetry = 0
|
||||
|
||||
function nowIso(): string {
|
||||
return new Date().toISOString()
|
||||
}
|
||||
|
||||
function refreshStatus() {
|
||||
store.status = liveStatus({
|
||||
online: import.meta.client ? navigator.onLine !== false : true,
|
||||
sseOpen: source?.readyState === EventSource.OPEN,
|
||||
sseFailures: store.sseFailures,
|
||||
polling: pollTimer !== null,
|
||||
pollFailures: store.pollFailures,
|
||||
})
|
||||
}
|
||||
|
||||
function clearPolling() {
|
||||
if (pollTimer) clearInterval(pollTimer)
|
||||
pollTimer = null
|
||||
}
|
||||
|
||||
function applyScenario(next: ScenarioState, origin: 'sse' | 'poll') {
|
||||
const changed = scenarioChanged(store.serverScenario, next)
|
||||
store.serverScenario = next
|
||||
store.lastEventAt = nowIso()
|
||||
store.error = ''
|
||||
if (origin === 'poll') store.lastPollAt = store.lastEventAt
|
||||
if (changed) store.revision += 1
|
||||
}
|
||||
|
||||
async function pollScenario(): Promise<void> {
|
||||
if (!import.meta.client) return
|
||||
try {
|
||||
const next = await $fetch<ScenarioState>('/api/scenario', {
|
||||
headers: { accept: 'application/json' },
|
||||
timeout: 5000,
|
||||
})
|
||||
store.pollFailures = 0
|
||||
applyScenario(next, 'poll')
|
||||
// A successful poll proves the API is reachable; stay "Polling" until SSE
|
||||
// opens again, so the audience can see the fallback is active.
|
||||
if (store.status === 'offline') store.status = 'polling'
|
||||
} catch (error) {
|
||||
store.pollFailures += 1
|
||||
store.error = (error as { statusMessage?: string })?.statusMessage ?? 'Scenario polling failed'
|
||||
}
|
||||
refreshStatus()
|
||||
}
|
||||
|
||||
function startPolling() {
|
||||
if (!import.meta.client || pollTimer) return
|
||||
void pollScenario()
|
||||
pollTimer = setInterval(() => void pollScenario(), SCENARIO_POLL_MS)
|
||||
refreshStatus()
|
||||
}
|
||||
|
||||
function closeSource() {
|
||||
if (source) {
|
||||
source.close()
|
||||
source = null
|
||||
}
|
||||
if (reconnectTimer) clearTimeout(reconnectTimer)
|
||||
reconnectTimer = null
|
||||
}
|
||||
|
||||
function connectSse() {
|
||||
if (!import.meta.client) return
|
||||
closeSource()
|
||||
|
||||
if (navigator.onLine === false) {
|
||||
store.status = 'offline'
|
||||
startPolling()
|
||||
return
|
||||
}
|
||||
|
||||
const eventSource = new EventSource('/api/stream')
|
||||
source = eventSource
|
||||
|
||||
eventSource.onopen = () => {
|
||||
if (source !== eventSource) return
|
||||
store.sseFailures = 0
|
||||
store.pollFailures = 0
|
||||
store.error = ''
|
||||
// Start the stale watchdog now: a proxy can accept the SSE headers and
|
||||
// then buffer the body, so "open" does not prove events are flowing.
|
||||
store.lastEventAt = nowIso()
|
||||
clearPolling()
|
||||
refreshStatus()
|
||||
}
|
||||
|
||||
eventSource.addEventListener('scenario', (event) => {
|
||||
if (source !== eventSource) return
|
||||
const parsed = parseScenarioEvent((event as MessageEvent).data)
|
||||
if (!parsed) {
|
||||
store.error = 'Ignored a malformed scenario event'
|
||||
return
|
||||
}
|
||||
store.sseFailures = 0
|
||||
applyScenario(parsed, 'sse')
|
||||
refreshStatus()
|
||||
})
|
||||
|
||||
eventSource.addEventListener('ping', () => {
|
||||
if (source !== eventSource) return
|
||||
store.sseFailures = 0
|
||||
store.lastEventAt = nowIso()
|
||||
if (pollTimer && eventSource.readyState === EventSource.OPEN) clearPolling()
|
||||
refreshStatus()
|
||||
})
|
||||
|
||||
eventSource.onerror = () => {
|
||||
if (source !== eventSource) return
|
||||
store.sseFailures += 1
|
||||
|
||||
// A non-200 response (Nitro 502/503, proxy error) leaves EventSource in
|
||||
// CLOSED and the browser will not retry it. Treat that as a definitive
|
||||
// failure: start polling now and try the stream again on a timer. Network
|
||||
// errors while CONNECTING still use the browser's own retry loop.
|
||||
const fatal = eventSource.readyState === EventSource.CLOSED
|
||||
if (fatal) {
|
||||
store.sseFailures = Math.max(store.sseFailures, SSE_FAILURES_BEFORE_POLLING)
|
||||
if (!reconnectTimer) {
|
||||
reconnectTimer = setTimeout(() => {
|
||||
if (!started) return
|
||||
connectSse()
|
||||
}, 5000)
|
||||
}
|
||||
}
|
||||
|
||||
if (store.sseFailures >= SSE_FAILURES_BEFORE_POLLING) startPolling()
|
||||
refreshStatus()
|
||||
}
|
||||
}
|
||||
|
||||
function checkStale() {
|
||||
if (!import.meta.client || !started) return
|
||||
const sseOpen = source?.readyState === EventSource.OPEN
|
||||
if (sseOpen && store.lastEventAt) {
|
||||
const age = Date.now() - Date.parse(store.lastEventAt)
|
||||
if (age > SSE_STALE_MS) {
|
||||
// Connection is open but no ping arrived: Cloudflare/path buffering.
|
||||
// Polling is the contract fallback; retry SSE once a minute.
|
||||
store.sseFailures = Math.max(store.sseFailures, SSE_FAILURES_BEFORE_POLLING)
|
||||
startPolling()
|
||||
refreshStatus()
|
||||
if (Date.now() - lastStaleRetry > 60000) {
|
||||
lastStaleRetry = Date.now()
|
||||
connectSse()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (store.pollFailures > 0) refreshStatus()
|
||||
}
|
||||
|
||||
function start() {
|
||||
if (!import.meta.client || started) return
|
||||
started = true
|
||||
store.sseFailures = 0
|
||||
store.pollFailures = 0
|
||||
store.lastEventAt = ''
|
||||
store.error = ''
|
||||
store.status = 'connecting'
|
||||
window.addEventListener('online', handleOnline)
|
||||
window.addEventListener('offline', handleOffline)
|
||||
staleTimer = setInterval(checkStale, 5000)
|
||||
connectSse()
|
||||
}
|
||||
|
||||
function stop() {
|
||||
if (!import.meta.client) return
|
||||
started = false
|
||||
closeSource()
|
||||
clearPolling()
|
||||
if (staleTimer) clearInterval(staleTimer)
|
||||
staleTimer = null
|
||||
window.removeEventListener('online', handleOnline)
|
||||
window.removeEventListener('offline', handleOffline)
|
||||
store.status = 'connecting'
|
||||
}
|
||||
|
||||
function handleOnline() {
|
||||
if (!started) return
|
||||
store.pollFailures = 0
|
||||
connectSse()
|
||||
void pollScenario()
|
||||
}
|
||||
|
||||
function handleOffline() {
|
||||
if (!started) return
|
||||
store.status = 'offline'
|
||||
if (pollTimer) clearInterval(pollTimer)
|
||||
pollTimer = null
|
||||
}
|
||||
|
||||
/**
|
||||
* Subscribe the current page to the Go scenario stream through Nitro.
|
||||
*
|
||||
* The first render uses `initial` from SSR; after mount the composable opens
|
||||
* `/api/stream`, shows Live/Polling/Offline, and falls back to GET
|
||||
* /api/scenario every 5 s when SSE fails or is buffered.
|
||||
*/
|
||||
export function useLiveScenario(initial?: ScenarioState | null) {
|
||||
const initialScenario = initial ?? null
|
||||
|
||||
const current = computed<ScenarioState | null>(() => store.serverScenario ?? initialScenario)
|
||||
const scenarioId = computed(() => current.value?.scenario.scenario ?? 'base')
|
||||
const status = computed(() => store.status)
|
||||
const statusLabel = computed(() => LIVE_LABELS[store.status])
|
||||
|
||||
onMounted(() => {
|
||||
// Seed after hydration so the first client paint matches the SSR HTML.
|
||||
if (initialScenario && !store.serverScenario) store.serverScenario = initialScenario
|
||||
subscribers += 1
|
||||
start()
|
||||
})
|
||||
onBeforeUnmount(() => {
|
||||
subscribers = Math.max(0, subscribers - 1)
|
||||
if (subscribers === 0) stop()
|
||||
})
|
||||
|
||||
return reactive({
|
||||
scenario: current,
|
||||
scenarioId,
|
||||
version: computed(() => current.value?.version ?? 0),
|
||||
scenarioAt: computed(() => current.value?.at ?? ''),
|
||||
status,
|
||||
statusLabel,
|
||||
lastEventAt: computed(() => store.lastEventAt),
|
||||
lastPollAt: computed(() => store.lastPollAt),
|
||||
error: computed(() => store.error),
|
||||
revision: computed(() => store.revision),
|
||||
pollNow: pollScenario,
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
<script setup lang="ts">
|
||||
const route = useRoute()
|
||||
const mobileOpen = ref(false)
|
||||
const menuButton = ref<HTMLButtonElement | null>(null)
|
||||
|
||||
function closeMenu() {
|
||||
mobileOpen.value = false
|
||||
}
|
||||
|
||||
function onKeydown(event: KeyboardEvent) {
|
||||
if (event.key === 'Escape' && mobileOpen.value) {
|
||||
closeMenu()
|
||||
menuButton.value?.focus()
|
||||
}
|
||||
}
|
||||
|
||||
function toggleMenu() {
|
||||
mobileOpen.value = !mobileOpen.value
|
||||
}
|
||||
|
||||
onMounted(() => window.addEventListener('keydown', onKeydown))
|
||||
onBeforeUnmount(() => window.removeEventListener('keydown', onKeydown))
|
||||
watch(() => route.fullPath, closeMenu)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<header class="fixed top-0 left-0 right-0 z-50 h-16 bg-[#081723]/95 backdrop-blur-md border-b border-[#1e3a52]">
|
||||
<div class="relative h-16 max-w-[1200px] mx-auto px-margin-desktop flex items-center justify-between">
|
||||
<NuxtLink
|
||||
to="/"
|
||||
aria-label="Schwarz IT — Sensing Engine home"
|
||||
class="inline-flex items-center shrink-0"
|
||||
>
|
||||
<img
|
||||
src="/schwarz-it-logo.svg"
|
||||
alt="Schwarz IT"
|
||||
class="h-8 w-auto"
|
||||
/>
|
||||
</NuxtLink>
|
||||
|
||||
<nav
|
||||
aria-label="Primary"
|
||||
class="hidden md:flex absolute top-0 left-1/2 -translate-x-1/2 h-16 items-center gap-space-xl"
|
||||
>
|
||||
<NuxtLink
|
||||
to="/"
|
||||
aria-current="page"
|
||||
class="inline-flex h-16 items-center border-b-2 border-[#00C3CD] font-label-md text-[#00C3CD] font-semibold transition-colors"
|
||||
>
|
||||
Engine
|
||||
</NuxtLink>
|
||||
<a
|
||||
href="#"
|
||||
class="inline-flex h-16 items-center border-b-2 border-transparent font-label-md text-[#94A3B8] hover:text-[#FFFFFF] transition-colors"
|
||||
@click.prevent
|
||||
>
|
||||
Sensors
|
||||
</a>
|
||||
<a
|
||||
href="#"
|
||||
class="inline-flex h-16 items-center border-b-2 border-transparent font-label-md text-[#94A3B8] hover:text-[#FFFFFF] transition-colors"
|
||||
@click.prevent
|
||||
>
|
||||
Use cases
|
||||
</a>
|
||||
<a
|
||||
href="#"
|
||||
class="inline-flex h-16 items-center border-b-2 border-transparent font-label-md text-[#94A3B8] hover:text-[#FFFFFF] transition-colors"
|
||||
@click.prevent
|
||||
>
|
||||
Playground
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
<button
|
||||
ref="menuButton"
|
||||
type="button"
|
||||
class="md:hidden inline-flex h-11 w-11 items-center justify-center rounded-lg text-[#94A3B8] hover:text-[#FFFFFF] transition-colors"
|
||||
aria-controls="mobile-nav"
|
||||
:aria-expanded="mobileOpen"
|
||||
:aria-label="mobileOpen ? 'Close menu' : 'Open menu'"
|
||||
@click="toggleMenu"
|
||||
>
|
||||
<Icon v-if="mobileOpen" name="material-symbols:close" class="text-[24px]" />
|
||||
<Icon v-else name="material-symbols:menu" class="text-[24px]" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-show="mobileOpen"
|
||||
id="mobile-nav"
|
||||
class="md:hidden absolute top-full left-0 right-0 bg-[#081723] border-b border-[#1e3a52] shadow-[0_8px_24px_rgba(0,0,0,0.4)]"
|
||||
>
|
||||
<nav aria-label="Mobile primary" class="max-w-[1200px] mx-auto px-margin-desktop py-space-sm flex flex-col">
|
||||
<NuxtLink
|
||||
to="/"
|
||||
aria-current="page"
|
||||
class="inline-flex h-12 items-center justify-center font-label-md text-[#00C3CD] font-semibold"
|
||||
@click="closeMenu"
|
||||
>
|
||||
Engine
|
||||
</NuxtLink>
|
||||
<a
|
||||
href="#"
|
||||
class="inline-flex h-12 items-center justify-center font-label-md text-[#94A3B8] hover:text-[#FFFFFF] transition-colors"
|
||||
@click.prevent="closeMenu"
|
||||
>
|
||||
Sensors
|
||||
</a>
|
||||
<a
|
||||
href="#"
|
||||
class="inline-flex h-12 items-center justify-center font-label-md text-[#94A3B8] hover:text-[#FFFFFF] transition-colors"
|
||||
@click.prevent="closeMenu"
|
||||
>
|
||||
Use cases
|
||||
</a>
|
||||
<a
|
||||
href="#"
|
||||
class="inline-flex h-12 items-center justify-center font-label-md text-[#94A3B8] hover:text-[#FFFFFF] transition-colors"
|
||||
@click.prevent="closeMenu"
|
||||
>
|
||||
Playground
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<slot />
|
||||
</template>
|
||||
@@ -1,152 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { iconCircleInformation, iconShieldUser, iconTriangleWarning } from '@sit-onyx/icons'
|
||||
import type { MetaResponse } from '#shared/types'
|
||||
import { formatDate, formatDateTime, formatPercent } from '~/utils/format'
|
||||
|
||||
useHead({ title: 'About the data and limits — PulseCast' })
|
||||
|
||||
const { data: meta } = await useFetch<MetaResponse>('/api/meta')
|
||||
|
||||
const config = useRuntimeConfig()
|
||||
const usingMock = computed(() => ['1', 'true'].includes(String(config.public.useMock).toLowerCase()))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page page-stack">
|
||||
<header class="page-header">
|
||||
<div>
|
||||
<p class="eyebrow">About · method, data and limits</p>
|
||||
<OnyxHeadline is="h1">A decision aid, not a city-wide truth.</OnyxHeadline>
|
||||
<p class="lede">
|
||||
PulseCast turns a footfall forecast into a next-week staffing plan. The forecast is a model output; the
|
||||
staffing rule is a transparent heuristic. Both are shown, editable, and bounded.
|
||||
</p>
|
||||
</div>
|
||||
<OnyxBadge color="warning">Hackathon prototype</OnyxBadge>
|
||||
</header>
|
||||
|
||||
<div class="summary-grid">
|
||||
<MetricCard
|
||||
label="Sensors"
|
||||
:value="String(meta?.coverage.sensors ?? 8)"
|
||||
hint="Fixed points in a 580 m inner-city cluster."
|
||||
:icon="iconCircleInformation"
|
||||
/>
|
||||
<MetricCard
|
||||
label="Model WAPE"
|
||||
:value="meta ? formatPercent(meta.metrics.wape, 1) : '—'"
|
||||
:badge="meta ? `baseline ${formatPercent(meta.metrics.baseline_wape, 1)}` : undefined"
|
||||
badge-color="success"
|
||||
hint="Time-based holdout, not a random split."
|
||||
/>
|
||||
<MetricCard
|
||||
label="R²"
|
||||
:value="meta ? meta.metrics.r2.toFixed(3) : '—'"
|
||||
:hint="meta ? `MAE ${meta.metrics.mae} devices/hour` : undefined"
|
||||
/>
|
||||
<MetricCard
|
||||
label="Cadence"
|
||||
:value="meta ? `${meta.coverage.cadence_min} min` : '—'"
|
||||
:hint="meta ? `${formatDate(meta.coverage.from)} → ${formatDate(meta.coverage.to)}` : undefined"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="split-grid">
|
||||
<div class="card-stack">
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h2">How the plan is made</OnyxHeadline>
|
||||
<OnyxBadge color="info" density="compact">transparent heuristic</OnyxBadge>
|
||||
</div>
|
||||
<ol class="small" style="margin: 0; padding-left: 1.2rem; display: grid; gap: var(--onyx-density-sm)">
|
||||
<li>Forecast estimated devices per hour for the next 7 days.</li>
|
||||
<li>Divide by visitors per staff-hour, multiply by a safety factor, round up, apply minimum staff.</li>
|
||||
<li>Cover 10:00–20:00 with consecutive shift blocks; a block gets the peak requirement inside it.</li>
|
||||
<li>Score coverage, cost, over/understaffed hours and compare with a flat schedule.</li>
|
||||
<li>Show the weather, holiday and assumption drivers; let the manager edit and regenerate.</li>
|
||||
</ol>
|
||||
<div class="callout" style="margin-top: var(--onyx-density-md)">
|
||||
<p class="small" style="margin: 0">
|
||||
There is no POS, sales, queue, payroll or labour-cost feed. Cost is an assumption. The coverage score
|
||||
is high by construction because shift blocks cover their local peak; overstaffed hours are the honest
|
||||
trade-off.
|
||||
</p>
|
||||
</div>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h2">Model and data coverage</OnyxHeadline>
|
||||
</div>
|
||||
<OnyxTable striped :table-attrs="{ style: 'min-width: 34rem' }">
|
||||
<template #head>
|
||||
<tr><th scope="col">Field</th><th scope="col">Value</th></tr>
|
||||
</template>
|
||||
<tr><th scope="row" style="text-align: left; font-weight: 600">Data version</th><td class="mono">{{ meta?.data_version ?? '—' }}</td></tr>
|
||||
<tr><th scope="row" style="text-align: left; font-weight: 600">Model version</th><td class="mono">{{ meta?.model_version ?? '—' }}</td></tr>
|
||||
<tr><th scope="row" style="text-align: left; font-weight: 600">Context version</th><td class="mono">{{ meta?.context_version ?? '—' }}</td></tr>
|
||||
<tr><th scope="row" style="text-align: left; font-weight: 600">Coverage</th><td>{{ meta ? `${formatDate(meta.coverage.from)} → ${formatDate(meta.coverage.to)}` : '—' }}</td></tr>
|
||||
<tr><th scope="row" style="text-align: left; font-weight: 600">Validation</th><td>{{ meta ? `WAPE ${formatPercent(meta.metrics.wape, 1)} · baseline ${formatPercent(meta.metrics.baseline_wape, 1)} · R² ${meta.metrics.r2}` : '—' }}</td></tr>
|
||||
<tr><th scope="row" style="text-align: left; font-weight: 600">Weather source</th><td>Open-Meteo archive + forecast via /api/context</td></tr>
|
||||
<tr><th scope="row" style="text-align: left; font-weight: 600">Holidays</th><td>Baden-Württemberg 2025–2026 public holidays</td></tr>
|
||||
</OnyxTable>
|
||||
<p class="small muted table-note">Meta comes from Go <code>/api/meta</code> through the Nitro proxy.</p>
|
||||
</OnyxCard>
|
||||
|
||||
<TrainModelCard />
|
||||
</div>
|
||||
|
||||
<aside class="card-stack">
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h2">Limits</OnyxHeadline>
|
||||
<OnyxIcon :icon="iconTriangleWarning" size="24px" color="warning" />
|
||||
</div>
|
||||
<ul class="why-list">
|
||||
<li v-for="limit in meta?.limits ?? []" :key="limit">
|
||||
<OnyxIcon :icon="iconTriangleWarning" size="16px" color="warning" />
|
||||
<span>{{ limit }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="small muted table-note">
|
||||
Eight sensors in one pedestrian cluster cannot rank commercial zones across Heilbronn. There is no
|
||||
city-wide heatmap claim here.
|
||||
</p>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h2">Privacy</OnyxHeadline>
|
||||
<OnyxIcon :icon="iconShieldUser" size="24px" color="primary" />
|
||||
</div>
|
||||
<ul class="small" style="margin: 0; padding-left: 1.1rem; display: grid; gap: var(--onyx-density-xs)">
|
||||
<li>No PII, MAC addresses or geolocation permission.</li>
|
||||
<li>Audience sessions use a random ID only.</li>
|
||||
<li>Public read-only screens; control actions are authenticated separately.</li>
|
||||
<li>Raw challenge CSV and secrets stay out of this repository.</li>
|
||||
</ul>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h3">Data source</OnyxHeadline>
|
||||
<OnyxBadge :color="usingMock ? 'warning' : 'success'" density="compact">
|
||||
{{ usingMock ? 'Mock mode' : 'Go API' }}
|
||||
</OnyxBadge>
|
||||
</div>
|
||||
<p v-if="usingMock" class="small muted" style="margin-top: 0">
|
||||
Explicit dev fallback: <code>NUXT_PUBLIC_USE_MOCK=1</code>. Mock JSON renders the app without the Go
|
||||
service; the plan heuristic is the shared implementation in <code>shared/staffing.ts</code>.
|
||||
</p>
|
||||
<p v-else class="small muted" style="margin-top: 0">
|
||||
The browser only talks to this Nuxt origin. Nitro proxies /api/* to the Go API at
|
||||
<code>NUXT_API_INTERNAL_BASE</code>; forecast, context and meta are served from there.
|
||||
</p>
|
||||
<p class="small muted" style="margin: 0">
|
||||
Last context update: {{ meta ? formatDateTime(meta.context_version) : '—' }}
|
||||
</p>
|
||||
</OnyxCard>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,269 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
iconArrowRight,
|
||||
iconCircleCheck,
|
||||
iconCircleX,
|
||||
iconPresentionBoard,
|
||||
iconSync,
|
||||
iconTriangleWarning,
|
||||
} from '@sit-onyx/icons'
|
||||
import { scenarioLabel } from '#shared/live'
|
||||
import type { ScenarioPreset, ScenarioState } from '#shared/types'
|
||||
import { apiErrorMessage, apiErrorStatus } from '~/utils/api-error'
|
||||
import { formatDateTime } from '~/utils/format'
|
||||
|
||||
useHead({ title: 'Presenter control — PulseCast' })
|
||||
|
||||
const { data: initialScenario } = await useFetch<ScenarioState>('/api/scenario')
|
||||
const { data: presets, error: presetsError } = await useFetch<ScenarioPreset[]>('/api/scenarios')
|
||||
|
||||
const live = useLiveScenario(initialScenario.value)
|
||||
const submitted = ref<ScenarioState | null>(null)
|
||||
const busy = ref('')
|
||||
const message = ref('')
|
||||
const errorMessage = ref('')
|
||||
|
||||
const current = computed(() => {
|
||||
const liveState = live.scenario
|
||||
const local = submitted.value
|
||||
if (!liveState) return local ?? initialScenario.value ?? null
|
||||
if (!local) return liveState
|
||||
// A remote presenter can move the stage on; always show the newer version.
|
||||
return liveState.version >= local.version ? liveState : local
|
||||
})
|
||||
const activeId = computed(() => current.value?.scenario.scenario ?? '')
|
||||
const presetList = computed(() => presets.value ?? [])
|
||||
|
||||
function applyBody(preset: ScenarioPreset) {
|
||||
return {
|
||||
scenario: preset.id,
|
||||
weather: preset.weather ?? {},
|
||||
event: preset.event,
|
||||
}
|
||||
}
|
||||
|
||||
async function apply(preset: ScenarioPreset) {
|
||||
if (busy.value) return
|
||||
busy.value = preset.id
|
||||
message.value = ''
|
||||
errorMessage.value = ''
|
||||
try {
|
||||
const response = await $fetch<ScenarioState>('/api/scenario', {
|
||||
method: 'POST',
|
||||
body: applyBody(preset),
|
||||
})
|
||||
submitted.value = response
|
||||
message.value = `${preset.label} is now live · version ${response.version}.`
|
||||
} catch (error) {
|
||||
errorMessage.value =
|
||||
apiErrorMessage(error, 'The scenario change failed. Check the Go API and control credentials.') +
|
||||
(apiErrorStatus(error) === 401 ? ' Reload this page to sign in again.' : '')
|
||||
} finally {
|
||||
busy.value = ''
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page page-stack control-page">
|
||||
<header class="page-header">
|
||||
<div>
|
||||
<p class="eyebrow">Presenter control · not linked in public navigation</p>
|
||||
<OnyxHeadline is="h1">Change the scenario once. Every screen follows.</OnyxHeadline>
|
||||
<p class="lede">
|
||||
Each button POSTs to this Nuxt origin. Nitro attaches the Go control credentials server-side; the browser
|
||||
never sees them. <NuxtLink to="/stage">Stage</NuxtLink> and <NuxtLink to="/live">Live</NuxtLink> update through
|
||||
SSE, with a 5-second polling fallback.
|
||||
</p>
|
||||
</div>
|
||||
<div class="hero-actions">
|
||||
<LiveStatusBadge :status="live.status" :last-event-at="live.lastEventAt" />
|
||||
<OnyxBadge v-if="current" color="neutral" density="compact">v{{ current.version }}</OnyxBadge>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div v-if="errorMessage" class="callout callout--warning" role="alert">
|
||||
<OnyxIcon :icon="iconCircleX" size="16px" color="danger" />
|
||||
<span>{{ errorMessage }}</span>
|
||||
</div>
|
||||
<div v-if="message" class="callout" role="status">
|
||||
<OnyxIcon :icon="iconCircleCheck" size="16px" color="success" />
|
||||
<span>{{ message }}</span>
|
||||
</div>
|
||||
|
||||
<div class="split-grid">
|
||||
<div class="card-stack">
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<OnyxHeadline is="h2">Scenario presets</OnyxHeadline>
|
||||
<p class="small muted" style="margin: 0">
|
||||
The enum is fixed by CONTRACT.md. Weather and event values match the demo narrative.
|
||||
</p>
|
||||
</div>
|
||||
<OnyxBadge color="info" density="compact">server proxy</OnyxBadge>
|
||||
</div>
|
||||
|
||||
<div v-if="presetList.length" class="scenario-grid">
|
||||
<button
|
||||
v-for="preset in presetList"
|
||||
:key="preset.id"
|
||||
type="button"
|
||||
class="scenario-button"
|
||||
:class="{ 'scenario-button--active': preset.id === activeId }"
|
||||
:disabled="Boolean(busy)"
|
||||
:aria-pressed="preset.id === activeId"
|
||||
@click="apply(preset)"
|
||||
>
|
||||
<span class="scenario-button__head">
|
||||
<strong>{{ preset.label }}</strong>
|
||||
<OnyxBadge v-if="preset.id === activeId" color="success" density="compact">on stage</OnyxBadge>
|
||||
<OnyxBadge v-else color="neutral" density="compact">{{ preset.short }}</OnyxBadge>
|
||||
</span>
|
||||
<span class="small muted">{{ preset.description }}</span>
|
||||
<span v-if="busy === preset.id" class="scenario-button__busy">
|
||||
<OnyxIcon :icon="iconSync" size="16px" color="primary" class="spin" />
|
||||
Broadcasting…
|
||||
</span>
|
||||
<span v-else class="scenario-button__action">
|
||||
Apply
|
||||
<OnyxIcon :icon="iconArrowRight" size="16px" color="primary" />
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div v-else class="callout callout--warning">
|
||||
<OnyxIcon :icon="iconTriangleWarning" size="16px" color="warning" />
|
||||
Scenario presets could not be loaded.
|
||||
<span v-if="presetsError" class="muted">{{ presetsError.statusMessage }}</span>
|
||||
</div>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h2">Open the audience views</OnyxHeadline>
|
||||
<OnyxIcon :icon="iconPresentionBoard" size="24px" color="primary" />
|
||||
</div>
|
||||
<div class="hero-actions">
|
||||
<OnyxButton label="Open /stage" link="/stage" color="primary" />
|
||||
<OnyxButton label="Open /live" link="/live" mode="outline" />
|
||||
<OnyxButton label="Open /plan" link="/plan" mode="outline" />
|
||||
</div>
|
||||
<p class="small muted table-note">
|
||||
Put <code>/stage</code> on the projector and let the audience scan the QR code. <code>/live</code> needs no
|
||||
login and keeps the last known plan if the stream drops.
|
||||
</p>
|
||||
</OnyxCard>
|
||||
</div>
|
||||
|
||||
<aside class="card-stack">
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h2">Current scenario</OnyxHeadline>
|
||||
<LiveStatusBadge :status="live.status" :last-event-at="live.lastEventAt" compact />
|
||||
</div>
|
||||
<p class="control-current">{{ current ? scenarioLabel(current.scenario.scenario) : 'Unavailable' }}</p>
|
||||
<dl class="metric-list">
|
||||
<div><dt>Version</dt><dd>{{ current?.version ?? '—' }}</dd></div>
|
||||
<div><dt>Broadcast at</dt><dd>{{ current ? formatDateTime(current.at) : '—' }}</dd></div>
|
||||
<div><dt>Last SSE event</dt><dd>{{ live.lastEventAt ? formatDateTime(live.lastEventAt) : '—' }}</dd></div>
|
||||
<div><dt>Transport</dt><dd>{{ live.statusLabel }}</dd></div>
|
||||
</dl>
|
||||
<p v-if="live.error" class="small muted table-note">{{ live.error }}</p>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h3">What the presenter says</OnyxHeadline>
|
||||
</div>
|
||||
<ul class="why-list">
|
||||
<li><span><strong>Base week</strong> — normal weather, no event uplift.</span></li>
|
||||
<li><span><strong>Sunny Saturday + market</strong> — the Saturday plan should add staff.</span></li>
|
||||
<li><span><strong>Rainy Saturday</strong> — the Saturday plan should shed staff.</span></li>
|
||||
<li><span><strong>Wednesday event</strong> — the weekday evening block should rise.</span></li>
|
||||
</ul>
|
||||
<p class="small muted table-note">
|
||||
If the numbers do not move on stage, check the <code>cached</code> badge: Go may be serving its last good
|
||||
forecast because the ML service is down.
|
||||
</p>
|
||||
</OnyxCard>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.control-current {
|
||||
margin: 0 0 var(--onyx-density-md);
|
||||
color: var(--onyx-color-text-icons-primary-intense);
|
||||
font-size: clamp(1.6rem, 3vw, 2.4rem);
|
||||
font-weight: 700;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.scenario-button {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--onyx-density-xs);
|
||||
width: 100%;
|
||||
padding: var(--onyx-density-md);
|
||||
border: 1px solid var(--onyx-color-base-neutral-300);
|
||||
border-radius: var(--onyx-radius-component-container-soft);
|
||||
background: var(--onyx-color-base-neutral-100);
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.scenario-button:hover:not(:disabled),
|
||||
.scenario-button:focus-visible {
|
||||
border-color: var(--onyx-color-base-primary-500);
|
||||
outline: 2px solid var(--onyx-color-base-primary-300);
|
||||
outline-offset: 1px;
|
||||
}
|
||||
|
||||
.scenario-button:disabled {
|
||||
cursor: progress;
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
.scenario-button--active {
|
||||
border-color: var(--onyx-color-base-primary-600);
|
||||
background: var(--onyx-color-base-primary-100);
|
||||
}
|
||||
|
||||
.scenario-button__head,
|
||||
.scenario-button__action,
|
||||
.scenario-button__busy {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--onyx-density-xs);
|
||||
}
|
||||
|
||||
.scenario-button__action,
|
||||
.scenario-button__busy {
|
||||
justify-content: flex-start;
|
||||
margin-top: var(--onyx-density-xs);
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.spin {
|
||||
animation: spin 0.9s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.spin {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,320 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { iconCalendar, iconChart, iconTriangleWarning } from '@sit-onyx/icons'
|
||||
import { dailyWeather } from '#shared/insights'
|
||||
import { berlinParts, planWeekStart, STANDARD_VISITORS_PER_STAFF_HOUR } from '#shared/staffing'
|
||||
import type { ContextResponse, ForecastResponse, MetaResponse, Point, Scenario, ScenarioPreset, ScenarioState, Sensor } from '#shared/types'
|
||||
import { formatDate, formatNumber, formatPercent, formatShortDate, formatWeekday, formatWeekdayShort, weekLabel } from '~/utils/format'
|
||||
|
||||
useHead({ title: 'Forecast — PulseCast' })
|
||||
|
||||
const config = useRuntimeConfig()
|
||||
const demoNow = String(config.public.demoNow)
|
||||
const weekStart = planWeekStart(demoNow)
|
||||
const weekEnd = new Date(new Date(`${weekStart}T12:00:00Z`).getTime() + 6 * 86400000)
|
||||
.toISOString()
|
||||
.slice(0, 10)
|
||||
|
||||
const sensorId = ref('hn-stadtgalerie-01')
|
||||
const scenario = ref<Scenario>('base')
|
||||
|
||||
const { data: sensors } = await useFetch<Sensor[]>('/api/sensors')
|
||||
const { data: context } = await useFetch<ContextResponse>('/api/context')
|
||||
const { data: meta } = await useFetch<MetaResponse>('/api/meta')
|
||||
const { data: presets } = await useFetch<ScenarioPreset[]>('/api/scenarios')
|
||||
const { data: liveScenarioState } = await useFetch<ScenarioState>('/api/scenario')
|
||||
const live = useLiveScenario(liveScenarioState.value)
|
||||
scenario.value = live.scenarioId
|
||||
|
||||
sensorId.value =
|
||||
sensors.value?.find((sensor) => sensor.id === 'hn-stadtgalerie-01')?.id ??
|
||||
sensors.value?.[0]?.id ??
|
||||
sensorId.value
|
||||
|
||||
const {
|
||||
data: forecast,
|
||||
error: forecastError,
|
||||
refresh: refreshForecast,
|
||||
} = await useFetch<ForecastResponse>('/api/forecast', {
|
||||
query: computed(() => ({ sensor: sensorId.value, horizon: '7d', scenario: scenario.value })),
|
||||
})
|
||||
|
||||
watch(
|
||||
() => live.revision,
|
||||
() => {
|
||||
if (live.scenarioId !== scenario.value) scenario.value = live.scenarioId
|
||||
else void refreshForecast()
|
||||
},
|
||||
)
|
||||
|
||||
const activeSensor = computed(() => sensors.value?.find((sensor) => sensor.id === sensorId.value))
|
||||
const sensorOptions = computed(() =>
|
||||
(sensors.value ?? []).map((sensor) => ({ value: sensor.id, label: sensor.name })),
|
||||
)
|
||||
const scenarioOptions = computed(() =>
|
||||
(presets.value ?? []).map((preset) => ({ value: preset.id, label: preset.label })),
|
||||
)
|
||||
|
||||
interface DayForecast {
|
||||
date: string
|
||||
points: Point[]
|
||||
mean: number
|
||||
peak: number
|
||||
peakHour: number
|
||||
weather?: ReturnType<typeof dailyWeather>[string]
|
||||
requiredAtPeak: number
|
||||
}
|
||||
|
||||
const days = computed<DayForecast[]>(() => {
|
||||
const grouped: Record<string, Point[]> = {}
|
||||
for (const point of forecast.value?.points ?? []) {
|
||||
const { date } = berlinParts(point.t)
|
||||
;(grouped[date] ??= []).push(point)
|
||||
}
|
||||
const weather = dailyWeather(context.value?.weather.forecast ?? [])
|
||||
return Object.keys(grouped)
|
||||
.sort()
|
||||
.map((date) => {
|
||||
const points = grouped[date]!
|
||||
const peakPoint = points.reduce((best, point) => (point.v > best.v ? point : best))
|
||||
const mean = points.reduce((sum, point) => sum + point.v, 0) / points.length
|
||||
return {
|
||||
date,
|
||||
points,
|
||||
mean: Math.round(mean),
|
||||
peak: peakPoint.v,
|
||||
peakHour: berlinParts(peakPoint.t).hour,
|
||||
weather: weather[date],
|
||||
requiredAtPeak: Math.max(
|
||||
1,
|
||||
Math.ceil((peakPoint.v / STANDARD_VISITORS_PER_STAFF_HOUR.standard) * 1.15),
|
||||
),
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const weekPeak = computed(() =>
|
||||
days.value.length ? days.value.reduce((best, day) => (day.peak > best.peak ? day : best)) : undefined,
|
||||
)
|
||||
const dayMax = computed(() => Math.max(...days.value.map((day) => day.peak), 1))
|
||||
// The API 7-day window starts at the current hour, so it spans up to eight
|
||||
// calendar days. Label the real window instead of the Monday plan week.
|
||||
const forecastStart = computed(() => days.value[0]?.date ?? weekStart)
|
||||
const forecastEnd = computed(() => days.value.at(-1)?.date ?? weekEnd)
|
||||
const forecastWindow = computed(() => weekLabel(forecastStart.value, forecastEnd.value))
|
||||
const weekWeather = computed(() =>
|
||||
Object.values(dailyWeather(context.value?.weather.forecast ?? []))
|
||||
.filter((day) => day.date >= forecastStart.value && day.date <= forecastEnd.value)
|
||||
.sort((a, b) => a.date.localeCompare(b.date)),
|
||||
)
|
||||
const total = computed(() => days.value.reduce((sum, day) => sum + day.mean, 0))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page page-stack">
|
||||
<header class="page-header">
|
||||
<div>
|
||||
<p class="eyebrow">Forecast · {{ forecastWindow }}</p>
|
||||
<OnyxHeadline is="h1">Next week peaks on {{ weekPeak ? formatWeekday(weekPeak.date) : '—' }}.</OnyxHeadline>
|
||||
<p class="lede">
|
||||
A 168-hour forecast for <strong>{{ activeSensor?.name ?? 'the selected store' }}</strong>, aggregated by
|
||||
day. The decision, shift blocks and hourly coverage are on <NuxtLink to="/plan">Plan</NuxtLink>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="forecast-header-controls">
|
||||
<LiveStatusBadge :status="live.status" :last-event-at="live.lastEventAt" />
|
||||
<div style="min-width: 14rem">
|
||||
<OnyxSelect
|
||||
v-model="sensorId"
|
||||
label="Sensor"
|
||||
list-label="Inner-city sensors"
|
||||
:options="sensorOptions"
|
||||
density="compact"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div v-if="forecastError" class="callout callout--warning" role="alert">
|
||||
<OnyxIcon :icon="iconTriangleWarning" size="16px" color="warning" />
|
||||
The forecast could not be loaded. <span class="muted">{{ forecastError.statusMessage }}</span>
|
||||
<OnyxButton label="Retry" mode="plain" density="compact" @click="refreshForecast()" />
|
||||
</div>
|
||||
<div v-else-if="forecast && !days.length" class="callout callout--warning" role="status">
|
||||
<OnyxIcon :icon="iconTriangleWarning" size="16px" color="warning" />
|
||||
No forecast points are available for this store yet. Try another sensor.
|
||||
</div>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<OnyxHeadline is="h2">Daily shape</OnyxHeadline>
|
||||
<p class="small muted" style="margin: 0">
|
||||
Peak estimated devices per hour. Weather is context, not a causal claim.
|
||||
</p>
|
||||
</div>
|
||||
<div style="min-width: 15rem">
|
||||
<OnyxSelect
|
||||
v-model="scenario"
|
||||
label="Scenario"
|
||||
list-label="Demo scenarios"
|
||||
:options="scenarioOptions"
|
||||
density="compact"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="forecast-bars" role="img" aria-label="Daily peak forecast">
|
||||
<div v-for="day in days" :key="day.date" class="forecast-bar">
|
||||
<span class="small muted">{{ formatNumber(day.peak) }}</span>
|
||||
<div class="forecast-bar__track">
|
||||
<div class="forecast-bar__fill" :style="{ height: `${Math.max(4, (day.peak / dayMax) * 100)}%` }" />
|
||||
</div>
|
||||
<strong>{{ formatWeekdayShort(day.date) }}</strong>
|
||||
<span class="small muted">{{ formatShortDate(day.date) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<OnyxTable striped with-page-scrolling :table-attrs="{ style: 'min-width: 46rem' }" style="margin-top: var(--onyx-density-lg)">
|
||||
<template #head>
|
||||
<tr>
|
||||
<th scope="col">Day</th>
|
||||
<th scope="col">Mean</th>
|
||||
<th scope="col">Peak</th>
|
||||
<th scope="col">Peak hour</th>
|
||||
<th scope="col">80% band at peak</th>
|
||||
<th scope="col">Weather</th>
|
||||
<th scope="col">Staff at peak</th>
|
||||
</tr>
|
||||
</template>
|
||||
<tr v-for="day in days" :key="day.date">
|
||||
<th scope="row" style="text-align: left; font-weight: 600">
|
||||
{{ formatWeekday(day.date) }}
|
||||
<span class="muted" style="font-weight: 400">{{ formatShortDate(day.date) }}</span>
|
||||
<OnyxBadge v-if="day.date === weekPeak?.date" color="warning" density="compact" style="margin-left: 0.35rem">peak</OnyxBadge>
|
||||
</th>
|
||||
<td>{{ formatNumber(day.mean) }}</td>
|
||||
<td>{{ formatNumber(day.peak) }}</td>
|
||||
<td>{{ String(day.peakHour).padStart(2, '0') }}:00</td>
|
||||
<td>{{ formatNumber(day.points.find((point) => point.v === day.peak)?.lo ?? 0) }}–{{ formatNumber(day.points.find((point) => point.v === day.peak)?.hi ?? 0) }}</td>
|
||||
<td>
|
||||
<template v-if="day.weather">
|
||||
{{ Math.round(day.weather.tempMin) }}–{{ Math.round(day.weather.tempMax) }} °C · {{ day.weather.precipMm.toFixed(1) }} mm
|
||||
</template>
|
||||
<span v-else class="muted">outside weather window</span>
|
||||
</td>
|
||||
<td><OnyxBadge color="neutral" density="compact">{{ day.requiredAtPeak }}</OnyxBadge></td>
|
||||
</tr>
|
||||
</OnyxTable>
|
||||
|
||||
<p class="small muted table-note">
|
||||
Scroll the table sideways on a phone for the uncertainty band and staffing columns. Weekly mean
|
||||
{{ formatNumber(total) }} estimated devices/hour across open+closed hours. Staff at peak uses 25
|
||||
visitors/staff-hour × 1.15; the plan can use a different standard.
|
||||
</p>
|
||||
</OnyxCard>
|
||||
|
||||
<div class="split-grid">
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h2">Weather strip</OnyxHeadline>
|
||||
<OnyxBadge color="neutral" density="compact">Open-Meteo context</OnyxBadge>
|
||||
</div>
|
||||
<WeatherStrip :days="weekWeather" />
|
||||
<p v-if="!weekWeather.length" class="small muted table-note">
|
||||
The weather window does not cover the plan week.
|
||||
</p>
|
||||
<p class="small muted table-note">
|
||||
Weather is the main accuracy driver in the model. Holidays are context and a smaller feature.
|
||||
</p>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h2">Read it honestly</OnyxHeadline>
|
||||
<OnyxIcon :icon="iconChart" size="24px" color="primary" />
|
||||
</div>
|
||||
<ul class="why-list">
|
||||
<li>
|
||||
<OnyxIcon :icon="iconCalendar" size="16px" color="primary" />
|
||||
<span>168 hourly points from the API 7-day horizon, not a live stream.</span>
|
||||
</li>
|
||||
<li>
|
||||
<OnyxIcon :icon="iconChart" size="16px" color="primary" />
|
||||
<span>
|
||||
Mean WAPE {{ meta ? formatPercent(meta.metrics.wape, 1) : '—' }} vs
|
||||
{{ meta ? formatPercent(meta.metrics.baseline_wape, 1) : '—' }} seasonal naive in the API meta;
|
||||
per-hour uncertainty is real.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<OnyxIcon :icon="iconCalendar" size="16px" color="primary" />
|
||||
<span>
|
||||
Forecast covers {{ formatDate(forecastStart) }} → {{ formatDate(forecastEnd) }} in Europe/Berlin.
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<OnyxButton label="Turn this into a plan" link="/plan" color="primary" style="margin-top: var(--onyx-density-md)" />
|
||||
</OnyxCard>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.forecast-bars {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr));
|
||||
gap: var(--onyx-density-xs);
|
||||
align-items: end;
|
||||
min-height: 13rem;
|
||||
}
|
||||
|
||||
.forecast-bar {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.2rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.forecast-bar strong {
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.forecast-bar__track {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 8rem;
|
||||
align-items: flex-end;
|
||||
border-radius: 3px;
|
||||
background: var(--onyx-color-base-neutral-200);
|
||||
}
|
||||
|
||||
.forecast-bar__fill {
|
||||
width: 100%;
|
||||
border-radius: 3px 3px 0 0;
|
||||
background: var(--onyx-color-base-primary-500);
|
||||
}
|
||||
|
||||
.forecast-header-controls {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
gap: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.forecast-bars {
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: var(--onyx-density-2xs);
|
||||
}
|
||||
|
||||
.forecast-bar strong {
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
.forecast-bar .small {
|
||||
font-size: 0.65rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+246
-257
@@ -1,268 +1,257 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
iconCalendar,
|
||||
iconCloud,
|
||||
iconLocationPin,
|
||||
iconSunny,
|
||||
iconTriangleWarning,
|
||||
} from '@sit-onyx/icons'
|
||||
import { weatherKind } from '#shared/insights'
|
||||
import { berlinParts } from '#shared/staffing'
|
||||
import type { ContextResponse, MetaResponse, Sensor, SeriesResponse } from '#shared/types'
|
||||
import {
|
||||
formatDate,
|
||||
formatDateTime,
|
||||
formatNumber,
|
||||
formatPercent,
|
||||
formatShortDate,
|
||||
formatTime,
|
||||
} from '~/utils/format'
|
||||
|
||||
useHead({ title: 'Now in Heilbronn — PulseCast' })
|
||||
|
||||
const config = useRuntimeConfig()
|
||||
const demoNow = String(config.public.demoNow)
|
||||
|
||||
const { data: sensors } = await useFetch<Sensor[]>('/api/sensors')
|
||||
const { data: context } = await useFetch<ContextResponse>('/api/context')
|
||||
const { data: meta } = await useFetch<MetaResponse>('/api/meta')
|
||||
const sensorId = ref(
|
||||
sensors.value?.find((sensor) => sensor.id === 'hn-stadtgalerie-01')?.id ??
|
||||
sensors.value?.[0]?.id ??
|
||||
'hn-stadtgalerie-01',
|
||||
)
|
||||
const { data: series } = await useFetch<SeriesResponse>('/api/series', {
|
||||
query: computed(() => ({ sensor: sensorId.value, step: '1h' })),
|
||||
})
|
||||
|
||||
const activeSensor = computed(() => sensors.value?.find((sensor) => sensor.id === sensorId.value))
|
||||
const sensorOptions = computed(() =>
|
||||
(sensors.value ?? []).map((sensor) => ({ value: sensor.id, label: sensor.name })),
|
||||
)
|
||||
|
||||
const lastPoint = computed(() => series.value?.points.at(-1))
|
||||
const previousPoint = computed(() => series.value?.points.at(-25))
|
||||
const deltaPct = computed(() => {
|
||||
if (!lastPoint.value || !previousPoint.value || previousPoint.value.v === 0) return 0
|
||||
return ((lastPoint.value.v - previousPoint.value.v) / previousPoint.value.v) * 100
|
||||
})
|
||||
const last24 = computed(() => series.value?.points.slice(-24) ?? [])
|
||||
const barMax = computed(() => Math.max(...last24.value.map((point) => point.v), 1))
|
||||
|
||||
const nowWeather = computed(() => context.value?.weather.now)
|
||||
const weatherIcon = computed(() =>
|
||||
nowWeather.value && weatherKind(nowWeather.value) === 'sunny' ? iconSunny : iconCloud,
|
||||
)
|
||||
const weatherLabel = computed(() => {
|
||||
if (!nowWeather.value) return '—'
|
||||
const kind = weatherKind(nowWeather.value)
|
||||
return kind === 'sunny' ? 'Sunny' : kind === 'partly-cloudy' ? 'Partly cloudy' : kind === 'rain' ? 'Rain' : 'Cloudy'
|
||||
})
|
||||
|
||||
const today = berlinParts(demoNow).date
|
||||
const todayHoliday = computed(() => context.value?.holidays.find((holiday) => holiday.date === today))
|
||||
const lastHoliday = computed(() =>
|
||||
context.value?.holidays.filter((holiday) => holiday.date < today).at(-1),
|
||||
)
|
||||
const nextHoliday = computed(() =>
|
||||
context.value?.holidays.find((holiday) => holiday.date > today),
|
||||
)
|
||||
|
||||
const latestPulse = computed(() => {
|
||||
if (!sensors.value?.length) return 0
|
||||
return Math.round(sensors.value.reduce((sum, sensor) => sum + sensor.mean, 0) / sensors.value.length)
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page page-stack">
|
||||
<header class="page-header">
|
||||
<div>
|
||||
<p class="eyebrow">Now · replay clock {{ formatDateTime(demoNow) }}</p>
|
||||
<OnyxHeadline is="h1">The pulse is in the pedestrian core.</OnyxHeadline>
|
||||
<p class="lede">
|
||||
Eight fixed sensors around Stadtgalerie and Kaiserstraße. This is estimated device density, not people,
|
||||
and not a city-wide heatmap. The decision lives on <NuxtLink to="/plan">Plan</NuxtLink>.
|
||||
<main class="w-full pt-16 bg-[#081723] min-h-[calc(100vh-160px)]">
|
||||
<div class="flex flex-col w-full">
|
||||
<!-- Above-The-Fold Master Container (1200px max width aligned) -->
|
||||
<section class="w-full bg-[#081723] pt-space-2xl pb-space-xl">
|
||||
<div class="max-w-[1200px] mx-auto px-margin-desktop flex flex-col gap-space-2xl">
|
||||
<!-- HERO TWO-COLUMN GRID (50% / 50%) -->
|
||||
<div class="grid grid-cols-1 lg:grid-cols-12 gap-space-xl items-center">
|
||||
<!-- LEFT COLUMN: Value Proposition & CTAs -->
|
||||
<div class="lg:col-span-6 flex flex-col justify-center gap-space-lg">
|
||||
<!-- Eyebrow Pill Badge -->
|
||||
<div class="inline-flex items-center gap-2 self-start px-3 py-1 rounded-full bg-[#0e2233] border border-[#1e3a52] shadow-sm">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-[#00C3CD]"></span>
|
||||
<span class="font-label-sm text-label-sm text-[#94A3B8] uppercase tracking-wider font-semibold">
|
||||
Schwarz IT · Sensing & Prediction Platform
|
||||
</span>
|
||||
</div>
|
||||
<!-- Headline -->
|
||||
<h1 class="text-[36px] leading-[40px] sm:text-[52px] sm:leading-[58px] tracking-[-0.03em] font-semibold text-[#FFFFFF]">
|
||||
You bring the data.<br />
|
||||
<span class="text-[#00C3CD]">We bring the engine.</span>
|
||||
</h1>
|
||||
<!-- Subline -->
|
||||
<p class="font-body-lg text-body-lg text-[#94A3B8] max-w-[500px] leading-relaxed">
|
||||
Privacy-preserving sensor counts in, decisions out. Turn raw edge signals into verified operational foresight without compromising individual identity.
|
||||
</p>
|
||||
<!-- CTAs Row -->
|
||||
<div class="flex flex-wrap items-center gap-space-md pt-space-xs">
|
||||
<a class="inline-flex items-center justify-center gap-2 px-6 h-12 rounded-xl bg-[#00C3CD] text-[#081723] font-label-md text-label-md font-semibold hover:bg-[#00d8e4] transition-all shadow-[0_2px_12px_rgba(0,195,205,0.25)] active:scale-[0.99] group" href="#playground">
|
||||
<span>Try the engine</span>
|
||||
<Icon name="material-symbols:arrow-forward" class="text-[18px] group-hover:translate-x-0.5 transition-transform text-[#081723]" />
|
||||
</a>
|
||||
<a class="inline-flex items-center justify-center gap-2 px-6 h-12 rounded-xl bg-[#0e2233] text-[#FFFFFF] border border-[#1e3a52] font-label-md text-label-md hover:bg-[#132b40] transition-all shadow-sm" href="#use-cases">
|
||||
<Icon name="material-symbols:visibility-outline" class="text-[18px] text-[#00C3CD]" />
|
||||
<span>See live use cases</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="hero-actions">
|
||||
<OnyxBadge color="warning">Replay, not live</OnyxBadge>
|
||||
<OnyxBadge color="neutral" density="compact">{{ sensors?.length ?? 8 }} sensors</OnyxBadge>
|
||||
<!-- Trust Micro-Copy -->
|
||||
<div class="flex items-center gap-2 pt-space-xs font-body-sm text-body-sm text-[#94A3B8]">
|
||||
<Icon name="material-symbols:verified-user" class="text-[17px] text-[#00C3CD]" />
|
||||
<span>Zero personally identifiable information (PII) processed. GDPR Art. 25 Privacy by Design.</span>
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
<!-- RIGHT COLUMN: Pipeline Architecture Diagram Card -->
|
||||
<div class="lg:col-span-6 w-full">
|
||||
<div class="w-full bg-[#0e2233] border border-[#1e3a52] rounded-xl shadow-xl p-space-lg flex flex-col gap-space-md relative overflow-hidden">
|
||||
<!-- Card Header Badge -->
|
||||
<div class="flex flex-wrap items-center justify-between gap-2 pb-space-xs border-b border-[#1e3a52]/60">
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="w-2 h-2 rounded-full bg-[#00C3CD] animate-pulse"></span>
|
||||
<span class="font-label-sm text-label-sm uppercase tracking-wider text-[#FFFFFF] font-semibold">Real-Time Core Pipeline</span>
|
||||
</div>
|
||||
<span class="font-label-sm text-label-sm bg-[#132b40] border border-[#1e3a52] px-2 py-0.5 rounded text-[#94A3B8] font-mono font-medium">v2.4-deterministic</span>
|
||||
</div>
|
||||
<!-- Pipeline Diagram Stage -->
|
||||
<div class="bg-[#081723]/60 border border-[#1e3a52] rounded-xl p-space-md flex flex-col gap-space-md relative">
|
||||
<!-- 3-Node Horizontal Pipeline Layout -->
|
||||
<div class="flex flex-col md:flex-row items-center justify-between gap-2 md:gap-1 w-full">
|
||||
<!-- NODE 1: Ingest -->
|
||||
<div class="w-full md:w-[30%] bg-[#0e2233] border border-[#1e3a52] rounded-xl p-space-sm flex flex-col items-center text-center shadow-sm">
|
||||
<div class="w-10 h-10 rounded-lg bg-[#132b40] border border-[#1e3a52] flex items-center justify-center text-[#00C3CD] mb-1">
|
||||
<Icon name="material-symbols:sensors" class="text-[20px]" />
|
||||
</div>
|
||||
<span class="font-headline-sm text-[13px] leading-tight text-[#FFFFFF] font-semibold">Anonymous Counts</span>
|
||||
<span class="font-body-sm text-[11px] text-[#94A3B8] mt-1">LiDAR, FLUX, In/Out Edge Turnstile</span>
|
||||
<div class="mt-2 w-full bg-[#132b40] border border-[#1e3a52]/80 px-1 py-0.5 rounded text-[10px] text-[#94A3B8] font-mono">
|
||||
Σ counts/min
|
||||
</div>
|
||||
</div>
|
||||
<!-- CONNECTOR 1 -->
|
||||
<div class="w-full md:w-auto flex flex-col items-center justify-center py-1 md:py-0 md:flex-1 md:px-1 relative">
|
||||
<div class="w-full h-[2px] bg-[#1e3a52] relative overflow-hidden flex items-center">
|
||||
<div class="w-1/2 h-[2px] bg-[#00C3CD] animate-flow"></div>
|
||||
</div>
|
||||
<span class="text-[9px] text-[#00C3CD] font-mono tracking-tighter mt-1 uppercase">100% PII-Free</span>
|
||||
</div>
|
||||
<!-- NODE 2: SENSING ENGINE (Centerpiece) -->
|
||||
<div class="w-full md:w-[38%] bg-[#132b40] border-2 border-[#00C3CD] text-[#FFFFFF] rounded-xl p-space-md flex flex-col items-center text-center shadow-lg relative overflow-hidden group">
|
||||
<div class="absolute -right-6 -bottom-6 w-20 h-20 rounded-full bg-[#00C3CD]/15 blur-xl pointer-events-none"></div>
|
||||
<div class="w-9 h-9 rounded-full bg-[#00C3CD]/20 border border-[#00C3CD]/40 flex items-center justify-center text-[#00C3CD] mb-1">
|
||||
<Icon name="material-symbols:hub-outline" class="text-[19px]" />
|
||||
</div>
|
||||
<span class="font-headline-sm text-[14px] leading-tight text-[#FFFFFF] font-semibold tracking-tight">SENSING ENGINE</span>
|
||||
<span class="font-label-sm text-[10px] text-[#00C3CD] uppercase tracking-wider font-semibold">Fuse + Predict</span>
|
||||
</div>
|
||||
<!-- CONNECTOR 2 -->
|
||||
<div class="w-full md:w-auto flex flex-col items-center justify-center py-1 md:py-0 md:flex-1 md:px-1 relative">
|
||||
<div class="w-full h-[2px] bg-[#1e3a52] relative overflow-hidden flex items-center">
|
||||
<div class="w-1/2 h-[2px] bg-[#00C3CD] animate-flow"></div>
|
||||
</div>
|
||||
<span class="text-[9px] text-[#00C3CD] font-mono tracking-tighter mt-1 uppercase">Inference</span>
|
||||
</div>
|
||||
<!-- NODE 3: Decisions -->
|
||||
<div class="w-full md:w-[30%] bg-[#0e2233] border border-[#1e3a52] rounded-xl p-space-sm flex flex-col items-center text-center shadow-sm">
|
||||
<div class="w-10 h-10 rounded-lg bg-[#132b40] border border-[#1e3a52] flex items-center justify-center text-[#00C3CD] mb-1">
|
||||
<Icon name="material-symbols:bolt-outline" class="text-[20px]" />
|
||||
</div>
|
||||
<span class="font-headline-sm text-[13px] leading-tight text-[#FFFFFF] font-semibold">Decisions</span>
|
||||
<span class="font-body-sm text-[11px] text-[#94A3B8] mt-1">Staff shift, dynamic routing, bin dispatch</span>
|
||||
<div class="mt-2 w-full bg-[#132b40] border border-[#1e3a52]/80 px-1 py-0.5 rounded text-[10px] text-[#00C3CD] font-mono font-semibold">
|
||||
Action Output
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Real-world Context Fusion Ribbon -->
|
||||
<div class="flex flex-col gap-1.5 pt-1">
|
||||
<div class="flex items-center justify-between text-[#94A3B8] px-1">
|
||||
<span class="font-label-sm text-[11px] tracking-wider uppercase font-semibold text-[#94A3B8]">Contextual Signals Fused in Real-Time</span>
|
||||
<span class="text-[10px] font-mono text-[#00C3CD]">4 Global Feeds Active</span>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-1.5">
|
||||
<div class="flex items-center gap-1.5 px-2 py-1.5 rounded-lg bg-[#0e2233] border border-[#1e3a52] shadow-sm">
|
||||
<span class="text-[13px]">☀️</span>
|
||||
<div class="flex flex-col min-w-0">
|
||||
<span class="font-label-sm text-[11px] text-[#FFFFFF] truncate font-semibold">Sun Position</span>
|
||||
<span class="text-[9px] text-[#94A3B8] truncate">Solar Azimuth</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5 px-2 py-1.5 rounded-lg bg-[#0e2233] border border-[#1e3a52] shadow-sm">
|
||||
<span class="text-[13px]">🌦️</span>
|
||||
<div class="flex flex-col min-w-0">
|
||||
<span class="font-label-sm text-[11px] text-[#FFFFFF] truncate font-semibold">DWD Weather</span>
|
||||
<span class="text-[9px] text-[#94A3B8] truncate">Hyperlocal Rain/Temp</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5 px-2 py-1.5 rounded-lg bg-[#0e2233] border border-[#1e3a52] shadow-sm">
|
||||
<span class="text-[13px]">📅</span>
|
||||
<div class="flex flex-col min-w-0">
|
||||
<span class="font-label-sm text-[11px] text-[#FFFFFF] truncate font-semibold">Calendar Sync</span>
|
||||
<span class="text-[9px] text-[#94A3B8] truncate">Retail, Holidays, Paydays</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5 px-2 py-1.5 rounded-lg bg-[#0e2233] border border-[#1e3a52] shadow-sm">
|
||||
<span class="text-[13px]">🗺️</span>
|
||||
<div class="flex flex-col min-w-0">
|
||||
<span class="font-label-sm text-[11px] text-[#FFFFFF] truncate font-semibold">Geo-Mesh Map</span>
|
||||
<span class="text-[9px] text-[#94A3B8] truncate">Store & Depot Spatial</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Mini Telemetry Footer Bar -->
|
||||
<div class="flex items-center justify-between text-[#94A3B8] px-space-xs font-mono text-[11px]">
|
||||
<div class="flex items-center gap-1.5">
|
||||
<Icon name="material-symbols:speed" class="text-[14px] text-[#00C3CD]" />
|
||||
<span>Pipeline Latency: <strong class="text-[#FFFFFF]">< 42ms</strong></span>
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5">
|
||||
<Icon name="material-symbols:sync" class="text-[14px] text-[#00C3CD]" />
|
||||
<span>Edge aggregation: <strong class="text-[#FFFFFF]">60s epoch</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- COMPLIANCE & ACCURACY STRIP (Full 1200px span) -->
|
||||
<div class="w-full bg-[#0e2233] border border-[#1e3a52] rounded-xl shadow-sm p-space-lg flex flex-col lg:flex-row items-center justify-between gap-space-lg">
|
||||
<!-- 4 Verified Core Value Pillars -->
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-space-md w-full lg:w-auto flex-1">
|
||||
<!-- Pillar 1 -->
|
||||
<div class="flex items-start gap-2.5">
|
||||
<div class="w-6 h-6 rounded-full bg-[#132b40] border border-[#1e3a52] flex items-center justify-center shrink-0 shadow-sm mt-0.5">
|
||||
<Icon name="material-symbols:check-circle" class="text-[15px] text-[#00C3CD]" />
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="font-label-md text-label-md text-[#FFFFFF] font-semibold">Privacy-Preserving Sensors</span>
|
||||
<span class="font-body-sm text-body-sm text-[#94A3B8] leading-tight">No identities, only counts.</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Pillar 2 -->
|
||||
<div class="flex items-start gap-2.5">
|
||||
<div class="w-6 h-6 rounded-full bg-[#132b40] border border-[#1e3a52] flex items-center justify-center shrink-0 shadow-sm mt-0.5">
|
||||
<Icon name="material-symbols:check-circle" class="text-[15px] text-[#00C3CD]" />
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="font-label-md text-label-md text-[#FFFFFF] font-semibold">Real-World Context</span>
|
||||
<span class="font-body-sm text-body-sm text-[#94A3B8] leading-tight">Weather, sun, calendar, map.</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Pillar 3 -->
|
||||
<div class="flex items-start gap-2.5">
|
||||
<div class="w-6 h-6 rounded-full bg-[#132b40] border border-[#1e3a52] flex items-center justify-center shrink-0 shadow-sm mt-0.5">
|
||||
<Icon name="material-symbols:check-circle" class="text-[15px] text-[#00C3CD]" />
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="font-label-md text-label-md text-[#FFFFFF] font-semibold">Intuitive Visual Story</span>
|
||||
<span class="font-body-sm text-body-sm text-[#94A3B8] leading-tight">One answer per screen.</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Pillar 4 -->
|
||||
<div class="flex items-start gap-2.5">
|
||||
<div class="w-6 h-6 rounded-full bg-[#132b40] border border-[#1e3a52] flex items-center justify-center shrink-0 shadow-sm mt-0.5">
|
||||
<Icon name="material-symbols:check-circle" class="text-[15px] text-[#00C3CD]" />
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="font-label-md text-label-md text-[#FFFFFF] font-semibold">Predictive Engine</span>
|
||||
<span class="font-body-sm text-body-sm text-[#94A3B8] leading-tight">Hindsight becomes foresight.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ACCURACY BADGE (Far right telemetry badge) -->
|
||||
<div class="shrink-0 flex items-center gap-3 bg-[#132b40] border border-[#1e3a52] px-space-md py-2.5 rounded-lg shadow-sm w-full lg:w-auto justify-between lg:justify-start">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-7 h-7 rounded-md bg-[#0e2233] border border-[#1e3a52] flex items-center justify-center text-[#00C3CD]">
|
||||
<Icon name="material-symbols:verified-outline" class="text-[18px]" />
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="font-label-sm text-[10px] text-[#94A3B8] uppercase tracking-wider font-semibold">Model Accuracy</span>
|
||||
<div class="flex items-center gap-1.5 font-mono text-[13px] font-semibold text-[#FFFFFF]">
|
||||
<span>Backtest MAE 4.2</span>
|
||||
<span class="text-[#1e3a52]">·</span>
|
||||
<span class="text-[#00C3CD]">MAPE 3.8%</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden sm:flex items-center text-[11px] font-mono bg-[#0e2233] border border-[#1e3a52] px-2 py-1 rounded text-[#94A3B8]">
|
||||
730 days backtested
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="split-grid">
|
||||
<div class="card-stack">
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<OnyxHeadline is="h2">Latest replay reading</OnyxHeadline>
|
||||
<p class="small muted" style="margin: 0">Last available hour in the API series.</p>
|
||||
<footer class="w-full bg-[#081723] border-t border-[#1e3a52] py-space-xl">
|
||||
<div class="max-w-[1200px] mx-auto px-margin-desktop flex flex-col md:flex-row items-center justify-between gap-space-lg font-body-sm text-body-sm text-[#94A3B8]">
|
||||
<div class="flex flex-wrap items-center gap-space-md">
|
||||
<span>© 2024 Schwarz IT KG. All rights reserved.</span>
|
||||
<span class="text-[#1e3a52]">|</span>
|
||||
<span class="flex items-center gap-1 text-[#00C3CD] font-label-sm text-label-sm">
|
||||
<Icon name="material-symbols:verified-user-outline" class="text-[16px]" />GDPR / ISO 27701 compliant</span>
|
||||
</div>
|
||||
<div style="min-width: 12rem">
|
||||
<OnyxSelect
|
||||
v-model="sensorId"
|
||||
label="Sensor"
|
||||
list-label="Inner-city sensors"
|
||||
:options="sensorOptions"
|
||||
density="compact"
|
||||
/>
|
||||
<div class="flex flex-wrap items-center gap-space-md">
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="w-2 h-2 rounded-full bg-[#00C3CD] animate-pulse"></span>
|
||||
<span class="font-label-sm text-label-sm text-[#FFFFFF]">System Status: All Engines Operational</span>
|
||||
</div>
|
||||
<span class="text-[#1e3a52]">|</span>
|
||||
<span class="bg-[#0e2233] px-2 py-0.5 rounded font-label-sm text-label-sm font-semibold text-[#94A3B8] border border-[#1e3a52]">v2.4-prod</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="reading-row">
|
||||
<p class="reading-value">{{ lastPoint ? formatNumber(lastPoint.v) : '—' }}</p>
|
||||
<div>
|
||||
<p style="margin: 0; font-weight: 600">estimated devices / hour</p>
|
||||
<p class="small muted" style="margin: 0">
|
||||
{{ activeSensor?.name }} · {{ activeSensor?.id }}
|
||||
</p>
|
||||
<OnyxBadge :color="deltaPct >= 0 ? 'success' : 'warning'" density="compact">
|
||||
{{ deltaPct >= 0 ? '+' : '' }}{{ formatPercent(deltaPct, 0) }} vs 24 h earlier
|
||||
</OnyxBadge>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bar-chart" role="img" :aria-label="`Last 24 hours for ${activeSensor?.name}`">
|
||||
<div
|
||||
v-for="(point, index) in last24"
|
||||
:key="point.t"
|
||||
class="bar-chart__bar"
|
||||
:class="{ 'bar-chart__bar--now': index === last24.length - 1 }"
|
||||
:style="{ height: `${Math.max(4, (point.v / barMax) * 100)}%` }"
|
||||
:title="`${formatTime(point.t)} · ${point.v}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="legend" style="justify-content: space-between; margin-top: var(--onyx-density-2xs)">
|
||||
<span class="small muted">{{ last24[0] ? formatTime(last24[0].t) : '—' }}</span>
|
||||
<span class="small muted">{{ lastPoint ? formatDateTime(lastPoint.t) : '—' }}</span>
|
||||
</div>
|
||||
|
||||
<p class="small muted table-note">
|
||||
The CSV is static. The replay clock is {{ formatDateTime(demoNow) }}; the last measured point is
|
||||
{{ lastPoint ? formatDateTime(lastPoint.t) : '—' }}. No live sensor feed is claimed.
|
||||
</p>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<OnyxHeadline is="h2">Sensor cluster</OnyxHeadline>
|
||||
<p class="small muted" style="margin: 0">
|
||||
Select a sensor to update the reading. Bounds are relative; the basemap is the next map slice.
|
||||
</p>
|
||||
</div>
|
||||
<OnyxBadge color="info" density="compact">580 m cluster</OnyxBadge>
|
||||
</div>
|
||||
<SensorClusterMap :sensors="sensors ?? []" :active-id="sensorId" @select="sensorId = $event" />
|
||||
</OnyxCard>
|
||||
</div>
|
||||
|
||||
<aside class="card-stack">
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h2">Heilbronn weather</OnyxHeadline>
|
||||
<OnyxBadge color="neutral" density="compact">Open-Meteo context</OnyxBadge>
|
||||
</div>
|
||||
<div class="reading-row">
|
||||
<OnyxIcon :icon="weatherIcon" size="48px" color="primary" />
|
||||
<div>
|
||||
<p style="margin: 0; font-size: 2rem; font-weight: 700; line-height: 1">
|
||||
{{ nowWeather ? `${nowWeather.temp_c} °C` : '—' }}
|
||||
</p>
|
||||
<p class="small muted" style="margin: 0">{{ weatherLabel }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<dl class="metric-list" style="margin-top: var(--onyx-density-md)">
|
||||
<div><dt>Precipitation</dt><dd>{{ nowWeather?.precip_mm ?? '—' }} mm</dd></div>
|
||||
<div><dt>Cloud cover</dt><dd>{{ nowWeather?.cloud_pct ?? '—' }}%</dd></div>
|
||||
<div><dt>Wind</dt><dd>{{ nowWeather?.wind_kmh ?? '—' }} km/h</dd></div>
|
||||
<div><dt>Humidity</dt><dd>{{ nowWeather?.humidity_pct ?? '—' }}%</dd></div>
|
||||
</dl>
|
||||
<p class="small muted table-note">
|
||||
Updated {{ context ? formatDateTime(context.updated_at) : '—' }} · context
|
||||
{{ context?.cached ? 'cached' : 'live' }}
|
||||
</p>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h2">Holiday context</OnyxHeadline>
|
||||
<OnyxIcon :icon="iconCalendar" size="24px" color="primary" />
|
||||
</div>
|
||||
<OnyxBadge v-if="todayHoliday" color="warning">{{ todayHoliday.name }} today</OnyxBadge>
|
||||
<OnyxBadge v-else color="success">No public holiday today</OnyxBadge>
|
||||
<p class="small muted" style="margin: var(--onyx-density-sm) 0 0">
|
||||
<template v-if="nextHoliday">
|
||||
Next: <strong>{{ nextHoliday.name }}</strong> on {{ formatDate(nextHoliday.date) }}.
|
||||
</footer>
|
||||
</template>
|
||||
<template v-else>No upcoming holiday in the holiday calendar.</template>
|
||||
</p>
|
||||
<p v-if="lastHoliday" class="small muted" style="margin: var(--onyx-density-xs) 0 0">
|
||||
Last: {{ lastHoliday.name }} on {{ formatShortDate(lastHoliday.date) }}.
|
||||
</p>
|
||||
<p class="small muted table-note">
|
||||
Baden-Württemberg public holidays; used as model context, not as a causal claim.
|
||||
</p>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h3">What to do next</OnyxHeadline>
|
||||
<OnyxIcon :icon="iconLocationPin" size="24px" color="primary" />
|
||||
</div>
|
||||
<p class="small" style="margin-top: 0">
|
||||
The average sensor is at <strong>{{ latestPulse }}</strong> estimated devices/hour. That is context,
|
||||
not a staffing decision. Open the plan to turn next week’s forecast into shifts.
|
||||
</p>
|
||||
<OnyxButton label="Open the staffing plan" link="/plan" color="primary" />
|
||||
</OnyxCard>
|
||||
</aside>
|
||||
</div>
|
||||
<style>
|
||||
@keyframes pulseDataFlow {
|
||||
0% { transform: translateX(0); opacity: 0.15; }
|
||||
50% { opacity: 0.95; }
|
||||
100% { transform: translateX(64px); opacity: 0.15; }
|
||||
}
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<OnyxHeadline is="h2">Eight sensors</OnyxHeadline>
|
||||
<p class="small muted" style="margin: 0">Measured points, stable order by ID. Battery may be null in the API.</p>
|
||||
</div>
|
||||
<OnyxBadge color="neutral" density="compact">measured points only</OnyxBadge>
|
||||
</div>
|
||||
<OnyxTable striped with-page-scrolling :table-attrs="{ style: 'min-width: 36rem' }">
|
||||
<template #head>
|
||||
<tr>
|
||||
<th scope="col">Sensor</th>
|
||||
<th scope="col">Mean</th>
|
||||
<th scope="col">P95</th>
|
||||
<th scope="col">Battery</th>
|
||||
<th scope="col">Source ID</th>
|
||||
</tr>
|
||||
</template>
|
||||
<tr v-for="sensor in sensors" :key="sensor.id">
|
||||
<th scope="row" style="text-align: left; font-weight: 600">
|
||||
{{ sensor.name }}
|
||||
<OnyxBadge v-if="sensor.id === sensorId" color="primary" density="compact" style="margin-left: 0.35rem">selected</OnyxBadge>
|
||||
</th>
|
||||
<td>{{ sensor.mean }}</td>
|
||||
<td>{{ sensor.p95 }}</td>
|
||||
<td>
|
||||
<OnyxBadge :color="sensor.battery === null ? 'neutral' : sensor.battery >= 60 ? 'success' : 'warning'" density="compact">
|
||||
{{ sensor.battery === null ? 'n/a' : `${sensor.battery}%` }}
|
||||
</OnyxBadge>
|
||||
</td>
|
||||
<td class="mono">{{ sensor.id }}</td>
|
||||
</tr>
|
||||
</OnyxTable>
|
||||
|
||||
<p v-if="meta" class="small muted table-note">
|
||||
Coverage {{ formatDate(meta.coverage.from) }} → {{ formatDate(meta.coverage.to) }} ·
|
||||
{{ meta.coverage.cadence_min }}-min cadence · data {{ meta.data_version }} · model {{ meta.model_version }}
|
||||
</p>
|
||||
</OnyxCard>
|
||||
|
||||
<div v-if="!sensors?.length" class="callout callout--warning">
|
||||
<OnyxIcon :icon="iconTriangleWarning" size="16px" color="warning" />
|
||||
Sensor data is missing. Check that the Go API is running and that NUXT_API_INTERNAL_BASE points to it.
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
.animate-flow {
|
||||
animation: pulseDataFlow 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
||||
}
|
||||
</style>
|
||||
@@ -1,324 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
iconArrowRight,
|
||||
iconCircleInformation,
|
||||
iconMobileSignal,
|
||||
iconSync,
|
||||
iconTriangleWarning,
|
||||
iconUserGroup,
|
||||
} from '@sit-onyx/icons'
|
||||
import { scenarioLabel } from '#shared/live'
|
||||
import type { ScenarioState, Sensor, Shift, StaffingResponse } from '#shared/types'
|
||||
import { formatDateTime, formatEuro, formatNumber, formatPercent, formatShortDate, formatWeekday } from '~/utils/format'
|
||||
|
||||
useHead({ title: 'Live recommendation — PulseCast' })
|
||||
|
||||
const { data: sensors } = await useFetch<Sensor[]>('/api/sensors')
|
||||
const { data: initialScenario } = await useFetch<ScenarioState>('/api/scenario')
|
||||
|
||||
const sensorId = ref(
|
||||
sensors.value?.find((sensor) => sensor.id === 'hn-stadtgalerie-01')?.id ??
|
||||
sensors.value?.[0]?.id ??
|
||||
'hn-stadtgalerie-01',
|
||||
)
|
||||
const live = useLiveScenario(initialScenario.value)
|
||||
|
||||
const {
|
||||
data: planData,
|
||||
status: planStatus,
|
||||
error: planError,
|
||||
refresh: refreshPlan,
|
||||
} = await useFetch<StaffingResponse>('/api/staffing', {
|
||||
query: computed(() => ({
|
||||
sensor: sensorId.value,
|
||||
scenario: live.scenarioId,
|
||||
standard: 'standard',
|
||||
})),
|
||||
})
|
||||
|
||||
let lastScenarioId = live.scenarioId
|
||||
watch(
|
||||
() => live.revision,
|
||||
() => {
|
||||
if (live.scenarioId === lastScenarioId) void refreshPlan()
|
||||
lastScenarioId = live.scenarioId
|
||||
},
|
||||
)
|
||||
|
||||
const plan = computed(() => planData.value ?? null)
|
||||
const activeSensor = computed(() => sensors.value?.find((sensor) => sensor.id === sensorId.value))
|
||||
|
||||
function maxOf<T>(items: T[], score: (item: T) => number): T | undefined {
|
||||
let best: T | undefined
|
||||
for (const item of items) if (!best || score(item) > score(best)) best = item
|
||||
return best
|
||||
}
|
||||
|
||||
const peakShift = computed<Shift | undefined>(() =>
|
||||
plan.value ? maxOf(plan.value.shifts, (shift) => shift.staff) : undefined,
|
||||
)
|
||||
const peakStaff = computed(() => peakShift.value?.staff ?? 0)
|
||||
const totalStaffHours = computed(() =>
|
||||
plan.value ? plan.value.hours.reduce((sum, hour) => sum + hour.scheduled_staff, 0) : 0,
|
||||
)
|
||||
const currentReason = computed(() => plan.value?.why[0] ?? '')
|
||||
const lastUpdate = computed(() => {
|
||||
if (live.scenarioAt) return live.scenarioAt
|
||||
return plan.value?.context_version ?? ''
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page page-stack live-page">
|
||||
<header class="live-header">
|
||||
<div>
|
||||
<p class="eyebrow">Live · no login</p>
|
||||
<OnyxHeadline is="h1">The plan on your phone.</OnyxHeadline>
|
||||
<p class="lede">
|
||||
{{ activeSensor?.name ?? 'Stadtgalerie' }} · {{ scenarioLabel(live.scenarioId) }}. Updates arrive over SSE;
|
||||
if the stream drops, this page polls every 5 seconds.
|
||||
</p>
|
||||
</div>
|
||||
<div class="live-header__status">
|
||||
<LiveStatusBadge :status="live.status" :last-event-at="live.lastEventAt" />
|
||||
<OnyxBadge color="neutral" density="compact">v{{ live.version || '—' }}</OnyxBadge>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div v-if="planError" class="callout callout--warning" role="alert">
|
||||
<OnyxIcon :icon="iconTriangleWarning" size="18px" color="warning" />
|
||||
<div>
|
||||
<strong>The live plan is unavailable.</strong>
|
||||
<span class="muted"> {{ planError.statusMessage ?? 'The API did not answer.' }}</span>
|
||||
</div>
|
||||
<OnyxButton label="Retry" mode="outline" density="compact" :icon="iconSync" @click="refreshPlan()" />
|
||||
</div>
|
||||
|
||||
<div v-else-if="planStatus === 'pending' && !plan" class="callout">
|
||||
<OnyxIcon :icon="iconSync" size="18px" color="primary" />
|
||||
<span>Loading the current recommendation…</span>
|
||||
</div>
|
||||
|
||||
<div v-else-if="plan && !plan.shifts.length" class="callout callout--warning" role="status">
|
||||
<OnyxIcon :icon="iconTriangleWarning" size="18px" color="warning" />
|
||||
<span>No shift blocks are available yet. The presenter may still be preparing the plan.</span>
|
||||
</div>
|
||||
|
||||
<section class="live-hero" aria-labelledby="live-decision">
|
||||
<p class="live-hero__kicker"><OnyxIcon :icon="iconUserGroup" size="18px" color="primary" /> Current recommendation</p>
|
||||
<p id="live-decision" class="live-hero__value">
|
||||
<template v-if="plan">{{ peakStaff }} staff</template>
|
||||
<template v-else>No plan yet</template>
|
||||
</p>
|
||||
<p class="live-hero__shift">
|
||||
<template v-if="peakShift">
|
||||
<strong>{{ formatWeekday(peakShift.date) }} {{ formatShortDate(peakShift.date) }}</strong><br />
|
||||
{{ peakShift.start }}–{{ peakShift.end }} · peak shift
|
||||
</template>
|
||||
<template v-else>Waiting for the peak shift</template>
|
||||
</p>
|
||||
<p v-if="currentReason" class="live-hero__why">
|
||||
<OnyxIcon :icon="iconCircleInformation" size="16px" color="primary" />
|
||||
<span>{{ currentReason }}</span>
|
||||
</p>
|
||||
<OnyxButton
|
||||
label="Open the full plan"
|
||||
:link="`/plan?scenario=${live.scenarioId}`"
|
||||
color="primary"
|
||||
:icon="iconArrowRight"
|
||||
icon-position="right"
|
||||
/>
|
||||
</section>
|
||||
|
||||
<section class="live-metrics" aria-label="Plan at a glance">
|
||||
<div class="live-metric">
|
||||
<p class="live-metric__label">Staff-hours</p>
|
||||
<p class="live-metric__value">{{ plan ? formatNumber(totalStaffHours) : '—' }}</p>
|
||||
</div>
|
||||
<div class="live-metric">
|
||||
<p class="live-metric__label">Labour cost</p>
|
||||
<p class="live-metric__value">{{ plan ? formatEuro(plan.summary.cost_eur) : '—' }}</p>
|
||||
</div>
|
||||
<div class="live-metric">
|
||||
<p class="live-metric__label">Coverage</p>
|
||||
<p class="live-metric__value">{{ plan ? formatPercent(plan.summary.coverage_pct, 1) : '—' }}</p>
|
||||
</div>
|
||||
<div class="live-metric">
|
||||
<p class="live-metric__label">Understaffed</p>
|
||||
<p class="live-metric__value">{{ plan ? `${plan.summary.understaffed_hours} h` : '—' }}</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="live-status-card">
|
||||
<div class="live-status-card__row">
|
||||
<span class="live-status-card__label">Scenario</span>
|
||||
<strong>{{ scenarioLabel(live.scenarioId) }}</strong>
|
||||
</div>
|
||||
<div class="live-status-card__row">
|
||||
<span class="live-status-card__label">Version</span>
|
||||
<span>{{ live.version || '—' }}</span>
|
||||
</div>
|
||||
<div class="live-status-card__row">
|
||||
<span class="live-status-card__label">Last update</span>
|
||||
<span>{{ lastUpdate ? formatDateTime(lastUpdate) : '—' }}</span>
|
||||
</div>
|
||||
<div class="live-status-card__row">
|
||||
<span class="live-status-card__label">Transport</span>
|
||||
<span>{{ live.statusLabel }}<template v-if="live.status === 'polling'"> · 5 s</template></span>
|
||||
</div>
|
||||
<p v-if="live.error" class="small muted table-note">{{ live.error }}</p>
|
||||
</section>
|
||||
|
||||
<footer class="live-footer">
|
||||
<p>
|
||||
<strong>Decision support, not an optimizer.</strong> The plan uses
|
||||
{{ plan?.assumptions.visitors_per_staff_hour ?? 25 }} visitors per staff-hour,
|
||||
×{{ plan?.assumptions.safety_factor ?? 1.15 }} safety, {{ plan?.assumptions.shift_length_h ?? 4 }} h shift
|
||||
blocks and €{{ plan?.assumptions.labor_cost_eur_h ?? 16 }}/h.
|
||||
</p>
|
||||
<p class="muted">
|
||||
Estimated devices, not people · {{ sensors?.length ?? 8 }} sensors in a 580 m cluster · no POS, sales or
|
||||
payroll data.
|
||||
</p>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.live-page {
|
||||
max-width: 44rem;
|
||||
gap: clamp(0.85rem, 2vw, 1.25rem);
|
||||
}
|
||||
|
||||
.live-header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
.live-header h1 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.live-header__status {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--onyx-density-xs);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.live-hero {
|
||||
padding: clamp(1.1rem, 3vw, 1.75rem);
|
||||
border: 1px solid var(--onyx-color-base-primary-300);
|
||||
border-radius: var(--onyx-radius-component-container-soft);
|
||||
background:
|
||||
radial-gradient(circle at 100% 0%, var(--onyx-color-base-primary-200), transparent 48%),
|
||||
linear-gradient(135deg, var(--onyx-color-base-primary-100), var(--onyx-color-base-neutral-100) 72%);
|
||||
}
|
||||
|
||||
.live-hero__kicker {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
margin: 0;
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.live-hero__value {
|
||||
margin: var(--onyx-density-xs) 0 0;
|
||||
font-size: clamp(3rem, 16vw, 5.5rem);
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.04em;
|
||||
line-height: 0.95;
|
||||
color: var(--onyx-color-text-icons-primary-intense);
|
||||
}
|
||||
|
||||
.live-hero__shift {
|
||||
margin: var(--onyx-density-sm) 0 0;
|
||||
font-size: clamp(1rem, 3.5vw, 1.25rem);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.live-hero__why {
|
||||
display: flex;
|
||||
gap: var(--onyx-density-xs);
|
||||
align-items: flex-start;
|
||||
margin: var(--onyx-density-md) 0;
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: 0.9rem;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.live-metrics {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
.live-metric {
|
||||
min-width: 0;
|
||||
padding: var(--onyx-density-md);
|
||||
border: 1px solid var(--onyx-color-base-neutral-300);
|
||||
border-radius: var(--onyx-radius-component-container-soft);
|
||||
background: var(--onyx-color-base-neutral-100);
|
||||
}
|
||||
|
||||
.live-metric__label {
|
||||
margin: 0;
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: 0.78rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.live-metric__value {
|
||||
margin: var(--onyx-density-xs) 0 0;
|
||||
font-size: clamp(1.35rem, 6vw, 1.9rem);
|
||||
font-weight: 700;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.live-status-card {
|
||||
display: grid;
|
||||
gap: var(--onyx-density-xs);
|
||||
padding: var(--onyx-density-md);
|
||||
border: 1px solid var(--onyx-color-base-neutral-300);
|
||||
border-radius: var(--onyx-radius-component-container-soft);
|
||||
background: var(--onyx-color-base-neutral-100);
|
||||
}
|
||||
|
||||
.live-status-card__row {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
.live-status-card__label {
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.live-footer {
|
||||
padding-top: var(--onyx-density-sm);
|
||||
border-top: 1px solid var(--onyx-color-base-neutral-300);
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.live-footer p {
|
||||
margin: 0 0 var(--onyx-density-xs);
|
||||
}
|
||||
|
||||
@media (min-width: 577px) {
|
||||
.live-metrics {
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,800 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
iconCalendar,
|
||||
iconCheck,
|
||||
iconCircleInformation,
|
||||
iconDownload,
|
||||
iconSync,
|
||||
iconTriangleWarning,
|
||||
iconUserGroup,
|
||||
} from '@sit-onyx/icons'
|
||||
import { dailyWeather } from '#shared/insights'
|
||||
import {
|
||||
addDays,
|
||||
berlinParts,
|
||||
buildStaffing,
|
||||
DEFAULT_ASSUMPTIONS,
|
||||
isInWeek,
|
||||
planWeekStart,
|
||||
STANDARD_VISITORS_PER_STAFF_HOUR,
|
||||
} from '#shared/staffing'
|
||||
import { SCENARIOS } from '#shared/types'
|
||||
import type {
|
||||
ContextResponse,
|
||||
MetaResponse,
|
||||
Scenario,
|
||||
ScenarioPreset,
|
||||
ScenarioState,
|
||||
Sensor,
|
||||
Shift,
|
||||
StaffingHour,
|
||||
StaffingResponse,
|
||||
Standard,
|
||||
} from '#shared/types'
|
||||
import {
|
||||
formatDate,
|
||||
formatDateTime,
|
||||
formatEuro,
|
||||
formatNumber,
|
||||
formatPercent,
|
||||
formatShortDate,
|
||||
formatTime,
|
||||
formatWeekday,
|
||||
weekLabel,
|
||||
} from '~/utils/format'
|
||||
|
||||
useHead({ title: 'Plan next week — PulseCast' })
|
||||
|
||||
const config = useRuntimeConfig()
|
||||
const route = useRoute()
|
||||
const demoNow = String(config.public.demoNow)
|
||||
const usingMock = computed(
|
||||
() =>
|
||||
config.public.useMock === true ||
|
||||
config.public.useMock === '1' ||
|
||||
config.public.useMock === 'true',
|
||||
)
|
||||
|
||||
function initialScenario(): Scenario {
|
||||
const value = route.query.scenario
|
||||
return typeof value === 'string' && SCENARIOS.includes(value as Scenario) ? (value as Scenario) : 'base'
|
||||
}
|
||||
|
||||
/** Keep Stadtgalerie as the demo default, but follow the API when it differs. */
|
||||
function preferredSensor(list: Sensor[] | null | undefined): string {
|
||||
return list?.find((sensor) => sensor.id === 'hn-stadtgalerie-01')?.id ?? list?.[0]?.id ?? 'hn-stadtgalerie-01'
|
||||
}
|
||||
|
||||
const { data: sensors } = await useFetch<Sensor[]>('/api/sensors')
|
||||
const { data: context } = await useFetch<ContextResponse>('/api/context')
|
||||
const { data: meta } = await useFetch<MetaResponse>('/api/meta')
|
||||
const { data: presets } = await useFetch<ScenarioPreset[]>('/api/scenarios')
|
||||
const { data: liveScenarioState } = await useFetch<ScenarioState>('/api/scenario')
|
||||
const live = useLiveScenario(liveScenarioState.value)
|
||||
|
||||
const sensorId = ref(preferredSensor(sensors.value))
|
||||
const scenario = ref<Scenario>(initialScenario())
|
||||
// The stage scenario wins unless the URL explicitly asks for another one.
|
||||
if (!route.query.scenario) scenario.value = live.scenarioId
|
||||
const standard = ref<Standard>('standard')
|
||||
const approved = ref(false)
|
||||
const generating = ref(false)
|
||||
const generatedAt = ref('')
|
||||
const openAssumptions = ref<PropertyKey[]>([])
|
||||
const assumptions = reactive({
|
||||
safety_factor: DEFAULT_ASSUMPTIONS.safety_factor,
|
||||
min_staff: DEFAULT_ASSUMPTIONS.min_staff,
|
||||
shift_length_h: DEFAULT_ASSUMPTIONS.shift_length_h,
|
||||
labor_cost_eur_h: DEFAULT_ASSUMPTIONS.labor_cost_eur_h,
|
||||
})
|
||||
|
||||
const EMPTY_PLAN: StaffingResponse = {
|
||||
sensor: '',
|
||||
scenario: 'base',
|
||||
standard: 'standard',
|
||||
assumptions: DEFAULT_ASSUMPTIONS,
|
||||
hours: [],
|
||||
shifts: [],
|
||||
summary: {
|
||||
coverage_pct: 0,
|
||||
cost_eur: 0,
|
||||
flat_schedule_cost_eur: 0,
|
||||
overstaffed_hours: 0,
|
||||
understaffed_hours: 0,
|
||||
},
|
||||
why: [],
|
||||
cached: false,
|
||||
data_version: '',
|
||||
model_version: '',
|
||||
context_version: '',
|
||||
}
|
||||
|
||||
// The hero plan comes from the Go API. Local assumption edits only render a
|
||||
// preview from the API's own forecast hours; they never replace the API plan.
|
||||
const {
|
||||
data: apiPlanData,
|
||||
status,
|
||||
error,
|
||||
refresh,
|
||||
} = await useFetch<StaffingResponse>('/api/staffing', {
|
||||
query: computed(() => ({
|
||||
sensor: sensorId.value,
|
||||
scenario: scenario.value,
|
||||
standard: standard.value,
|
||||
})),
|
||||
})
|
||||
|
||||
watch(
|
||||
() => route.query.scenario,
|
||||
(value) => {
|
||||
if (typeof value === 'string' && SCENARIOS.includes(value as Scenario)) {
|
||||
scenario.value = value as Scenario
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
// A scenario event changes the plan. If the enum is unchanged (same scenario,
|
||||
// new override/version), the query string does not move, so refresh it here.
|
||||
watch(
|
||||
() => live.revision,
|
||||
() => {
|
||||
if (live.scenarioId !== scenario.value) scenario.value = live.scenarioId
|
||||
else void refresh()
|
||||
},
|
||||
)
|
||||
|
||||
const apiPlan = computed(() => apiPlanData.value ?? EMPTY_PLAN)
|
||||
const activeSensor = computed(() => sensors.value?.find((sensor) => sensor.id === sensorId.value))
|
||||
const activeScenario = computed(() => presets.value?.find((preset) => preset.id === scenario.value))
|
||||
const visitorsPerStaffHour = computed(() => STANDARD_VISITORS_PER_STAFF_HOUR[standard.value])
|
||||
|
||||
const weekStart = computed(() => {
|
||||
const first = apiPlan.value.hours[0]
|
||||
return first ? berlinParts(first.t).date : planWeekStart(demoNow)
|
||||
})
|
||||
const weekEnd = computed(() => addDays(weekStart.value, 6))
|
||||
|
||||
const scenarioOptions = computed(() =>
|
||||
(presets.value ?? []).map((preset) => ({ value: preset.id, label: preset.label })),
|
||||
)
|
||||
const sensorOptions = computed(() =>
|
||||
(sensors.value ?? []).map((sensor) => ({ value: sensor.id, label: sensor.name })),
|
||||
)
|
||||
const standardOptions = [
|
||||
{ value: 'relaxed', label: 'Relaxed 35' },
|
||||
{ value: 'standard', label: 'Standard 25' },
|
||||
{ value: 'premium', label: 'Premium 18' },
|
||||
]
|
||||
const standardLabel = computed(
|
||||
() =>
|
||||
({
|
||||
relaxed: 'relaxed · 35 visitors per staff-hour',
|
||||
standard: 'standard · 25 visitors per staff-hour',
|
||||
premium: 'premium · 18 visitors per staff-hour',
|
||||
})[standard.value],
|
||||
)
|
||||
const shiftLengthOptions = [
|
||||
{ value: 2, label: '2 hours' },
|
||||
{ value: 3, label: '3 hours' },
|
||||
{ value: 4, label: '4 hours' },
|
||||
{ value: 5, label: '5 hours' },
|
||||
]
|
||||
|
||||
/** The /api/staffing contract has no assumption query params. Non-query edits
|
||||
* are therefore an explicitly labeled local preview, never a silent swap. */
|
||||
const previewActive = computed(() => {
|
||||
const api = apiPlan.value.assumptions
|
||||
return (
|
||||
assumptions.safety_factor !== api.safety_factor ||
|
||||
assumptions.min_staff !== api.min_staff ||
|
||||
assumptions.shift_length_h !== api.shift_length_h ||
|
||||
assumptions.labor_cost_eur_h !== api.labor_cost_eur_h
|
||||
)
|
||||
})
|
||||
|
||||
const previewBuild = computed(() =>
|
||||
buildStaffing({
|
||||
sensor: sensorId.value,
|
||||
scenario: scenario.value,
|
||||
standard: standard.value,
|
||||
points: apiPlan.value.hours.map((hour) => ({ t: hour.t, v: hour.footfall })),
|
||||
weekStart: weekStart.value,
|
||||
assumptions: {
|
||||
visitors_per_staff_hour: visitorsPerStaffHour.value,
|
||||
safety_factor: assumptions.safety_factor,
|
||||
min_staff: assumptions.min_staff,
|
||||
shift_length_h: assumptions.shift_length_h,
|
||||
labor_cost_eur_h: assumptions.labor_cost_eur_h,
|
||||
store_hours: apiPlan.value.assumptions.store_hours,
|
||||
},
|
||||
data_version: apiPlan.value.data_version,
|
||||
model_version: apiPlan.value.model_version,
|
||||
context_version: apiPlan.value.context_version,
|
||||
}),
|
||||
)
|
||||
|
||||
const plan = computed(() => (previewActive.value ? previewBuild.value.response : apiPlan.value))
|
||||
|
||||
const hoursByDate = computed<Record<string, StaffingHour[]>>(() => {
|
||||
if (previewActive.value) return previewBuild.value.byDate
|
||||
const grouped: Record<string, StaffingHour[]> = {}
|
||||
for (const hour of apiPlan.value.hours) {
|
||||
const date = berlinParts(hour.t).date
|
||||
;(grouped[date] ??= []).push(hour)
|
||||
}
|
||||
return grouped
|
||||
})
|
||||
|
||||
const shiftsByDate = computed<Record<string, Shift[]>>(() => {
|
||||
if (previewActive.value) return previewBuild.value.shiftsByDate
|
||||
const grouped: Record<string, Shift[]> = {}
|
||||
for (const shift of apiPlan.value.shifts) {
|
||||
;(grouped[shift.date] ??= []).push(shift)
|
||||
}
|
||||
return grouped
|
||||
})
|
||||
|
||||
const why = computed(() => apiPlan.value.why)
|
||||
const weekWeather = computed(() => {
|
||||
if (!context.value) return []
|
||||
return Object.values(dailyWeather(context.value.weather.forecast))
|
||||
.filter((day) => isInWeek(day.date, weekStart.value))
|
||||
.sort((a, b) => a.date.localeCompare(b.date))
|
||||
})
|
||||
|
||||
function maxOf<T>(items: T[], score: (item: T) => number): T | undefined {
|
||||
let best: T | undefined
|
||||
for (const item of items) {
|
||||
if (!best || score(item) > score(best)) best = item
|
||||
}
|
||||
return best
|
||||
}
|
||||
|
||||
const peakHour = computed(() => maxOf(plan.value.hours, (hour) => hour.footfall))
|
||||
const peakShift = computed(() => maxOf(plan.value.shifts, (shift) => shift.staff))
|
||||
const totalStaffHours = computed(() =>
|
||||
plan.value.hours.reduce((sum, hour) => sum + hour.scheduled_staff, 0),
|
||||
)
|
||||
const savingEur = computed(() =>
|
||||
Math.max(0, plan.value.summary.flat_schedule_cost_eur - plan.value.summary.cost_eur),
|
||||
)
|
||||
const savingPct = computed(() => {
|
||||
const flat = plan.value.summary.flat_schedule_cost_eur
|
||||
return flat > 0 ? (savingEur.value / flat) * 100 : 0
|
||||
})
|
||||
|
||||
interface DaySummary {
|
||||
date: string
|
||||
shifts: Shift[]
|
||||
staffHours: number
|
||||
peakStaff: number
|
||||
cost: number
|
||||
}
|
||||
|
||||
const daySummaries = computed<DaySummary[]>(() =>
|
||||
Object.keys(hoursByDate.value)
|
||||
.sort()
|
||||
.map((date) => {
|
||||
const hours = hoursByDate.value[date] ?? []
|
||||
const shifts = shiftsByDate.value[date] ?? []
|
||||
const staffHours = hours.reduce((sum, hour) => sum + hour.scheduled_staff, 0)
|
||||
return {
|
||||
date,
|
||||
shifts,
|
||||
staffHours,
|
||||
peakStaff: maxOf(hours, (hour) => hour.scheduled_staff)?.scheduled_staff ?? 0,
|
||||
cost: staffHours * plan.value.assumptions.labor_cost_eur_h,
|
||||
}
|
||||
}),
|
||||
)
|
||||
const dayDates = computed(() => daySummaries.value.map((day) => day.date))
|
||||
const selectedDay = ref('')
|
||||
watch(
|
||||
() => dayDates.value.join(','),
|
||||
() => {
|
||||
if (dayDates.value.includes(selectedDay.value)) return
|
||||
const preferred = addDays(weekStart.value, 5)
|
||||
selectedDay.value = dayDates.value.includes(preferred) ? preferred : (dayDates.value[0] ?? '')
|
||||
},
|
||||
{ immediate: true },
|
||||
)
|
||||
|
||||
const dayOptions = computed(() =>
|
||||
daySummaries.value.map((day) => ({
|
||||
value: day.date,
|
||||
label: `${formatWeekday(day.date)} ${formatShortDate(day.date)} · ${day.peakStaff} peak`,
|
||||
})),
|
||||
)
|
||||
const selectedHours = computed<StaffingHour[]>(() => hoursByDate.value[selectedDay.value] ?? [])
|
||||
const selectedCovered = computed(
|
||||
() => selectedHours.value.filter((hour) => hour.scheduled_staff >= hour.required_staff).length,
|
||||
)
|
||||
const selectedOver = computed(
|
||||
() => selectedHours.value.filter((hour) => hour.coverage === 'over').length,
|
||||
)
|
||||
|
||||
function coverageColor(hour: StaffingHour) {
|
||||
if (hour.coverage === 'under') return 'danger' as const
|
||||
if (hour.coverage === 'over') return 'warning' as const
|
||||
return 'success' as const
|
||||
}
|
||||
|
||||
function coverageLabel(hour: StaffingHour) {
|
||||
if (hour.coverage === 'under') return `${hour.required_staff - hour.scheduled_staff} short`
|
||||
if (hour.coverage === 'over') return `+${hour.scheduled_staff - hour.required_staff} over`
|
||||
return 'Covered'
|
||||
}
|
||||
|
||||
async function generate() {
|
||||
generating.value = true
|
||||
try {
|
||||
await refresh()
|
||||
if (!error.value && import.meta.client) generatedAt.value = formatTime(new Date().toISOString())
|
||||
} finally {
|
||||
generating.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function resetAssumptions() {
|
||||
assumptions.safety_factor = DEFAULT_ASSUMPTIONS.safety_factor
|
||||
assumptions.min_staff = DEFAULT_ASSUMPTIONS.min_staff
|
||||
assumptions.shift_length_h = DEFAULT_ASSUMPTIONS.shift_length_h
|
||||
assumptions.labor_cost_eur_h = DEFAULT_ASSUMPTIONS.labor_cost_eur_h
|
||||
standard.value = 'standard'
|
||||
}
|
||||
|
||||
function useApiPlan() {
|
||||
const api = apiPlan.value.assumptions
|
||||
assumptions.safety_factor = api.safety_factor
|
||||
assumptions.min_staff = api.min_staff
|
||||
assumptions.shift_length_h = api.shift_length_h
|
||||
assumptions.labor_cost_eur_h = api.labor_cost_eur_h
|
||||
}
|
||||
|
||||
function exportPlan() {
|
||||
if (!import.meta.client) return
|
||||
const rows = [
|
||||
['date', 'shift_start', 'shift_end', 'staff', 'staff_hours'],
|
||||
...plan.value.shifts.map((shift) => [
|
||||
shift.date,
|
||||
shift.start,
|
||||
shift.end,
|
||||
String(shift.staff),
|
||||
String((Number(shift.end.slice(0, 2)) - Number(shift.start.slice(0, 2))) * shift.staff),
|
||||
]),
|
||||
]
|
||||
const csv = rows.map((row) => row.join(',')).join('\n')
|
||||
const url = URL.createObjectURL(new Blob([csv], { type: 'text/csv;charset=utf-8' }))
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = `pulsecast-plan-${weekStart.value}.csv`
|
||||
link.click()
|
||||
URL.revokeObjectURL(url)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page page-stack">
|
||||
<section class="hero" aria-labelledby="plan-headline">
|
||||
<div class="hero-grid">
|
||||
<div class="hero-copy">
|
||||
<p class="eyebrow">Plan · {{ weekLabel(weekStart, weekEnd) }}</p>
|
||||
<OnyxHeadline id="plan-headline" is="h1">
|
||||
<template v-if="peakShift">
|
||||
{{ formatWeekday(peakShift.date) }} peak: {{ peakShift.staff }} staff, {{ peakShift.start }}–{{ peakShift.end }}.
|
||||
</template>
|
||||
<template v-else>Build next week’s shift plan.</template>
|
||||
</OnyxHeadline>
|
||||
<p class="lede">
|
||||
Forecast for <strong>{{ activeSensor?.name ?? apiPlan.sensor ?? 'the selected store' }}</strong> needs
|
||||
<strong>{{ peakHour?.required_staff ?? '—' }} staff at the busiest hour</strong>. The rest of the week
|
||||
runs on {{ totalStaffHours }} staff-hours at {{ formatEuro(plan.summary.cost_eur) }}.
|
||||
</p>
|
||||
<div class="hero-actions">
|
||||
<OnyxButton
|
||||
:label="approved ? 'Plan approved' : 'Approve plan'"
|
||||
:icon="approved ? iconCheck : iconCalendar"
|
||||
color="primary"
|
||||
@click="approved = !approved"
|
||||
/>
|
||||
<OnyxButton label="Export CSV" :icon="iconDownload" mode="outline" @click="exportPlan" />
|
||||
<LiveStatusBadge :status="live.status" :last-event-at="live.lastEventAt" />
|
||||
<OnyxBadge v-if="approved" color="success">Approved · demo</OnyxBadge>
|
||||
<span v-else class="small muted">Draft for manager review</span>
|
||||
</div>
|
||||
<p class="small muted" style="margin: 0">
|
||||
<template v-if="usingMock">Mock mode · NUXT_PUBLIC_USE_MOCK=1 · no Go API call.</template>
|
||||
<template v-else-if="previewActive">
|
||||
Local preview · the Go API plan is unchanged.
|
||||
</template>
|
||||
<template v-else>
|
||||
Go /api/staffing · scenario v{{ live.version }} · broadcast
|
||||
{{ live.scenarioAt ? formatDateTime(live.scenarioAt) : '—' }} · no POS, sales or labour-cost feed.
|
||||
</template>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="hero-decision">
|
||||
<p class="stat-label">Peak staffing decision</p>
|
||||
<p class="hero-decision__value">{{ peakShift?.staff ?? '—' }} staff</p>
|
||||
<p class="hero-decision__label">
|
||||
<template v-if="peakShift">
|
||||
{{ formatWeekday(peakShift.date) }} {{ formatShortDate(peakShift.date) }}, {{ peakShift.start }}–{{ peakShift.end }}<br />
|
||||
</template>
|
||||
<template v-if="peakHour">
|
||||
{{ formatWeekday(berlinParts(peakHour.t).date) }} {{ String(berlinParts(peakHour.t).hour).padStart(2, '0') }}:00
|
||||
peak: {{ peakHour.footfall }} est. visitors/hour
|
||||
</template>
|
||||
</p>
|
||||
<OnyxSeparator style="margin-block: var(--onyx-density-sm)" />
|
||||
<div class="reading-row">
|
||||
<OnyxBadge color="success" density="compact">{{ formatPercent(plan.summary.coverage_pct, 1) }} covered</OnyxBadge>
|
||||
<OnyxBadge color="warning" density="compact">{{ plan.summary.overstaffed_hours }} h over</OnyxBadge>
|
||||
<OnyxBadge color="success" density="compact">{{ plan.summary.understaffed_hours }} h under</OnyxBadge>
|
||||
<OnyxBadge v-if="apiPlan.cached" color="warning" density="compact">cached forecast</OnyxBadge>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div v-if="status === 'error'" class="callout callout--warning">
|
||||
<OnyxIcon :icon="iconTriangleWarning" size="16px" color="warning" />
|
||||
The staffing API could not be loaded. Check that the Go API is running and that NUXT_API_INTERNAL_BASE points
|
||||
to it. <span v-if="error" class="muted">{{ error.statusMessage }}</span>
|
||||
</div>
|
||||
<div v-else-if="status === 'success' && !apiPlan.hours.length" class="callout callout--warning">
|
||||
<OnyxIcon :icon="iconTriangleWarning" size="16px" color="warning" />
|
||||
No open hours are available for this store and scenario yet. Pick another sensor or check the data window.
|
||||
</div>
|
||||
|
||||
<section class="summary-grid" aria-label="Plan summary">
|
||||
<MetricCard
|
||||
label="Coverage"
|
||||
:value="formatPercent(plan.summary.coverage_pct, 1)"
|
||||
badge="All hours covered"
|
||||
badge-color="success"
|
||||
:icon="iconCheck"
|
||||
hint="Shift blocks cover the block peak, so low hours are intentionally overstaffed."
|
||||
/>
|
||||
<MetricCard
|
||||
label="Labour cost"
|
||||
:value="formatEuro(plan.summary.cost_eur)"
|
||||
:icon="iconUserGroup"
|
||||
:hint="`${totalStaffHours} staff-hours × €${plan.assumptions.labor_cost_eur_h}/h assumption`"
|
||||
/>
|
||||
<MetricCard
|
||||
label="vs flat schedule"
|
||||
:value="`−${formatEuro(savingEur)}`"
|
||||
:badge="`${formatPercent(savingPct, 0)} lower`"
|
||||
badge-color="success"
|
||||
:hint="`Flat schedule would cost ${formatEuro(plan.summary.flat_schedule_cost_eur)}.`"
|
||||
/>
|
||||
<MetricCard
|
||||
label="Plan risk"
|
||||
:value="`${plan.summary.overstaffed_hours} h over`"
|
||||
:badge="`${plan.summary.understaffed_hours} h under`"
|
||||
badge-color="success"
|
||||
:hint="`${selectedOver} of ${selectedHours.length} selected-day hours are above requirement.`"
|
||||
/>
|
||||
</section>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<OnyxHeadline is="h2">Plan inputs</OnyxHeadline>
|
||||
<p class="small muted" style="margin: 0">
|
||||
Store, service standard and scenario are sent to Go /api/staffing. Local assumption edits render a
|
||||
preview from the API forecast.
|
||||
</p>
|
||||
</div>
|
||||
<OnyxBadge :color="usingMock ? 'warning' : previewActive ? 'warning' : 'success'" density="compact">
|
||||
{{ usingMock ? 'Mock mode' : previewActive ? 'Local preview' : 'Go API' }}
|
||||
</OnyxBadge>
|
||||
</div>
|
||||
|
||||
<div class="form-grid">
|
||||
<div style="display: grid; gap: var(--onyx-density-md); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr))">
|
||||
<OnyxSelect
|
||||
v-model="sensorId"
|
||||
label="Store / sensor"
|
||||
list-label="Inner-city sensors"
|
||||
:options="sensorOptions"
|
||||
:message="activeSensor ? `${activeSensor.id} · ${activeSensor.mean} mean / ${activeSensor.p95} p95` : undefined"
|
||||
/>
|
||||
<OnyxSelect
|
||||
v-model="scenario"
|
||||
label="Scenario"
|
||||
list-label="Demo scenarios"
|
||||
:options="scenarioOptions"
|
||||
:message="activeScenario?.description"
|
||||
/>
|
||||
<div>
|
||||
<p class="stat-label" style="margin-bottom: var(--onyx-density-xs)">Service standard</p>
|
||||
<OnyxSegmentedControl
|
||||
v-model="standard"
|
||||
aria-label="Service standard"
|
||||
:options="standardOptions"
|
||||
name="service-standard"
|
||||
/>
|
||||
<p class="small muted" style="margin: var(--onyx-density-xs) 0 0">{{ standardLabel }}</p>
|
||||
</div>
|
||||
<div style="display: flex; align-items: flex-end; gap: var(--onyx-density-sm); flex-wrap: wrap">
|
||||
<OnyxButton
|
||||
label="Generate plan"
|
||||
:icon="iconSync"
|
||||
color="primary"
|
||||
:loading="generating || status === 'pending'"
|
||||
@click="generate"
|
||||
/>
|
||||
<span v-if="generatedAt" class="small muted">Updated {{ generatedAt }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<OnyxAccordion v-model="openAssumptions" type="card">
|
||||
<OnyxAccordionItem id="assumptions" value="assumptions">
|
||||
<template #header>
|
||||
<span>
|
||||
Assumptions
|
||||
<span class="muted small">
|
||||
· {{ visitorsPerStaffHour }} visitors/staff-h · ×{{ assumptions.safety_factor.toFixed(2) }} ·
|
||||
min {{ assumptions.min_staff }}
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
<div class="assumption-grid">
|
||||
<OnyxSlider
|
||||
v-model="assumptions.safety_factor"
|
||||
label="Safety factor"
|
||||
:min="1"
|
||||
:max="1.5"
|
||||
:step="0.05"
|
||||
control="input"
|
||||
:message="`Higher values add buffer staff. Current ×${assumptions.safety_factor.toFixed(2)}.`"
|
||||
/>
|
||||
<OnyxStepper
|
||||
v-model="assumptions.min_staff"
|
||||
label="Minimum staff"
|
||||
:min="1"
|
||||
:max="10"
|
||||
:step-size="1"
|
||||
message="Floor applied to every open hour."
|
||||
/>
|
||||
<OnyxSelect
|
||||
v-model="assumptions.shift_length_h"
|
||||
label="Shift block length"
|
||||
list-label="Shift lengths"
|
||||
:options="shiftLengthOptions"
|
||||
message="Blocks are scheduled independently; coverage is checked per hour."
|
||||
/>
|
||||
<OnyxStepper
|
||||
v-model="assumptions.labor_cost_eur_h"
|
||||
label="Labour cost (€/hour)"
|
||||
:min="8"
|
||||
:max="60"
|
||||
:step-size="1"
|
||||
message="Assumption only. No payroll or POS data exists."
|
||||
/>
|
||||
<p class="small muted" style="grid-column: 1 / -1; margin: 0">
|
||||
These four values are not query inputs of Go /api/staffing. Changing them shows a local preview;
|
||||
“Use API plan” restores the server values.
|
||||
</p>
|
||||
<div class="form-actions" style="grid-column: 1 / -1">
|
||||
<OnyxButton label="Reset assumptions" mode="outline" @click="resetAssumptions" />
|
||||
<OnyxButton v-if="previewActive" label="Use API plan" mode="outline" @click="useApiPlan" />
|
||||
<span class="small muted">Store hours 10:00–20:00, Europe/Berlin · {{ apiPlan.model_version || 'API' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</OnyxAccordionItem>
|
||||
</OnyxAccordion>
|
||||
</div>
|
||||
</OnyxCard>
|
||||
|
||||
<div class="split-grid">
|
||||
<div class="card-stack">
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<OnyxHeadline is="h2">Recommended shifts</OnyxHeadline>
|
||||
<p class="small muted" style="margin: 0">2–5 h blocks per day; staff count covers the block peak.</p>
|
||||
</div>
|
||||
<div class="legend">
|
||||
<span class="legend__item"><span class="legend__swatch legend__swatch--over" /> over requirement</span>
|
||||
<span class="legend__item"><span class="legend__swatch" /> scheduled staff</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<OnyxTable class="desktop-table" striped>
|
||||
<template #head>
|
||||
<tr>
|
||||
<th scope="col">Day</th>
|
||||
<th scope="col">Shift blocks (start–end · staff)</th>
|
||||
<th scope="col">Staff-hours</th>
|
||||
<th scope="col">Peak</th>
|
||||
<th scope="col">Labour</th>
|
||||
<th scope="col"><span class="onyx-visually-hidden">Inspect</span></th>
|
||||
</tr>
|
||||
</template>
|
||||
<tr v-for="day in daySummaries" :key="day.date" :class="{ 'peak-row': day.date === peakShift?.date }">
|
||||
<th scope="row" style="text-align: left; font-weight: 600">
|
||||
{{ formatWeekday(day.date) }}
|
||||
<span class="muted" style="font-weight: 400"> {{ formatShortDate(day.date) }}</span>
|
||||
<OnyxBadge v-if="day.date === peakShift?.date" color="warning" density="compact" style="margin-left: 0.35rem">peak</OnyxBadge>
|
||||
</th>
|
||||
<td>
|
||||
<div class="shift-tags">
|
||||
<OnyxTag
|
||||
v-for="shift in day.shifts"
|
||||
:key="`${shift.date}-${shift.start}`"
|
||||
:label="`${shift.start}–${shift.end} · ${shift.staff}`"
|
||||
density="compact"
|
||||
color="neutral"
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{ formatNumber(day.staffHours) }}</td>
|
||||
<td>{{ day.peakStaff }}</td>
|
||||
<td>{{ formatEuro(day.cost) }}</td>
|
||||
<td>
|
||||
<OnyxButton
|
||||
label="Hours"
|
||||
mode="plain"
|
||||
density="compact"
|
||||
@click="selectedDay = day.date"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
</OnyxTable>
|
||||
|
||||
<div class="day-card-list">
|
||||
<OnyxCard v-for="day in daySummaries" :key="day.date" density="compact">
|
||||
<div class="day-card__header">
|
||||
<p class="day-card__date">
|
||||
{{ formatWeekday(day.date) }} <span class="muted">{{ formatShortDate(day.date) }}</span>
|
||||
</p>
|
||||
<OnyxBadge :color="day.date === peakShift?.date ? 'warning' : 'neutral'" density="compact">
|
||||
{{ day.peakStaff }} peak
|
||||
</OnyxBadge>
|
||||
</div>
|
||||
<div class="shift-tags" style="margin-top: var(--onyx-density-xs)">
|
||||
<OnyxTag
|
||||
v-for="shift in day.shifts"
|
||||
:key="`${shift.date}-${shift.start}`"
|
||||
:label="`${shift.start}–${shift.end} · ${shift.staff}`"
|
||||
density="compact"
|
||||
/>
|
||||
</div>
|
||||
<div class="day-card__metrics">
|
||||
<span>{{ formatNumber(day.staffHours) }} staff-hours</span>
|
||||
<span>{{ formatEuro(day.cost) }}</span>
|
||||
</div>
|
||||
<OnyxButton label="View hourly detail" mode="plain" density="compact" @click="selectedDay = day.date" />
|
||||
</OnyxCard>
|
||||
</div>
|
||||
|
||||
<p class="small muted table-note">
|
||||
Total {{ totalStaffHours }} staff-hours · {{ formatEuro(plan.summary.cost_eur) }} at
|
||||
€{{ plan.assumptions.labor_cost_eur_h }}/h · exported CSV has one row per shift block.
|
||||
</p>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<OnyxHeadline is="h2">Hourly coverage</OnyxHeadline>
|
||||
<p class="small muted" style="margin: 0">
|
||||
{{ selectedCovered }}/{{ selectedHours.length }} open hours covered · {{ selectedOver }} over requirement
|
||||
</p>
|
||||
</div>
|
||||
<div style="min-width: 13rem">
|
||||
<OnyxSelect
|
||||
v-model="selectedDay"
|
||||
label="Inspect day"
|
||||
list-label="Plan days"
|
||||
:options="dayOptions"
|
||||
density="compact"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<OnyxTable striped with-page-scrolling :table-attrs="{ style: 'min-width: 34rem' }">
|
||||
<template #head>
|
||||
<tr>
|
||||
<th scope="col">Hour</th>
|
||||
<th scope="col">Forecast footfall</th>
|
||||
<th scope="col">Required</th>
|
||||
<th scope="col">Scheduled</th>
|
||||
<th scope="col">Coverage</th>
|
||||
</tr>
|
||||
</template>
|
||||
<tr v-for="hour in selectedHours" :key="hour.t">
|
||||
<th scope="row" style="text-align: left; font-weight: 600">{{ String(berlinParts(hour.t).hour).padStart(2, '0') }}:00</th>
|
||||
<td>{{ formatNumber(hour.footfall) }}</td>
|
||||
<td>{{ hour.required_staff }}</td>
|
||||
<td>{{ hour.scheduled_staff }}</td>
|
||||
<td>
|
||||
<OnyxBadge :color="coverageColor(hour)" density="compact">{{ coverageLabel(hour) }}</OnyxBadge>
|
||||
</td>
|
||||
</tr>
|
||||
</OnyxTable>
|
||||
<p class="small muted table-note">
|
||||
Scheduled staff is constant inside a block. Coverage is <em>at or above</em> the service standard by
|
||||
construction; the trade-off is visible as overstaffed hours. Store hours 10:00–20:00 local.
|
||||
</p>
|
||||
</OnyxCard>
|
||||
</div>
|
||||
|
||||
<aside class="card-stack">
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h2">Why this plan</OnyxHeadline>
|
||||
<OnyxBadge color="info" density="compact">{{ usingMock ? 'Mock mode' : 'Go API' }}</OnyxBadge>
|
||||
</div>
|
||||
<ul class="why-list">
|
||||
<li v-for="reason in why" :key="reason">
|
||||
<OnyxIcon :icon="iconCircleInformation" size="16px" color="primary" />
|
||||
<span>{{ reason }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<OnyxSeparator style="margin-block: var(--onyx-density-md)" />
|
||||
<p class="stat-label" style="margin-bottom: var(--onyx-density-xs)">Weather during the plan week</p>
|
||||
<WeatherStrip :days="weekWeather" />
|
||||
<p v-if="!weekWeather.length" class="small muted table-note">
|
||||
The weather forecast from /api/context does not cover this plan window yet.
|
||||
</p>
|
||||
<p class="small muted table-note">
|
||||
{{ activeScenario?.description ?? 'Base scenario uses the API forecast weather.' }}
|
||||
</p>
|
||||
<p v-if="previewActive" class="small muted table-note">
|
||||
This card explains the API plan; the assumption preview above is local.
|
||||
</p>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h3">Assumptions in this plan</OnyxHeadline>
|
||||
</div>
|
||||
<dl class="metric-list">
|
||||
<div><dt>Service standard</dt><dd>{{ standard }}</dd></div>
|
||||
<div><dt>Visitors / staff-hour</dt><dd>{{ plan.assumptions.visitors_per_staff_hour }}</dd></div>
|
||||
<div><dt>Safety factor</dt><dd>×{{ plan.assumptions.safety_factor }}</dd></div>
|
||||
<div><dt>Minimum staff</dt><dd>{{ plan.assumptions.min_staff }}</dd></div>
|
||||
<div><dt>Shift block</dt><dd>{{ plan.assumptions.shift_length_h }} h</dd></div>
|
||||
<div><dt>Labour cost</dt><dd>{{ formatEuro(plan.assumptions.labor_cost_eur_h) }}/h</dd></div>
|
||||
<div><dt>Store hours</dt><dd>{{ plan.assumptions.store_hours.open }}–{{ plan.assumptions.store_hours.close }}</dd></div>
|
||||
<div><dt>Model / data</dt><dd>{{ plan.model_version || meta?.model_version || '—' }}</dd></div>
|
||||
</dl>
|
||||
<p class="small muted table-note" style="margin-top: var(--onyx-density-md)">
|
||||
No POS, sales, queue or labour-cost data exists. This is decision support with explicit assumptions,
|
||||
not a payroll calculation or a precise ROI.
|
||||
</p>
|
||||
<OnyxButton
|
||||
label="Edit assumptions"
|
||||
mode="plain"
|
||||
density="compact"
|
||||
@click="openAssumptions = ['assumptions']"
|
||||
/>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h3">Data and limits</OnyxHeadline>
|
||||
</div>
|
||||
<p class="small muted" style="margin-top: 0">
|
||||
{{ meta?.coverage.sensors ?? 8 }} sensors · {{ meta?.coverage.cadence_min ?? 15 }}-min cadence ·
|
||||
coverage {{ meta ? `${formatDate(meta.coverage.from)} → ${formatDate(meta.coverage.to)}` : '—' }}
|
||||
</p>
|
||||
<ul class="small muted" style="margin: var(--onyx-density-xs) 0 0; padding-left: 1.1rem">
|
||||
<li v-for="limit in meta?.limits ?? []" :key="limit">{{ limit }}</li>
|
||||
</ul>
|
||||
</OnyxCard>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.peak-row {
|
||||
background: var(--onyx-color-base-warning-100);
|
||||
}
|
||||
</style>
|
||||
@@ -1,270 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { iconArrowRight, iconCircleInformation, iconFlash } from '@sit-onyx/icons'
|
||||
import { addDays, berlinParts, planWeekStart } from '#shared/staffing'
|
||||
import type {
|
||||
ContextResponse,
|
||||
Scenario,
|
||||
ScenarioPreset,
|
||||
Sensor,
|
||||
StaffingResponse,
|
||||
} from '#shared/types'
|
||||
import { formatEuro, formatShortDate, formatWeekday, formatWeekdayShort, weekLabel } from '~/utils/format'
|
||||
|
||||
useHead({ title: 'Simulate a scenario — PulseCast' })
|
||||
|
||||
const config = useRuntimeConfig()
|
||||
const demoNow = String(config.public.demoNow)
|
||||
|
||||
const { data: sensors } = await useFetch<Sensor[]>('/api/sensors')
|
||||
const { data: context } = await useFetch<ContextResponse>('/api/context')
|
||||
const { data: presets } = await useFetch<ScenarioPreset[]>('/api/scenarios')
|
||||
|
||||
const sensorId = ref(
|
||||
sensors.value?.find((sensor) => sensor.id === 'hn-stadtgalerie-01')?.id ??
|
||||
sensors.value?.[0]?.id ??
|
||||
'hn-stadtgalerie-01',
|
||||
)
|
||||
const scenario = ref<Scenario>('sunny-saturday-market')
|
||||
|
||||
const EMPTY_PLAN: StaffingResponse = {
|
||||
sensor: '',
|
||||
scenario: 'base',
|
||||
standard: 'standard',
|
||||
assumptions: {
|
||||
visitors_per_staff_hour: 25,
|
||||
safety_factor: 1.15,
|
||||
min_staff: 1,
|
||||
shift_length_h: 4,
|
||||
labor_cost_eur_h: 16,
|
||||
store_hours: { open: '10:00', close: '20:00', tz: 'Europe/Berlin' },
|
||||
},
|
||||
hours: [],
|
||||
shifts: [],
|
||||
summary: {
|
||||
coverage_pct: 0,
|
||||
cost_eur: 0,
|
||||
flat_schedule_cost_eur: 0,
|
||||
overstaffed_hours: 0,
|
||||
understaffed_hours: 0,
|
||||
},
|
||||
why: [],
|
||||
cached: false,
|
||||
data_version: '',
|
||||
model_version: '',
|
||||
context_version: '',
|
||||
}
|
||||
|
||||
const { data: baseData } = await useFetch<StaffingResponse>('/api/staffing', {
|
||||
query: computed(() => ({ sensor: sensorId.value, scenario: 'base', standard: 'standard' })),
|
||||
})
|
||||
const { data: scenarioData, status } = await useFetch<StaffingResponse>('/api/staffing', {
|
||||
query: computed(() => ({ sensor: sensorId.value, scenario: scenario.value, standard: 'standard' })),
|
||||
})
|
||||
|
||||
const basePlan = computed(() => baseData.value ?? EMPTY_PLAN)
|
||||
const scenarioPlan = computed(() => scenarioData.value ?? basePlan.value)
|
||||
|
||||
const weekStart = computed(() => {
|
||||
const first = basePlan.value.hours[0]
|
||||
return first ? berlinParts(first.t).date : planWeekStart(demoNow)
|
||||
})
|
||||
const weekEnd = computed(() => addDays(weekStart.value, 6))
|
||||
|
||||
const activeSensor = computed(() => sensors.value?.find((sensor) => sensor.id === sensorId.value))
|
||||
const sensorOptions = computed(() =>
|
||||
(sensors.value ?? []).map((sensor) => ({ value: sensor.id, label: sensor.name })),
|
||||
)
|
||||
const activePreset = computed(() => presets.value?.find((preset) => preset.id === scenario.value))
|
||||
const radioOptions = computed(() =>
|
||||
(presets.value ?? []).map((preset) => ({
|
||||
value: preset.id,
|
||||
label: preset.label,
|
||||
description: preset.description,
|
||||
})),
|
||||
)
|
||||
|
||||
const baseHours = computed(() => basePlan.value.hours.reduce((sum, hour) => sum + hour.scheduled_staff, 0))
|
||||
const scenarioHours = computed(() =>
|
||||
scenarioPlan.value.hours.reduce((sum, hour) => sum + hour.scheduled_staff, 0),
|
||||
)
|
||||
const deltaHours = computed(() => scenarioHours.value - baseHours.value)
|
||||
const deltaCost = computed(() => scenarioPlan.value.summary.cost_eur - basePlan.value.summary.cost_eur)
|
||||
|
||||
function peakStaffByDay(plan: StaffingResponse) {
|
||||
const map: Record<string, number> = {}
|
||||
for (const hour of plan.hours) {
|
||||
const date = berlinParts(hour.t).date
|
||||
map[date] = Math.max(map[date] ?? 0, hour.required_staff)
|
||||
}
|
||||
return map
|
||||
}
|
||||
const basePeaks = computed(() => peakStaffByDay(basePlan.value))
|
||||
const scenarioPeaks = computed(() => peakStaffByDay(scenarioPlan.value))
|
||||
|
||||
const days = computed(() =>
|
||||
[...new Set([...Object.keys(basePeaks.value), ...Object.keys(scenarioPeaks.value)])]
|
||||
.sort()
|
||||
.map((date) => ({
|
||||
date,
|
||||
base: basePeaks.value[date] ?? 0,
|
||||
scenario: scenarioPeaks.value[date] ?? 0,
|
||||
})),
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page page-stack">
|
||||
<header class="page-header">
|
||||
<div>
|
||||
<p class="eyebrow">Simulate · {{ weekLabel(weekStart, weekEnd) }}</p>
|
||||
<OnyxHeadline is="h1">Change the weather, watch the plan move.</OnyxHeadline>
|
||||
<p class="lede">
|
||||
A scenario changes forecast footfall, not history. Compare the shift requirement against the base week
|
||||
for <strong>{{ activeSensor?.name ?? 'Stadtgalerie' }}</strong>.
|
||||
</p>
|
||||
</div>
|
||||
<div style="min-width: 14rem">
|
||||
<OnyxSelect
|
||||
v-model="sensorId"
|
||||
label="Sensor"
|
||||
list-label="Inner-city sensors"
|
||||
:options="sensorOptions"
|
||||
density="compact"
|
||||
/>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="callout">
|
||||
<OnyxIcon :icon="iconCircleInformation" size="16px" color="primary" />
|
||||
The base and scenario plans are generated by Go /api/staffing. The presenter broadcasts from
|
||||
<NuxtLink to="/control">/control</NuxtLink>; <NuxtLink to="/stage">/stage</NuxtLink> and
|
||||
<NuxtLink to="/live">/live</NuxtLink> follow the scenario over SSE with a 5 s polling fallback.
|
||||
</div>
|
||||
|
||||
<div class="split-grid">
|
||||
<div class="card-stack">
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<OnyxHeadline is="h2">Scenario</OnyxHeadline>
|
||||
<p class="small muted" style="margin: 0">The contract enum is fixed; the API applies the perturbation.</p>
|
||||
</div>
|
||||
<OnyxBadge :color="status === 'pending' ? 'warning' : 'success'" density="compact">
|
||||
{{ status === 'pending' ? 'loading' : 'Go API' }}
|
||||
</OnyxBadge>
|
||||
</div>
|
||||
<OnyxRadioGroup
|
||||
v-model="scenario"
|
||||
label="Choose a scenario"
|
||||
:options="radioOptions"
|
||||
orientation="vertical"
|
||||
/>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<OnyxHeadline is="h2">Day by day</OnyxHeadline>
|
||||
<p class="small muted" style="margin: 0">Peak required staff per day, base vs scenario.</p>
|
||||
</div>
|
||||
</div>
|
||||
<OnyxTable striped :table-attrs="{ style: 'min-width: 30rem' }">
|
||||
<template #head>
|
||||
<tr>
|
||||
<th scope="col">Day</th>
|
||||
<th scope="col">Base peak</th>
|
||||
<th scope="col">Scenario peak</th>
|
||||
<th scope="col">Δ staff</th>
|
||||
</tr>
|
||||
</template>
|
||||
<tr v-for="day in days" :key="day.date">
|
||||
<th scope="row" style="text-align: left; font-weight: 600">
|
||||
{{ formatWeekday(day.date) }}
|
||||
<span class="muted" style="font-weight: 400">{{ formatShortDate(day.date) }}</span>
|
||||
</th>
|
||||
<td>{{ day.base }}</td>
|
||||
<td>{{ day.scenario }}</td>
|
||||
<td>
|
||||
<OnyxBadge :color="day.scenario > day.base ? 'warning' : day.scenario < day.base ? 'success' : 'neutral'" density="compact">
|
||||
{{ day.scenario === day.base ? '±0' : `${day.scenario > day.base ? '+' : ''}${day.scenario - day.base}` }}
|
||||
</OnyxBadge>
|
||||
</td>
|
||||
</tr>
|
||||
</OnyxTable>
|
||||
</OnyxCard>
|
||||
</div>
|
||||
|
||||
<aside class="card-stack">
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h2">What changes</OnyxHeadline>
|
||||
<OnyxIcon :icon="iconFlash" size="24px" color="primary" />
|
||||
</div>
|
||||
<p style="margin-top: 0"><strong>{{ activePreset?.label ?? 'Base week' }}</strong></p>
|
||||
<p class="small muted" style="margin-top: 0">{{ activePreset?.description }}</p>
|
||||
<dl class="metric-list">
|
||||
<div><dt>Base staff-hours</dt><dd>{{ baseHours }}</dd></div>
|
||||
<div><dt>Scenario staff-hours</dt><dd>{{ scenarioHours }}</dd></div>
|
||||
<div><dt>Δ staff-hours</dt><dd>{{ deltaHours >= 0 ? '+' : '' }}{{ deltaHours }}</dd></div>
|
||||
<div><dt>Δ labour cost</dt><dd>{{ deltaCost >= 0 ? '+' : '' }}{{ formatEuro(deltaCost) }}</dd></div>
|
||||
<div><dt>Base cost</dt><dd>{{ formatEuro(basePlan.summary.cost_eur) }}</dd></div>
|
||||
<div><dt>Scenario cost</dt><dd>{{ formatEuro(scenarioPlan.summary.cost_eur) }}</dd></div>
|
||||
</dl>
|
||||
<div class="callout" style="margin-top: var(--onyx-density-md)">
|
||||
<p class="small" style="margin: 0">
|
||||
<template v-if="deltaHours > 0">
|
||||
This scenario adds {{ deltaHours }} staff-hours. Check that the Saturday block can be covered before
|
||||
approving.
|
||||
</template>
|
||||
<template v-else-if="deltaHours < 0">
|
||||
This scenario removes {{ Math.abs(deltaHours) }} staff-hours. The plan gets cheaper, but check the
|
||||
peak hour before cutting the block.
|
||||
</template>
|
||||
<template v-else>
|
||||
This scenario does not change the shift requirements. That is a result, not a bug.
|
||||
</template>
|
||||
</p>
|
||||
</div>
|
||||
<OnyxButton
|
||||
:label="`Apply to plan`"
|
||||
:icon="iconArrowRight"
|
||||
icon-position="right"
|
||||
color="primary"
|
||||
:link="`/plan?scenario=${scenario}`"
|
||||
style="margin-top: var(--onyx-density-md)"
|
||||
/>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h3">Scenario rules</OnyxHeadline>
|
||||
</div>
|
||||
<ul class="why-list">
|
||||
<li><span><strong>Base week</strong> — latest forecast weather, no scenario uplift.</span></li>
|
||||
<li><span><strong>Sunny Saturday + market</strong> — Go applies the market/day uplift to next Saturday.</span></li>
|
||||
<li><span><strong>Rainy Saturday</strong> — Go applies the wet-weather reduction.</span></li>
|
||||
<li><span><strong>Wednesday event</strong> — Go applies the weekday evening event uplift.</span></li>
|
||||
</ul>
|
||||
<p class="small muted table-note">
|
||||
Scenario perturbations are produced by the Go/ML stack. This page reads the base and scenario plans from
|
||||
/api/staffing; it does not invent its own multipliers.
|
||||
</p>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h3">Context</OnyxHeadline>
|
||||
</div>
|
||||
<p class="small muted" style="margin-top: 0">
|
||||
Weather now: {{ context?.weather.now.temp_c ?? '—' }} °C, {{ context?.weather.now.precip_mm ?? '—' }} mm
|
||||
precipitation.
|
||||
</p>
|
||||
<p class="small muted" style="margin: 0">
|
||||
{{ formatWeekdayShort(weekStart) }} {{ formatShortDate(weekStart) }} → {{ formatWeekdayShort(weekEnd) }}
|
||||
{{ formatShortDate(weekEnd) }} · Europe/Berlin.
|
||||
</p>
|
||||
</OnyxCard>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,560 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
iconArrowRight,
|
||||
iconCalendar,
|
||||
iconCheck,
|
||||
iconMobileSignal,
|
||||
iconQrCode,
|
||||
iconSync,
|
||||
iconTriangleWarning,
|
||||
iconUserGroup,
|
||||
} from '@sit-onyx/icons'
|
||||
import { scenarioLabel } from '#shared/live'
|
||||
import type {
|
||||
ForecastResponse,
|
||||
ScenarioState,
|
||||
Sensor,
|
||||
Shift,
|
||||
StaffingHour,
|
||||
StaffingResponse,
|
||||
} from '#shared/types'
|
||||
import { formatDateTime, formatEuro, formatPercent, formatShortDate, formatWeekday } from '~/utils/format'
|
||||
|
||||
useHead({ title: 'Stage — PulseCast live decision' })
|
||||
|
||||
const { data: sensors } = await useFetch<Sensor[]>('/api/sensors')
|
||||
const { data: initialScenario } = await useFetch<ScenarioState>('/api/scenario')
|
||||
|
||||
const sensorId = ref(
|
||||
sensors.value?.find((sensor) => sensor.id === 'hn-stadtgalerie-01')?.id ??
|
||||
sensors.value?.[0]?.id ??
|
||||
'hn-stadtgalerie-01',
|
||||
)
|
||||
const live = useLiveScenario(initialScenario.value)
|
||||
|
||||
const {
|
||||
data: planData,
|
||||
status: planStatus,
|
||||
error: planError,
|
||||
refresh: refreshPlan,
|
||||
} = await useFetch<StaffingResponse>('/api/staffing', {
|
||||
query: computed(() => ({
|
||||
sensor: sensorId.value,
|
||||
scenario: live.scenarioId,
|
||||
standard: 'standard',
|
||||
})),
|
||||
})
|
||||
|
||||
const {
|
||||
data: forecastData,
|
||||
error: forecastError,
|
||||
refresh: refreshForecast,
|
||||
} = await useFetch<ForecastResponse>('/api/forecast', {
|
||||
query: computed(() => ({
|
||||
sensor: sensorId.value,
|
||||
horizon: '7d',
|
||||
scenario: live.scenarioId,
|
||||
})),
|
||||
})
|
||||
|
||||
// A new version of the same scenario (new weather/event values) does not
|
||||
// change the query string, so refresh explicitly. A different scenario id
|
||||
// already triggers useFetch's own query watcher.
|
||||
let lastScenarioId = live.scenarioId
|
||||
watch(
|
||||
() => live.revision,
|
||||
() => {
|
||||
if (live.scenarioId === lastScenarioId) {
|
||||
void refreshPlan()
|
||||
void refreshForecast()
|
||||
}
|
||||
lastScenarioId = live.scenarioId
|
||||
},
|
||||
)
|
||||
|
||||
const plan = computed<StaffingResponse | null>(() => planData.value ?? null)
|
||||
const activeSensor = computed(() => sensors.value?.find((sensor) => sensor.id === sensorId.value))
|
||||
|
||||
function maxOf<T>(items: T[], score: (item: T) => number): T | undefined {
|
||||
let best: T | undefined
|
||||
for (const item of items) if (!best || score(item) > score(best)) best = item
|
||||
return best
|
||||
}
|
||||
|
||||
const peakShift = computed<Shift | undefined>(() =>
|
||||
plan.value ? maxOf(plan.value.shifts, (shift) => shift.staff) : undefined,
|
||||
)
|
||||
const peakHour = computed<StaffingHour | undefined>(() =>
|
||||
plan.value ? maxOf(plan.value.hours, (hour) => hour.required_staff) : undefined,
|
||||
)
|
||||
const peakStaff = computed(() => peakShift.value?.staff ?? peakHour.value?.required_staff ?? 0)
|
||||
const totalStaffHours = computed(() =>
|
||||
plan.value ? plan.value.hours.reduce((sum, hour) => sum + hour.scheduled_staff, 0) : 0,
|
||||
)
|
||||
const forecastPeak = computed(() => {
|
||||
const points = forecastData.value?.points ?? []
|
||||
return points.length ? Math.max(...points.map((point) => point.v)) : 0
|
||||
})
|
||||
const saving = computed(() =>
|
||||
plan.value ? Math.max(0, plan.value.summary.flat_schedule_cost_eur - plan.value.summary.cost_eur) : 0,
|
||||
)
|
||||
|
||||
const requestUrl = useRequestURL()
|
||||
const liveUrl = computed(() => {
|
||||
const origin = import.meta.client ? window.location.origin : requestUrl.origin
|
||||
return `${origin}/live`
|
||||
})
|
||||
const qrSrc = computed(() => `/api/qr?text=${encodeURIComponent(liveUrl.value)}`)
|
||||
|
||||
const headline = computed(() => {
|
||||
if (!plan.value) return 'Waiting for the next staffing plan.'
|
||||
const shift = peakShift.value
|
||||
if (!shift) return 'Next week has no shift blocks yet.'
|
||||
return `${formatWeekday(shift.date)} peak: ${shift.staff} staff, ${shift.start}–${shift.end}.`
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page page-stack stage-page">
|
||||
<header class="stage-hero">
|
||||
<div class="stage-hero__copy">
|
||||
<div class="stage-kicker">
|
||||
<OnyxBadge color="neutral" density="compact">PulseCast stage</OnyxBadge>
|
||||
<LiveStatusBadge :status="live.status" :last-event-at="live.lastEventAt" />
|
||||
<OnyxBadge v-if="plan?.cached" color="warning" density="compact">cached forecast</OnyxBadge>
|
||||
</div>
|
||||
<h1 class="stage-headline">{{ headline }}</h1>
|
||||
<p class="stage-sub">
|
||||
{{ activeSensor?.name ?? 'Stadtgalerie' }} · {{ scenarioLabel(live.scenarioId) }} ·
|
||||
{{ plan ? `${totalStaffHours} staff-hours` : 'waiting for the API' }} · updates live via SSE
|
||||
</p>
|
||||
<div class="stage-scenario">
|
||||
<OnyxIcon :icon="iconCalendar" size="18px" color="primary" />
|
||||
<span>
|
||||
<strong>Scenario version {{ live.version || '—' }}</strong>
|
||||
<template v-if="live.scenarioAt"> · broadcast {{ formatDateTime(live.scenarioAt) }}</template>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="stage-qr">
|
||||
<div class="stage-qr__frame">
|
||||
<img :src="qrSrc" width="220" height="220" :alt="`QR code to ${liveUrl}`" />
|
||||
</div>
|
||||
<p class="stage-qr__label">
|
||||
<OnyxIcon :icon="iconQrCode" size="16px" color="primary" />
|
||||
Scan for the phone view
|
||||
</p>
|
||||
<p class="stage-qr__url mono">{{ liveUrl }}</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div v-if="planError" class="callout callout--warning" role="alert">
|
||||
<OnyxIcon :icon="iconTriangleWarning" size="18px" color="warning" />
|
||||
<div>
|
||||
<strong>The plan is unavailable.</strong>
|
||||
<span class="muted"> {{ planError.statusMessage ?? 'Check the Go API and ML service.' }}</span>
|
||||
</div>
|
||||
<OnyxButton label="Retry" mode="outline" density="compact" :icon="iconSync" @click="refreshPlan()" />
|
||||
</div>
|
||||
|
||||
<div v-else-if="planStatus === 'pending' && !plan" class="callout">
|
||||
<OnyxIcon :icon="iconSync" size="18px" color="primary" class="spin-slow" />
|
||||
<span>Loading the current staffing plan…</span>
|
||||
</div>
|
||||
|
||||
<div v-else-if="plan && !plan.hours.length" class="callout callout--warning" role="status">
|
||||
<OnyxIcon :icon="iconTriangleWarning" size="18px" color="warning" />
|
||||
<span>No open hours are available for this sensor yet. Check the data window or pick another store.</span>
|
||||
</div>
|
||||
|
||||
<section class="stage-metrics" aria-label="Decision summary">
|
||||
<div class="stage-metric stage-metric--primary">
|
||||
<p class="stage-metric__label"><OnyxIcon :icon="iconUserGroup" size="18px" color="primary" /> Peak staff</p>
|
||||
<p class="stage-metric__value">{{ plan ? peakStaff : '—' }}</p>
|
||||
<p class="stage-metric__hint">
|
||||
<template v-if="peakShift">{{ formatWeekday(peakShift.date) }} {{ peakShift.start }}–{{ peakShift.end }}</template>
|
||||
<template v-else>Per shift block</template>
|
||||
</p>
|
||||
</div>
|
||||
<div class="stage-metric">
|
||||
<p class="stage-metric__label">Labour cost</p>
|
||||
<p class="stage-metric__value">{{ plan ? formatEuro(plan.summary.cost_eur) : '—' }}</p>
|
||||
<p class="stage-metric__hint">{{ plan ? `€${plan.assumptions.labor_cost_eur_h}/h assumption` : '—' }}</p>
|
||||
</div>
|
||||
<div class="stage-metric">
|
||||
<p class="stage-metric__label">Coverage</p>
|
||||
<p class="stage-metric__value">{{ plan ? formatPercent(plan.summary.coverage_pct, 1) : '—' }}</p>
|
||||
<p class="stage-metric__hint">
|
||||
{{ plan ? `${plan.summary.understaffed_hours} h under` : '—' }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="stage-metric">
|
||||
<p class="stage-metric__label">Forecast peak</p>
|
||||
<p class="stage-metric__value">{{ forecastPeak ? Math.round(forecastPeak) : '—' }}</p>
|
||||
<p class="stage-metric__hint">estimated devices/hour</p>
|
||||
</div>
|
||||
<div class="stage-metric">
|
||||
<p class="stage-metric__label">vs flat schedule</p>
|
||||
<p class="stage-metric__value">−{{ plan ? formatEuro(saving) : '—' }}</p>
|
||||
<p class="stage-metric__hint">same coverage, fewer hours</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="stage-grid">
|
||||
<section class="stage-panel" aria-labelledby="stage-decision">
|
||||
<div class="stage-panel__head">
|
||||
<OnyxHeadline id="stage-decision" is="h2">The decision on stage</OnyxHeadline>
|
||||
<OnyxBadge color="success" density="compact">{{ scenarioLabel(live.scenarioId) }}</OnyxBadge>
|
||||
</div>
|
||||
<p class="stage-decision">
|
||||
<template v-if="peakShift">
|
||||
Put <strong>{{ peakShift.staff }} staff</strong> on {{ formatWeekday(peakShift.date) }}
|
||||
{{ formatShortDate(peakShift.date) }}, {{ peakShift.start }}–{{ peakShift.end }}.
|
||||
</template>
|
||||
<template v-else>Pick a store and scenario; the recommendation appears here.</template>
|
||||
</p>
|
||||
<p class="stage-why">
|
||||
<OnyxIcon :icon="iconCheck" size="18px" color="success" />
|
||||
<template v-if="plan">
|
||||
{{ plan.summary.understaffed_hours === 0 ? 'Every open hour is covered by the block plan.' : `${plan.summary.understaffed_hours} hours are below requirement.` }}
|
||||
{{ plan.summary.overstaffed_hours }} hours are intentionally over requirement.
|
||||
</template>
|
||||
<template v-else>Nothing to approve yet.</template>
|
||||
</p>
|
||||
<div class="stage-actions">
|
||||
<OnyxButton label="Presenter control" link="/control" color="primary" :icon="iconArrowRight" icon-position="right" />
|
||||
<OnyxButton label="Open full plan" link="/plan" mode="outline" />
|
||||
<OnyxButton label="Refresh" mode="plain" :icon="iconSync" @click="refreshPlan()" />
|
||||
</div>
|
||||
<p v-if="forecastError" class="small muted">
|
||||
Forecast refresh failed: {{ forecastError.statusMessage }}
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<aside class="stage-panel stage-panel--aside">
|
||||
<div class="stage-panel__head">
|
||||
<OnyxHeadline is="h2">On every phone</OnyxHeadline>
|
||||
<OnyxBadge color="info" density="compact">no login</OnyxBadge>
|
||||
</div>
|
||||
<div class="stage-phone">
|
||||
<div class="stage-phone__screen">
|
||||
<p class="stage-phone__kicker"><OnyxIcon :icon="iconMobileSignal" size="14px" color="primary" /> LIVE</p>
|
||||
<p class="stage-phone__value">{{ plan ? peakStaff : '—' }} staff</p>
|
||||
<p class="stage-phone__label">
|
||||
<template v-if="peakShift">{{ formatWeekday(peakShift.date) }} · {{ peakShift.start }}–{{ peakShift.end }}</template>
|
||||
<template v-else>Waiting for the plan</template>
|
||||
</p>
|
||||
<p class="stage-phone__scenario">{{ scenarioLabel(live.scenarioId) }} · v{{ live.version || '—' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="small muted">
|
||||
The audience scans the QR code. The same scenario event refreshes the phone view and this screen within
|
||||
the SSE round trip.
|
||||
</p>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<footer class="stage-footer">
|
||||
<span>
|
||||
<strong>Assumptions:</strong> {{ plan?.assumptions.visitors_per_staff_hour ?? 25 }} visitors per staff-hour,
|
||||
×{{ plan?.assumptions.safety_factor ?? 1.15 }} safety, {{ plan?.assumptions.shift_length_h ?? 4 }} h blocks,
|
||||
store hours {{ plan?.assumptions.store_hours.open ?? '10:00' }}–{{ plan?.assumptions.store_hours.close ?? '20:00' }}.
|
||||
</span>
|
||||
<span class="muted">
|
||||
Estimated devices, not people · 8 sensors in a 580 m cluster · no POS or payroll feed ·
|
||||
last update {{ plan ? formatDateTime(live.scenarioAt || plan.context_version) : '—' }}
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.stage-page {
|
||||
gap: clamp(1rem, 2vw, 1.75rem);
|
||||
}
|
||||
|
||||
.stage-hero {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: clamp(1rem, 3vw, 2.5rem);
|
||||
align-items: center;
|
||||
padding: clamp(1.25rem, 2.5vw, 2.5rem);
|
||||
border: 1px solid var(--onyx-color-base-primary-200);
|
||||
border-radius: var(--onyx-radius-component-container-soft);
|
||||
background:
|
||||
radial-gradient(circle at 100% 0%, var(--onyx-color-base-primary-200), transparent 45%),
|
||||
linear-gradient(135deg, var(--onyx-color-base-primary-100), var(--onyx-color-base-neutral-100) 70%);
|
||||
}
|
||||
|
||||
.stage-kicker,
|
||||
.stage-scenario,
|
||||
.stage-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
.stage-headline {
|
||||
max-width: 24ch;
|
||||
margin: var(--onyx-density-sm) 0 0;
|
||||
font-size: clamp(2.1rem, 4.8vw, 4.5rem);
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.03em;
|
||||
line-height: 1.02;
|
||||
color: var(--onyx-color-text-icons-primary-intense);
|
||||
}
|
||||
|
||||
.stage-sub {
|
||||
max-width: 70ch;
|
||||
margin: var(--onyx-density-sm) 0 0;
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: clamp(0.95rem, 1.5vw, 1.15rem);
|
||||
}
|
||||
|
||||
.stage-scenario {
|
||||
margin-top: var(--onyx-density-md);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.stage-qr {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--onyx-density-xs);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.stage-qr__frame {
|
||||
padding: 0.65rem;
|
||||
border: 1px solid var(--onyx-color-base-neutral-300);
|
||||
border-radius: var(--onyx-radius-component-container-soft);
|
||||
background: #fff;
|
||||
box-shadow: var(--onyx-shadow-soft-bottom);
|
||||
}
|
||||
|
||||
.stage-qr__frame img {
|
||||
display: block;
|
||||
width: min(220px, 32vw);
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.stage-qr__label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
margin: 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.stage-qr__url {
|
||||
max-width: 18rem;
|
||||
margin: 0;
|
||||
overflow-wrap: anywhere;
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
}
|
||||
|
||||
.stage-metrics {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||
gap: var(--onyx-density-sm);
|
||||
}
|
||||
|
||||
.stage-metric {
|
||||
min-width: 0;
|
||||
padding: var(--onyx-density-md);
|
||||
border: 1px solid var(--onyx-color-base-neutral-300);
|
||||
border-radius: var(--onyx-radius-component-container-soft);
|
||||
background: var(--onyx-color-base-neutral-100);
|
||||
}
|
||||
|
||||
.stage-metric--primary {
|
||||
border-color: var(--onyx-color-base-primary-400);
|
||||
background: var(--onyx-color-base-primary-100);
|
||||
}
|
||||
|
||||
.stage-metric__label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
margin: 0;
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.stage-metric__value {
|
||||
margin: var(--onyx-density-xs) 0 0;
|
||||
font-size: clamp(1.5rem, 2.6vw, 2.5rem);
|
||||
font-weight: 800;
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
.stage-metric__hint {
|
||||
margin: var(--onyx-density-2xs) 0 0;
|
||||
color: var(--onyx-color-text-icons-neutral-soft);
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.stage-grid {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.65fr) minmax(16rem, 1fr);
|
||||
gap: var(--onyx-density-lg);
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.stage-panel {
|
||||
min-width: 0;
|
||||
padding: clamp(1rem, 2vw, 1.75rem);
|
||||
border: 1px solid var(--onyx-color-base-neutral-300);
|
||||
border-radius: var(--onyx-radius-component-container-soft);
|
||||
background: var(--onyx-color-base-neutral-100);
|
||||
}
|
||||
|
||||
.stage-panel--aside {
|
||||
background: var(--onyx-color-base-neutral-200);
|
||||
}
|
||||
|
||||
.stage-panel__head {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--onyx-density-xs);
|
||||
}
|
||||
|
||||
.stage-panel__head h2 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.stage-decision {
|
||||
margin: var(--onyx-density-md) 0 0;
|
||||
font-size: clamp(1.1rem, 2vw, 1.5rem);
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.stage-why {
|
||||
display: flex;
|
||||
gap: var(--onyx-density-xs);
|
||||
align-items: flex-start;
|
||||
margin: var(--onyx-density-sm) 0 0;
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
}
|
||||
|
||||
.stage-actions {
|
||||
margin-top: var(--onyx-density-lg);
|
||||
}
|
||||
|
||||
.stage-phone {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-block: var(--onyx-density-md);
|
||||
}
|
||||
|
||||
.stage-phone__screen {
|
||||
width: min(15rem, 100%);
|
||||
padding: var(--onyx-density-md);
|
||||
border: 6px solid #1e293b;
|
||||
border-radius: 1.5rem;
|
||||
background: #fff;
|
||||
box-shadow: var(--onyx-shadow-soft-bottom);
|
||||
}
|
||||
|
||||
.stage-phone__kicker {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
margin: 0;
|
||||
color: var(--onyx-color-text-icons-primary-intense);
|
||||
font-size: 0.7rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
.stage-phone__value {
|
||||
margin: 0.35rem 0 0;
|
||||
font-size: 2.2rem;
|
||||
font-weight: 800;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.stage-phone__label {
|
||||
margin: 0.25rem 0 0;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.stage-phone__scenario {
|
||||
margin: 0.75rem 0 0;
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: 0.72rem;
|
||||
}
|
||||
|
||||
.stage-footer {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
gap: var(--onyx-density-sm);
|
||||
padding-top: var(--onyx-density-sm);
|
||||
border-top: 1px solid var(--onyx-color-base-neutral-300);
|
||||
color: var(--onyx-color-text-icons-neutral-medium);
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.stage-footer span {
|
||||
max-width: 75ch;
|
||||
}
|
||||
|
||||
.spin-slow {
|
||||
animation: spin 1.4s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.spin-slow {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
.stage-metrics {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.stage-hero,
|
||||
.stage-grid {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.stage-qr {
|
||||
align-items: flex-start;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.stage-qr__frame img {
|
||||
width: min(180px, 50vw);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.stage-metrics {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.stage-headline {
|
||||
font-size: clamp(1.8rem, 8vw, 2.6rem);
|
||||
}
|
||||
|
||||
.stage-footnote {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +0,0 @@
|
||||
import type { RouterConfig } from '@nuxt/schema'
|
||||
|
||||
// Onyx scrolls inside .onyx-page__main, not the window, so the default Nuxt
|
||||
// scroll behaviour does not reach the page container.
|
||||
export default {
|
||||
scrollBehavior: createOnyxScrollBehavior(),
|
||||
} satisfies RouterConfig
|
||||
@@ -1,27 +0,0 @@
|
||||
interface ApiErrorLike {
|
||||
status?: number
|
||||
statusCode?: number
|
||||
statusMessage?: string
|
||||
message?: string
|
||||
data?: {
|
||||
error?: { message?: string; code?: string }
|
||||
message?: string
|
||||
}
|
||||
}
|
||||
|
||||
/** Human-readable message from a Nuxt/$fetch error, without leaking tokens. */
|
||||
export function apiErrorMessage(error: unknown, fallback: string): string {
|
||||
const value = error as ApiErrorLike | undefined
|
||||
return (
|
||||
value?.data?.error?.message ??
|
||||
value?.data?.message ??
|
||||
value?.statusMessage ??
|
||||
value?.message ??
|
||||
fallback
|
||||
)
|
||||
}
|
||||
|
||||
export function apiErrorStatus(error: unknown): number | undefined {
|
||||
const value = error as ApiErrorLike | undefined
|
||||
return value?.status ?? value?.statusCode
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
import { BERLIN_TZ } from '#shared/staffing'
|
||||
|
||||
const dateFormatter = new Intl.DateTimeFormat('en-GB', {
|
||||
timeZone: BERLIN_TZ,
|
||||
day: 'numeric',
|
||||
month: 'short',
|
||||
year: 'numeric',
|
||||
})
|
||||
|
||||
const shortDateFormatter = new Intl.DateTimeFormat('en-GB', {
|
||||
timeZone: BERLIN_TZ,
|
||||
day: 'numeric',
|
||||
month: 'short',
|
||||
})
|
||||
|
||||
const weekdayFormatter = new Intl.DateTimeFormat('en-GB', {
|
||||
timeZone: BERLIN_TZ,
|
||||
weekday: 'long',
|
||||
})
|
||||
|
||||
const weekdayShortFormatter = new Intl.DateTimeFormat('en-GB', {
|
||||
timeZone: BERLIN_TZ,
|
||||
weekday: 'short',
|
||||
})
|
||||
|
||||
const dateTimeFormatter = new Intl.DateTimeFormat('en-GB', {
|
||||
timeZone: BERLIN_TZ,
|
||||
day: 'numeric',
|
||||
month: 'short',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
hourCycle: 'h23',
|
||||
})
|
||||
|
||||
const timeFormatter = new Intl.DateTimeFormat('en-GB', {
|
||||
timeZone: BERLIN_TZ,
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
hourCycle: 'h23',
|
||||
})
|
||||
|
||||
const euroFormatter = new Intl.NumberFormat('en-GB', {
|
||||
style: 'currency',
|
||||
currency: 'EUR',
|
||||
maximumFractionDigits: 0,
|
||||
})
|
||||
|
||||
const numberFormatter = new Intl.NumberFormat('en-GB')
|
||||
|
||||
/** Date-only strings are parsed at noon UTC so the local date never shifts. */
|
||||
function toDate(value: string): Date {
|
||||
return value.length > 10 ? new Date(value) : new Date(`${value}T12:00:00Z`)
|
||||
}
|
||||
|
||||
function formatWith(formatter: Intl.DateTimeFormat, value: string): string {
|
||||
const date = toDate(value)
|
||||
return Number.isNaN(date.getTime()) ? '—' : formatter.format(date)
|
||||
}
|
||||
|
||||
export function formatDate(date: string): string {
|
||||
return formatWith(dateFormatter, date)
|
||||
}
|
||||
|
||||
export function formatShortDate(date: string): string {
|
||||
return formatWith(shortDateFormatter, date)
|
||||
}
|
||||
|
||||
export function formatWeekday(date: string): string {
|
||||
return formatWith(weekdayFormatter, date)
|
||||
}
|
||||
|
||||
export function formatWeekdayShort(date: string): string {
|
||||
return formatWith(weekdayShortFormatter, date)
|
||||
}
|
||||
|
||||
/** Format a wire timestamp in Heilbronn local time. */
|
||||
export function formatDateTime(iso: string): string {
|
||||
return formatWith(dateTimeFormatter, iso)
|
||||
}
|
||||
|
||||
export function formatTime(iso: string): string {
|
||||
return formatWith(timeFormatter, iso)
|
||||
}
|
||||
|
||||
export function formatEuro(value: number): string {
|
||||
return euroFormatter.format(value)
|
||||
}
|
||||
|
||||
export function formatNumber(value: number): string {
|
||||
return numberFormatter.format(value)
|
||||
}
|
||||
|
||||
export function formatPercent(value: number, digits = 0): string {
|
||||
return `${value.toFixed(digits)}%`
|
||||
}
|
||||
|
||||
export function weekLabel(start: string, end: string): string {
|
||||
return `${formatShortDate(start)} – ${formatDate(end)}`
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
# Stitch hero — claims to reconcile before the pitch
|
||||
|
||||
The page copy is frozen 1:1 with `design/stitch-hero.html` for this visual pass.
|
||||
Do not change the page yet. Before presenting, reconcile the following claims:
|
||||
|
||||
- Footer says **© 2024**, which is stale. Use the current year (2026) once copy changes are allowed.
|
||||
- **Model metrics** in the accuracy badge ("Backtest MAE 4.2", "MAPE 3.8%",
|
||||
"730 days backtested") do not match the paper's verified results
|
||||
(**MAE 3.32, WAPE 27.5%, R² 0.777**). Replace with the verified metrics and
|
||||
state the actual data window rather than "730 days".
|
||||
- **"GDPR / ISO 27701 compliant"** in the footer overstates the position.
|
||||
Verify whether certification has actually been obtained; otherwise phrase it
|
||||
as "privacy by design" or "designed for GDPR / ISO 27701 alignment".
|
||||
- **"Zero PII" / "Zero personally identifiable information (PII) processed"**
|
||||
is too absolute. Phrase precisely what the sensor pipeline processes
|
||||
(anonymous counts rather than identities) and avoid claiming zero PII across
|
||||
the entire system unless that has been verified end to end.
|
||||
@@ -0,0 +1,237 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html class="dark" lang="en"><head><meta charset="utf-8"/><meta content="width=device-width, initial-scale=1.0" name="viewport"/><meta content="web_standard" name="shell-type"/><link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet"/>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet"/>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet"/><style>@layer base{html,body{margin:0;padding:0;}body{overscroll-behavior:none;}main>:first-child{margin-top:0!important;}main>:last-child{margin-bottom:0!important;}}::-webkit-scrollbar{display:none;}</style><script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script><script id="tailwind-config">tailwind.config={darkMode:"class",theme:{extend:{"colors":{"dark-bg":"#081723","dark-card":"#0e2233","dark-surface":"#132b40","dark-border":"#1e3a52","dark-text":"#FFFFFF","dark-muted":"#94A3B8","dark-accent":"#00C3CD"},"borderRadius":{"DEFAULT":"0.25rem","lg":"0.5rem","xl":"0.75rem","full":"9999px"},"spacing":{"space-xl":"1.5rem","space-2xl":"2rem","space-xs":"0.25rem","gutter":"1rem","margin":"1rem","margin-desktop":"2rem","gutter-desktop":"1.5rem","space-sm":"0.5rem","space-lg":"1rem","space-md":"0.75rem"},"fontFamily":{"headline-lg":["Inter"],"body-sm":["Inter"],"headline-xl":["Inter"],"tabular-stat-md":["Inter"],"body-md":["Inter"],"tabular-stat-lg":["Inter"],"headline-md":["Inter"],"headline-sm":["Inter"],"body-lg":["Inter"],"label-md":["Inter"],"label-sm":["Inter"],"headline-xl-mobile":["Inter"]}}}}</script></head><body class="bg-[#081723] text-[#FFFFFF] font-body-md"><header class="fixed top-0 left-0 right-0 z-50 bg-[#081723]/95 backdrop-blur-md border-b border-[#1e3a52] shadow-[0_1px_8px_rgba(0,0,0,0.3)]"><div class="h-16 max-w-[1200px] mx-auto px-margin-desktop flex items-center justify-between gap-space-lg"><div class="flex items-center gap-space-md shrink-0"><img alt="Schwarz Sensing Engine Logo" class="h-8 w-auto object-contain brightness-0 invert" src="https://lh3.googleusercontent.com/aida/ALJJyrCNxLn9636LeBvNQ9xgc1tPAR-NnMkUOlz6fEu2IU82YAhVBNixjwgJmwo0cAG2XefOjV2c3I8g8ozRtMqRIZxTxVW5Xda-62jbzgmFuOm9m6LwwWn2ELEb1jkvei4wTEgs_tpGTSqsFMI9_vF1qZtubfUQ6QUM0Ux9w3Vz9YA1WnKp1BlIY6rrST1tAwRXn7E6-bIrj498cqAcUXVwpHf8qGA9cSb3w7XJif-Fvlc"/><div class="flex flex-col"><span class="font-headline-sm text-headline-sm text-[#FFFFFF] tracking-tight">Schwarz IT</span><span class="font-label-sm text-label-sm text-[#94A3B8] uppercase tracking-wider -mt-1">Sensing Engine</span></div></div><nav class="hidden md:flex items-center gap-space-xl"><a aria-current="page" class="transition-colors py-space-sm text-[#00C3CD] font-semibold border-b-2 border-[#00C3CD]" data-path="engine" href="#">Engine</a><a class="font-label-md text-label-md text-[#94A3B8] hover:text-[#FFFFFF] transition-colors py-space-sm" data-path="sensing-options" href="#">Sensing Options</a><a class="font-label-md text-label-md text-[#94A3B8] hover:text-[#FFFFFF] transition-colors py-space-sm" data-path="use-cases" href="#">Use Cases</a><a class="font-label-md text-label-md text-[#94A3B8] hover:text-[#FFFFFF] transition-colors py-space-sm" data-path="playground" href="#">Playground</a></nav><div class="flex items-center gap-space-md shrink-0"><div class="flex items-center bg-[#0e2233] p-space-xs rounded-lg border border-[#1e3a52]"><button class="px-space-sm py-1 rounded bg-[#132b40] text-[#00C3CD] font-label-sm text-label-sm shadow-[0_1px_3px_rgba(0,0,0,0.3)] transition-all font-semibold" type="button">UC1: Staffing</button><button class="px-space-sm py-1 rounded text-[#94A3B8] hover:text-[#FFFFFF] font-label-sm text-label-sm transition-all" type="button">UC2: Smart Routing</button><button class="px-space-sm py-1 rounded text-[#94A3B8] hover:text-[#FFFFFF] font-label-sm text-label-sm transition-all" type="button">UC3: PreZero Depot</button></div><div class="w-8 h-8 rounded-full bg-[#132b40] border border-[#1e3a52] flex items-center justify-center shrink-0"><span class="material-symbols-outlined text-[#00C3CD] text-[18px]">person</span></div></div></div></header><main class="w-full pt-16 bg-[#081723] min-h-[calc(100vh-160px)]"><div class="flex flex-col w-full">
|
||||
<!-- Interactive & Style Setup for Flow Visualization -->
|
||||
<style>
|
||||
@keyframes pulseDataFlow {
|
||||
0% { transform: translateX(0); opacity: 0.15; }
|
||||
50% { opacity: 0.95; }
|
||||
100% { transform: translateX(64px); opacity: 0.15; }
|
||||
}
|
||||
.animate-flow {
|
||||
animation: pulseDataFlow 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
||||
}
|
||||
</style>
|
||||
<!-- Above-The-Fold Master Container (1200px max width aligned) -->
|
||||
<section class="w-full bg-[#081723] pt-space-2xl pb-space-xl">
|
||||
<div class="max-w-[1200px] mx-auto px-margin-desktop flex flex-col gap-space-2xl">
|
||||
<!-- HERO TWO-COLUMN GRID (50% / 50%) -->
|
||||
<div class="grid grid-cols-1 lg:grid-cols-12 gap-space-xl items-center">
|
||||
<!-- LEFT COLUMN: Value Proposition & CTAs -->
|
||||
<div class="lg:col-span-6 flex flex-col justify-center gap-space-lg">
|
||||
<!-- Eyebrow Pill Badge -->
|
||||
<div class="inline-flex items-center gap-2 self-start px-3 py-1 rounded-full bg-[#0e2233] border border-[#1e3a52] shadow-sm">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-[#00C3CD]"></span>
|
||||
<span class="font-label-sm text-label-sm text-[#94A3B8] uppercase tracking-wider font-semibold">
|
||||
Schwarz IT · Sensing & Prediction Platform
|
||||
</span>
|
||||
</div>
|
||||
<!-- Headline -->
|
||||
<h1 class="text-[52px] leading-[58px] tracking-[-0.03em] font-semibold text-[#FFFFFF]">
|
||||
You bring the data.<br/>
|
||||
<span class="text-[#00C3CD]">We bring the engine.</span>
|
||||
</h1>
|
||||
<!-- Subline -->
|
||||
<p class="font-body-lg text-body-lg text-[#94A3B8] max-w-[500px] leading-relaxed">
|
||||
Privacy-preserving sensor counts in, decisions out. Turn raw edge signals into verified operational foresight without compromising individual identity.
|
||||
</p>
|
||||
<!-- CTAs Row -->
|
||||
<div class="flex flex-wrap items-center gap-space-md pt-space-xs">
|
||||
<a class="inline-flex items-center justify-center gap-2 px-6 h-12 rounded-xl bg-[#00C3CD] text-[#081723] font-label-md text-label-md font-semibold hover:bg-[#00d8e4] transition-all shadow-[0_2px_12px_rgba(0,195,205,0.25)] active:scale-[0.99] group" href="#playground">
|
||||
<span>Try the engine</span>
|
||||
<span class="material-symbols-outlined text-[18px] group-hover:translate-x-0.5 transition-transform text-[#081723]">arrow_forward</span>
|
||||
</a>
|
||||
<a class="inline-flex items-center justify-center gap-2 px-6 h-12 rounded-xl bg-[#0e2233] text-[#FFFFFF] border border-[#1e3a52] font-label-md text-label-md hover:bg-[#132b40] transition-all shadow-sm" href="#use-cases">
|
||||
<span class="material-symbols-outlined text-[18px] text-[#00C3CD]">visibility</span>
|
||||
<span>See live use cases</span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Trust Micro-Copy -->
|
||||
<div class="flex items-center gap-2 pt-space-xs font-body-sm text-body-sm text-[#94A3B8]">
|
||||
<span class="material-symbols-outlined text-[17px] text-[#00C3CD]" style="font-variation-settings: 'FILL' 1;">verified_user</span>
|
||||
<span>Zero personally identifiable information (PII) processed. GDPR Art. 25 Privacy by Design.</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- RIGHT COLUMN: Pipeline Architecture Diagram Card -->
|
||||
<div class="lg:col-span-6 w-full">
|
||||
<div class="w-full bg-[#0e2233] border border-[#1e3a52] rounded-xl shadow-xl p-space-lg flex flex-col gap-space-md relative overflow-hidden">
|
||||
<!-- Card Header Badge -->
|
||||
<div class="flex items-center justify-between pb-space-xs border-b border-[#1e3a52]/60">
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="w-2 h-2 rounded-full bg-[#00C3CD] animate-pulse"></span>
|
||||
<span class="font-label-sm text-label-sm uppercase tracking-wider text-[#FFFFFF] font-semibold">Real-Time Core Pipeline</span>
|
||||
</div>
|
||||
<span class="font-label-sm text-label-sm bg-[#132b40] border border-[#1e3a52] px-2 py-0.5 rounded text-[#94A3B8] font-mono font-medium">v2.4-deterministic</span>
|
||||
</div>
|
||||
<!-- Pipeline Diagram Stage -->
|
||||
<div class="bg-[#081723]/60 border border-[#1e3a52] rounded-xl p-space-md flex flex-col gap-space-md relative">
|
||||
<!-- 3-Node Horizontal Pipeline Layout -->
|
||||
<div class="flex items-center justify-between gap-1 w-full">
|
||||
<!-- NODE 1: Ingest -->
|
||||
<div class="w-[30%] bg-[#0e2233] border border-[#1e3a52] rounded-xl p-space-sm flex flex-col items-center text-center shadow-sm">
|
||||
<div class="w-10 h-10 rounded-lg bg-[#132b40] border border-[#1e3a52] flex items-center justify-center text-[#00C3CD] mb-1">
|
||||
<span class="material-symbols-outlined text-[20px]">sensors</span>
|
||||
</div>
|
||||
<span class="font-headline-sm text-[13px] leading-tight text-[#FFFFFF] font-semibold">Anonymous Counts</span>
|
||||
<span class="font-body-sm text-[11px] text-[#94A3B8] mt-1">LiDAR, FLUX, In/Out Edge Turnstile</span>
|
||||
<div class="mt-2 w-full bg-[#132b40] border border-[#1e3a52]/80 px-1 py-0.5 rounded text-[10px] text-[#94A3B8] font-mono">
|
||||
Σ counts/min
|
||||
</div>
|
||||
</div>
|
||||
<!-- CONNECTOR 1 -->
|
||||
<div class="flex-1 flex flex-col items-center justify-center px-1 relative">
|
||||
<div class="w-full h-[2px] bg-[#1e3a52] relative overflow-hidden flex items-center">
|
||||
<div class="w-1/2 h-[2px] bg-[#00C3CD] animate-flow"></div>
|
||||
</div>
|
||||
<span class="text-[9px] text-[#00C3CD] font-mono tracking-tighter mt-1 uppercase">100% PII-Free</span>
|
||||
</div>
|
||||
<!-- NODE 2: SENSING ENGINE (Centerpiece) -->
|
||||
<div class="w-[38%] bg-[#132b40] border-2 border-[#00C3CD] text-[#FFFFFF] rounded-xl p-space-md flex flex-col items-center text-center shadow-lg relative overflow-hidden group">
|
||||
<div class="absolute -right-6 -bottom-6 w-20 h-20 rounded-full bg-[#00C3CD]/15 blur-xl pointer-events-none"></div>
|
||||
<div class="w-9 h-9 rounded-full bg-[#00C3CD]/20 border border-[#00C3CD]/40 flex items-center justify-center text-[#00C3CD] mb-1">
|
||||
<span class="material-symbols-outlined text-[19px]">hub</span>
|
||||
</div>
|
||||
<span class="font-headline-sm text-[14px] leading-tight text-[#FFFFFF] font-semibold tracking-tight">SENSING ENGINE</span>
|
||||
<span class="font-label-sm text-[10px] text-[#00C3CD] uppercase tracking-wider font-semibold">Fuse + Predict</span>
|
||||
</div>
|
||||
<!-- CONNECTOR 2 -->
|
||||
<div class="flex-1 flex flex-col items-center justify-center px-1 relative">
|
||||
<div class="w-full h-[2px] bg-[#1e3a52] relative overflow-hidden flex items-center">
|
||||
<div class="w-1/2 h-[2px] bg-[#00C3CD] animate-flow"></div>
|
||||
</div>
|
||||
<span class="text-[9px] text-[#00C3CD] font-mono tracking-tighter mt-1 uppercase">Inference</span>
|
||||
</div>
|
||||
<!-- NODE 3: Decisions -->
|
||||
<div class="w-[30%] bg-[#0e2233] border border-[#1e3a52] rounded-xl p-space-sm flex flex-col items-center text-center shadow-sm">
|
||||
<div class="w-10 h-10 rounded-lg bg-[#132b40] border border-[#1e3a52] flex items-center justify-center text-[#00C3CD] mb-1">
|
||||
<span class="material-symbols-outlined text-[20px]">bolt</span>
|
||||
</div>
|
||||
<span class="font-headline-sm text-[13px] leading-tight text-[#FFFFFF] font-semibold">Decisions</span>
|
||||
<span class="font-body-sm text-[11px] text-[#94A3B8] mt-1">Staff shift, dynamic routing, bin dispatch</span>
|
||||
<div class="mt-2 w-full bg-[#132b40] border border-[#1e3a52]/80 px-1 py-0.5 rounded text-[10px] text-[#00C3CD] font-mono font-semibold">
|
||||
Action Output
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Real-world Context Fusion Ribbon -->
|
||||
<div class="flex flex-col gap-1.5 pt-1">
|
||||
<div class="flex items-center justify-between text-[#94A3B8] px-1">
|
||||
<span class="font-label-sm text-[11px] tracking-wider uppercase font-semibold text-[#94A3B8]">Contextual Signals Fused in Real-Time</span>
|
||||
<span class="text-[10px] font-mono text-[#00C3CD]">4 Global Feeds Active</span>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-1.5">
|
||||
<div class="flex items-center gap-1.5 px-2 py-1.5 rounded-lg bg-[#0e2233] border border-[#1e3a52] shadow-sm">
|
||||
<span class="text-[13px]">☀️</span>
|
||||
<div class="flex flex-col min-w-0">
|
||||
<span class="font-label-sm text-[11px] text-[#FFFFFF] truncate font-semibold">Sun Position</span>
|
||||
<span class="text-[9px] text-[#94A3B8] truncate">Solar Azimuth</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5 px-2 py-1.5 rounded-lg bg-[#0e2233] border border-[#1e3a52] shadow-sm">
|
||||
<span class="text-[13px]">🌦️</span>
|
||||
<div class="flex flex-col min-w-0">
|
||||
<span class="font-label-sm text-[11px] text-[#FFFFFF] truncate font-semibold">DWD Weather</span>
|
||||
<span class="text-[9px] text-[#94A3B8] truncate">Hyperlocal Rain/Temp</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5 px-2 py-1.5 rounded-lg bg-[#0e2233] border border-[#1e3a52] shadow-sm">
|
||||
<span class="text-[13px]">📅</span>
|
||||
<div class="flex flex-col min-w-0">
|
||||
<span class="font-label-sm text-[11px] text-[#FFFFFF] truncate font-semibold">Calendar Sync</span>
|
||||
<span class="text-[9px] text-[#94A3B8] truncate">Retail, Holidays, Paydays</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5 px-2 py-1.5 rounded-lg bg-[#0e2233] border border-[#1e3a52] shadow-sm">
|
||||
<span class="text-[13px]">🗺️</span>
|
||||
<div class="flex flex-col min-w-0">
|
||||
<span class="font-label-sm text-[11px] text-[#FFFFFF] truncate font-semibold">Geo-Mesh Map</span>
|
||||
<span class="text-[9px] text-[#94A3B8] truncate">Store & Depot Spatial</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Mini Telemetry Footer Bar -->
|
||||
<div class="flex items-center justify-between text-[#94A3B8] px-space-xs font-mono text-[11px]">
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="material-symbols-outlined text-[14px] text-[#00C3CD]">speed</span>
|
||||
<span>Pipeline Latency: <strong class="text-[#FFFFFF]">< 42ms</strong></span>
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="material-symbols-outlined text-[14px] text-[#00C3CD]">sync</span>
|
||||
<span>Edge aggregation: <strong class="text-[#FFFFFF]">60s epoch</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- COMPLIANCE & ACCURACY STRIP (Full 1200px span) -->
|
||||
<div class="w-full bg-[#0e2233] border border-[#1e3a52] rounded-xl shadow-sm p-space-lg flex flex-col lg:flex-row items-center justify-between gap-space-lg">
|
||||
<!-- 4 Verified Core Value Pillars -->
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-space-md w-full lg:w-auto flex-1">
|
||||
<!-- Pillar 1 -->
|
||||
<div class="flex items-start gap-2.5">
|
||||
<div class="w-6 h-6 rounded-full bg-[#132b40] border border-[#1e3a52] flex items-center justify-center shrink-0 shadow-sm mt-0.5">
|
||||
<span class="material-symbols-outlined text-[15px] text-[#00C3CD]" style="font-variation-settings: 'FILL' 1;">check_circle</span>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="font-label-md text-label-md text-[#FFFFFF] font-semibold">Privacy-Preserving Sensors</span>
|
||||
<span class="font-body-sm text-body-sm text-[#94A3B8] leading-tight">No identities, only counts.</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Pillar 2 -->
|
||||
<div class="flex items-start gap-2.5">
|
||||
<div class="w-6 h-6 rounded-full bg-[#132b40] border border-[#1e3a52] flex items-center justify-center shrink-0 shadow-sm mt-0.5">
|
||||
<span class="material-symbols-outlined text-[15px] text-[#00C3CD]" style="font-variation-settings: 'FILL' 1;">check_circle</span>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="font-label-md text-label-md text-[#FFFFFF] font-semibold">Real-World Context</span>
|
||||
<span class="font-body-sm text-body-sm text-[#94A3B8] leading-tight">Weather, sun, calendar, map.</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Pillar 3 -->
|
||||
<div class="flex items-start gap-2.5">
|
||||
<div class="w-6 h-6 rounded-full bg-[#132b40] border border-[#1e3a52] flex items-center justify-center shrink-0 shadow-sm mt-0.5">
|
||||
<span class="material-symbols-outlined text-[15px] text-[#00C3CD]" style="font-variation-settings: 'FILL' 1;">check_circle</span>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="font-label-md text-label-md text-[#FFFFFF] font-semibold">Intuitive Visual Story</span>
|
||||
<span class="font-body-sm text-body-sm text-[#94A3B8] leading-tight">One answer per screen.</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Pillar 4 -->
|
||||
<div class="flex items-start gap-2.5">
|
||||
<div class="w-6 h-6 rounded-full bg-[#132b40] border border-[#1e3a52] flex items-center justify-center shrink-0 shadow-sm mt-0.5">
|
||||
<span class="material-symbols-outlined text-[15px] text-[#00C3CD]" style="font-variation-settings: 'FILL' 1;">check_circle</span>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="font-label-md text-label-md text-[#FFFFFF] font-semibold">Predictive Engine</span>
|
||||
<span class="font-body-sm text-body-sm text-[#94A3B8] leading-tight">Hindsight becomes foresight.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ACCURACY BADGE (Far right telemetry badge) -->
|
||||
<div class="shrink-0 flex items-center gap-3 bg-[#132b40] border border-[#1e3a52] px-space-md py-2.5 rounded-lg shadow-sm w-full lg:w-auto justify-between lg:justify-start">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-7 h-7 rounded-md bg-[#0e2233] border border-[#1e3a52] flex items-center justify-center text-[#00C3CD]">
|
||||
<span class="material-symbols-outlined text-[18px]">verified</span>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="font-label-sm text-[10px] text-[#94A3B8] uppercase tracking-wider font-semibold">Model Accuracy</span>
|
||||
<div class="flex items-center gap-1.5 font-mono text-[13px] font-semibold text-[#FFFFFF]">
|
||||
<span>Backtest MAE 4.2</span>
|
||||
<span class="text-[#1e3a52]">·</span>
|
||||
<span class="text-[#00C3CD]">MAPE 3.8%</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden sm:flex items-center text-[11px] font-mono bg-[#0e2233] border border-[#1e3a52] px-2 py-1 rounded text-[#94A3B8]">
|
||||
730 days backtested
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div></main><footer class="w-full bg-[#081723] border-t border-[#1e3a52] py-space-xl"><div class="max-w-[1200px] mx-auto px-margin-desktop flex flex-col md:flex-row items-center justify-between gap-space-lg font-body-sm text-body-sm text-[#94A3B8]"><div class="flex flex-wrap items-center gap-space-md"><span>© 2024 Schwarz IT KG. All rights reserved.</span><span class="text-[#1e3a52]">|</span><span class="flex items-center gap-1 text-[#00C3CD] font-label-sm text-label-sm"><span class="material-symbols-outlined text-[16px]">verified_user</span>GDPR / ISO 27701 compliant</span></div><div class="flex flex-wrap items-center gap-space-md"><div class="flex items-center gap-1.5"><span class="w-2 h-2 rounded-full bg-[#00C3CD] animate-pulse"></span><span class="font-label-sm text-label-sm text-[#FFFFFF]">System Status: All Engines Operational</span></div><span class="text-[#1e3a52]">|</span><span class="bg-[#0e2233] px-2 py-0.5 rounded font-label-sm text-label-sm font-semibold text-[#94A3B8] border border-[#1e3a52]">v2.4-prod</span></div></div></footer></body></html>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 199 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 145 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 130 KiB |
+41
-9
@@ -6,9 +6,38 @@ const useMock =
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2026-11-01',
|
||||
ssr: true,
|
||||
modules: ['@sit-onyx/nuxt'],
|
||||
css: ['~/assets/css/main.css'],
|
||||
modules: ['@nuxt/icon'],
|
||||
css: ['~/assets/css/tailwind.css'],
|
||||
postcss: {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
},
|
||||
devtools: { enabled: false },
|
||||
icon: {
|
||||
mode: 'svg',
|
||||
serverBundle: { collections: ['material-symbols'] },
|
||||
clientBundle: {
|
||||
icons: [
|
||||
'material-symbols:menu',
|
||||
'material-symbols:close',
|
||||
'material-symbols:arrow-forward',
|
||||
'material-symbols:visibility-outline',
|
||||
'material-symbols:verified-user',
|
||||
'material-symbols:sensors',
|
||||
'material-symbols:hub-outline',
|
||||
'material-symbols:bolt-outline',
|
||||
'material-symbols:speed',
|
||||
'material-symbols:sync',
|
||||
'material-symbols:check-circle',
|
||||
'material-symbols:verified-outline',
|
||||
'material-symbols:verified-user-outline',
|
||||
],
|
||||
scan: true,
|
||||
},
|
||||
fallbackToApi: false,
|
||||
},
|
||||
runtimeConfig: {
|
||||
// Server-side Go API. K8s sets NUXT_API_INTERNAL_BASE=http://api:8080.
|
||||
apiBase:
|
||||
@@ -32,18 +61,21 @@ export default defineNuxtConfig({
|
||||
},
|
||||
app: {
|
||||
head: {
|
||||
htmlAttrs: { lang: 'en' },
|
||||
title: 'PulseCast — next week’s staffing plan',
|
||||
htmlAttrs: { lang: 'en', class: 'dark' },
|
||||
title: 'Schwarz IT — Sensing Engine',
|
||||
meta: [
|
||||
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
||||
{ name: 'theme-color', content: '#081723' },
|
||||
],
|
||||
link: [
|
||||
{ rel: 'preconnect', href: 'https://fonts.googleapis.com' },
|
||||
{ rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' },
|
||||
{
|
||||
name: 'description',
|
||||
content:
|
||||
'PulseCast turns inner-city footfall into a transparent next-week staffing plan for Heilbronn retailers.',
|
||||
rel: 'stylesheet',
|
||||
href: 'https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap',
|
||||
},
|
||||
{ name: 'theme-color', content: '#0f766e' },
|
||||
{ rel: 'icon', type: 'image/svg+xml', href: '/schwarz-it-logo.svg' },
|
||||
],
|
||||
link: [{ rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }],
|
||||
},
|
||||
},
|
||||
nitro: {
|
||||
|
||||
Generated
+578
@@ -17,11 +17,43 @@
|
||||
"sit-onyx": "1.22.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/material-symbols": "^1.2.99",
|
||||
"@nuxt/icon": "^2.6.2",
|
||||
"@types/qrcode": "1.5.5",
|
||||
"autoprefixer": "^10.6.2",
|
||||
"postcss": "^8.5.33",
|
||||
"tailwindcss": "3.4.17",
|
||||
"typescript": "5.9.3",
|
||||
"vitest": "3.2.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@alloc/quick-lru": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.3.0.tgz",
|
||||
"integrity": "sha512-U4+70Pc5ZS9osnCBCE5Jha/ciHM+Yp+CNMNC/7HvYbNRk1Ldd+f7qO65W5qfhu/TCv+/ozljlXXe9Nj8419DMA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/@antfu/install-pkg": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-2.1.0.tgz",
|
||||
"integrity": "sha512-sdg9NxU3zR4Mnawfbc/x6GB5Wf17WYud5qOuEuxXjaKpYpMkISSJEjItGebXJ2bQ4DIcly4NYH23mtkGJjvKUw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"package-manager-detector": "^1.8.0",
|
||||
"tinyexec": "^1.3.1"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
"version": "7.29.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",
|
||||
@@ -974,6 +1006,61 @@
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/@iconify-json/material-symbols": {
|
||||
"version": "1.2.99",
|
||||
"resolved": "https://registry.npmjs.org/@iconify-json/material-symbols/-/material-symbols-1.2.99.tgz",
|
||||
"integrity": "sha512-c7CBI249CmvZDeT7sml1iwKEjsbiB8NUG2Bg1KPd7jnvLQ/8iQv7TQWnqq9a2357SkPjnyVTxxTgkWO2rlUtCw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@iconify/types": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@iconify/collections": {
|
||||
"version": "1.0.764",
|
||||
"resolved": "https://registry.npmjs.org/@iconify/collections/-/collections-1.0.764.tgz",
|
||||
"integrity": "sha512-cjPAaJBUaQMSfPF3pBwB35GHJWrD8u26B6aLx/aWo+abiaPyOHF1j0BJ7zBviiCU3TC1j9Mje2rV+X/9evaIBw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@iconify/types": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@iconify/types": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz",
|
||||
"integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@iconify/utils": {
|
||||
"version": "3.1.7",
|
||||
"resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-3.1.7.tgz",
|
||||
"integrity": "sha512-JZHlwdID+dy+lTgbYC8NEC4zeugqeYsc6jewvzb4c58kHauJn+X7rNwQjxz5p2qSjqaEeQoLkCIQ9v/H4PK0/w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@antfu/install-pkg": "^2.0.1",
|
||||
"@iconify/types": "^2.0.0",
|
||||
"import-meta-resolve": "^4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@iconify/vue": {
|
||||
"version": "5.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@iconify/vue/-/vue-5.0.5.tgz",
|
||||
"integrity": "sha512-O4SHjEKCQ2KTupa0tOd7MIuDdi8Pg6y9fCvsqccX8nYW8Wuy+ZbEgpzw7gZTN3ThyFjY9uo29ZLZ8MQjjMJRBw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@iconify/types": "^2.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/cyberalien"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": ">=3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@ioredis/commands": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.10.0.tgz",
|
||||
@@ -1381,6 +1468,30 @@
|
||||
"devtools-wizard": "cli.mjs"
|
||||
}
|
||||
},
|
||||
"node_modules/@nuxt/icon": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@nuxt/icon/-/icon-2.6.2.tgz",
|
||||
"integrity": "sha512-eNVXbKzj1fmrkzcakkix8Pn/7lpd0I1b7xG0shjrlefr2wWIG3o0DrU9EvvT1BCf9UD33MAzoLF1l2Z99CKoTg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@iconify/collections": "^1.0.755",
|
||||
"@iconify/types": "^2.0.0",
|
||||
"@iconify/utils": "^3.1.7",
|
||||
"@iconify/vue": "^5.0.4",
|
||||
"@nuxt/devtools-kit": "^3.4.4",
|
||||
"@nuxt/kit": "^4.6.3",
|
||||
"consola": "^3.4.2",
|
||||
"fnv1a-64": "^0.1.2",
|
||||
"local-pkg": "^1.2.1",
|
||||
"mlly": "^1.8.2",
|
||||
"ohash": "^2.0.12",
|
||||
"picomatch": "^4.0.7",
|
||||
"std-env": "^4.3.0",
|
||||
"tinyglobby": "^0.2.17",
|
||||
"ufo": "^1.6.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@nuxt/kit": {
|
||||
"version": "4.6.4",
|
||||
"resolved": "https://registry.npmjs.org/@nuxt/kit/-/kit-4.6.4.tgz",
|
||||
@@ -3305,6 +3416,13 @@
|
||||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/any-promise": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
|
||||
"integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/anymatch": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
|
||||
@@ -3362,6 +3480,13 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/arg": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
|
||||
"integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/args-tokenizer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/args-tokenizer/-/args-tokenizer-0.3.0.tgz",
|
||||
@@ -3685,6 +3810,19 @@
|
||||
"require-from-string": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/binary-extensions": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
|
||||
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
@@ -3866,6 +4004,16 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/camelcase-css": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz",
|
||||
"integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-api": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-4.0.0.tgz",
|
||||
@@ -4395,6 +4543,13 @@
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/didyoumean": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
|
||||
"integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/diff": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-9.0.0.tgz",
|
||||
@@ -4410,6 +4565,13 @@
|
||||
"integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/dlv": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz",
|
||||
"integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/dot-prop": {
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-10.2.0.tgz",
|
||||
@@ -5162,6 +5324,17 @@
|
||||
"integrity": "sha512-rKANCbmsJCZ3/q87GTWZ+8MhOvhPLjsScznVtqvBoTu6Tyq8FzdPoBUMl/ZxQXy+/5I+C1vxXwS1jSwmHgmDLQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/import-meta-resolve": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz",
|
||||
"integrity": "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/impound": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/impound/-/impound-1.2.1.tgz",
|
||||
@@ -5224,6 +5397,19 @@
|
||||
"url": "https://github.com/sponsors/brc-dd"
|
||||
}
|
||||
},
|
||||
"node_modules/is-binary-path": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
||||
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"binary-extensions": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.18.0",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.18.0.tgz",
|
||||
@@ -5796,6 +5982,26 @@
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/lilconfig": {
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.5.tgz",
|
||||
"integrity": "sha512-aRAOI9Ia43ygL4o1EOmC/sc/0OFxrm7qcQngiIyWaqVnSnz932ybJ07zyCcgMNGSDP8Yxaf88Xj1zHEXmvQ4SA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antonk52"
|
||||
}
|
||||
},
|
||||
"node_modules/lines-and-columns": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
||||
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/listhen": {
|
||||
"version": "1.10.1",
|
||||
"resolved": "https://registry.npmjs.org/listhen/-/listhen-1.10.1.tgz",
|
||||
@@ -6214,6 +6420,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/mz": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
|
||||
"integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"any-promise": "^1.0.0",
|
||||
"object-assign": "^4.0.1",
|
||||
"thenify-all": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.20",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz",
|
||||
@@ -6661,6 +6879,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/object-hash": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
|
||||
"integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/object-identity": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/object-identity/-/object-identity-0.2.3.tgz",
|
||||
@@ -6934,6 +7172,16 @@
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/pirates": {
|
||||
"version": "4.0.7",
|
||||
"resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz",
|
||||
"integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/pkg-types": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.4.0.tgz",
|
||||
@@ -6997,6 +7245,125 @@
|
||||
"postcss": "^8.5.29"
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-import": {
|
||||
"version": "15.1.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz",
|
||||
"integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"postcss-value-parser": "^4.0.0",
|
||||
"read-cache": "^1.0.0",
|
||||
"resolve": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"postcss": "^8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-js": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.1.0.tgz",
|
||||
"integrity": "sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/postcss/"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"camelcase-css": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12 || ^14 || >= 16"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"postcss": "^8.4.21"
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-load-config": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz",
|
||||
"integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/postcss/"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"lilconfig": "^3.0.0",
|
||||
"yaml": "^2.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"postcss": ">=8.0.9",
|
||||
"ts-node": ">=9.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"postcss": {
|
||||
"optional": true
|
||||
},
|
||||
"ts-node": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-nested": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz",
|
||||
"integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/postcss/"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"postcss-selector-parser": "^6.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"postcss": "^8.2.14"
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-selector-parser": {
|
||||
"version": "6.1.6",
|
||||
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.6.tgz",
|
||||
"integrity": "sha512-BK87/Qgti3DIcgS2PaCVoteFIkjIFvCJBizZDIVSjdlFNg4Jv+SRqbN2JONb/qQUH4ZFqfXYF+izg15W2HVRvA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"util-deprecate": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-value-parser": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
|
||||
@@ -7281,6 +7648,13 @@
|
||||
"destr": "^2.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/read-cache": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.2.tgz",
|
||||
"integrity": "sha512-/peqiBB/n07gQGLsWaHho3WfvUyRscw0gYTsEFMhrIe/nWLkYaf5SbKYjGYqtRV3aPwykJgF2VEMo1ac4bnsGA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/readable-stream": {
|
||||
"version": "4.8.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.8.0.tgz",
|
||||
@@ -8015,6 +8389,39 @@
|
||||
"integrity": "sha512-10ZL5r77LhknxlP1FBiCW+VdnuWOEFLdSS2SKtjyEV+L4qP1hUEIMIZW94LC3jKxRmT/Dj7KkD1mqh/IY6lhKQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/sucrase": {
|
||||
"version": "3.35.1",
|
||||
"resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz",
|
||||
"integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/gen-mapping": "^0.3.2",
|
||||
"commander": "^4.0.0",
|
||||
"lines-and-columns": "^1.1.6",
|
||||
"mz": "^2.7.0",
|
||||
"pirates": "^4.0.1",
|
||||
"tinyglobby": "^0.2.11",
|
||||
"ts-interface-checker": "^0.1.9"
|
||||
},
|
||||
"bin": {
|
||||
"sucrase": "bin/sucrase",
|
||||
"sucrase-node": "bin/sucrase-node"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16 || 14 >=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/sucrase/node_modules/commander": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
|
||||
"integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-color": {
|
||||
"version": "10.2.2",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz",
|
||||
@@ -8051,6 +8458,131 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/tailwindcss": {
|
||||
"version": "3.4.17",
|
||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz",
|
||||
"integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@alloc/quick-lru": "^5.2.0",
|
||||
"arg": "^5.0.2",
|
||||
"chokidar": "^3.6.0",
|
||||
"didyoumean": "^1.2.2",
|
||||
"dlv": "^1.1.3",
|
||||
"fast-glob": "^3.3.2",
|
||||
"glob-parent": "^6.0.2",
|
||||
"is-glob": "^4.0.3",
|
||||
"jiti": "^1.21.6",
|
||||
"lilconfig": "^3.1.3",
|
||||
"micromatch": "^4.0.8",
|
||||
"normalize-path": "^3.0.0",
|
||||
"object-hash": "^3.0.0",
|
||||
"picocolors": "^1.1.1",
|
||||
"postcss": "^8.4.47",
|
||||
"postcss-import": "^15.1.0",
|
||||
"postcss-js": "^4.0.1",
|
||||
"postcss-load-config": "^4.0.2",
|
||||
"postcss-nested": "^6.2.0",
|
||||
"postcss-selector-parser": "^6.1.2",
|
||||
"resolve": "^1.22.8",
|
||||
"sucrase": "^3.35.0"
|
||||
},
|
||||
"bin": {
|
||||
"tailwind": "lib/cli.js",
|
||||
"tailwindcss": "lib/cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tailwindcss/node_modules/chokidar": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
|
||||
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"anymatch": "~3.1.2",
|
||||
"braces": "~3.0.2",
|
||||
"glob-parent": "~5.1.2",
|
||||
"is-binary-path": "~2.1.0",
|
||||
"is-glob": "~4.0.1",
|
||||
"normalize-path": "~3.0.0",
|
||||
"readdirp": "~3.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.10.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/tailwindcss/node_modules/chokidar/node_modules/glob-parent": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
||||
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"is-glob": "^4.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/tailwindcss/node_modules/glob-parent": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
|
||||
"integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"is-glob": "^4.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tailwindcss/node_modules/jiti": {
|
||||
"version": "1.21.7",
|
||||
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz",
|
||||
"integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"jiti": "bin/jiti.js"
|
||||
}
|
||||
},
|
||||
"node_modules/tailwindcss/node_modules/picomatch": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
|
||||
"integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/tailwindcss/node_modules/readdirp": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
||||
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"picomatch": "^2.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tar": {
|
||||
"version": "7.5.23",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.23.tgz",
|
||||
@@ -8124,6 +8656,29 @@
|
||||
"b4a": "^1.6.4"
|
||||
}
|
||||
},
|
||||
"node_modules/thenify": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",
|
||||
"integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"any-promise": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/thenify-all": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
|
||||
"integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"thenify": ">= 3.1.0 < 4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/tiny-invariant": {
|
||||
"version": "1.3.3",
|
||||
"resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz",
|
||||
@@ -8243,6 +8798,13 @@
|
||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/ts-interface-checker": {
|
||||
"version": "0.1.13",
|
||||
"resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
|
||||
"integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.9.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz",
|
||||
@@ -9598,6 +10160,22 @@
|
||||
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/yaml": {
|
||||
"version": "2.9.1",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz",
|
||||
"integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==",
|
||||
"devOptional": true,
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"yaml": "bin.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/eemeli"
|
||||
}
|
||||
},
|
||||
"node_modules/yargs": {
|
||||
"version": "18.2.0",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-18.2.0.tgz",
|
||||
|
||||
@@ -22,7 +22,12 @@
|
||||
"sit-onyx": "1.22.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/material-symbols": "^1.2.99",
|
||||
"@nuxt/icon": "^2.6.2",
|
||||
"@types/qrcode": "1.5.5",
|
||||
"autoprefixer": "^10.6.2",
|
||||
"postcss": "^8.5.33",
|
||||
"tailwindcss": "3.4.17",
|
||||
"typescript": "5.9.3",
|
||||
"vitest": "3.2.4"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
export default {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 151.562 39.63">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: #00c3cd;
|
||||
}
|
||||
|
||||
.cls-2 {
|
||||
fill: #FFFFFF;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g>
|
||||
<path class="cls-1" d="m92.658,11.931c.199.05.266.116.266.266v1.262c0,.183-.066.266-.281.266h-2.988c-.648,0-.98.183-.98.598v.166c0,.315.199.548.797.764l2.125.747c1.412.498,1.744,1.361,1.744,2.49v.266c0,1.926-1.428,2.424-3.537,2.424-1.443,0-2.639-.083-3.436-.166-.217,0-.283-.066-.283-.249v-1.345c0-.183.084-.249.283-.249h3.402c.881,0,1.146-.116,1.146-.564v-.149c0-.315-.184-.531-.914-.78l-2.041-.73c-1.312-.448-1.693-1.461-1.693-2.523v-.315c0-1.776,1.377-2.391,3.768-2.391.715,0,1.66.05,2.623.216Z"/>
|
||||
<path class="cls-1" d="m101.527,11.931c.182.033.281.116.281.332v1.312c0,.183-.1.266-.281.266h-2.707c-1.527,0-1.76.515-1.76,2.606,0,2.075.232,2.606,1.76,2.606h2.707c.182,0,.281.083.281.249v1.328c0,.199-.1.282-.281.315-.896.199-2.092.232-2.707.232-3.535,0-4.217-.946-4.217-4.731s.682-4.731,4.217-4.731c.615,0,1.811.033,2.707.216Z"/>
|
||||
<path class="cls-1" d="m105.579,8.246c.166,0,.25.1.25.266v3.287c.613-.066,1.295-.083,1.76-.083,3.17,0,4,.598,4,3.984v5.13c0,.183-.082.266-.248.266h-1.977c-.166,0-.232-.083-.232-.266v-4.499c0-2.374-.266-2.49-1.793-2.49h-1.494v6.989c0,.183-.082.266-.248.266h-1.992c-.166,0-.232-.083-.232-.266v-12.318c0-.166.082-.266.248-.266h1.959Z"/>
|
||||
<path class="cls-1" d="m126.616,11.799c.166,0,.217.05.199.232l-1.428,7.487c-.281,1.478-.746,1.66-2.273,1.66-1.91,0-2.109-.183-2.441-1.66l-.812-3.686-.814,3.686c-.314,1.478-.531,1.66-2.424,1.66-1.543,0-1.992-.183-2.291-1.66l-1.41-7.487c-.033-.183.033-.232.199-.232h2.107c.1,0,.15.05.184.232l1.145,6.773c.066.282.117.315.266.315.184,0,.217-.033.266-.315l1.545-6.491c.049-.183.133-.232.266-.232h1.941c.117,0,.217.05.25.232l1.543,6.491c.066.282.1.315.266.315.15,0,.217-.033.283-.315l1.145-6.773c.033-.183.066-.232.184-.232h2.107Z"/>
|
||||
<path class="cls-1" d="m135.488,14.571v5.744c0,.266-.066.415-.365.515-1.162.266-2.623.349-3.77.349-2.49,0-3.801-.266-3.834-2.872.033-2.241,1.195-2.723,3.402-2.723h2.109v-.598c0-.797-.498-1.146-1.561-1.146h-3.006c-.182,0-.232-.05-.232-.249v-1.361c0-.199.066-.232.232-.266,1.014-.199,1.977-.249,3.006-.249,3.287,0,4.018,1.062,4.018,2.855Zm-4.367,2.606c-.863,0-1.162.282-1.162.996,0,.797.365,1.013,1.412,1.013.332,0,1.178-.033,1.66-.166v-1.843h-1.91Z"/>
|
||||
<path class="cls-1" d="m142.595,11.898c.184.05.266.116.266.332v1.361c0,.166-.1.249-.281.249h-1.561c-.863,0-1.162.133-1.162.847v6.143c0,.183-.084.266-.25.266h-1.975c-.166,0-.25-.083-.25-.266v-6.773c0-2.092,1.494-2.341,3.006-2.341.48,0,1.627.05,2.207.183Z"/>
|
||||
<path class="cls-1" d="m151.064,11.799c.184,0,.283.083.283.249v1.129c0,.133-.051.216-.117.315l-4.084,5.479h4.135c.182,0,.281.083.281.249v1.61c0,.183-.1.266-.281.266h-7.404c-.199,0-.299-.083-.299-.266v-1.079c0-.116.033-.199.115-.315l4.217-5.562h-3.852c-.199,0-.281-.083-.281-.249v-1.577c0-.166.082-.249.281-.249h7.006Z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="cls-1" d="m89.023,26.527c.166,0,.249.083.249.266v12.318c0,.183-.083.266-.249.266h-2.108c-.166,0-.249-.083-.249-.266v-12.318c0-.183.083-.266.249-.266h2.108Z"/>
|
||||
<path class="cls-1" d="m101.011,26.527c.166,0,.266.083.266.249v1.776c0,.166-.1.249-.266.249h-3.47v10.31c0,.183-.083.266-.249.266h-2.108c-.166,0-.249-.083-.249-.266v-10.31h-3.47c-.166,0-.249-.083-.249-.249v-1.776c0-.166.083-.249.249-.249h9.546Z"/>
|
||||
</g>
|
||||
<path class="cls-1" d="m10.94,11.034c1.754,0,4.836,0,6.59,0,.503,0,.555.303.355.85-2.424,6.661-7.273,19.982-9.697,26.643-.199.548-.542.85-1.134.85-1.754,0-4.836,0-6.59,0-.503,0-.555-.303-.355-.85,2.424-6.661,7.273-19.982,9.697-26.643.199-.548.542-.85,1.134-.85Z"/>
|
||||
<g>
|
||||
<path class="cls-2" d="m40.033,11.439c.607.152.811.354.811.81v3.847c0,.557-.203.81-.861.81h-9.109c-1.975,0-2.986.557-2.986,1.822v.506c0,.962.607,1.67,2.43,2.328l6.479,2.278c4.301,1.518,5.314,4.15,5.314,7.592v.81c0,5.871-4.354,7.39-10.781,7.39-4.404,0-8.047-.253-10.477-.506-.658,0-.861-.202-.861-.759v-4.1c0-.557.254-.759.861-.759h10.375c2.684,0,3.492-.354,3.492-1.721v-.456c0-.962-.557-1.62-2.783-2.379l-6.227-2.227c-3.998-1.367-5.162-4.454-5.162-7.693v-.962c0-5.416,4.201-7.288,11.49-7.288,2.176,0,5.061.152,7.996.658Z"/>
|
||||
<path class="cls-2" d="m54.714,3.796c0,2.531-1.418,3.847-4.15,3.847s-4.201-1.316-4.201-3.847c0-2.48,1.467-3.796,4.201-3.796s4.15,1.316,4.15,3.796Zm-1.164,7.238c.506,0,.758.253.758.759v26.774c0,.557-.252.81-.758.81h-5.973c-.506,0-.76-.253-.76-.81V11.793c0-.506.254-.759.76-.759h5.973Z"/>
|
||||
<path class="cls-2" d="m68.835,3.189c.506-.152.811.202.811.759v7.238h4.656c.557,0,.859.253.859.759v4.049c0,.506-.303.759-.859.759h-4.656v13.818c0,2.176.76,2.581,2.986,2.581h2.074c.607,0,.861.202.861.759v4.302c0,.607-.254.86-.811.962-1.771.354-3.188.456-4.303.456-4.352,0-8.299-.152-8.299-6.529v-16.348h-2.986c-.557,0-.811-.253-.811-.759v-4.049c0-.506.254-.759.811-.759h2.986v-5.618c0-.506.201-.708.707-.81l5.973-1.569Z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
@@ -0,0 +1,51 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
export default {
|
||||
darkMode: 'class',
|
||||
content: ['./app/**/*.{vue,js,ts}'],
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
'dark-bg': '#081723',
|
||||
'dark-card': '#0e2233',
|
||||
'dark-surface': '#132b40',
|
||||
'dark-border': '#1e3a52',
|
||||
'dark-text': '#FFFFFF',
|
||||
'dark-muted': '#94A3B8',
|
||||
'dark-accent': '#00C3CD',
|
||||
},
|
||||
borderRadius: {
|
||||
DEFAULT: '0.25rem',
|
||||
lg: '0.5rem',
|
||||
xl: '0.75rem',
|
||||
full: '9999px',
|
||||
},
|
||||
spacing: {
|
||||
'space-xl': '1.5rem',
|
||||
'space-2xl': '2rem',
|
||||
'space-xs': '0.25rem',
|
||||
gutter: '1rem',
|
||||
margin: '1rem',
|
||||
'margin-desktop': '2rem',
|
||||
'gutter-desktop': '1.5rem',
|
||||
'space-sm': '0.5rem',
|
||||
'space-lg': '1rem',
|
||||
'space-md': '0.75rem',
|
||||
},
|
||||
fontFamily: {
|
||||
'headline-lg': ['Inter'],
|
||||
'body-sm': ['Inter'],
|
||||
'headline-xl': ['Inter'],
|
||||
'tabular-stat-md': ['Inter'],
|
||||
'body-md': ['Inter'],
|
||||
'tabular-stat-lg': ['Inter'],
|
||||
'headline-md': ['Inter'],
|
||||
'headline-sm': ['Inter'],
|
||||
'body-lg': ['Inter'],
|
||||
'label-md': ['Inter'],
|
||||
'label-sm': ['Inter'],
|
||||
'headline-xl-mobile': ['Inter'],
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
||||
Reference in new issue
Block a user