colouring-cities / colouring-core

The Core Platform for the Colouring Cities Research Programme (CCRP)
https://colouringcities.org
GNU General Public License v3.0
48 stars 43 forks source link

Require source type #1369

Open mdsimpson42 opened 8 months ago

mdsimpson42 commented 8 months ago

Need to add requirement for source type and for certain ones for source before user can save - also for colouring core

polly64 commented 8 months ago

@mdsimpson42 also need to check everything consistent across all categories - and at the same time that copy tool is autoselecting all categories (this issue is about source type behaviour, not the copy feature - there is a separate issue for that)

mdsimpson42 commented 6 months ago

The problem is that if, for example, you set the "Property Address" Source Type to required (Location), then it is also required if you answer the "Is this building subdivided" question in the "Building subdivision" subcategory. (And if the Property Address subcategory is closed, you can't even see that it is required).

I came up with a partial solution in Community.tsx, but that requires a lot of additional code (that will need to be updated if the fields to which the source field applies change).

There must be a better solution, where you specify part of the page as a "form" and the field is only required if a field within that Form changes....

polly64 commented 6 months ago

@matkoniecz any suggested quick fixes on this one?