[yoga-11] add common type and add logo

This commit is contained in:
Roland Schneider 2025-06-08 21:12:59 +02:00
parent ca60a9a2f4
commit 3bbd9dcbf6
4 changed files with 17 additions and 5 deletions

View File

@ -31,7 +31,7 @@ export default async function ServiceArticlePage({params}: {
if (!servicePage) { if (!servicePage) {
return notFound() return notFound()
} }
const {subscribeNow, footer} = servicePage; const {subscribeNow, footer, common} = servicePage;
const servicesByName = await strapiApi.getService(slug); const servicesByName = await strapiApi.getService(slug);
if (!servicesByName || servicesByName.length === 0) { if (!servicesByName || servicesByName.length === 0) {
return notFound(); return notFound();

View File

@ -8,19 +8,23 @@ export interface YogaCommon {
id: number; id: number;
attributes: { attributes: {
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: { data: Media }; createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: { data: Media };
name: string;
}; };
} }
export interface YogaCommon_Plain { export interface YogaCommon_Plain {
id: number; id: number;
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: Media_Plain; createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: Media_Plain;
name: string;
} }
export interface YogaCommon_NoRelations { export interface YogaCommon_NoRelations {
id: number; id: number;
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: number; createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: number;
name: string;
} }
export interface YogaCommon_AdminPanelLifeCycle { export interface YogaCommon_AdminPanelLifeCycle {
id: number; id: number;
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: AdminPanelRelationPropertyModification<Media_Plain>; createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: AdminPanelRelationPropertyModification<Media_Plain>;
name: string;
} }

View File

@ -4,21 +4,27 @@
"info": { "info": {
"singularName": "yoga-common", "singularName": "yoga-common",
"pluralName": "yoga-commons", "pluralName": "yoga-commons",
"displayName": "YogaCommon" "displayName": "YogaCommon",
"description": ""
}, },
"options": { "options": {
"draftAndPublish": true "draftAndPublish": true
}, },
"attributes": { "attributes": {
"logoImage": { "logoImage": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [ "allowedTypes": [
"images", "images",
"files", "files",
"videos", "videos",
"audios" "audios"
], ]
"type": "media", },
"multiple": false "name": {
"type": "string",
"required": true
} }
} }
} }

View File

@ -1237,6 +1237,7 @@ export interface ApiYogaBlogPostsComponentYogaBlogPostsComponent
export interface ApiYogaCommonYogaCommon extends Struct.CollectionTypeSchema { export interface ApiYogaCommonYogaCommon extends Struct.CollectionTypeSchema {
collectionName: 'yoga_commons'; collectionName: 'yoga_commons';
info: { info: {
description: '';
displayName: 'YogaCommon'; displayName: 'YogaCommon';
pluralName: 'yoga-commons'; pluralName: 'yoga-commons';
singularName: 'yoga-common'; singularName: 'yoga-common';
@ -1255,6 +1256,7 @@ export interface ApiYogaCommonYogaCommon extends Struct.CollectionTypeSchema {
> & > &
Schema.Attribute.Private; Schema.Attribute.Private;
logoImage: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>; logoImage: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
name: Schema.Attribute.String & Schema.Attribute.Required;
publishedAt: Schema.Attribute.DateTime; publishedAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime; updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &