This repository has been archived by the owner on Mar 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
[Back] Export divider | StockChange | IsArchived | Split ProductGetComboList - [Front] stale-while-revalidate #106
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…s within `Post.cs`. In `AdminHub`, the `OrderPostClose` method has been updated to include `OrderCombos` and their associated `Combo` objects in the order fetch query. A new condition has been added to check if the order status is `Pending` or `Processing`, and if so, the stock of each `Combo` in the `OrderCombos` is increased by the quantity of that `Combo` in the order. The order status is now set to `Finished` regardless of its previous status. In `ShopHub`, the method has been updated to increase the stock of each `Combo` in the `OrderCombos` regardless of the order status. The order status is now set to `Returning` if it was `Shipping`, and `Cancelled` otherwise. The lines of code that previously increased the stock of each `Combo` in the `OrderCombos` and returned the result of `SaveChangesAsync` have been removed. List of changes: 1. In `AdminHub` class within `Post.cs`, the `OrderPostClose` method has been updated: - The version in the author's remarks has been updated from 1.1.0 to 1.2.0. - The query to fetch the order now includes `OrderCombos` and their associated `Combo` objects. - A new condition has been added to check if the order status is either `Pending` or `Processing`. If it is, the stock of each `Combo` in the `OrderCombos` is increased by the quantity of that `Combo` in the order. - The order status is now set to `Finished` regardless of its previous status. 2. In the `ShopHub` class within `Post.cs`, the method has been updated: - The stock of each `Combo` in the `OrderCombos` is now increased regardless of the order status. - The order status is now set to `Returning` if it was `Shipping`, and `Cancelled` otherwise. - The lines of code that previously increased the stock of each `Combo` in the `OrderCombos` and returned the result of `SaveChangesAsync` have been removed.
… product combos in the code. The `Entity.cs` file now filters out archived products, types, variants, and combos in the `ShopHub` class, and a new method `ComboEntity` has been added. The `ProductGetComboList` method in `Get.cs` has been altered to return a list of combo IDs instead of combo details, and it now also filters out archived combos. In `index.tsx` and `RadioList.tsx`, the method `Hub.Product.Get.Combo` has been replaced with `Hub.Product.Get.ComboItem`. New type `Combo` and a new method `Combo` have been added to the `ProductData` class in `Data.ts`. The `Combo` method in `ProductGet` class in `Get.ts` has been renamed to `ComboItem` and modified to fetch combo details using the new `Combo` method in `ProductData` class. The method now also handles errors when a type or variant is not found. The `ComboList` method in `ProductGet` class in `Get.ts` has been modified to return a list of combo IDs instead of combo details. Lastly, the `GetTimeCache` method in `SignalR.ts` has been marked as deprecated. List of changes: 1. `Entity.cs` now filters out archived products, types, variants, and combos in the `ShopHub` class, and a new method `ComboEntity` has been added. 2. `ProductGetComboList` method in `Get.cs` now returns a list of combo IDs and filters out archived combos. 3. `Hub.Product.Get.Combo` method has been replaced with `Hub.Product.Get.ComboItem` in `index.tsx` and `RadioList.tsx`. 4. New type `Combo` and a new method `Combo` have been added to the `ProductData` class in `Data.ts`. 5. `Combo` method in `ProductGet` class in `Get.ts` has been renamed to `ComboItem` and fetches combo details using the new `Combo` method in `ProductData` class. It also handles errors when a type or variant is not found. 6. `ComboList` method in `ProductGet` class in `Get.ts` now returns a list of combo IDs instead of combo details. 7. `GetTimeCache` method in `SignalR.ts` has been marked as deprecated.
…f `Cell` objects named `cells`, the modification of the `timestamp` row to append the entire `cells` list, and the alteration of the `data` list in the `record` processing section to contain `Cell` objects instead of `OpenXmlElement` objects. Additionally, the `data` list now adds a new `Cell` object containing a dash ("-") when the `record` does not contain any comments. 1. The `ExportOrder` method in the `AdminHub` class has been updated with new author information and a version number change from `1.0.0` to `1.1.0`. 2. A new list of `Cell` objects named `cells` has been added, initialized with a `Cell` object containing the string "AwaiShop", followed by five `Cell` objects containing a space character, and a `Cell` object containing a timestamp string. 3. The `timestamp` row now appends the entire `cells` list instead of a single `Cell` object. A new `divider` row has been added, which appends a `Cell` object containing a space character. 4. The `data` list in the `record` processing section now contains `Cell` objects instead of `OpenXmlElement` objects. The `Cell` objects are created using the new keyword without specifying the class name, a feature of C# 9.0 and later. 5. The `data` list now adds new `Cell` objects using the new keyword without specifying the class name. This change has been applied to all instances where a new `Cell` object is added to the `data` list. 6. The `data` list now adds a new `Cell` object containing a dash ("-") when the `record` does not contain any comments. This change has been applied to the `else` branch of the `if` statement that checks for comments in the `record`.
…onCache` method in the `SignalR` class for improved readability and maintainability. This includes the encapsulation of the cache checking and updating logic into a new `update` function. The `update` function now handles different responses from the `Invoke` method and performs appropriate actions. The `GetVersionCache` method has also been updated to use the `update` function under certain conditions. Additionally, a new `setCache` function has been introduced to set the cache with a given value, which is now used in the `update` function instead of directly calling the `Shared.Set` method. List of changes: 1. Refactored `GetVersionCache` method in `SignalR` class for improved readability and maintainability. 2. Updated version number in class documentation from `0.3.3` to `1.0.0`. 3. Encapsulated cache checking and updating logic into new `update` function. 4. `update` function now handles different responses from `Invoke` method. 5. Updated `GetVersionCache` method to use `update` function under certain conditions. 6. Introduced new `setCache` function to set cache with a given value. 7. `setCache` function is now used in `update` function instead of directly calling `Shared.Set` method.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.