Compare commits

...

10 Commits

Author SHA1 Message Date
075508413e logbook page unauthenticated alert 2026-04-26 17:06:09 -05:00
56b07d64a9 Merge branch 'main' into 126-all-logs-shown-when-unauthenticated 2026-04-18 11:35:53 -07:00
928a4dae43 updating api log interceptor 2026-04-18 13:33:32 -05:00
a7a9f01fd9 126 all logs shown when unauthenticated (#129)
* fixing all logs showing when user is unauthenticated

* updating api log interceptor

* updating api log interceptor
2026-04-18 11:09:50 -07:00
e345898341 Merge branch '126-all-logs-shown-when-unauthenticated' of https://github.com/noahspannbauer/noahspan-flying into 126-all-logs-shown-when-unauthenticated 2026-04-18 13:05:35 -05:00
a6af3c2229 updating api log interceptor 2026-04-18 13:05:11 -05:00
a367b517db updating api log interceptor (#128)
* fixing all logs showing when user is unauthenticated

* updating api log interceptor
2026-04-16 06:31:28 -07:00
b8f708fd6d Merge branch 'main' into 126-all-logs-shown-when-unauthenticated 2026-04-16 08:30:29 -05:00
1c46f58afc updating api log interceptor 2026-04-16 08:27:33 -05:00
fa7a39e48a fixing all logs showing when user is unauthenticated 2026-04-07 20:41:08 -05:00
2 changed files with 5 additions and 5 deletions

View File

@@ -63,7 +63,7 @@ export class LogInterceptor implements NestInterceptor {
return { return {
entities: logs, entities: logs,
total: data.total, total: logs.length,
hasNextPage: false hasNextPage: false
}; };
} else { } else {

View File

@@ -413,7 +413,7 @@ const Logbook: React.FC<unknown> = () => {
setColumnVisibility(columnVisibility) setColumnVisibility(columnVisibility)
dispatch({ type: 'SET_ENTRIES', payload: { entries: entries, totalEntries: response.data.total }}); dispatch({ type: 'SET_ENTRIES', payload: { entries: entries, totalEntries: response.data.total }});
if (!isUserLoggedIn && response.data.length >= 5) { if (!isUserLoggedIn && response.data.entities.length >= 5) {
dispatch({ type: 'SET_ALERT', payload: { severity: 'info', message: 'A limited number of log entries displayed. Sign in to view all log entries.'}}) dispatch({ type: 'SET_ALERT', payload: { severity: 'info', message: 'A limited number of log entries displayed. Sign in to view all log entries.'}})
} else { } else {
dispatch({ type: 'SET_ALERT', payload: undefined}) dispatch({ type: 'SET_ALERT', payload: undefined})
@@ -528,8 +528,8 @@ const Logbook: React.FC<unknown> = () => {
}, [state.totalEntries, state.pagination?.pageSize]) }, [state.totalEntries, state.pagination?.pageSize])
useEffect(() => { useEffect(() => {
console.log(state.pagination) console.log(state.alert)
}, [state.pagination]) }, [state.alert])
return ( return (
<> <>
@@ -554,7 +554,7 @@ const Logbook: React.FC<unknown> = () => {
onClose={() => onClose={() =>
dispatch({ type: 'SET_ALERT', payload: undefined }) dispatch({ type: 'SET_ALERT', payload: undefined })
} }
severity={'info'} severity={state.alert.severity}
> >
{state.alert.message} {state.alert.message}
</Alert> </Alert>