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

API redesign #248

Closed
2 of 19 tasks
Tracked by #307 ...
jon-nfc opened this issue Aug 19, 2024 · 0 comments · Fixed by #344
Closed
2 of 19 tasks
Tracked by #307 ...

API redesign #248

jon-nfc opened this issue Aug 19, 2024 · 0 comments · Fixed by #344
Assignees
Labels
type::quality assurance Type for Issues and Merge Requests. Can also be used in discussion in comments and commits
Milestone

Comments

@jon-nfc
Copy link
Member

jon-nfc commented Aug 19, 2024

API has no real structure, redesign so that ui can be separated.

Details

Down the track the UI will be separated from the API. For this to occur, the API needs to be suitable.

Models

  • defines layout
  • Must define __str__ function that will be used by serializer as field display_name
  • must define table_fields

Layout

Each model, not including tickets will be required to define its layout. this will be used by the UI to build the page layout for the model.

UI layout types are:

  • Detail layout is a primary models page. This lay displays all information pertinent to the model. This is inclusive of child models and linked items.

  • List layout is used as the landing page for models. it's a essentially a table view of all items the user has access to.

  • Settings layout is for models that are considered settings for other models. i.e. category field.

  • Ticket layout is for all models that have model ticket. this is regardless of the actual ticket type. The UI will distinguish between the different types.

Table Fields

Used to render the model in a table. All Models are required to specify this field.

Serializers

Serializes to be separated into three types:

  • Base
  • Model
  • Display

Base Serializer

provides the basic details to show in place for a related model. To contains id, display_name and url.

Model Serializer

user for the creation and update of an item and contains ALL fields defined in display order, including any additional fields as specified within the View Serializer. these additional fields must be set as read_only=True

Display Serializer

Used to serializer to display the data. related fields are redefined to use their own base serializer.

defines parameter _urls: dict that always contains key _self which is the items detail view url.

Views

  • Updates API meta with table fields and layout for list and detail views respectively.

Requirements

  • normalised URLs
  • follows nav structure

Links

Tasks

Potential new issues

  • Separate UI code from API
@jon-nfc jon-nfc added the type::quality assurance Type for Issues and Merge Requests. Can also be used in discussion in comments and commits label Aug 19, 2024
@jon-nfc jon-nfc added this to the v1.2 milestone Aug 25, 2024
@jon-nfc jon-nfc moved this to Planning in Centurion ERP Aug 25, 2024
@jon-nfc jon-nfc self-assigned this Aug 26, 2024
@jon-nfc jon-nfc moved this from Planning to In progress in Centurion ERP Aug 26, 2024
jon-nfc added a commit that referenced this issue Aug 26, 2024
jon-nfc added a commit that referenced this issue Aug 26, 2024
jon-nfc added a commit that referenced this issue Aug 26, 2024
jon-nfc added a commit that referenced this issue Aug 26, 2024
@jon-nfc jon-nfc removed this from the v1.2 milestone Sep 13, 2024
@jon-nfc jon-nfc removed their assignment Sep 13, 2024
@jon-nfc jon-nfc moved this from In progress to Ready to Commence in Centurion ERP Sep 13, 2024
@jon-nfc jon-nfc mentioned this issue Sep 19, 2024
35 tasks
@jon-nfc jon-nfc linked a pull request Sep 26, 2024 that will close this issue
@jon-nfc jon-nfc moved this from Ready to Commence to Planning in Centurion ERP Sep 27, 2024
This was referenced Sep 27, 2024
@jon-nfc jon-nfc self-assigned this Sep 28, 2024
@jon-nfc jon-nfc moved this from Planning to In progress in Centurion ERP Sep 28, 2024
jon-nfc added a commit that referenced this issue Nov 27, 2024
jon-nfc added a commit that referenced this issue Nov 27, 2024
jon-nfc added a commit that referenced this issue Nov 27, 2024
jon-nfc added a commit that referenced this issue Nov 27, 2024
jon-nfc added a commit that referenced this issue Nov 27, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in Centurion ERP Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::quality assurance Type for Issues and Merge Requests. Can also be used in discussion in comments and commits
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant