Skip to content

Commit

Permalink
[DEV-1536] Strapi setup for webinars and webinar speakers (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
tommaso1 authored Mar 27, 2024
1 parent 9bd7fae commit 1ed75ad
Show file tree
Hide file tree
Showing 9 changed files with 244 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/ten-poems-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"strapi-cms": minor
---

Add support for webinars
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"kind": "collectionType",
"collectionName": "webinar_speakers",
"info": {
"singularName": "webinar-speaker",
"pluralName": "webinar-speakers",
"displayName": "WebinarSpeaker",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"name": {
"type": "string",
"pluginOptions": {
"i18n": {
"localized": true
}
},
"required": true
},
"jobTitle": {
"type": "string",
"pluginOptions": {
"i18n": {
"localized": true
}
},
"required": true
},
"description": {
"type": "blocks",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"avatar": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images"
],
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"webinars": {
"type": "relation",
"relation": "manyToMany",
"target": "api::webinar.webinar",
"mappedBy": "webinarSpeakers"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* webinar-speaker controller
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreController(
'api::webinar-speaker.webinar-speaker'
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* webinar-speaker router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter(
'api::webinar-speaker.webinar-speaker'
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* webinar-speaker service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService(
'api::webinar-speaker.webinar-speaker'
);
126 changes: 126 additions & 0 deletions apps/strapi-cms/src/api/webinar/content-types/webinar/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"kind": "collectionType",
"collectionName": "webinars",
"info": {
"singularName": "webinar",
"pluralName": "webinars",
"displayName": "Webinar",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"title": {
"type": "string",
"pluginOptions": {
"i18n": {
"localized": true
}
},
"required": true
},
"coverImage": {
"type": "media",
"multiple": false,
"required": true,
"allowedTypes": [
"images"
],
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"slug": {
"type": "string",
"pluginOptions": {
"i18n": {
"localized": true
}
},
"required": true,
"regex": "^[a-zA-Z0-9-]+$"
},
"textContent": {
"type": "blocks",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"playerSrc": {
"type": "string",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"startDatetime": {
"type": "datetime",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"endDatetime": {
"type": "datetime",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"webinarSpeakers": {
"type": "relation",
"relation": "manyToMany",
"target": "api::webinar-speaker.webinar-speaker",
"inversedBy": "webinars"
},
"isVisibleInList": {
"type": "boolean",
"pluginOptions": {
"i18n": {
"localized": true
}
},
"required": true
},
"relatedLinks": {
"type": "component",
"repeatable": false,
"component": "common.related-links",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"subscribeParagraphLabel": {
"type": "string",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"description": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "text",
"required": true
}
}
}
7 changes: 7 additions & 0 deletions apps/strapi-cms/src/api/webinar/controllers/webinar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* webinar controller
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreController('api::webinar.webinar');
7 changes: 7 additions & 0 deletions apps/strapi-cms/src/api/webinar/routes/webinar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* webinar router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::webinar.webinar');
7 changes: 7 additions & 0 deletions apps/strapi-cms/src/api/webinar/services/webinar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* webinar service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::webinar.webinar');

0 comments on commit 1ed75ad

Please sign in to comment.