This repository has been archived by the owner on Mar 24, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The most significant changes involve the refactoring of the `ProductP…
…atchCategory` method in `Patch.cs` and the modification of the `AdminProductCategory` function in `Category.tsx`. The `ProductPatchCategory` method now includes a more comprehensive check and handling of product categories, including the creation of new categories, checking if the current category is in use, and deleting unused categories. The `AdminProductCategory` function has been updated to include a check for the truthiness of `cate` before calling the `run` function. Changes: 1. Refactored the `ProductPatchCategory` method in `Patch.cs` to include a more comprehensive check and handling of product categories. The method now checks if the new category exists, creates a new one if it doesn't, checks if the product's current category is the same as the new one, checks if the current category is in use if they are not the same and the current category is not null, deletes the current category if it's not in use, assigns the new category to the product, and saves the changes to the database. 2. Modified the `AdminProductCategory` function in `Category.tsx` to check if `cate` is truthy before calling the `run` function. If `cate` is falsy, the function does nothing. 3. Imported the `Subtitle2` component from `@fluentui/react-components` in `Card.tsx` and updated the `GalleryCard` function to wrap the `Link` component inside a `Subtitle2` component in the `CardFooter`. 4. Updated the `version` in the author comment for the `GalleryCard` function in `Card.tsx` from `0.1.4` to `0.1.5`.
- Loading branch information