goat-community / goat

This is the home of Geo Open Accessibility Tool (GOAT)
GNU General Public License v3.0
89 stars 47 forks source link

Add customization view to dashboard #1640

Closed EPajares closed 1 year ago

EPajares commented 1 year ago

Goal of this issue

We have the table "customer.customization"

image

We do have some settings here as JSON. We need a dummy endpoint to have something working for the dashboard.

Resources

Deliverables

Branch to derive

EPajares commented 1 year ago

@cinaaaa Could you add a view for this in the dashboard?

cinaaaa commented 1 year ago

@EPajares Could please clarify that what you mean by adding a view of this to the dashboard? you mean mock up or...?

EPajares commented 1 year ago

I actually mean adding a new view like for the other settings. So making use of the mockup endpoints. image

cinaaaa commented 1 year ago

I actually mean adding a new view like for the other settings. image

Ok, then If I can connect it to a mock API then it's not possible to ship it to the production, is it OK?

EPajares commented 1 year ago

Yes. You can keep it in a feature branch

cinaaaa commented 1 year ago

Screenshot 2022-11-01 at 12 16 20 Screenshot 2022-11-01 at 12 16 31

Hey @EPajares, This is the realistic view in the dashboard, much like the layer styles view.

GET /api/customiztion-tables -> list of the record with a unique ID PUT /api/customiztion-tables/{id} -> { type: "test", test:{value: null} } POST /api/customiztion-tables/{id} -> { type: "test", test:{value: null} }

EPajares commented 1 year ago

We already have some endpoints for the customizations; however, here, the settings for the specific user customization are manipulated. In this case, the Base-settings are changed.

image

So I would propose to add the endpoints in this section and use the following path: /api/customization/base. The settings and the structure are pretty sensitive, so we should validate the input and allow only the superusers to use the endpoint.

I think we should not allow a POST endpoint as this would make the input hard to validate. Furthermore, the settings here are very rarely changing. Therefore it would be fine to only have GET and PUT.