@autobusal/providers 1.0.59 → 1.0.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Queries/apiClient.ts +1 -3
- package/package.json +1 -1
- package/stores/page.ts +15 -0
- package/types/account.ts +17 -0
- package/types/agents.ts +1 -0
- package/types/operators.ts +1 -0
- package/types/users.ts +1 -1
- package/types/visitors.ts +14 -0
package/Queries/apiClient.ts
CHANGED
|
@@ -27,9 +27,7 @@ apiClient.interceptors.response.use(response => (
|
|
|
27
27
|
if (error.response) {
|
|
28
28
|
// if we have a 401, we go to the logout page
|
|
29
29
|
if (error.response.status === 401) {
|
|
30
|
-
|
|
31
|
-
// window.location.href = '/account/logout#redirect';
|
|
32
|
-
// }
|
|
30
|
+
window.location.href = '/account/logout';
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
// if we have a 422 error, we display the message
|
package/package.json
CHANGED
package/stores/page.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { create } from 'zustand';
|
|
2
|
+
|
|
3
|
+
export interface PageStore {
|
|
4
|
+
current: string
|
|
5
|
+
save: (newPage: string) => void
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const usePageStore = create<PageStore>((set) => ({
|
|
9
|
+
current: '',
|
|
10
|
+
save: (newPage) => set(() => ({
|
|
11
|
+
current: newPage
|
|
12
|
+
}))
|
|
13
|
+
}));
|
|
14
|
+
|
|
15
|
+
export default usePageStore;
|
package/types/account.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AgentData } from './agents';
|
|
2
|
+
import { OperatorData } from './operators';
|
|
3
|
+
|
|
4
|
+
export interface TransactionData {
|
|
5
|
+
id: number
|
|
6
|
+
public_display: string[]
|
|
7
|
+
from?: OperatorData | AgentData
|
|
8
|
+
to?: OperatorData | AgentData
|
|
9
|
+
amount_display: string
|
|
10
|
+
paid_date: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface NotificationData {
|
|
14
|
+
id: number
|
|
15
|
+
title: string
|
|
16
|
+
content: string
|
|
17
|
+
}
|
package/types/agents.ts
CHANGED
package/types/operators.ts
CHANGED
package/types/users.ts
CHANGED