Compare commits
23 Commits
feature/yo
...
90a7dbf827
| Author | SHA1 | Date | |
|---|---|---|---|
| 90a7dbf827 | |||
|
|
fac8dd6f19 | ||
|
|
cc6d8147de | ||
| 217a26ca83 | |||
|
|
d50eac40c3 | ||
|
|
f0f0a975a9 | ||
|
|
97feef9395 | ||
| 6866c0e41c | |||
|
|
dd6f21c57b | ||
|
|
6bb9365a6c | ||
|
|
434de73554 | ||
|
|
d248ccd985 | ||
|
|
0f3056af01 | ||
|
|
0be0070568 | ||
| 7a3cf063ed | |||
|
|
f33e97666e | ||
|
|
67839dbfb9 | ||
|
|
35f172702a | ||
|
|
22272e0a17 | ||
| 4a0cf5762f | |||
|
|
16b6107206 | ||
|
|
9dc426bf64 | ||
|
|
2c71984d96 |
9
api.http
9
api.http
@@ -22,3 +22,12 @@ x
|
||||
GET {{domain}}/api/yoga-blog-posts/wmhqy1n8japcfpy0of4hauwm
|
||||
Accept: application/json
|
||||
#Authorization: Bearer {{token}}
|
||||
|
||||
|
||||
### GET request with a header
|
||||
GET {{domain}}/api/yoga-single-services?filters[name][$eq]=service4
|
||||
Accept: application/json
|
||||
|
||||
### GET service page
|
||||
GET {{domain}}/api/service-page?fields[0]=*&populate[subscribeNow][fields][0]=*&populate[footer][fields][0]=*&populate[footer][populate][links][fields][0]=*&populate[footer][populate][contactUsEmail][fields][0]=*&populate[footer][populate][contactUsLocation][fields][0]=*&populate[footer][populate][contactUsPhoneNumber][fields][0]=*
|
||||
Accept: application/json
|
||||
|
||||
5
dev.sh
Executable file
5
dev.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd environment/dev/docker-compose/yogastic
|
||||
docker compose up -d
|
||||
|
||||
@@ -1 +1 @@
|
||||
202505181151.77363d0
|
||||
202505291116.217a26c
|
||||
|
||||
@@ -9,4 +9,4 @@ echo "build image ${TAG} from folder ${PROJECT_ROOT}"
|
||||
|
||||
cd $PROJECT_ROOT
|
||||
|
||||
docker build --build-arg NODE_ENV=production -t $TAG .
|
||||
docker build --build-arg NODE_ENV=production -t $TAG_INTERNAL -t $TAG_PUBLIC .
|
||||
|
||||
@@ -6,4 +6,5 @@ echo "Reading version file: ${VERSION_FILE}"
|
||||
|
||||
export VERSION=$(cat "${VERSION_FILE}")
|
||||
|
||||
export TAG=docker.rschneider.hu/infra/yoga-cms:$VERSION
|
||||
export TAG_PUBLIC=docker.rschneider.hu/infra/yoga-cms:$VERSION
|
||||
export TAG_INTERNAL=internal-docker.rschneider.hu/infra/yoga-cms:$VERSION
|
||||
|
||||
@@ -3,5 +3,7 @@
|
||||
CURRENT_DIR=$(dirname "$0")
|
||||
# push docker image
|
||||
source "${CURRENT_DIR}/build.docker.env.sh"
|
||||
echo "push image ${TAG}"
|
||||
docker push $TAG
|
||||
echo "push image ${TAG_INTERNAL}"
|
||||
docker push $TAG_INTERNAL
|
||||
echo "push image ${TAG_PUBLIC}"
|
||||
docker push $TAG_PUBLIC
|
||||
|
||||
@@ -1 +1 @@
|
||||
202505180959.57552b3
|
||||
202507041949.cc6d814
|
||||
|
||||
@@ -21,7 +21,7 @@ services:
|
||||
networks:
|
||||
- yogastic
|
||||
app:
|
||||
image: docker.rschneider.hu/infra/yoga-app:202505181151.77363d0
|
||||
image: docker.rschneider.hu/infra/yoga-app:202505291116.217a26c
|
||||
platform: linux/amd64
|
||||
ports:
|
||||
- '4025:3000'
|
||||
@@ -47,7 +47,7 @@ services:
|
||||
- proxy_shared
|
||||
- yogastic
|
||||
cms:
|
||||
image: docker.rschneider.hu/infra/yoga-cms:202505180959.57552b3
|
||||
image: docker.rschneider.hu/infra/yoga-cms:202507041949.cc6d814
|
||||
ports:
|
||||
- '4026:1337'
|
||||
environment:
|
||||
@@ -71,7 +71,6 @@ services:
|
||||
- yogastic
|
||||
volumes:
|
||||
- strapi-uploads:/opt/app/public/uploads
|
||||
|
||||
volumes:
|
||||
next-db: {}
|
||||
strapi-db: {}
|
||||
|
||||
@@ -16,9 +16,9 @@ const eslintConfig = [
|
||||
"next/core-web-vitals",
|
||||
"next/typescript",
|
||||
],
|
||||
// rules: {
|
||||
// "@typescript-eslint/no-explicit-any": "off"
|
||||
// },
|
||||
rules: {
|
||||
"@typescript-eslint/no-explicit-any": "off"
|
||||
},
|
||||
}
|
||||
|
||||
),
|
||||
@@ -32,6 +32,6 @@ const eslintConfig = [
|
||||
// }
|
||||
];
|
||||
|
||||
console.info("eslint config",eslintConfig)
|
||||
// console.info("eslint config",eslintConfig)
|
||||
|
||||
export default eslintConfig;
|
||||
|
||||
11
yoga-app/package-lock.json
generated
11
yoga-app/package-lock.json
generated
@@ -9,6 +9,7 @@
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^6.7.2",
|
||||
"@strapi/blocks-react-renderer": "^1.0.2",
|
||||
"@strapi/database": "^5.10.3",
|
||||
"@types/aos": "^3.0.7",
|
||||
"@types/bcrypt": "^5.0.2",
|
||||
@@ -1393,6 +1394,16 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@strapi/blocks-react-renderer": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@strapi/blocks-react-renderer/-/blocks-react-renderer-1.0.2.tgz",
|
||||
"integrity": "sha512-pRV/WMreo5wyrLg7J0pw1DM9lg8U8m+QA7Bd8CPN3beUBTdDhYrFTTNZh3XveEdnURZNJu1X0aWXAg4SzVg7QA==",
|
||||
"hasInstallScript": true,
|
||||
"peerDependencies": {
|
||||
"react": "^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^18.0.0 || ^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@strapi/database": {
|
||||
"version": "5.10.3",
|
||||
"resolved": "https://registry.npmjs.org/@strapi/database/-/database-5.10.3.tgz",
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^6.7.2",
|
||||
"@strapi/blocks-react-renderer": "^1.0.2",
|
||||
"@strapi/database": "^5.10.3",
|
||||
"@types/aos": "^3.0.7",
|
||||
"@types/bcrypt": "^5.0.2",
|
||||
|
||||
25
yoga-app/src/api/strapi/query/service.json
Normal file
25
yoga-app/src/api/strapi/query/service.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"subscribeNow": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"footer": {
|
||||
"fields": ["*"],
|
||||
"populate": {
|
||||
"links": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"contactUsEmail": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"contactUsLocation": {
|
||||
"fields": ["*"]
|
||||
},
|
||||
"contactUsPhoneNumber": {
|
||||
"fields": ["*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import qs from "qs";
|
||||
import aboutQuery from "@/api/strapi/query/about.json";
|
||||
import homeQuery from "@/api/strapi/query/home.json";
|
||||
import servicesQuery from "@/api/strapi/query/services.json";
|
||||
import serviceQuery from "@/api/strapi/query/service.json";
|
||||
import pricesQuery from "@/api/strapi/query/prices.json";
|
||||
import faqQuery from "@/api/strapi/query/faq.json";
|
||||
import contactQuery from "@/api/strapi/query/contact.json";
|
||||
@@ -13,6 +14,8 @@ import {ServicesPage_Plain} from "@/types/generated-strapi-interfaces/api/servic
|
||||
import {PricesPage_Plain} from "@/types/generated-strapi-interfaces/api/prices-page";
|
||||
import {FaqPage_Plain} from "@/types/generated-strapi-interfaces/api/faq-page";
|
||||
import {ContactPage_Plain} from "@/types/generated-strapi-interfaces/api/contact-page";
|
||||
import {YogaSingleService_Plain} from "@/types/generated-strapi-interfaces/api/yoga-single-service";
|
||||
import {ServicePage_Plain} from "@/types/generated-strapi-interfaces/api/service-page";
|
||||
|
||||
|
||||
class StrapiApi{
|
||||
@@ -42,6 +45,20 @@ class StrapiApi{
|
||||
return this.getJson("/api/services-page?",servicesQuery);
|
||||
}
|
||||
|
||||
public getServicePage(): Promise<ServicePage_Plain>{
|
||||
return this.getJson("/api/service-page?",serviceQuery);
|
||||
}
|
||||
|
||||
public getService(name: string): Promise<YogaSingleService_Plain[]>{
|
||||
return this.getJson("/api/yoga-single-services?", {
|
||||
filters: {
|
||||
name: {
|
||||
$eq: name,
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
public getPricesPage(): Promise<PricesPage_Plain>{
|
||||
return this.getJson("/api/prices-page?",pricesQuery);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ class StrapiClient{
|
||||
return '/image/'+ imagePath;
|
||||
}
|
||||
public async httpGet(path: string){
|
||||
console.info("httpGet", path);
|
||||
return await httpClient.httpGet(this.strapiUrl + path);
|
||||
}
|
||||
public async httpGetJson<T>(url: string): Promise<Payload<T>>{
|
||||
|
||||
@@ -16,8 +16,6 @@ import webApi from "@/api/web-client/web-api";
|
||||
export default async function Home() {
|
||||
const pageData = await webApi.getHomePage();
|
||||
|
||||
console.info(JSON.stringify(pageData))
|
||||
|
||||
const {
|
||||
header,
|
||||
ourServices,
|
||||
|
||||
11
yoga-app/src/app/services/[slug]/not-found.tsx
Normal file
11
yoga-app/src/app/services/[slug]/not-found.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import Link from 'next/link'
|
||||
|
||||
export default function NotFound() {
|
||||
return (
|
||||
<div>
|
||||
<h2>Nem található</h2>
|
||||
<p>Could not find requested resource</p>
|
||||
<Link href="/">Vissza a kezdőoldalra</Link>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
3
yoga-app/src/app/services/[slug]/page.module.css
Normal file
3
yoga-app/src/app/services/[slug]/page.module.css
Normal file
@@ -0,0 +1,3 @@
|
||||
.article h1{
|
||||
color: black;
|
||||
}
|
||||
@@ -1,6 +1,68 @@
|
||||
import React from "react";
|
||||
import strapiApi from "@/api/strapi/strapi-api";
|
||||
import {BlocksContent} from "@strapi/blocks-react-renderer";
|
||||
import SubscribeComponent from "@/components/subscribe.component";
|
||||
import FooterComponent from "@/components/footer.component";
|
||||
import SubHeaderComponent from "@/components/subHeader.component";
|
||||
import AosComponent from "@/components/aos.component";
|
||||
import styles from './page.module.css'
|
||||
import NextBlocksRenderer from "@/components/next.blocks.renderer";
|
||||
import clsx from "clsx";
|
||||
import {notFound} from "next/navigation";
|
||||
|
||||
export default async function ServiceDetails() {
|
||||
return (
|
||||
<h1>hello </h1>
|
||||
)
|
||||
const rewriteStrapiImageUrlToNextImageUrl = (content: BlocksContent) =>{
|
||||
console.info("content", content);
|
||||
for(const item of content){
|
||||
if ( item.type == 'image'){
|
||||
const imageData = item.image;
|
||||
const url = new URL(imageData.url);
|
||||
imageData.url = strapiApi.getImageUrl(url.pathname);
|
||||
}
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
||||
export default async function ServiceArticlePage({params}: {
|
||||
params: Promise<{ slug: string }>
|
||||
}) {
|
||||
const {slug} = await params
|
||||
|
||||
const servicePage = await strapiApi.getServicePage();
|
||||
if (!servicePage) {
|
||||
return notFound()
|
||||
}
|
||||
const {subscribeNow, footer} = servicePage;
|
||||
const servicesByName = await strapiApi.getService(slug);
|
||||
if (!servicesByName || servicesByName.length === 0) {
|
||||
return notFound();
|
||||
}
|
||||
const selectedService = servicesByName[0];
|
||||
if ( !selectedService?.article?.length ) {
|
||||
return notFound();
|
||||
}
|
||||
const article: BlocksContent = rewriteStrapiImageUrlToNextImageUrl( selectedService.article);
|
||||
|
||||
return (
|
||||
<>
|
||||
{selectedService && selectedService.header && selectedService.description &&
|
||||
<SubHeaderComponent header1={selectedService.header} description={selectedService.description}/>}
|
||||
<section className={clsx( styles.article, 'mb-3')}>
|
||||
<div className="container">
|
||||
<div className={"row"}>
|
||||
<div className={"col-lg-12 col-md-12 col-sm-12 col-xs-12"}>
|
||||
<NextBlocksRenderer
|
||||
content={article as BlocksContent}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
{subscribeNow && <SubscribeComponent config={subscribeNow}/>}
|
||||
{footer && <FooterComponent config={footer}/>}
|
||||
<AosComponent/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
28
yoga-app/src/components/next.blocks.renderer.tsx
Normal file
28
yoga-app/src/components/next.blocks.renderer.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
'use client';
|
||||
import {BlocksContent, BlocksRenderer} from "@strapi/blocks-react-renderer";
|
||||
import React from "react";
|
||||
import YogaImageComponent from "@/components/yoga.image.component";
|
||||
|
||||
export interface Props{
|
||||
content: BlocksContent;
|
||||
}
|
||||
const NextBlocksRenderer = ({ content }: Props) => {
|
||||
return (
|
||||
<BlocksRenderer
|
||||
content={content}
|
||||
blocks={{
|
||||
image: ({image}) => {
|
||||
return (
|
||||
<YogaImageComponent
|
||||
src={image.url}
|
||||
// width={image.width}
|
||||
// height={image.height}
|
||||
alt={image.alternativeText || ""}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}}
|
||||
/>);
|
||||
}
|
||||
|
||||
export default NextBlocksRenderer;
|
||||
@@ -3,13 +3,18 @@ import {YogaSingleService_Plain} from "@/types/generated-strapi-interfaces/api/y
|
||||
import {StrapiFile} from "@/types/types";
|
||||
import strapiApi from "@/api/strapi/strapi-api";
|
||||
import styles from './our.services.item.component.module.css'
|
||||
import Link from "next/link";
|
||||
|
||||
export interface Props {
|
||||
config: YogaSingleService_Plain
|
||||
}
|
||||
|
||||
const OurServiceItemComponent = ({config: {header,description,image}}: Props) => {
|
||||
const OurServiceItemComponent = ({config: {header,description,image,name}}: Props) => {
|
||||
const imageFile: StrapiFile = image as StrapiFile;
|
||||
if (!imageFile || !imageFile.url) {
|
||||
return null
|
||||
}
|
||||
const path = '/services/' + name;
|
||||
return (
|
||||
|
||||
<div className={styles.serviceSlide}>
|
||||
@@ -17,15 +22,15 @@ const OurServiceItemComponent = ({config: {header,description,image}}: Props) =>
|
||||
<div className="services_box_content">
|
||||
<div className="services_box_upper_portion">
|
||||
<figure className="mb-0">
|
||||
<YogaImageComponent src={strapiApi.getImageUrl(imageFile?.url)} alt="" className="img-fluid"/>
|
||||
<YogaImageComponent src={strapiApi.getImageUrl(imageFile.url)} alt="" className="img-fluid"/>
|
||||
</figure>
|
||||
</div>
|
||||
<div className="services_box_lower_portion">
|
||||
<h3>{header}</h3>
|
||||
<p>{description}</p>
|
||||
<div className="btn_wrapper">
|
||||
<a href="/services" className="text-decoration-none"><i
|
||||
className="fa-solid fa-arrow-right" aria-hidden="true"></i></a>
|
||||
<Link href={path} className="text-decoration-none"><i
|
||||
className="fa-solid fa-arrow-right" aria-hidden="true"></i></Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@ export interface Props{
|
||||
config: YogaPrice_Plain
|
||||
}
|
||||
|
||||
export function PriceItemComponent({config: {header,option1,option2,price,icon, image,buttonText}} : Props){
|
||||
export function PriceItemComponent({config: {header, description, option1,option2,price,pricePostfix, icon, image,buttonText}} : Props){
|
||||
// there are some issues with the strapi generated types
|
||||
const iconFile: StrapiFile = icon as StrapiFile;
|
||||
const imageFile: StrapiFile = image as StrapiFile;
|
||||
@@ -28,6 +28,7 @@ export function PriceItemComponent({config: {header,option1,option2,price,icon,
|
||||
</div>
|
||||
<div className="pricing_plans_box_lower_portion">
|
||||
<h3>{header}</h3>
|
||||
<p className={'text-center'}>{description}</p>
|
||||
<ul className="list-unstyled">
|
||||
<li>
|
||||
<i className="fa-solid fa-check" aria-hidden="true"></i>{option1}
|
||||
@@ -38,7 +39,7 @@ export function PriceItemComponent({config: {header,option1,option2,price,icon,
|
||||
</ul>
|
||||
<div className="pricing_plans_span_wrapper">
|
||||
<span className="price">{price} FT</span>
|
||||
<span className="per_month">/per month</span>
|
||||
{ pricePostfix && <span className="per_month">{pricePostfix}</span> }
|
||||
</div>
|
||||
<div className="btn_wrapper">
|
||||
<a className="enroll_now_btn text-decoration-none" href="/pricing.html">{buttonText}</a>
|
||||
|
||||
@@ -17,7 +17,7 @@ export interface Article {
|
||||
cover?: { data: Media };
|
||||
author?: { data: Author };
|
||||
category?: { data: Category };
|
||||
blocks?: object;
|
||||
blocks?: any;
|
||||
};
|
||||
}
|
||||
export interface Article_Plain {
|
||||
@@ -28,7 +28,7 @@ export interface Article_Plain {
|
||||
cover?: Media_Plain;
|
||||
author?: Author_Plain;
|
||||
category?: Category_Plain;
|
||||
blocks?: object;
|
||||
blocks?: any;
|
||||
}
|
||||
|
||||
export interface Article_NoRelations {
|
||||
@@ -39,7 +39,7 @@ export interface Article_NoRelations {
|
||||
cover?: number;
|
||||
author?: number;
|
||||
category?: number;
|
||||
blocks?: object;
|
||||
blocks?: any;
|
||||
}
|
||||
|
||||
export interface Article_AdminPanelLifeCycle {
|
||||
@@ -50,5 +50,5 @@ export interface Article_AdminPanelLifeCycle {
|
||||
cover?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||
author?: AdminPanelRelationPropertyModification<Author_Plain>;
|
||||
category?: AdminPanelRelationPropertyModification<Category_Plain>;
|
||||
blocks?: object;
|
||||
blocks?: any;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
import { YogaSubscribeNowComponent } from './yoga-subscribe-now-component';
|
||||
import { YogaFooter } from './yoga-footer';
|
||||
import { YogaSubscribeNowComponent_Plain } from './yoga-subscribe-now-component';
|
||||
import { YogaFooter_Plain } from './yoga-footer';
|
||||
import { AdminPanelRelationPropertyModification } from '../common/AdminPanelRelationPropertyModification';
|
||||
|
||||
export interface ServicePage {
|
||||
id: number;
|
||||
attributes: {
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string;
|
||||
description?: string;
|
||||
subscribeNow?: { data: YogaSubscribeNowComponent };
|
||||
footer?: { data: YogaFooter };
|
||||
};
|
||||
}
|
||||
export interface ServicePage_Plain {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string;
|
||||
description?: string;
|
||||
subscribeNow?: YogaSubscribeNowComponent_Plain;
|
||||
footer?: YogaFooter_Plain;
|
||||
}
|
||||
|
||||
export interface ServicePage_NoRelations {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string;
|
||||
description?: string;
|
||||
subscribeNow?: number;
|
||||
footer?: number;
|
||||
}
|
||||
|
||||
export interface ServicePage_AdminPanelLifeCycle {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string;
|
||||
description?: string;
|
||||
subscribeNow?: AdminPanelRelationPropertyModification<YogaSubscribeNowComponent_Plain>;
|
||||
footer?: AdminPanelRelationPropertyModification<YogaFooter_Plain>;
|
||||
}
|
||||
@@ -14,6 +14,8 @@ export interface YogaPrice {
|
||||
price?: number;
|
||||
icon?: { data: Media };
|
||||
image?: { data: Media };
|
||||
pricePostfix?: string;
|
||||
description?: string;
|
||||
};
|
||||
}
|
||||
export interface YogaPrice_Plain {
|
||||
@@ -25,6 +27,8 @@ export interface YogaPrice_Plain {
|
||||
price?: number;
|
||||
icon?: Media_Plain;
|
||||
image?: Media_Plain;
|
||||
pricePostfix?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface YogaPrice_NoRelations {
|
||||
@@ -36,6 +40,8 @@ export interface YogaPrice_NoRelations {
|
||||
price?: number;
|
||||
icon?: number;
|
||||
image?: number;
|
||||
pricePostfix?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface YogaPrice_AdminPanelLifeCycle {
|
||||
@@ -47,4 +53,6 @@ export interface YogaPrice_AdminPanelLifeCycle {
|
||||
price?: number;
|
||||
icon?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||
image?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||
pricePostfix?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ export interface YogaSingleService {
|
||||
image?: { data: Media };
|
||||
imageAlt?: string;
|
||||
name?: string;
|
||||
article?: any;
|
||||
locale: string;
|
||||
localizations?: { data: YogaSingleService[] };
|
||||
};
|
||||
@@ -25,6 +26,7 @@ export interface YogaSingleService_Plain {
|
||||
image?: Media_Plain;
|
||||
imageAlt?: string;
|
||||
name?: string;
|
||||
article?: any;
|
||||
locale: string;
|
||||
localizations?: YogaSingleService_Plain[];
|
||||
}
|
||||
@@ -37,6 +39,7 @@ export interface YogaSingleService_NoRelations {
|
||||
image?: number;
|
||||
imageAlt?: string;
|
||||
name?: string;
|
||||
article?: any;
|
||||
locale: string;
|
||||
localizations?: YogaSingleService[];
|
||||
}
|
||||
@@ -49,6 +52,7 @@ export interface YogaSingleService_AdminPanelLifeCycle {
|
||||
image?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||
imageAlt?: string;
|
||||
name?: string;
|
||||
article?: any;
|
||||
locale: string;
|
||||
localizations?: YogaSingleService[];
|
||||
}
|
||||
|
||||
40
yoga-cms/generated-strapi-interfaces/api/service-page.ts
Normal file
40
yoga-cms/generated-strapi-interfaces/api/service-page.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
import { YogaSubscribeNowComponent } from './yoga-subscribe-now-component';
|
||||
import { YogaFooter } from './yoga-footer';
|
||||
import { YogaSubscribeNowComponent_Plain } from './yoga-subscribe-now-component';
|
||||
import { YogaFooter_Plain } from './yoga-footer';
|
||||
import { AdminPanelRelationPropertyModification } from '../common/AdminPanelRelationPropertyModification';
|
||||
|
||||
export interface ServicePage {
|
||||
id: number;
|
||||
attributes: {
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string;
|
||||
description?: string;
|
||||
subscribeNow?: { data: YogaSubscribeNowComponent };
|
||||
footer?: { data: YogaFooter };
|
||||
};
|
||||
}
|
||||
export interface ServicePage_Plain {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string;
|
||||
description?: string;
|
||||
subscribeNow?: YogaSubscribeNowComponent_Plain;
|
||||
footer?: YogaFooter_Plain;
|
||||
}
|
||||
|
||||
export interface ServicePage_NoRelations {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string;
|
||||
description?: string;
|
||||
subscribeNow?: number;
|
||||
footer?: number;
|
||||
}
|
||||
|
||||
export interface ServicePage_AdminPanelLifeCycle {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; header?: string;
|
||||
description?: string;
|
||||
subscribeNow?: AdminPanelRelationPropertyModification<YogaSubscribeNowComponent_Plain>;
|
||||
footer?: AdminPanelRelationPropertyModification<YogaFooter_Plain>;
|
||||
}
|
||||
@@ -14,6 +14,8 @@ export interface YogaPrice {
|
||||
price?: number;
|
||||
icon?: { data: Media };
|
||||
image?: { data: Media };
|
||||
pricePostfix?: string;
|
||||
description?: string;
|
||||
};
|
||||
}
|
||||
export interface YogaPrice_Plain {
|
||||
@@ -25,6 +27,8 @@ export interface YogaPrice_Plain {
|
||||
price?: number;
|
||||
icon?: Media_Plain;
|
||||
image?: Media_Plain;
|
||||
pricePostfix?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface YogaPrice_NoRelations {
|
||||
@@ -36,6 +40,8 @@ export interface YogaPrice_NoRelations {
|
||||
price?: number;
|
||||
icon?: number;
|
||||
image?: number;
|
||||
pricePostfix?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface YogaPrice_AdminPanelLifeCycle {
|
||||
@@ -47,4 +53,6 @@ export interface YogaPrice_AdminPanelLifeCycle {
|
||||
price?: number;
|
||||
icon?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||
image?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||
pricePostfix?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export interface YogaSingleService {
|
||||
image?: { data: Media };
|
||||
imageAlt?: string;
|
||||
name?: string;
|
||||
article?: string;
|
||||
article?: any;
|
||||
locale: string;
|
||||
localizations?: { data: YogaSingleService[] };
|
||||
};
|
||||
@@ -26,7 +26,7 @@ export interface YogaSingleService_Plain {
|
||||
image?: Media_Plain;
|
||||
imageAlt?: string;
|
||||
name?: string;
|
||||
article?: string;
|
||||
article?: any;
|
||||
locale: string;
|
||||
localizations?: YogaSingleService_Plain[];
|
||||
}
|
||||
@@ -39,7 +39,7 @@ export interface YogaSingleService_NoRelations {
|
||||
image?: number;
|
||||
imageAlt?: string;
|
||||
name?: string;
|
||||
article?: string;
|
||||
article?: any;
|
||||
locale: string;
|
||||
localizations?: YogaSingleService[];
|
||||
}
|
||||
@@ -52,7 +52,7 @@ export interface YogaSingleService_AdminPanelLifeCycle {
|
||||
image?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||
imageAlt?: string;
|
||||
name?: string;
|
||||
article?: string;
|
||||
article?: any;
|
||||
locale: string;
|
||||
localizations?: YogaSingleService[];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"kind": "singleType",
|
||||
"collectionName": "service_pages",
|
||||
"info": {
|
||||
"singularName": "service-page",
|
||||
"pluralName": "service-pages",
|
||||
"displayName": "ServicePage",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"attributes": {
|
||||
"header": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"subscribeNow": {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* service-page controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::service-page.service-page');
|
||||
7
yoga-cms/src/api/service-page/routes/service-page.ts
Normal file
7
yoga-cms/src/api/service-page/routes/service-page.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* service-page router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::service-page.service-page');
|
||||
7
yoga-cms/src/api/service-page/services/service-page.ts
Normal file
7
yoga-cms/src/api/service-page/services/service-page.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* service-page service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::service-page.service-page');
|
||||
@@ -4,7 +4,8 @@
|
||||
"info": {
|
||||
"singularName": "yoga-price",
|
||||
"pluralName": "yoga-prices",
|
||||
"displayName": "YogaPrice"
|
||||
"displayName": "YogaPrice",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
@@ -27,24 +28,32 @@
|
||||
"type": "integer"
|
||||
},
|
||||
"icon": {
|
||||
"type": "media",
|
||||
"multiple": false,
|
||||
"required": false,
|
||||
"allowedTypes": [
|
||||
"images",
|
||||
"files",
|
||||
"videos",
|
||||
"audios"
|
||||
],
|
||||
"type": "media",
|
||||
"multiple": false
|
||||
]
|
||||
},
|
||||
"image": {
|
||||
"type": "media",
|
||||
"multiple": false,
|
||||
"required": false,
|
||||
"allowedTypes": [
|
||||
"images",
|
||||
"files",
|
||||
"videos",
|
||||
"audios"
|
||||
],
|
||||
"type": "media",
|
||||
"multiple": false
|
||||
]
|
||||
},
|
||||
"pricePostfix": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"article": {
|
||||
"type": "richtext"
|
||||
"type": "blocks"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
44
yoga-cms/types/generated/contentTypes.d.ts
vendored
44
yoga-cms/types/generated/contentTypes.d.ts
vendored
@@ -849,6 +849,44 @@ export interface ApiPricesPagePricesPage extends Struct.SingleTypeSchema {
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiServicePageServicePage extends Struct.SingleTypeSchema {
|
||||
collectionName: 'service_pages';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'ServicePage';
|
||||
pluralName: 'service-pages';
|
||||
singularName: 'service-page';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: true;
|
||||
};
|
||||
attributes: {
|
||||
createdAt: Schema.Attribute.DateTime;
|
||||
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
description: Schema.Attribute.Text;
|
||||
footer: Schema.Attribute.Relation<
|
||||
'oneToOne',
|
||||
'api::yoga-footer.yoga-footer'
|
||||
>;
|
||||
header: Schema.Attribute.String;
|
||||
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||
localizations: Schema.Attribute.Relation<
|
||||
'oneToMany',
|
||||
'api::service-page.service-page'
|
||||
> &
|
||||
Schema.Attribute.Private;
|
||||
publishedAt: Schema.Attribute.DateTime;
|
||||
subscribeNow: Schema.Attribute.Relation<
|
||||
'oneToOne',
|
||||
'api::yoga-subscribe-now-component.yoga-subscribe-now-component'
|
||||
>;
|
||||
updatedAt: Schema.Attribute.DateTime;
|
||||
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiServicesPageServicesPage extends Struct.SingleTypeSchema {
|
||||
collectionName: 'services_pages';
|
||||
info: {
|
||||
@@ -1642,6 +1680,7 @@ export interface ApiYogaPriceComponentYogaPriceComponent
|
||||
export interface ApiYogaPriceYogaPrice extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'yoga_prices';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'YogaPrice';
|
||||
pluralName: 'yoga-prices';
|
||||
singularName: 'yoga-price';
|
||||
@@ -1654,6 +1693,7 @@ export interface ApiYogaPriceYogaPrice extends Struct.CollectionTypeSchema {
|
||||
createdAt: Schema.Attribute.DateTime;
|
||||
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
description: Schema.Attribute.Text;
|
||||
header: Schema.Attribute.String;
|
||||
icon: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
|
||||
image: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
|
||||
@@ -1666,6 +1706,7 @@ export interface ApiYogaPriceYogaPrice extends Struct.CollectionTypeSchema {
|
||||
option1: Schema.Attribute.String;
|
||||
option2: Schema.Attribute.String;
|
||||
price: Schema.Attribute.Integer;
|
||||
pricePostfix: Schema.Attribute.String;
|
||||
publishedAt: Schema.Attribute.DateTime;
|
||||
updatedAt: Schema.Attribute.DateTime;
|
||||
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
@@ -1691,7 +1732,7 @@ export interface ApiYogaSingleServiceYogaSingleService
|
||||
};
|
||||
};
|
||||
attributes: {
|
||||
article: Schema.Attribute.RichText;
|
||||
article: Schema.Attribute.Blocks;
|
||||
buttonLink: Schema.Attribute.String &
|
||||
Schema.Attribute.SetPluginOptions<{
|
||||
i18n: {
|
||||
@@ -2503,6 +2544,7 @@ declare module '@strapi/strapi' {
|
||||
'api::page.page': ApiPagePage;
|
||||
'api::person.person': ApiPersonPerson;
|
||||
'api::prices-page.prices-page': ApiPricesPagePricesPage;
|
||||
'api::service-page.service-page': ApiServicePageServicePage;
|
||||
'api::services-page.services-page': ApiServicesPageServicesPage;
|
||||
'api::yoga-about-us-component.yoga-about-us-component': ApiYogaAboutUsComponentYogaAboutUsComponent;
|
||||
'api::yoga-about-us-with-boxes-component.yoga-about-us-with-boxes-component': ApiYogaAboutUsWithBoxesComponentYogaAboutUsWithBoxesComponent;
|
||||
|
||||
Reference in New Issue
Block a user