In order to handle the nested list of data objects (activity -> [sourceTypes: [units :[fuels: [emissions]]]]) we are going to need some models to define the relationships between each data object and the schema that represents the shape of the object's data. These schemas will be used to dynamically build the form in an API service to be passed to the frontend (#256).
The models we need are:
activitySchema
activitySourceTypeSchema
activitySourceTypeUnitSchema
activitySourceTypeFuelSchema
activitySourceTypeEmissionSchema
maybe activitySourceTypeEmissionMethodologySchema (we were using reportingFields here but a defined schema may be necessary instead)
These models will need fkey relationships to a configuration (valid_from, valid_to) as they need to be versioned & retrievable by when they were/are vaild.
These schemas will become definitions in a single RJSF schema for each activity page.
Also to be done:
modify the baseSchema table to just be jsonSchema & all schemas can be held in this table (referenced by id in activitySchema, etc)
In order to handle the nested list of data objects (activity -> [sourceTypes: [units :[fuels: [emissions]]]]) we are going to need some models to define the relationships between each data object and the schema that represents the shape of the object's data. These schemas will be used to dynamically build the form in an API service to be passed to the frontend (#256).
The models we need are:
These schemas will become definitions in a single RJSF schema for each activity page.
Also to be done: