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

[Back] Use TypeId | ProductGetTypes | ProductGetVariants | ProductPatchType | GuestVisit - [Front] AdminProductComboDetail | AdminProductNewCombo | useVariants | useTypes | useTypeList | useVariantName | useType | useVariant #113

Merged
merged 6 commits into from
Mar 2, 2024

Conversation

Aloento
Copy link
Owner

@Aloento Aloento commented Mar 2, 2024

No description provided.

Aloento added 6 commits March 2, 2024 19:39
Updated `LoggerExtension.cs` to include a new logging method for guest visits and incremented its version to 0.2.0. `ShopHub.cs` now calls this new logging method when a guest visits the shop and its version has been updated to 0.1.1. The application version in `package.json` has been updated from 1.4.0 to 1.4.5. Marked the `refreshVariant` function in `index.tsx` as deprecated.
Updated the README.md file to include a project description and requirements. Modified the import statement in Ship.tsx to include useEffect from the 'react' library. Updated the version annotation in the Shipment function. Changed the initial useState hook for 'track' to an empty string and added a useEffect hook to update 'track' state when 'order' changes.
In this commit, several changes have been made to the CRUD files. In `Delete.cs`, `Get.cs`, `Patch.cs`, and `Post.cs`, methods have been updated to take or return different parameters or types. Specifically, `ProductDeleteType`, `ProductPatchType`, `ProductGetVariants`, `ProductPostVariant`, and `ProductPostType` have been modified. The query filters in `Delete.cs` and `Patch.cs` have also been updated. A new method, `ProductGetTypes`, has been added to `Get.cs`. Lastly, version numbers in the comments have been updated across all files.
Several classes in product-related files have been updated. In `Delete.ts`, `Get.ts`, `Patch.ts`, `Post.ts`, and `Data.ts`, methods like `useVariant`, `useType`, and `useRequest` have been refactored to take in different parameters. The cache time in `useList` method in `Get.ts` has been changed from 1 minute to 5 seconds. Deprecated `Variants` method in `Get.ts` has been replaced with `useVariants`, `useTypes`, and `useTypeList`. The `mutate` function in `Patch.ts` and `Post.ts` is used to update the name or list of variants or types. The `Variant` type in `Data.ts` now includes `TypeIds`. New methods `useType` and `useVariant` have been added in `Data.ts` to get the type and variant data. The `usePhotoList` method in `Get.ts` now takes an array of numbers as default parameters.
Full Summary:
This commit includes significant updates to the user interface, enhancing the overall user experience. Additionally, several bugs in the login module have been identified and fixed. These bugs were causing login failures for some users. The changes should improve the stability and reliability of the login process.
Replaced `useRequest` hook with `useAsyncEffect` in `Detail.tsx`, `New.tsx`, `Delete.tsx`, and `index.tsx` for better handling of asynchronous operations. Added `Hub` import from `~/ShopNet` to several files. Introduced `IUpdateComboItem` interface in `Detail.tsx` and `New.tsx`, extending `IVariantItem` interface. Moved `IVariantItem` interface from `index.tsx` to `New.tsx`. Updated functions in `Detail.tsx` and `New.tsx` to use new hook and interface. Updated `AdminProductVariantDelete` function in `Delete.tsx` to use `useVariant` hook. Refactored `AdminProductGet` class in `Get.ts` by removing `Variants` method and adding `Types` method. Removed `TypeIds` property from `Variant` type in `Data.ts`.
@Aloento Aloento self-assigned this Mar 2, 2024
@Aloento Aloento merged commit 838d284 into master Mar 2, 2024
1 check passed
@Aloento Aloento deleted the Dev branch March 2, 2024 22:54
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