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

Sorting in Project and Order Views #6

Open
kboek opened this issue Nov 30, 2024 · 3 comments
Open

Sorting in Project and Order Views #6

kboek opened this issue Nov 30, 2024 · 3 comments
Assignees

Comments

@kboek
Copy link
Collaborator

kboek commented Nov 30, 2024

Introduce chronological (by “date” field) sorting functionality for orders within the project view and for music requests within the order view.

@kboek
Copy link
Collaborator Author

kboek commented Jan 29, 2025

In order to enable sorting for table orders and table song_requests, the sort field must be an obligatory field - in other words: NOT NULL

For orders the sort field will be performance_date
For song_requests the sort field will be date_created - which we by default can set to NOW()

@kboek
Copy link
Collaborator Author

kboek commented Jan 29, 2025

Steps to deploy to production (incomplete)
Events

  • Edit field orders - Relationshop and set Sort Field to performance_date
  • In the same edit, under Interface, review the Per Page value (no manual reorder when paging)

Orders

  • Change field performance_date; disable "Allow NULL value"
  • Edit field song_requests - Relationship and set Sort Field to date_created
  • In the same edit, under Interface, review the Per Page value (no manual reorder when paging)

Song Requests

  • Change field date_created in song_requests; disable "Allow NULL value" and set Default Value to NOW()

@kboek
Copy link
Collaborator Author

kboek commented Jan 29, 2025

Currently getting this update when manually changing order of orders in event/projects

{
  "message": "update \"orders\" set \"event_id\" = $1, \"performance_date\" = $2, \"date_updated\" = $3, \"user_updated\" = $4 where \"id\" in ($5) - invalid input syntax for type date: \"1\"",
  "extensions": {
    "code": "INTERNAL_SERVER_ERROR"
  }
}

And when manually changing the order of song requests in an order

{
  "message": "update \"song_requests\" set \"date_created\" = $1, \"order_id\" = $2, \"date_updated\" = $3, \"user_updated\" = $4 where \"id\" in ($5) - invalid input syntax for type timestamp with time zone: \"1\"",
  "extensions": {
    "code": "INTERNAL_SERVER_ERROR"
  }
}

@kboek kboek self-assigned this Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant