fix: buttons not working

This commit is contained in:
2025-11-10 11:22:58 +01:00
parent bf160febee
commit 6df5cb35de
2 changed files with 26 additions and 2 deletions

View File

@@ -39,6 +39,7 @@ function App() {
const [confirmDialog, setConfirmDialog] = useState({ open: false, resolve: null });
const [activeRangePicker, setActiveRangePicker] = useState(null);
const [notificationPanelOpen, setNotificationPanelOpen] = useState(false);
const [focusedStoreId, setFocusedStoreId] = useState(null);
const minSelectableDate = useMemo(() => startOfDay(new Date()), []);
const weekdays = ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'];
@@ -886,6 +887,7 @@ function App() {
const storeId = String(store.id);
const existing = configMap.get(storeId);
if (existing && !existing.hidden) {
setFocusedStoreId(storeId);
return;
}
const confirmed = await askConfirmation({
@@ -927,6 +929,7 @@ function App() {
},
message
);
setFocusedStoreId(storeId);
};
const handleAdminSettingChange = (field, value, isNumber = false) => {
@@ -1152,6 +1155,8 @@ function App() {
onHideEntry={hideEntry}
onDeleteEntry={deleteEntry}
canDelete={Boolean(session?.isAdmin)}
focusedStoreId={focusedStoreId}
onClearFocus={() => setFocusedStoreId(null)}
/>
);