From 13bd2f3ce72104ff17cf0cf2aa68713e31757c60 Mon Sep 17 00:00:00 2001
From: Marie Gauthier <marie.gauthier63@gmail.com>
Date: Fri, 24 May 2024 13:36:04 +0200
Subject: [PATCH] feat: add createProjectPage popup (#61)

---
 deskStructure.js                              |  4 ++
 .../documents/registry/createProjectPage.js   | 13 ++++++
 schemas/objects/createProjectPagePopup.js     | 42 +++++++++++++++++++
 schemas/schema.js                             |  4 ++
 uniqueDocuments.js                            |  3 +-
 5 files changed, 65 insertions(+), 1 deletion(-)
 create mode 100644 schemas/documents/registry/createProjectPage.js
 create mode 100644 schemas/objects/createProjectPagePopup.js

diff --git a/deskStructure.js b/deskStructure.js
index 5321226..d4f1944 100644
--- a/deskStructure.js
+++ b/deskStructure.js
@@ -20,6 +20,10 @@ export default S =>
                 .title('Create Methodology Page')
                 .schemaType('createMethodologyPage')
                 .child(S.document().schemaType('createMethodologyPage')),
+              S.listItem()
+                .title('Create Project Page')
+                .schemaType('createProjectPage')
+                .child(S.document().schemaType('createProjectPage')),
               S.listItem()
                 .title('Land Stewards Page')
                 .schemaType('landStewardsPage')
diff --git a/schemas/documents/registry/createProjectPage.js b/schemas/documents/registry/createProjectPage.js
new file mode 100644
index 0000000..7a128b8
--- /dev/null
+++ b/schemas/documents/registry/createProjectPage.js
@@ -0,0 +1,13 @@
+export default {
+  name: 'createProjectPage',
+  type: 'document',
+  title: 'Create Project Page',
+  fields: [
+    {
+      name: 'createProjectPagePopup',
+      type: 'createProjectPagePopup',
+      title: 'Create Project Page Popup',
+      description: 'Steps for getting started with a basic project page',
+    },
+  ],
+};
diff --git a/schemas/objects/createProjectPagePopup.js b/schemas/objects/createProjectPagePopup.js
new file mode 100644
index 0000000..f0333a6
--- /dev/null
+++ b/schemas/objects/createProjectPagePopup.js
@@ -0,0 +1,42 @@
+export default {
+  title: 'Create Project Page Popup',
+  name: 'createProjectPagePopup',
+  type: 'object',
+  fields: [
+    {
+      title: 'Title',
+      name: 'title',
+      type: 'string',
+      validation: Rule => Rule.required(),
+    },
+    {
+      title: 'Description',
+      name: 'description',
+      type: 'customPortableText',
+      validation: Rule => Rule.required(),
+    },
+    {
+      title: 'Text with link to our guides',
+      name: 'guidesLink',
+      type: 'customPortableText',
+      validation: Rule => Rule.required(),
+    },
+    {
+      title: 'Steps',
+      name: 'steps',
+      type: 'array',
+      of: [
+        {
+          type: 'titleImageCustomBody',
+        },
+      ],
+      validation: Rule => Rule.required(),
+    },
+    {
+      title: 'Button label',
+      name: 'buttonLabel',
+      type: 'string',
+      validation: Rule => Rule.required(),
+    },
+  ],
+};
diff --git a/schemas/schema.js b/schemas/schema.js
index c402c5c..832a4c6 100644
--- a/schemas/schema.js
+++ b/schemas/schema.js
@@ -3,6 +3,7 @@ import homePage from './documents/registry/homePage';
 import homePageWeb from './documents/www/homePageWeb';
 import createCreditClassPage from './documents/registry/createCreditClassPage';
 import createMethodologyPage from './documents/registry/createMethodologyPage';
+import createProjectPage from './documents/registry/createProjectPage';
 import developersPage from './documents/www/developersPage';
 import methodologyReviewProcessPage from './documents/registry/methodologyReviewProcessPage';
 import methodology from './documents/registry/methodology';
@@ -199,6 +200,7 @@ import classPrefinanceTimelineItem from './objects/classPrefinanceTimelineItem';
 import prefinanceTimelineItem from './objects/prefinanceTimelineItem';
 import prefinanceProjects from './objects/prefinanceProjects';
 import creditCategory from './documents/shared/creditCategory';
+import createProjectPagePopup from './objects/createProjectPagePopup';
 
 export default [
   actionCard,
@@ -251,6 +253,8 @@ export default [
   contactPage,
   createCreditClassPage,
   createMethodologyPage,
+  createProjectPage,
+  createProjectPagePopup,
   createMethodologyStepCardSection,
   creditCategory,
   creditCertification,
diff --git a/uniqueDocuments.js b/uniqueDocuments.js
index da62dab..36abc55 100644
--- a/uniqueDocuments.js
+++ b/uniqueDocuments.js
@@ -31,5 +31,6 @@ export const uniqueDocuments = [
   'tokenPage',
   'validatorsPage',
   'walletAddressRegistrationPage',
-  'profilePage'
+  'profilePage',
+  'createProjectPage',
 ];