From 4d239f7c7a701050cb321bf3ce99a1d6317df4ee Mon Sep 17 00:00:00 2001 From: Schneider Roland Date: Tue, 4 Feb 2025 22:13:50 +0100 Subject: [PATCH] add concatct page --- .../api/contact-page.ts | 52 +++++++++++++++++++ .../api/yoga-google-maps-component.ts | 26 ++++++++++ .../api/contact-page.ts | 52 +++++++++++++++++++ .../api/yoga-google-maps-component.ts | 26 ++++++++++ .../content-types/contact-page/schema.json | 42 +++++++++++++++ .../contact-page/controllers/contact-page.ts | 7 +++ .../api/contact-page/routes/contact-page.ts | 7 +++ .../api/contact-page/services/contact-page.ts | 7 +++ .../yoga-google-maps-component/schema.json | 21 ++++++++ .../controllers/yoga-google-maps-component.ts | 7 +++ .../routes/yoga-google-maps-component.ts | 7 +++ .../services/yoga-google-maps-component.ts | 7 +++ 12 files changed, 261 insertions(+) create mode 100644 yoga-app/src/types/generated-strapi-interfaces/api/contact-page.ts create mode 100644 yoga-app/src/types/generated-strapi-interfaces/api/yoga-google-maps-component.ts create mode 100644 yoga-cms/generated-strapi-interfaces/api/contact-page.ts create mode 100644 yoga-cms/generated-strapi-interfaces/api/yoga-google-maps-component.ts create mode 100644 yoga-cms/src/api/contact-page/content-types/contact-page/schema.json create mode 100644 yoga-cms/src/api/contact-page/controllers/contact-page.ts create mode 100644 yoga-cms/src/api/contact-page/routes/contact-page.ts create mode 100644 yoga-cms/src/api/contact-page/services/contact-page.ts create mode 100644 yoga-cms/src/api/yoga-google-maps-component/content-types/yoga-google-maps-component/schema.json create mode 100644 yoga-cms/src/api/yoga-google-maps-component/controllers/yoga-google-maps-component.ts create mode 100644 yoga-cms/src/api/yoga-google-maps-component/routes/yoga-google-maps-component.ts create mode 100644 yoga-cms/src/api/yoga-google-maps-component/services/yoga-google-maps-component.ts diff --git a/yoga-app/src/types/generated-strapi-interfaces/api/contact-page.ts b/yoga-app/src/types/generated-strapi-interfaces/api/contact-page.ts new file mode 100644 index 0000000..5f909a0 --- /dev/null +++ b/yoga-app/src/types/generated-strapi-interfaces/api/contact-page.ts @@ -0,0 +1,52 @@ +// Interface automatically generated by schemas-to-ts + +import { YogaContactUs } from './yoga-contact-us'; +import { YogaGoogleMapsComponent } from './yoga-google-maps-component'; +import { YogaSubscribeNowComponent } from './yoga-subscribe-now-component'; +import { YogaFooter } from './yoga-footer'; +import { YogaContactUs_Plain } from './yoga-contact-us'; +import { YogaGoogleMapsComponent_Plain } from './yoga-google-maps-component'; +import { YogaSubscribeNowComponent_Plain } from './yoga-subscribe-now-component'; +import { YogaFooter_Plain } from './yoga-footer'; +import { AdminPanelRelationPropertyModification } from '../common/AdminPanelRelationPropertyModification'; + +export interface ContactPage { + id: number; + attributes: { + createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string; + description?: string; + contactUs?: { data: YogaContactUs }; + google_maps?: { data: YogaGoogleMapsComponent }; + subscribe?: { data: YogaSubscribeNowComponent }; + footer?: { data: YogaFooter }; + }; +} +export interface ContactPage_Plain { + id: number; + createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string; + description?: string; + contactUs?: YogaContactUs_Plain; + google_maps?: YogaGoogleMapsComponent_Plain; + subscribe?: YogaSubscribeNowComponent_Plain; + footer?: YogaFooter_Plain; +} + +export interface ContactPage_NoRelations { + id: number; + createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string; + description?: string; + contactUs?: number; + google_maps?: number; + subscribe?: number; + footer?: number; +} + +export interface ContactPage_AdminPanelLifeCycle { + id: number; + createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string; + description?: string; + contactUs?: AdminPanelRelationPropertyModification; + google_maps?: AdminPanelRelationPropertyModification; + subscribe?: AdminPanelRelationPropertyModification; + footer?: AdminPanelRelationPropertyModification; +} diff --git a/yoga-app/src/types/generated-strapi-interfaces/api/yoga-google-maps-component.ts b/yoga-app/src/types/generated-strapi-interfaces/api/yoga-google-maps-component.ts new file mode 100644 index 0000000..497ec77 --- /dev/null +++ b/yoga-app/src/types/generated-strapi-interfaces/api/yoga-google-maps-component.ts @@ -0,0 +1,26 @@ +// Interface automatically generated by schemas-to-ts + +export interface YogaGoogleMapsComponent { + id: number; + attributes: { + createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string; + google_maps_url?: string; + }; +} +export interface YogaGoogleMapsComponent_Plain { + id: number; + createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string; + google_maps_url?: string; +} + +export interface YogaGoogleMapsComponent_NoRelations { + id: number; + createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string; + google_maps_url?: string; +} + +export interface YogaGoogleMapsComponent_AdminPanelLifeCycle { + id: number; + createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string; + google_maps_url?: string; +} diff --git a/yoga-cms/generated-strapi-interfaces/api/contact-page.ts b/yoga-cms/generated-strapi-interfaces/api/contact-page.ts new file mode 100644 index 0000000..5f909a0 --- /dev/null +++ b/yoga-cms/generated-strapi-interfaces/api/contact-page.ts @@ -0,0 +1,52 @@ +// Interface automatically generated by schemas-to-ts + +import { YogaContactUs } from './yoga-contact-us'; +import { YogaGoogleMapsComponent } from './yoga-google-maps-component'; +import { YogaSubscribeNowComponent } from './yoga-subscribe-now-component'; +import { YogaFooter } from './yoga-footer'; +import { YogaContactUs_Plain } from './yoga-contact-us'; +import { YogaGoogleMapsComponent_Plain } from './yoga-google-maps-component'; +import { YogaSubscribeNowComponent_Plain } from './yoga-subscribe-now-component'; +import { YogaFooter_Plain } from './yoga-footer'; +import { AdminPanelRelationPropertyModification } from '../common/AdminPanelRelationPropertyModification'; + +export interface ContactPage { + id: number; + attributes: { + createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string; + description?: string; + contactUs?: { data: YogaContactUs }; + google_maps?: { data: YogaGoogleMapsComponent }; + subscribe?: { data: YogaSubscribeNowComponent }; + footer?: { data: YogaFooter }; + }; +} +export interface ContactPage_Plain { + id: number; + createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string; + description?: string; + contactUs?: YogaContactUs_Plain; + google_maps?: YogaGoogleMapsComponent_Plain; + subscribe?: YogaSubscribeNowComponent_Plain; + footer?: YogaFooter_Plain; +} + +export interface ContactPage_NoRelations { + id: number; + createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string; + description?: string; + contactUs?: number; + google_maps?: number; + subscribe?: number; + footer?: number; +} + +export interface ContactPage_AdminPanelLifeCycle { + id: number; + createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string; + description?: string; + contactUs?: AdminPanelRelationPropertyModification; + google_maps?: AdminPanelRelationPropertyModification; + subscribe?: AdminPanelRelationPropertyModification; + footer?: AdminPanelRelationPropertyModification; +} diff --git a/yoga-cms/generated-strapi-interfaces/api/yoga-google-maps-component.ts b/yoga-cms/generated-strapi-interfaces/api/yoga-google-maps-component.ts new file mode 100644 index 0000000..497ec77 --- /dev/null +++ b/yoga-cms/generated-strapi-interfaces/api/yoga-google-maps-component.ts @@ -0,0 +1,26 @@ +// Interface automatically generated by schemas-to-ts + +export interface YogaGoogleMapsComponent { + id: number; + attributes: { + createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string; + google_maps_url?: string; + }; +} +export interface YogaGoogleMapsComponent_Plain { + id: number; + createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string; + google_maps_url?: string; +} + +export interface YogaGoogleMapsComponent_NoRelations { + id: number; + createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string; + google_maps_url?: string; +} + +export interface YogaGoogleMapsComponent_AdminPanelLifeCycle { + id: number; + createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string; + google_maps_url?: string; +} diff --git a/yoga-cms/src/api/contact-page/content-types/contact-page/schema.json b/yoga-cms/src/api/contact-page/content-types/contact-page/schema.json new file mode 100644 index 0000000..d706374 --- /dev/null +++ b/yoga-cms/src/api/contact-page/content-types/contact-page/schema.json @@ -0,0 +1,42 @@ +{ + "kind": "singleType", + "collectionName": "contact_pages", + "info": { + "singularName": "contact-page", + "pluralName": "contact-pages", + "displayName": "ContactPage", + "description": "" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": {}, + "attributes": { + "header": { + "type": "string" + }, + "description": { + "type": "text" + }, + "contactUs": { + "type": "relation", + "relation": "oneToOne", + "target": "api::yoga-contact-us.yoga-contact-us" + }, + "google_maps": { + "type": "relation", + "relation": "oneToOne", + "target": "api::yoga-google-maps-component.yoga-google-maps-component" + }, + "subscribe": { + "type": "relation", + "relation": "oneToOne", + "target": "api::yoga-subscribe-now-component.yoga-subscribe-now-component" + }, + "footer": { + "type": "relation", + "relation": "oneToOne", + "target": "api::yoga-footer.yoga-footer" + } + } +} diff --git a/yoga-cms/src/api/contact-page/controllers/contact-page.ts b/yoga-cms/src/api/contact-page/controllers/contact-page.ts new file mode 100644 index 0000000..4ca001e --- /dev/null +++ b/yoga-cms/src/api/contact-page/controllers/contact-page.ts @@ -0,0 +1,7 @@ +/** + * contact-page controller + */ + +import { factories } from '@strapi/strapi' + +export default factories.createCoreController('api::contact-page.contact-page'); diff --git a/yoga-cms/src/api/contact-page/routes/contact-page.ts b/yoga-cms/src/api/contact-page/routes/contact-page.ts new file mode 100644 index 0000000..e13b979 --- /dev/null +++ b/yoga-cms/src/api/contact-page/routes/contact-page.ts @@ -0,0 +1,7 @@ +/** + * contact-page router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::contact-page.contact-page'); diff --git a/yoga-cms/src/api/contact-page/services/contact-page.ts b/yoga-cms/src/api/contact-page/services/contact-page.ts new file mode 100644 index 0000000..fb5797d --- /dev/null +++ b/yoga-cms/src/api/contact-page/services/contact-page.ts @@ -0,0 +1,7 @@ +/** + * contact-page service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::contact-page.contact-page'); diff --git a/yoga-cms/src/api/yoga-google-maps-component/content-types/yoga-google-maps-component/schema.json b/yoga-cms/src/api/yoga-google-maps-component/content-types/yoga-google-maps-component/schema.json new file mode 100644 index 0000000..37f9c46 --- /dev/null +++ b/yoga-cms/src/api/yoga-google-maps-component/content-types/yoga-google-maps-component/schema.json @@ -0,0 +1,21 @@ +{ + "kind": "collectionType", + "collectionName": "yoga_google_maps_components", + "info": { + "singularName": "yoga-google-maps-component", + "pluralName": "yoga-google-maps-components", + "displayName": "YogaGoogleMapsComponent" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": {}, + "attributes": { + "name": { + "type": "string" + }, + "google_maps_url": { + "type": "text" + } + } +} diff --git a/yoga-cms/src/api/yoga-google-maps-component/controllers/yoga-google-maps-component.ts b/yoga-cms/src/api/yoga-google-maps-component/controllers/yoga-google-maps-component.ts new file mode 100644 index 0000000..c85b5ce --- /dev/null +++ b/yoga-cms/src/api/yoga-google-maps-component/controllers/yoga-google-maps-component.ts @@ -0,0 +1,7 @@ +/** + * yoga-google-maps-component controller + */ + +import { factories } from '@strapi/strapi' + +export default factories.createCoreController('api::yoga-google-maps-component.yoga-google-maps-component'); diff --git a/yoga-cms/src/api/yoga-google-maps-component/routes/yoga-google-maps-component.ts b/yoga-cms/src/api/yoga-google-maps-component/routes/yoga-google-maps-component.ts new file mode 100644 index 0000000..178e760 --- /dev/null +++ b/yoga-cms/src/api/yoga-google-maps-component/routes/yoga-google-maps-component.ts @@ -0,0 +1,7 @@ +/** + * yoga-google-maps-component router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::yoga-google-maps-component.yoga-google-maps-component'); diff --git a/yoga-cms/src/api/yoga-google-maps-component/services/yoga-google-maps-component.ts b/yoga-cms/src/api/yoga-google-maps-component/services/yoga-google-maps-component.ts new file mode 100644 index 0000000..d89f39e --- /dev/null +++ b/yoga-cms/src/api/yoga-google-maps-component/services/yoga-google-maps-component.ts @@ -0,0 +1,7 @@ +/** + * yoga-google-maps-component service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::yoga-google-maps-component.yoga-google-maps-component');