Should be all there. We'll need to load in some units (there won't be very many).
Create a list of resource specs, can be just names.
Add popup/modal or separate pane (?) with:
- Name (ResourceSpecification.name)
- Image (ResourceSpecification.image)
- Default Unit of Resource (ResourceSpecification.defaultUnitOfResource)
- Default Unit of Effort (ResourceSpecification.defaultUnitOfEffort)
- Description (ResourceSpecification.note)
- later when we have facets: facets/facet values for the ResourceSpecification
(I don't think we need ResourceSpecification.resourceClassifiedAs.)
Sample from REA Playspace, just informational, or maybe there is some code that could be re-used.
Sample graphql (note Unit is included because you'll need to make a unit to use in CreateResourceSpecification - Units won't have a CRUD, they can be created from the graphiql interface when hREA is installed and run from the launcher):
mutation CreateUnit {
createUnit(
unit: {
label: "pound"
symbol: "lb"
}
){
unit {
id
label
symbol
}
}
}
mutation CreateUnit {
createUnit(
unit: {
label: "one"
symbol: "1"
}
){
unit {
id
label
symbol
}
}
}
query GetUnits {
units {
edges {
node {
id
label
symbol
}
}
}
}
mutation CreateResourceSpecification {
createResourceSpecification(
resourceSpecification: {
name: "White Alpaca Dirty"
image: "https://example.com/alpaca"
note: "good stuff"
defaultUnitOfResource: "lb:uhC0kQ4nL2SS4GBSV6xKDpcLXYQN98Iy3w-PPXeJk7P4OpNYDYwKb"
}
) {
resourceSpecification {
id
name
image
note
resourceClassifiedAs
defaultUnitOfResource {
label
}
defaultUnitOfEffort {
label
}
}
}
}