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

Frontend implementation for Money Mathesar type #259

Closed
Tracked by #249
kgodey opened this issue Jun 14, 2021 · 0 comments · Fixed by #1336
Closed
Tracked by #249

Frontend implementation for Money Mathesar type #259

kgodey opened this issue Jun 14, 2021 · 0 comments · Fixed by #1336
Assignees
Labels
needs: unblocking Blocked by other work type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory
Milestone

Comments

@kgodey
Copy link
Contributor

kgodey commented Jun 14, 2021

Requirements

Users should be able to:

  • view data in columns that have the Money Mathesar type
  • change data type to and from the associated DB types based on options selected
    • MATHESAR_TYPES.MONEY_[XXX]
    • MONEY
  • view, set, and change data type options related to the Money data types
  • filter data by Money-specific filtering options
  • group data by Money-specific grouping options
  • use display options to view data in Money type columns
    • Data should be rounded according to the precision specified in the display options
  • see Money data shown in a monospace font or using tabular figures (see design spec)
  • see Money data formatted according to the locale of the currency

Update:

DB Type Mapping

  • If the custom MATHESAR_TYPES.MONEY type is available:
    • all new columns of UI type Money should use it.
    • converting existing columns to the UI type Money should use it.
  • If the custom MATHESAR_TYPES.MONEY type is not available:
    • all new columns of UI type Money or converting existing columns to UI type Money should use default MONEY type

Existing columns of type MONEY can only be converted to MATHESAR_TYPES.MONEY if MATHESAR_TYPES.MONEY is available by converting first to Number and then converting back to Money.

Please note that the design for MONEY vary on whether MATHESAR_TYPES.MONEY is installed.

Implementation

Design

Backend

  • /api/v0/tables/ lists the name and DB type of each columns
  • /api/v0/tables/<id/columns/ lists column information in more detail
  • /api/v0/databases/<id>/types/ maps Mathesar types to DB types and provides a list of filtering and grouping options per-type.
    • These should be used to populate the filter and grouping options dynamically.
  • Updates to column types and type options should happen via PATCH requests to /api/v0/tables/<id>/columns/<id>/. These updates include
    • Changes to the data type (type)
    • Changes to the display options (display_options)

Additional Context

@kgodey kgodey added type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory needs: unblocking Blocked by other work status: detail needed labels Jun 14, 2021
@kgodey kgodey added this to the 8. Initial Data Types milestone Jun 14, 2021
@kgodey kgodey removed the needs: unblocking Blocked by other work label Jun 18, 2021
@kgodey kgodey changed the title Frontend implementation for money data type Frontend implementation for Money Mathesar type Sep 13, 2021
@kgodey kgodey added needs: unblocking Blocked by other work and removed status: draft labels Sep 13, 2021
@seancolsen seancolsen self-assigned this Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: unblocking Blocked by other work type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants