2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 12:06:44 +00:00
Oliver e21a5e62b8
Parameter types (#4935)
* Add fields to PartParameterTemplateModel

- checkbox: Is the field a 'checkbox'
- choices: List of valid options

* Update javascript

* Adds unit test for PartParameterTemplate

- Checkbox cannot have units
- Checkbox cannot have choices
- Choices must be unique

* Improve API filtering

- Add "has_choices" filter
- Add "has_units" filter

* Prune dead code

* Update js functions for creating / editing parameters

* Update part parameter form

- Rebuild the "data" field based on the selected template
- Supports "string" / "boolean" / "select"

* Adjust data input based on parameter type

- Choice displays available options
- Checkbox displays boolean switch
- Otherwise displays text input
- Adds more unit testing
- Updates to forms.js for improved functionality

* Calculate numeric value for boolean parameters

* Update docs

* Bump API version
2023-06-01 07:20:11 +10:00
..
2023-04-22 22:40:29 +10:00
2023-06-01 07:20:11 +10:00
2023-05-26 16:57:23 +10:00
2023-04-27 22:27:21 +10:00
2023-04-22 22:40:29 +10:00
2023-04-22 22:40:29 +10:00
2023-04-22 22:40:29 +10:00
2023-04-27 22:27:21 +10:00
2023-04-22 22:40:29 +10:00