Skip to content

Commit

Permalink
Merge branch 'main' into 32-add-react-components
Browse files Browse the repository at this point in the history
  • Loading branch information
NoeTerrier authored Aug 9, 2023
2 parents 9bd4f60 + 687d153 commit b2f71b4
Show file tree
Hide file tree
Showing 36 changed files with 846 additions and 34 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
# Custom strapi service
strapi:
# Build the strapi service from its folder
container_name: clic-strapi
build:
# Build context, relative to the current file
context: ../strapi/.devcontainer
Expand Down Expand Up @@ -35,6 +36,7 @@ services:

# Database service for strapi
strapi-postgres:
container_name: clic-postgres
image: postgres
environment:
POSTGRES_DB: strapi_data
Expand Down
44 changes: 43 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,47 @@
"color": "white",
"backgroundColor": "orange"
},
"todohighlight.keywordsPattern": "(todo|TODO|fixme|FIXME)(:?)"
"todohighlight.keywordsPattern": "(todo|TODO|fixme|FIXME)(:?)",
"terminal.integrated.profiles.linux": {
"strapi": {
"path": "docker",
"args": ["exec", "-it", "clic-strapi", "/bin/bash"],
"overrideName": true
},
"postgres": {
"path": "docker",
"args": ["exec", "-it", "clic-postgres", "/bin/bash"],
"overrideName": true
}
},
"terminal.integrated.profiles.windows": {
"strapi": {
"path": "docker",
"args": ["exec", "-it", "clic-strapi", "/bin/bash"],
"overrideName": true
},
"postgres": {
"path": "docker",
"args": ["exec", "-it", "clic-postgres", "/bin/bash"],
"overrideName": true
}
},
"terminal.integrated.profiles.osx": {
"strapi": {
"path": "docker",
"args": ["exec", "-it", "clic-strapi", "/bin/bash"],
"overrideName": true
},
"postgres": {
"path": "docker",
"args": ["exec", "-it", "clic-postgres", "/bin/bash"],
"overrideName": true
}
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
34 changes: 34 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Start dev container",
"type": "shell",
"command": "docker compose --file .devcontainer/docker-compose.yaml up",
"windows": {
"command": "docker compose --file .devcontainer\\docker-compose.yaml up"
},
"group": "none",
"presentation": {
"reveal": "always",
"panel": "new"
},
"runOptions": {
"runOn": "folderOpen"
}
},
{
"label": "Stop dev container",
"type": "shell",
"command": "docker compose --file .devcontainer/docker-compose.yaml down",
"windows": {
"command": "docker compose --file .devcontainer\\docker-compose.yaml down"
},
"group": "none",
"presentation": {
"reveal": "always",
"panel": "new"
}
}
]
}
33 changes: 0 additions & 33 deletions strapi/.devcontainer/devcontainer.json

This file was deleted.

126 changes: 126 additions & 0 deletions strapi/src/api/association/content-types/association/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"kind": "singleType",
"collectionName": "associations",
"info": {
"singularName": "association",
"pluralName": "associations",
"displayName": "Association",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"association_name": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "string",
"required": true,
"default": "CLIC",
"unique": true
},
"about": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "richtext",
"required": false
},
"logo": {
"type": "media",
"multiple": false,
"required": true,
"allowedTypes": [
"images"
],
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"gallery": {
"type": "media",
"multiple": true,
"required": false,
"allowedTypes": [
"images",
"videos"
],
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"official_documents": {
"type": "media",
"multiple": true,
"required": false,
"allowedTypes": [
"files"
],
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"social_links": {
"type": "relation",
"relation": "oneToMany",
"target": "api::social-link.social-link"
},
"members": {
"type": "relation",
"relation": "oneToMany",
"target": "api::member.member"
},
"partners": {
"type": "relation",
"relation": "oneToMany",
"target": "api::partner.partner"
},
"address": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "string",
"required": true,
"unique": true,
"default": "CLIC, INN 132, Station 14, EPFL, CH-1015 Lausanne"
},
"email": {
"pluginOptions": {
"i18n": {
"localized": false
}
},
"type": "email",
"default": "clic@epfl.ch",
"unique": false
},
"phone": {
"pluginOptions": {
"i18n": {
"localized": false
}
},
"type": "string",
"default": "+41 21 693 81 28",
"unique": false
}
}
}
7 changes: 7 additions & 0 deletions strapi/src/api/association/controllers/association.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* association controller
*/

import { factories } from '@strapi/strapi'

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

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

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

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

export default factories.createCoreService('api::association.association');
72 changes: 72 additions & 0 deletions strapi/src/api/commission/content-types/commission/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"kind": "collectionType",
"collectionName": "commissions",
"info": {
"singularName": "commission",
"pluralName": "commissions",
"displayName": "Commission",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"commission_name": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "string",
"required": true,
"unique": true
},
"news": {
"type": "relation",
"relation": "manyToMany",
"target": "api::news.news",
"mappedBy": "commissions"
},
"description": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "richtext",
"required": true
},
"small_description": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "text",
"required": true
},
"members": {
"type": "relation",
"relation": "manyToMany",
"target": "api::member.member",
"mappedBy": "commissions"
},
"social_links": {
"type": "relation",
"relation": "oneToMany",
"target": "api::social-link.social-link",
"mappedBy": "commission"
},
"partners": {
"type": "relation",
"relation": "manyToMany",
"target": "api::partner.partner",
"inversedBy": "commissions"
}
}
}
7 changes: 7 additions & 0 deletions strapi/src/api/commission/controllers/commission.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* commission controller
*/

import { factories } from '@strapi/strapi'

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

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

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

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

export default factories.createCoreService('api::commission.commission');
Loading

0 comments on commit b2f71b4

Please sign in to comment.