Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order Handling in Dashboard #1543

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

inikoo
Copy link
Contributor

@inikoo inikoo commented Mar 14, 2025

PR Summary by Typo

Overview
This PR introduces new features to enhance order handling and dashboard functionalities. It adds new actions and hydrators for managing order intervals and registration intervals, updates the ShopHydrateOrderHandling action to use the OrderPayStatusEnum, and adds new dashboard tables for sales data. It also refactors the organisation dashboard to use a new structure and components.

Key Changes

  • Added IndexOrganisationsSalesTable, IndexShopsSalesTable, and IndexInvoiceCategoriesSalesTable actions for displaying sales data in dashboard tables.
  • Added ShopHydrateOrderIntervals, ShopHydrateRegistrationIntervals, GroupHydrateOrderIntervals, GroupHydrateRegistrationIntervals, OrganisationHydrateOrderIntervals, and OrganisationHydrateRegistrationIntervals hydrators for calculating and storing interval data.
  • Modified ShopHydrateOrderHandling to use OrderPayStatusEnum for order payment status.
  • Added OrderPayStatusEnum enum for order payment status.
  • Added WithDashboardIntervalOption, WithDashboardIntervalValues, WithDashboardModelStateSettings, and WithDashboardDataDisplayTypeSettings traits for dashboard settings and data display.
  • Modified ShowOrganisationDashboard and ShowGroupDashboard to use the new dashboard structure and components.
  • Added DashboardOrganisationSalesResource, DashboardShopSalesResource, DashboardInvoiceCategoriesSalesResource, DashboardHeaderOrganisationsSalesResource, DashboardHeaderShopsSalesResource, DashboardHeaderOrganisationsInvoiceCategoriesSalesResource, DashboardHeaderShopsInvoiceCategoriesSalesResource, DashboardTotalOrganisationsSalesResource, DashboardTotalGroupShopsSalesResource, DashboardTotalGroupInvoiceCategoriesSalesResource, and DashboardTotalInvoiceCategoriesSalesResource resources for dashboard data.
  • Added DashboardSettingsNew and DashboardTableNew components for the new dashboard structure.
  • Added pay_status column to the orders table.
  • Added basket columns to the ordering_intervals and sales_intervals tables.
  • Renamed app/Actions/SysAdmin/Organisation/UI/ShowOrganisationDashboard.php to app/Actions/Dashboard/ShowOrganisationDashboard.php.
  • Updated related files and components to reflect the changes.

Recommendations
Not deployment ready. While the changes are substantial and introduce valuable features, thorough testing is crucial before deploying to production. Consider adding comprehensive unit and integration tests to cover the new actions, hydrators, and dashboard components. Additionally, review the updated dashboard functionalities in a staging environment to ensure data accuracy and performance. Finally, document the new features and changes for other developers and users.

To turn off PR summary, please visit Notification settings.

@inikoo inikoo linked an issue Mar 14, 2025 that may be closed by this pull request
Copy link

typo-app bot commented Mar 14, 2025

Typo Code Review 📊

🔥 1 issues detected!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you confirm if _1y
Screenshot 2025-03-14 at 16 29 20

fields are created?

can you test the rollback to see if works ok pls

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i can confirm , the rollback also work

inikoo added 2 commits March 18, 2025 14:51
…nisation-dashboard' into 1542-order-handling-info-in-organisation-dashboard
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
21.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dashboard: Order Handling info in Organisation Dashboard
4 participants