14 Commits

Author SHA1 Message Date
c67bcc5d07 fixed: update user role change 2024-09-10 11:43:25 +08:00
327d8de438 feat: get user role from api
```
feat: Add `roles` field to `AuthContext` and update `AuthProvider` to handle new state

Fixes a bug where the `roles` field was missing from the `AuthContext` and `AuthProvider`. This adds the `roles` field to the `AuthContext` and updates the `AuthProvider` to properly handle the new state.

BREAKING: The `AuthContext` and `AuthProvider` now include a `roles` field. If your application relies on the old structure, you may need to update your code accordingly.

---

feat: Add `roles` field to `AuthContext`

```
feat: Add `roles` field to `AuthContext`

Add the `roles` field to the `AuthContext` to better represent the user's roles in the authentication context.

---

feat: Update `AuthProvider` to handle new state

```
feat: Update `AuthProvider` to handle new state

Update the `AuthProvider` to handle the new `roles` field in the `AuthContext`. This ensures that the `AuthProvider` can properly pass the `roles` field to its children.

---

refactor: Remove unnecessary comments and code from `AuthProvider`

```
refactor: Remove unnecessary comments and code from `AuthProvider`

Remove unnecessary comments and code from the `AuthProvider` to clean up the codebase and improve readability.

---

style: Fix trailing commas in object literals

```
style: Fix trailing commas in object literals

Fix trailing commas in object literals to adhere to the recommended JavaScript style guide.

---

test: Update test cases to reflect changes in `AuthContext` and `AuthProvider`

```
test: Update test cases to reflect changes in `AuthContext` and `AuthProvider`

Update test cases to properly test the changes made to the `AuthContext` and `AuthProvider`. This ensures that the changes have not introduced any regressions.

---

docs: Update documentation to reflect changes in `AuthContext` and `AuthProvider`

```
docs: Update documentation to reflect changes in `AuthContext` and `AuthProvider`

Update the documentation to reflect the changes made to the `AuthContext` and `AuthProvider`. This ensures that developers are aware of the new features and can properly use the updated components.
```
2024-08-09 21:08:01 +08:00
770f320372 feat: add logout 2024-08-02 21:50:27 +08:00
b13f61b81a update permission 2024-07-27 00:16:31 +08:00
2545bbb3bc Display a notification when the request fails 2024-07-22 14:15:11 +08:00
08e0d8cbec update user role and save to localstorage 2024-07-13 15:21:39 +08:00
71b6f776c9 update 2024-07-06 18:02:42 +08:00
d49ce2b815 add role switch only for test 2024-06-24 22:10:14 +08:00
aabbd75a2f update bill query and pay 2024-06-05 00:10:25 +08:00
4d917a7e41 update api fields and add sso 2024-06-02 01:18:01 +08:00
295d6c75e9 add bill list component 2024-05-20 16:09:43 +08:00
44095afbc7 完善后台页面 2024-05-19 23:22:54 +08:00
7d022bc4fa add pdf receipt demo 2024-05-19 22:22:45 +08:00
e7857c904d init commit 2024-05-19 17:43:52 +08:00