diff --git a/src/components/StoreWatchPage.js b/src/components/StoreWatchPage.js
index 75d72b3..dd7fdd2 100644
--- a/src/components/StoreWatchPage.js
+++ b/src/components/StoreWatchPage.js
@@ -240,7 +240,7 @@ const StoreWatchPage = ({ authorizedFetch, knownStores = [], userLocation }) =>
const storeId = String(store.id || store.storeId);
const existing = prev.find((entry) => entry.storeId === storeId);
if (checked) {
- if (existing) {
+ if (store.isOpen || existing) {
return prev;
}
setDirty(true);
@@ -323,9 +323,26 @@ const StoreWatchPage = ({ authorizedFetch, knownStores = [], userLocation }) =>
),
cell: ({ row }) => (
-
-
{row.original.name}
-
#{row.original.id}
+
+
+
+ {row.original.name}
+
+
#{row.original.id}
+
+
+
+
),
sortingFn: 'alphanumeric',
@@ -380,7 +397,7 @@ const StoreWatchPage = ({ authorizedFetch, knownStores = [], userLocation }) =>
const label = value
? new Date(value).toLocaleDateString('de-DE', { year: 'numeric', month: '2-digit', day: '2-digit' })
: '–';
- return
{label}
;
+ return
{label}
;
},
sortingFn: (rowA, rowB, columnId) => {
const a = rowA.getValue(columnId);
@@ -541,6 +558,7 @@ const StoreWatchPage = ({ authorizedFetch, knownStores = [], userLocation }) =>
cell: ({ row }) => {
const store = row.original;
const checked = watchedIds.has(String(store.id));
+ const disabled = store.isOpen;
return (
className="h-5 w-5"
checked={checked}
onChange={(event) => handleToggleStore(store, event.target.checked)}
+ disabled={disabled}
+ title={
+ disabled ? 'Store ist bereits offen – Überwachung nicht verfügbar.' : undefined
+ }
/>
);