diff --git a/backend/package.json b/backend/package.json index 4d8d78279..86e918a1a 100644 --- a/backend/package.json +++ b/backend/package.json @@ -36,15 +36,16 @@ "react-router-dom": "^6.0.0", "sharp": "^0.34.4", "strapi-plugin-multi-select": "^2.1.1", - "strapi-v5-redirects": "^1.0.4", "strapi-plugin-tagsinput": "^2.0.2", "strapi-provider-email-brevo": "^1.0.4", + "strapi-v5-redirects": "^1.0.4", "styled-components": "^6.0.0" }, "strapi": { "uuid": "23578308-9b2f-4525-aca3-db1c4f9e3b2d" }, "devDependencies": { - "@types/qs": "^6.9.16" + "@types/qs": "^6.9.16", + "baseline-browser-mapping": "^2.10.23" } } diff --git a/backend/src/api/press-release/content-types/press-release/schema.json b/backend/src/api/press-release/content-types/press-release/schema.json index f00c1a297..088e172c6 100644 --- a/backend/src/api/press-release/content-types/press-release/schema.json +++ b/backend/src/api/press-release/content-types/press-release/schema.json @@ -97,6 +97,33 @@ "type": "relation", "relation": "oneToMany", "target": "api::tag.tag" + }, + "press_release_type": { + "type": "enumeration", + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "media", + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "multiple": false, + "allowedTypes": [ + "images", + "files", + "videos", + "audios" + ] } } } diff --git a/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json b/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json index d418b64d0..5f7203831 100644 --- a/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -14307,6 +14307,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -17973,6 +18109,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -21359,6 +21631,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -24420,6 +24828,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -27037,6 +27581,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -32566,6 +33246,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -35275,6 +36091,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -40282,6 +41234,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -43860,6 +44948,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -45106,6 +46330,24 @@ "example": "string or id" } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "example": "string or id" + }, "locale": { "type": "string" }, @@ -46980,6 +48222,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -48203,6 +49581,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -50615,6 +52129,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -53652,6 +55302,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -56863,6 +58649,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -60035,6 +61957,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -63425,6 +65483,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -66118,6 +68312,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -69750,6 +72080,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -73377,6 +75843,142 @@ } } }, + "press_release_type": { + "type": "string", + "enum": [ + "link", + "file" + ] + }, + "article_file": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": {}, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number", + "format": "float" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": {}, + "related": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + }, + "folder": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "folderPath": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "publishedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + }, + "locale": { + "type": "string" + }, + "localizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "documentId": { + "type": "string" + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" diff --git a/backend/types/generated/contentTypes.d.ts b/backend/types/generated/contentTypes.d.ts index e1c0154fb..f9cfc926d 100644 --- a/backend/types/generated/contentTypes.d.ts +++ b/backend/types/generated/contentTypes.d.ts @@ -1190,6 +1190,14 @@ export interface ApiPressReleasePressRelease }; }; attributes: { + article_file: Schema.Attribute.Media< + 'images' | 'files' | 'videos' | 'audios' + > & + Schema.Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; article_link: Schema.Attribute.String & Schema.Attribute.SetPluginOptions<{ i18n: { @@ -1228,6 +1236,12 @@ export interface ApiPressReleasePressRelease localized: true; }; }>; + press_release_type: Schema.Attribute.Enumeration<['link', 'file']> & + Schema.Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; published_date: Schema.Attribute.Date & Schema.Attribute.SetPluginOptions<{ i18n: { diff --git a/frontend/src/app/[locale]/about/about.tsx b/frontend/src/app/[locale]/about/about.tsx index c4f376fc2..b215bfe76 100644 --- a/frontend/src/app/[locale]/about/about.tsx +++ b/frontend/src/app/[locale]/about/about.tsx @@ -26,12 +26,12 @@ function transformTestimonials( } function transformFunders(funders: NonNullable) { - return funders.map(partner => ({ - id: partner.id, - name: partner.name, - description: partner.description, - image: partner.logo?.url, - link: partner.website_link ?? 'https://www.dataforgood.fr', + return funders.map(funder => ({ + id: funder.id, + name: funder.name, + description: funder.description, + image: funder.logo?.url, + link: funder.website_link ?? 'https://www.dataforgood.fr', })); } diff --git a/frontend/src/app/[locale]/blog/blog.tsx b/frontend/src/app/[locale]/blog/blog.tsx index 3c7932e66..0d2d31b53 100644 --- a/frontend/src/app/[locale]/blog/blog.tsx +++ b/frontend/src/app/[locale]/blog/blog.tsx @@ -6,6 +6,7 @@ import { Title, BaseCardsBlock, Pagination, SearchInput } from '@/components'; import { BlogsPageMeta, BlogsPageData } from './page'; import { usePagination } from '@/hooks/usePagination'; import { useState, useEffect } from 'react'; +import { getPressReleaseLink } from '@/lib/utils'; function transformBlogsData(resources: NonNullable) { @@ -19,7 +20,7 @@ function transformBlogsData(resources: NonNullable) { rawDate: resource.published_date, date: new Date(resource.published_date).toLocaleString(undefined, {dateStyle: 'medium'}), image: element.thumbnail?.url ?? "/images/dataforgood.svg", - link: isBlog ? `/blog/${element.slug}` : element.article_link, + link: isBlog ? `/blog/${element.slug}` : getPressReleaseLink(element as { press_release_type: string; article_link: string; article_file: {url: string;}}), subInfos: element.tags ? element.tags.map(tag => tag.name) : [], tags: [new Date(element.published_date).toLocaleDateString(undefined, {dateStyle: 'long'}), element.media_name], isBlank: true, diff --git a/frontend/src/app/[locale]/blog/page.tsx b/frontend/src/app/[locale]/blog/page.tsx index 84a918d23..fe38b9db7 100644 --- a/frontend/src/app/[locale]/blog/page.tsx +++ b/frontend/src/app/[locale]/blog/page.tsx @@ -57,7 +57,7 @@ export default async function Page({ searchParams: { [key: string]: string | string[] | undefined }; }) { const page = typeof searchParams.page === 'string' ? Number(searchParams.page) : 1; - const pageSize = 8; + const pageSize = 12; const response = await fetchBlogsPageData(page, pageSize); if (!response?.data || !response?.data.meta?.pagination) { diff --git a/frontend/src/app/[locale]/home.tsx b/frontend/src/app/[locale]/home.tsx index 780b4fbe2..9df95ffcc 100644 --- a/frontend/src/app/[locale]/home.tsx +++ b/frontend/src/app/[locale]/home.tsx @@ -4,6 +4,7 @@ import { useTranslations } from 'next-intl'; import { ThematicsBlock, ImagesCarousel, ResultsCard, NewsSmallBlock, TalksBlock, Title, TitleProps, HeroBlock } from '@/components'; import { HomepageData } from './page'; import Image from 'next/image' +import { getPressReleaseLink } from '@/lib/utils'; type HomepageProps = { data: HomepageData; @@ -70,7 +71,7 @@ export default function Homepage({ data }: HomepageProps) { talk: isBlog ? (resource.blog as { title: string })?.title || '' : (resource.press_release as { title: string })?.title || '', image: isBlog ? resource.blog?.thumbnail?.url || '' : resource.press_release?.thumbnail?.url || '', ctaText: isBlog ? t('resources.articleCtaText') : t('resources.pressCtaText'), - ctaLink: isBlog ? `/articles/${resource.blog?.slug || ''}` : (resource.press_release as { article_link: string })?.article_link || '', + ctaLink: isBlog ? `/articles/${resource.blog?.slug || ''}` : getPressReleaseLink(resource.press_release as { press_release_type: string; article_link: string; article_file: {url: string;}}) || '', } }) ?? []; diff --git a/frontend/src/app/[locale]/positions/positions.tsx b/frontend/src/app/[locale]/positions/positions.tsx index 93633bbf9..6a9c32d51 100644 --- a/frontend/src/app/[locale]/positions/positions.tsx +++ b/frontend/src/app/[locale]/positions/positions.tsx @@ -5,6 +5,7 @@ import { BaseCardsBlock, LargeTextImage } from '@/components'; import Animation from './_partials/Animations'; import { PositionsPageData } from './page'; import { useRef } from 'react'; +import { getPressReleaseLink } from '@/lib/utils'; type PositionPageProps = { data: PositionsPageData @@ -15,7 +16,7 @@ function transformPressReleases(press_releases: NonNullable tag.name) || [] : (resource.press_release as { tags: string[] })?.tags || [], isBlank: true, } diff --git a/frontend/src/app/[locale]/projects/[slug]/projectDetail.tsx b/frontend/src/app/[locale]/projects/[slug]/projectDetail.tsx index 42df86688..c62d8f2f6 100644 --- a/frontend/src/app/[locale]/projects/[slug]/projectDetail.tsx +++ b/frontend/src/app/[locale]/projects/[slug]/projectDetail.tsx @@ -88,7 +88,7 @@ function getNews(project: ProjectPageData) { title: pressRelease.title, tag: pressRelease.tags ?? [], image: pressRelease.thumbnail?.url, - link: pressRelease.article_link, + link: getPressReleaseLink(pressRelease as { press_release_type: string; article_link: string; article_file: {url: string;}}), date: new Date(pressRelease.published_date || '').toLocaleString(undefined, { month: 'short', day: 'numeric', year: 'numeric'}), })) || []; } diff --git a/frontend/src/lib/strapi-types.d.ts b/frontend/src/lib/strapi-types.d.ts index 576f1bfe6..330b4b74a 100644 --- a/frontend/src/lib/strapi-types.d.ts +++ b/frontend/src/lib/strapi-types.d.ts @@ -2057,6 +2057,7 @@ export interface components { scientific_committee?: (number | string)[]; strategic_committee?: (number | string)[]; division_managers?: (number | string)[]; + activity_reports?: components["schemas"]["FileListWithDatesFileWithDateComponent"][]; locale?: string; localizations?: (number | string)[]; }; @@ -2681,6 +2682,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -2954,6 +3004,7 @@ export interface components { id?: number; documentId?: string; }[]; + activity_reports?: components["schemas"]["FileListWithDatesFileWithDateComponent"][]; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -3003,6 +3054,7 @@ export interface components { id?: number; documentId?: string; }[]; + activity_reports?: components["schemas"]["FileListWithDatesFileWithDateComponent"][]; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -3194,6 +3246,58 @@ export interface components { }[]; }; }; + FileListWithDatesFileWithDateComponent: { + id?: number; + /** Format: date */ + date?: string; + file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; + }; KpiKpiComponent: { id?: number; stat?: string; @@ -3918,6 +4022,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -5118,6 +5271,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -6196,6 +6398,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -7120,6 +7371,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -9039,6 +9339,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -9973,6 +10322,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -11731,6 +12129,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -12956,11 +13403,60 @@ export interface components { id?: number; documentId?: string; }[]; - }; - tags?: { - id?: number; - documentId?: string; - tag?: string; + }; + tags?: { + id?: number; + documentId?: string; + tag?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -12980,7 +13476,7 @@ export interface components { id?: number; documentId?: string; }[]; - }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -13421,6 +13917,10 @@ export interface components { /** @example string or id */ thumbnail?: number | string; tags?: (number | string)[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + /** @example string or id */ + article_file?: number | string; locale?: string; localizations?: (number | string)[]; }; @@ -14084,6 +14584,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -14518,6 +15067,55 @@ export interface components { id?: number; documentId?: string; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -15336,6 +15934,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -16401,6 +17048,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -17493,21 +18189,70 @@ export interface components { createdBy?: { id?: number; documentId?: string; - }; - updatedBy?: { + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; + tags?: { + id?: number; + documentId?: string; + tag?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { id?: number; documentId?: string; }; - locale?: string; - localizations?: { - id?: number; - documentId?: string; - }[]; - }; - tags?: { - id?: number; - documentId?: string; - tag?: string; + folderPath?: string; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -17527,7 +18272,7 @@ export interface components { id?: number; documentId?: string; }[]; - }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -18642,6 +19387,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -19842,6 +20636,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -20792,6 +21635,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -22056,6 +22948,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ @@ -23335,6 +24276,55 @@ export interface components { documentId?: string; }[]; }[]; + /** @enum {string} */ + press_release_type?: "link" | "file"; + article_file?: { + id?: number; + documentId?: string; + name?: string; + alternativeText?: string; + caption?: string; + width?: number; + height?: number; + formats?: unknown; + hash?: string; + ext?: string; + mime?: string; + /** Format: float */ + size?: number; + url?: string; + previewUrl?: string; + provider?: string; + provider_metadata?: unknown; + related?: { + id?: number; + documentId?: string; + }[]; + folder?: { + id?: number; + documentId?: string; + }; + folderPath?: string; + /** Format: date-time */ + createdAt?: string; + /** Format: date-time */ + updatedAt?: string; + /** Format: date-time */ + publishedAt?: string; + createdBy?: { + id?: number; + documentId?: string; + }; + updatedBy?: { + id?: number; + documentId?: string; + }; + locale?: string; + localizations?: { + id?: number; + documentId?: string; + }[]; + }; /** Format: date-time */ createdAt?: string; /** Format: date-time */ diff --git a/frontend/src/lib/utils.ts b/frontend/src/lib/utils.ts index 1cdab8cbc..be91b89d4 100644 --- a/frontend/src/lib/utils.ts +++ b/frontend/src/lib/utils.ts @@ -44,3 +44,16 @@ export function generateMetadataFromSeo(seo: { }, }; } + +export function getPressReleaseLink(press_release: { + press_release_type: string; + article_link?: string; + article_file?: { + url: string; + }; +}) { + if(press_release.press_release_type === 'file') { + return press_release.article_file?.url + } + return press_release.article_link ?? "" +} \ No newline at end of file diff --git a/frontend/src/types/strapi/generated/contentTypes.d.ts b/frontend/src/types/strapi/generated/contentTypes.d.ts index e1c0154fb..f9cfc926d 100644 --- a/frontend/src/types/strapi/generated/contentTypes.d.ts +++ b/frontend/src/types/strapi/generated/contentTypes.d.ts @@ -1190,6 +1190,14 @@ export interface ApiPressReleasePressRelease }; }; attributes: { + article_file: Schema.Attribute.Media< + 'images' | 'files' | 'videos' | 'audios' + > & + Schema.Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; article_link: Schema.Attribute.String & Schema.Attribute.SetPluginOptions<{ i18n: { @@ -1228,6 +1236,12 @@ export interface ApiPressReleasePressRelease localized: true; }; }>; + press_release_type: Schema.Attribute.Enumeration<['link', 'file']> & + Schema.Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; published_date: Schema.Attribute.Date & Schema.Attribute.SetPluginOptions<{ i18n: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b69a98d8c..10e28d7b5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -100,6 +100,9 @@ importers: '@types/qs': specifier: ^6.9.16 version: 6.14.0 + baseline-browser-mapping: + specifier: ^2.10.23 + version: 2.10.35 frontend: dependencies: @@ -5457,8 +5460,9 @@ packages: resolution: {integrity: sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==} engines: {node: '>=0.10.0'} - baseline-browser-mapping@2.8.5: - resolution: {integrity: sha512-TiU4qUT9jdCuh4aVOG7H1QozyeI2sZRqoRPdqBIaslfNt4WUSanRBueAwl2x5jt4rXBMim3lIN2x6yT8PDi24Q==} + baseline-browser-mapping@2.10.35: + resolution: {integrity: sha512-honAfLBde0HAFLdNyBEfuuENkF6zR+ozxqxa/2zJKHBe1qzLqyTSeRKpdPEHAP03rlDGyQOPnCSxnVpVqQo9Mg==} + engines: {node: '>=6.0.0'} hasBin: true bcp-47-match@2.0.3: @@ -20047,7 +20051,7 @@ snapshots: mixin-deep: 1.3.2 pascalcase: 0.1.1 - baseline-browser-mapping@2.8.5: {} + baseline-browser-mapping@2.10.35: {} bcp-47-match@2.0.3: {} @@ -20163,7 +20167,7 @@ snapshots: browserslist@4.26.2: dependencies: - baseline-browser-mapping: 2.8.5 + baseline-browser-mapping: 2.10.35 caniuse-lite: 1.0.30001743 electron-to-chromium: 1.5.221 node-releases: 2.0.21