Added Debug Log and info pickup older 6month + hygiene crt
This commit is contained in:
30
src/App.js
30
src/App.js
@@ -23,6 +23,7 @@ import ConfirmationDialog from './components/ConfirmationDialog';
|
||||
import StoreSyncOverlay from './components/StoreSyncOverlay';
|
||||
import RangePickerModal from './components/RangePickerModal';
|
||||
import StoreWatchPage from './components/StoreWatchPage';
|
||||
import DebugPage from './components/DebugPage';
|
||||
|
||||
function App() {
|
||||
const [credentials, setCredentials] = useState({ email: '', password: '' });
|
||||
@@ -484,6 +485,15 @@ function App() {
|
||||
);
|
||||
};
|
||||
|
||||
const handleToggleDormantSkip = (entryId) => {
|
||||
setIsDirty(true);
|
||||
setConfig((prev) =>
|
||||
prev.map((item) =>
|
||||
item.id === entryId ? { ...item, skipDormantCheck: !item.skipDormantCheck } : item
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
const handleWeekdayChange = (entryId, value) => {
|
||||
setIsDirty(true);
|
||||
setConfig((prev) =>
|
||||
@@ -623,6 +633,7 @@ function App() {
|
||||
active: false,
|
||||
checkProfileId: true,
|
||||
onlyNotify: false,
|
||||
skipDormantCheck: false,
|
||||
hidden: false
|
||||
}
|
||||
];
|
||||
@@ -732,6 +743,7 @@ function App() {
|
||||
onToggleActive={handleToggleActive}
|
||||
onToggleProfileCheck={handleToggleProfileCheck}
|
||||
onToggleOnlyNotify={handleToggleOnlyNotify}
|
||||
onToggleDormantSkip={handleToggleDormantSkip}
|
||||
onWeekdayChange={handleWeekdayChange}
|
||||
weekdays={weekdays}
|
||||
onRangePickerRequest={setActiveRangePicker}
|
||||
@@ -778,12 +790,12 @@ function App() {
|
||||
<Route
|
||||
path="/store-watch"
|
||||
element={
|
||||
<StoreWatchPage
|
||||
authorizedFetch={authorizedFetch}
|
||||
knownStores={stores}
|
||||
userLocation={userLocationWithLabel}
|
||||
locationLoading={preferencesLoading}
|
||||
locationError={preferencesError}
|
||||
<StoreWatchPage
|
||||
authorizedFetch={authorizedFetch}
|
||||
knownStores={stores}
|
||||
userLocation={userLocationWithLabel}
|
||||
locationLoading={preferencesLoading}
|
||||
locationError={preferencesError}
|
||||
notificationPanelOpen={notificationPanelOpen}
|
||||
onToggleNotificationPanel={() => setNotificationPanelOpen((prev) => !prev)}
|
||||
notificationProps={sharedNotificationProps}
|
||||
@@ -791,6 +803,12 @@ function App() {
|
||||
/>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/debug"
|
||||
element={
|
||||
session?.isAdmin ? <DebugPage authorizedFetch={authorizedFetch} /> : <AdminAccessMessage />
|
||||
}
|
||||
/>
|
||||
<Route path="/admin" element={adminPageContent} />
|
||||
<Route path="*" element={<Navigate to="/" replace />} />
|
||||
</Routes>
|
||||
|
||||
Reference in New Issue
Block a user