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

[APP] ExportOrder #101

Merged
merged 3 commits into from
Feb 4, 2024
Merged

[APP] ExportOrder #101

merged 3 commits into from
Feb 4, 2024

Conversation

Aloento
Copy link
Owner

@Aloento Aloento commented Feb 4, 2024

No description provided.

…ference `DocumentFormat.OpenXml` in the `SoarCraft.AwaiShop.csproj` file and the addition of a new namespace `SoarCraft.AwaiShop.AdminHub` in the `Export.cs` file. The new namespace includes several `using` directives and a new `AdminHub` class with a method for creating an Excel document.

1. The `SoarCraft.AwaiShop.csproj` file now includes a new package reference `DocumentFormat.OpenXml` with version `3.0.1`. This package is likely to be used for manipulating Open XML documents.

2. The `Export.cs` file now includes a new namespace `SoarCraft.AwaiShop.AdminHub`. This namespace includes several `using` directives for `DocumentFormat.OpenXml`, `DocumentFormat.OpenXml.Packaging`, `DocumentFormat.OpenXml.Spreadsheet`, and `Microsoft.AspNetCore.SignalR`. These directives are likely to be used for creating and manipulating Open XML documents and for using SignalR, a library for real-time web functionality.

3. A new `AdminHub` class has been added to the `Export.cs` file. This class includes a static `DateTime` field `lastExport` initialized to `DateTime.MinValue`. This field is likely to be used for tracking the last export time.

4. A new method `ExportProcessingOrder` has been added to the `AdminHub` class in the `Export.cs` file. This method creates a new Excel document with a single sheet named "ProcessingOrder" and a single header row. The method returns `1`, indicating successful execution.

The changes in the `AdminHub` class in the `Post.cs` file seem to be redundant as they involve removing and adding back the same lines of code without any modification.
…y to export order data. This is achieved through the creation of new methods and components across multiple files. The `Export.cs` file has been heavily modified to include a new `ExportOrder()` method that exports order data into a byte array. This method also includes checks to ensure that exports are not performed too frequently. A new `AdminOrderExportButton` component has been added to the `TopNavBar.tsx` file, allowing users to export order data. New methods have also been added to the `Get.ts` and `Export.ts` files to support this new functionality.

List of changes:

1. `Export.cs` file has been significantly modified to include new imports, changes to the `AdminHub` class, and a new `ExportOrder()` method. This method exports order data into a byte array and includes checks to ensure that exports are not performed more frequently than every 3 minutes (Export.cs).

2. `TopNavBar.tsx` file has been updated to include a new `AdminOrderExportButton` component, which allows users to export order data (TopNavBar.tsx).

3. `Entity.ts` file has been updated to change the return type of the `Order` and `Comment` methods in the `AdminOrderEntity` class (Entity.ts).

4. `Get.ts` file has been updated to include a new `Export` method in the `AdminOrderGet` class, which is used to export order data (Get.ts).

5. A new `Export.tsx` file has been created, which defines the `AdminOrderExportButton` component. This component uses the `AdminHub.Order.Get.Export(log)` method to export order data when clicked (Export.tsx).

6. A new `Export.ts` file has been created, which defines the `AdminOrderExport` class. This class includes a `Export(plog: Logger)` method, which is used to export order data (Export.ts).
@Aloento Aloento self-assigned this Feb 4, 2024
@Aloento Aloento merged commit 66d2a42 into master Feb 4, 2024
1 check passed
@Aloento Aloento deleted the Dev branch February 4, 2024 18:17
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