[yoga-11] add common type and add logo

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

View File

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

View File

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

View File

@ -4,21 +4,27 @@
"info": {
"singularName": "yoga-common",
"pluralName": "yoga-commons",
"displayName": "YogaCommon"
"displayName": "YogaCommon",
"description": ""
},
"options": {
"draftAndPublish": true
},
"attributes": {
"logoImage": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images",
"files",
"videos",
"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 {
collectionName: 'yoga_commons';
info: {
description: '';
displayName: 'YogaCommon';
pluralName: 'yoga-commons';
singularName: 'yoga-common';
@ -1255,6 +1256,7 @@ export interface ApiYogaCommonYogaCommon extends Struct.CollectionTypeSchema {
> &
Schema.Attribute.Private;
logoImage: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
name: Schema.Attribute.String & Schema.Attribute.Required;
publishedAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &