diff --git a/src/api/hackspace/content-types/hackspace/schema.json b/src/api/hackspace/content-types/hackspace/schema.json index a50e750..0da4d6c 100644 --- a/src/api/hackspace/content-types/hackspace/schema.json +++ b/src/api/hackspace/content-types/hackspace/schema.json @@ -32,6 +32,11 @@ "repeatable": false, "component": "hackspace.contacts", "required": true + }, + "location": { + "type": "component", + "repeatable": false, + "component": "hackspace.location" } } } diff --git a/src/components/hackspace/location.json b/src/components/hackspace/location.json new file mode 100644 index 0000000..4f17a0e --- /dev/null +++ b/src/components/hackspace/location.json @@ -0,0 +1,34 @@ +{ + "collectionName": "components_hackspace_locations", + "info": { + "displayName": "location", + "icon": "pinMap", + "description": "" + }, + "options": {}, + "attributes": { + "address": { + "type": "string" + }, + "lat": { + "type": "decimal" + }, + "lon": { + "type": "decimal" + }, + "timezone": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "hint": { + "type": "text" + }, + "areas": { + "type": "component", + "repeatable": true, + "component": "location.area" + } + } +} diff --git a/src/components/location/area.json b/src/components/location/area.json new file mode 100644 index 0000000..45e806e --- /dev/null +++ b/src/components/location/area.json @@ -0,0 +1,20 @@ +{ + "collectionName": "components_location_areas", + "info": { + "displayName": "area", + "icon": "layout" + }, + "options": {}, + "attributes": { + "name": { + "type": "string" + }, + "description": { + "type": "text" + }, + "square_meters": { + "type": "decimal", + "required": true + } + } +}