Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

[Back] OrderPostClose / Cancel: string - [Front] useOrder replace IOrderRef | useSWR refresh | mutate #109

Merged
merged 3 commits into from
Feb 19, 2024

Conversation

Aloento
Copy link
Owner

@Aloento Aloento commented Feb 19, 2024

No description provided.

Updated various methods and components related to order handling. The return type of `OrderPostClose` and `OrderPostCancel` methods in `Post.cs` and `useClose` and `useCancel` methods in `OrderPost` and `AdminOrderPost` classes have been changed from `Task<bool>` to `Task<string>`. Renamed `OrderDeleteCancel` method in `Delete.cs` to `OrderDeleteCancelled` and updated `useDelete` method in `OrderDelete` class to invoke the renamed method. Added a `refresh` method to `useSWR` function in `useSWR.ts` to clear cache or remove item from local storage before refreshing data. Removed `Order`, `Status`, and `Refresh` props from `OrderDetailDrawer`, `OrderInfo`, `AdminOrderAction`, and `OrderAction` components in `Drawer.tsx`, `Info.tsx`, and `Action.tsx` respectively, and replaced them with `useOrder` hook. Updated `useItems` method in `OrderGet` class in `Get.ts` to fetch product photo only if `admin` parameter is not true.
@Aloento Aloento self-assigned this Feb 19, 2024
@Aloento Aloento merged commit 842939a into master Feb 19, 2024
1 check passed
@Aloento Aloento deleted the Dev branch February 19, 2024 16:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant