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

[Front] ShopCount | Setting Tips - [Back] Stock Change #104

Merged
merged 4 commits into from
Feb 7, 2024
Merged

Conversation

Aloento
Copy link
Owner

@Aloento Aloento commented Feb 7, 2024

No description provided.

…` class in the `Export.cs` file, and updates to the `ShopHub` class in both the `Post.cs` and `Get.cs` files.

In the `AdminHub` class, the `shared` method has been refactored to use a local variable `table` instead of directly using `sharedStringTablePart.SharedStringTable` in the `foreach` loop and `AppendChild` and `Save` methods. This change likely improves the readability and maintainability of the code.

In the `ShopHub` class in the `Post.cs` file, the `OrderPostNew` method has been updated to check if the quantity of an item is greater than a `Limit` constant or less than 1, and the `OrderPostCancel` method has been updated to include `OrderCombos` and `Combo` in the query and increase the stock by the quantity of each order combo when an order is cancelled. These changes likely improve the functionality and accuracy of the order posting and cancellation processes.

In the `ShopHub` class in the `Get.cs` file, a new constant `Limit` has been added and the `ProdGetLimit` method has been updated to return this constant instead of the number 3. This change likely makes the code more flexible and easier to maintain.

Changes:
1. Refactored `shared` method in `AdminHub` class in `Export.cs` file.
2. Updated `OrderPostNew` and `OrderPostCancel` methods in `ShopHub` class in `Post.cs` file.
3. Added new constant `Limit` and updated `ProdGetLimit` method in `ShopHub` class in `Get.cs` file.
…"Name", "Phone", and "Address" fields in the `Setting` function, and the update of the version annotation in the same function. The tooltips, which were added to the import statement in `Setting.tsx`, provide users with additional information about the expected input for each field.

Changes:
1. The import statement in `Setting.tsx` was updated to include `Tooltip` from `@fluentui/react-components`. This allows the use of tooltips in the `Setting` function (Code Change Reference: `Setting.tsx`).
2. The version annotation in the `Setting` function was updated from `0.6.0` to `0.7.0`. This reflects the new version of the function after the changes (Code Change Reference: `Setting` function).
3. The `Field` components for "Name", "Phone", and "Address" in the `Setting` function were wrapped in `Tooltip` components. These tooltips provide additional information to the user about the expected input for each field (Code Change Reference: `Setting` function).
…ue of items in a cart. The code in `Columns.tsx` and `Quantity.tsx` has been updated to include a validation check before setting the quantity. This check ensures that the input value is a valid number within the allowed range and different from the current quantity. Additionally, the version number in the `Columns.tsx` file has been updated.

Changes:
1. The code in `Columns.tsx` and `Quantity.tsx` now includes a validation check for the quantity value of items in a cart. This check prevents the quantity from being updated if the input value is not a number, less than 1, greater than the maximum allowed quantity, or equal to the current quantity. If none of these conditions are met, the quantity is set to the input value.
2. The version number in `Columns.tsx` has been updated from 0.3.1 to 0.4.0.
@Aloento Aloento self-assigned this Feb 7, 2024
@Aloento Aloento merged commit db6b3ae into master Feb 7, 2024
1 check passed
@Aloento Aloento deleted the Dev branch February 7, 2024 19:39
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