diff --git a/deskStructure.js b/deskStructure.js index d2da419..2d6d6f8 100644 --- a/deskStructure.js +++ b/deskStructure.js @@ -12,10 +12,6 @@ export default S => .title('Home') .schemaType('homePage') .child(S.document().schemaType('homePage')), - S.listItem() - .title('Buyers Page') - .schemaType('buyersPage') - .child(S.document().schemaType('buyersPage')), S.listItem() .title('Create Credit Class Page') .schemaType('createCreditClassPage') @@ -82,6 +78,10 @@ export default S => .title('Home Page') .schemaType('homePageWeb') .child(S.document().schemaType('homePageWeb')), + S.listItem() + .title('Buyers Page') + .schemaType('buyersPage') + .child(S.document().schemaType('buyersPage')), S.listItem() .title('Developers Page') .schemaType('developersPage') @@ -299,6 +299,10 @@ export default S => .title('Person') .schemaType('person') .child(S.documentTypeList('person').title('Person')), + S.listItem() + .title('Program') + .schemaType('program') + .child(S.documentTypeList('program').title('Program')), ]), ), ]); diff --git a/schemas/documents/registry/creditClass.js b/schemas/documents/registry/creditClass.js index 8b27d9a..bcea2fd 100644 --- a/schemas/documents/registry/creditClass.js +++ b/schemas/documents/registry/creditClass.js @@ -104,5 +104,11 @@ export default { name: 'icon', type: 'image', }, + { + title: 'Program', + name: 'program', + type: 'reference', + to: [{ type: 'program' }], + }, ], }; diff --git a/schemas/documents/shared/featuredProjectCard.js b/schemas/documents/shared/featuredProjectCard.js index 9dab64a..0358934 100644 --- a/schemas/documents/shared/featuredProjectCard.js +++ b/schemas/documents/shared/featuredProjectCard.js @@ -3,11 +3,6 @@ export default { name: 'featuredProjectCard', type: 'document', fields: [ - { - title: 'Name', - name: 'name', - type: 'string', - }, { title: 'Project', name: 'project', diff --git a/schemas/documents/shared/program.js b/schemas/documents/shared/program.js new file mode 100644 index 0000000..d57a6a3 --- /dev/null +++ b/schemas/documents/shared/program.js @@ -0,0 +1,25 @@ +export default { + name: 'program', + title: 'Program', + type: 'document', + fields: [ + { + title: 'Name', + name: 'name', + type: 'string', + validation: Rule => Rule.required(), + }, + { + title: 'Link', + name: 'link', + type: 'string', + validation: Rule => Rule.required(), + }, + { + title: 'Image', + name: 'image', + type: 'image', + validation: Rule => Rule.required(), + }, + ], +}; diff --git a/schemas/documents/shared/project.js b/schemas/documents/shared/project.js index 18cbcf7..6263a6e 100644 --- a/schemas/documents/shared/project.js +++ b/schemas/documents/shared/project.js @@ -7,8 +7,7 @@ export default { title: 'Project name', name: 'projectName', type: 'string', - description: - 'optional project name to make it easier to track projects already added to the list', + validation: Rule => Rule.required(), }, { title: 'Project id', @@ -17,6 +16,31 @@ export default { description: 'on-chain project id', validation: Rule => Rule.required(), }, + { + title: 'Project Image', + name: 'image', + type: 'customImage', + validation: Rule => Rule.required(), + }, + { + title: 'Project Location', + name: 'location', + type: 'string', + validation: Rule => Rule.required(), + }, + { + title: 'Area', + name: 'area', + type: 'number', + }, + { + title: 'Area unit', + name: 'areaUnit', + type: 'string', + options: { + list: ['hectares', 'acres'], + }, + }, { title: 'Credibility Cards', name: 'credibilityCards', diff --git a/schemas/documents/registry/buyersPage.js b/schemas/documents/www/buyersPage.js similarity index 100% rename from schemas/documents/registry/buyersPage.js rename to schemas/documents/www/buyersPage.js diff --git a/schemas/schema.js b/schemas/schema.js index c499a6a..72b6ec6 100644 --- a/schemas/schema.js +++ b/schemas/schema.js @@ -9,7 +9,7 @@ import methodology from './documents/registry/methodology'; import creditClass from './documents/registry/creditClass'; import creditClassPage from './documents/registry/creditClassPage'; import landStewardsPage from './documents/registry/landStewardsPage'; -import buyersPage from './documents/registry/buyersPage'; +import buyersPage from './documents/www/buyersPage'; import mainnetPage from './documents/www/mainnetPage'; import projectsPage from './documents/registry/projectsPage'; import projectPage from './documents/registry/projectPage'; @@ -45,6 +45,7 @@ import statCard from './documents/shared/statCard'; import claim from './documents/shared/claim'; import credibilityCard from './documents/shared/credibilityCard'; import person from './documents/shared/person'; +import program from './documents/shared/program'; // Object types import heroSection from './objects/sections/heroSection'; @@ -310,6 +311,7 @@ export default [ partnerLogo, partnersPage, person, + program, practicesOutcomesSection, presskitAwardsSection, presskitFeaturedSection,