Compare commits
3 Commits
feature/yo
...
yoga-6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16b6107206 | ||
|
|
9dc426bf64 | ||
|
|
2c71984d96 |
5
api.http
5
api.http
@@ -22,3 +22,8 @@ x
|
|||||||
GET {{domain}}/api/yoga-blog-posts/wmhqy1n8japcfpy0of4hauwm
|
GET {{domain}}/api/yoga-blog-posts/wmhqy1n8japcfpy0of4hauwm
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
#Authorization: Bearer {{token}}
|
#Authorization: Bearer {{token}}
|
||||||
|
|
||||||
|
|
||||||
|
### GET request with a header
|
||||||
|
GET {{domain}}/api/yoga-single-services?filters[name][$eq]=service4
|
||||||
|
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
|
||||||
|
|
||||||
@@ -13,6 +13,7 @@ import {ServicesPage_Plain} from "@/types/generated-strapi-interfaces/api/servic
|
|||||||
import {PricesPage_Plain} from "@/types/generated-strapi-interfaces/api/prices-page";
|
import {PricesPage_Plain} from "@/types/generated-strapi-interfaces/api/prices-page";
|
||||||
import {FaqPage_Plain} from "@/types/generated-strapi-interfaces/api/faq-page";
|
import {FaqPage_Plain} from "@/types/generated-strapi-interfaces/api/faq-page";
|
||||||
import {ContactPage_Plain} from "@/types/generated-strapi-interfaces/api/contact-page";
|
import {ContactPage_Plain} from "@/types/generated-strapi-interfaces/api/contact-page";
|
||||||
|
import {YogaSingleService_Plain} from "@/types/generated-strapi-interfaces/api/yoga-single-service";
|
||||||
|
|
||||||
|
|
||||||
class StrapiApi{
|
class StrapiApi{
|
||||||
@@ -42,6 +43,16 @@ class StrapiApi{
|
|||||||
return this.getJson("/api/services-page?",servicesQuery);
|
return this.getJson("/api/services-page?",servicesQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getServicePage(name: string): Promise<YogaSingleService_Plain[]>{
|
||||||
|
return this.getJson("/api/yoga-single-services?", {
|
||||||
|
filters: {
|
||||||
|
name: {
|
||||||
|
$eq: name,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public getPricesPage(): Promise<PricesPage_Plain>{
|
public getPricesPage(): Promise<PricesPage_Plain>{
|
||||||
return this.getJson("/api/prices-page?",pricesQuery);
|
return this.getJson("/api/prices-page?",pricesQuery);
|
||||||
}
|
}
|
||||||
|
|||||||
27
yoga-app/src/app/services/[slug]/page.tsx
Normal file
27
yoga-app/src/app/services/[slug]/page.tsx
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import React from "react";
|
||||||
|
import strapiApi from "@/api/strapi/strapi-api";
|
||||||
|
export default async function ServiceArticlePage({params}: {
|
||||||
|
params: { slug: string}
|
||||||
|
} ) {
|
||||||
|
const servicesByName = await strapiApi.getServicePage(params.slug);
|
||||||
|
// return (
|
||||||
|
// <>
|
||||||
|
// {header && description && <SubHeaderComponent header1={header} description={description} />}
|
||||||
|
// { ourServices && <OurServicesComponent config={ourServices} /> }
|
||||||
|
// { contactUs && <ContactUsComponent contactUs={contactUs} />}
|
||||||
|
// { ourSpecialities && <OurSpecialitiesComponent config={ourSpecialities} /> }
|
||||||
|
// { feedbacks && <FeedbackComponent config={feedbacks} /> }
|
||||||
|
// { blogs && <BlogPostsComponent config={blogs} /> }
|
||||||
|
// { subscribe && <SubscribeComponent config={subscribe} /> }
|
||||||
|
// { footer && <FooterComponent config={footer} /> }
|
||||||
|
// <AosComponent />
|
||||||
|
// </>
|
||||||
|
// );
|
||||||
|
console.info("slug", params.slug);
|
||||||
|
console.info("servicesByName", servicesByName);
|
||||||
|
return (
|
||||||
|
<div>hello world {params.slug}</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const dynamic = 'force-dynamic'
|
||||||
@@ -7,7 +7,7 @@ export interface Props{
|
|||||||
config: YogaPrice_Plain
|
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
|
// there are some issues with the strapi generated types
|
||||||
const iconFile: StrapiFile = icon as StrapiFile;
|
const iconFile: StrapiFile = icon as StrapiFile;
|
||||||
const imageFile: StrapiFile = image as StrapiFile;
|
const imageFile: StrapiFile = image as StrapiFile;
|
||||||
@@ -28,6 +28,7 @@ export function PriceItemComponent({config: {header,option1,option2,price,icon,
|
|||||||
</div>
|
</div>
|
||||||
<div className="pricing_plans_box_lower_portion">
|
<div className="pricing_plans_box_lower_portion">
|
||||||
<h3>{header}</h3>
|
<h3>{header}</h3>
|
||||||
|
<p className={'text-center'}>{description}</p>
|
||||||
<ul className="list-unstyled">
|
<ul className="list-unstyled">
|
||||||
<li>
|
<li>
|
||||||
<i className="fa-solid fa-check" aria-hidden="true"></i>{option1}
|
<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>
|
</ul>
|
||||||
<div className="pricing_plans_span_wrapper">
|
<div className="pricing_plans_span_wrapper">
|
||||||
<span className="price">{price} FT</span>
|
<span className="price">{price} FT</span>
|
||||||
<span className="per_month">/per month</span>
|
{ pricePostfix && <span className="per_month">{pricePostfix}</span> }
|
||||||
</div>
|
</div>
|
||||||
<div className="btn_wrapper">
|
<div className="btn_wrapper">
|
||||||
<a className="enroll_now_btn text-decoration-none" href="/pricing.html">{buttonText}</a>
|
<a className="enroll_now_btn text-decoration-none" href="/pricing.html">{buttonText}</a>
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ export interface YogaPrice {
|
|||||||
price?: number;
|
price?: number;
|
||||||
icon?: { data: Media };
|
icon?: { data: Media };
|
||||||
image?: { data: Media };
|
image?: { data: Media };
|
||||||
|
pricePostfix?: string;
|
||||||
|
description?: string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
export interface YogaPrice_Plain {
|
export interface YogaPrice_Plain {
|
||||||
@@ -25,6 +27,8 @@ export interface YogaPrice_Plain {
|
|||||||
price?: number;
|
price?: number;
|
||||||
icon?: Media_Plain;
|
icon?: Media_Plain;
|
||||||
image?: Media_Plain;
|
image?: Media_Plain;
|
||||||
|
pricePostfix?: string;
|
||||||
|
description?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface YogaPrice_NoRelations {
|
export interface YogaPrice_NoRelations {
|
||||||
@@ -36,6 +40,8 @@ export interface YogaPrice_NoRelations {
|
|||||||
price?: number;
|
price?: number;
|
||||||
icon?: number;
|
icon?: number;
|
||||||
image?: number;
|
image?: number;
|
||||||
|
pricePostfix?: string;
|
||||||
|
description?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface YogaPrice_AdminPanelLifeCycle {
|
export interface YogaPrice_AdminPanelLifeCycle {
|
||||||
@@ -47,4 +53,6 @@ export interface YogaPrice_AdminPanelLifeCycle {
|
|||||||
price?: number;
|
price?: number;
|
||||||
icon?: AdminPanelRelationPropertyModification<Media_Plain>;
|
icon?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||||
image?: AdminPanelRelationPropertyModification<Media_Plain>;
|
image?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||||
|
pricePostfix?: string;
|
||||||
|
description?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export interface YogaSingleService {
|
|||||||
image?: { data: Media };
|
image?: { data: Media };
|
||||||
imageAlt?: string;
|
imageAlt?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
article?: string;
|
||||||
locale: string;
|
locale: string;
|
||||||
localizations?: { data: YogaSingleService[] };
|
localizations?: { data: YogaSingleService[] };
|
||||||
};
|
};
|
||||||
@@ -25,6 +26,7 @@ export interface YogaSingleService_Plain {
|
|||||||
image?: Media_Plain;
|
image?: Media_Plain;
|
||||||
imageAlt?: string;
|
imageAlt?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
article?: string;
|
||||||
locale: string;
|
locale: string;
|
||||||
localizations?: YogaSingleService_Plain[];
|
localizations?: YogaSingleService_Plain[];
|
||||||
}
|
}
|
||||||
@@ -37,6 +39,7 @@ export interface YogaSingleService_NoRelations {
|
|||||||
image?: number;
|
image?: number;
|
||||||
imageAlt?: string;
|
imageAlt?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
article?: string;
|
||||||
locale: string;
|
locale: string;
|
||||||
localizations?: YogaSingleService[];
|
localizations?: YogaSingleService[];
|
||||||
}
|
}
|
||||||
@@ -49,6 +52,7 @@ export interface YogaSingleService_AdminPanelLifeCycle {
|
|||||||
image?: AdminPanelRelationPropertyModification<Media_Plain>;
|
image?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||||
imageAlt?: string;
|
imageAlt?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
article?: string;
|
||||||
locale: string;
|
locale: string;
|
||||||
localizations?: YogaSingleService[];
|
localizations?: YogaSingleService[];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ export interface YogaPrice {
|
|||||||
price?: number;
|
price?: number;
|
||||||
icon?: { data: Media };
|
icon?: { data: Media };
|
||||||
image?: { data: Media };
|
image?: { data: Media };
|
||||||
|
pricePostfix?: string;
|
||||||
|
description?: string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
export interface YogaPrice_Plain {
|
export interface YogaPrice_Plain {
|
||||||
@@ -25,6 +27,8 @@ export interface YogaPrice_Plain {
|
|||||||
price?: number;
|
price?: number;
|
||||||
icon?: Media_Plain;
|
icon?: Media_Plain;
|
||||||
image?: Media_Plain;
|
image?: Media_Plain;
|
||||||
|
pricePostfix?: string;
|
||||||
|
description?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface YogaPrice_NoRelations {
|
export interface YogaPrice_NoRelations {
|
||||||
@@ -36,6 +40,8 @@ export interface YogaPrice_NoRelations {
|
|||||||
price?: number;
|
price?: number;
|
||||||
icon?: number;
|
icon?: number;
|
||||||
image?: number;
|
image?: number;
|
||||||
|
pricePostfix?: string;
|
||||||
|
description?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface YogaPrice_AdminPanelLifeCycle {
|
export interface YogaPrice_AdminPanelLifeCycle {
|
||||||
@@ -47,4 +53,6 @@ export interface YogaPrice_AdminPanelLifeCycle {
|
|||||||
price?: number;
|
price?: number;
|
||||||
icon?: AdminPanelRelationPropertyModification<Media_Plain>;
|
icon?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||||
image?: AdminPanelRelationPropertyModification<Media_Plain>;
|
image?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||||
|
pricePostfix?: string;
|
||||||
|
description?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export interface YogaSingleService {
|
|||||||
image?: { data: Media };
|
image?: { data: Media };
|
||||||
imageAlt?: string;
|
imageAlt?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
article?: string;
|
||||||
locale: string;
|
locale: string;
|
||||||
localizations?: { data: YogaSingleService[] };
|
localizations?: { data: YogaSingleService[] };
|
||||||
};
|
};
|
||||||
@@ -25,6 +26,7 @@ export interface YogaSingleService_Plain {
|
|||||||
image?: Media_Plain;
|
image?: Media_Plain;
|
||||||
imageAlt?: string;
|
imageAlt?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
article?: string;
|
||||||
locale: string;
|
locale: string;
|
||||||
localizations?: YogaSingleService_Plain[];
|
localizations?: YogaSingleService_Plain[];
|
||||||
}
|
}
|
||||||
@@ -37,6 +39,7 @@ export interface YogaSingleService_NoRelations {
|
|||||||
image?: number;
|
image?: number;
|
||||||
imageAlt?: string;
|
imageAlt?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
article?: string;
|
||||||
locale: string;
|
locale: string;
|
||||||
localizations?: YogaSingleService[];
|
localizations?: YogaSingleService[];
|
||||||
}
|
}
|
||||||
@@ -49,6 +52,7 @@ export interface YogaSingleService_AdminPanelLifeCycle {
|
|||||||
image?: AdminPanelRelationPropertyModification<Media_Plain>;
|
image?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||||
imageAlt?: string;
|
imageAlt?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
article?: string;
|
||||||
locale: string;
|
locale: string;
|
||||||
localizations?: YogaSingleService[];
|
localizations?: YogaSingleService[];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
"info": {
|
"info": {
|
||||||
"singularName": "yoga-price",
|
"singularName": "yoga-price",
|
||||||
"pluralName": "yoga-prices",
|
"pluralName": "yoga-prices",
|
||||||
"displayName": "YogaPrice"
|
"displayName": "YogaPrice",
|
||||||
|
"description": ""
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"draftAndPublish": true
|
"draftAndPublish": true
|
||||||
@@ -27,24 +28,32 @@
|
|||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"icon": {
|
"icon": {
|
||||||
|
"type": "media",
|
||||||
|
"multiple": false,
|
||||||
|
"required": false,
|
||||||
"allowedTypes": [
|
"allowedTypes": [
|
||||||
"images",
|
"images",
|
||||||
"files",
|
"files",
|
||||||
"videos",
|
"videos",
|
||||||
"audios"
|
"audios"
|
||||||
],
|
]
|
||||||
"type": "media",
|
|
||||||
"multiple": false
|
|
||||||
},
|
},
|
||||||
"image": {
|
"image": {
|
||||||
|
"type": "media",
|
||||||
|
"multiple": false,
|
||||||
|
"required": false,
|
||||||
"allowedTypes": [
|
"allowedTypes": [
|
||||||
"images",
|
"images",
|
||||||
"files",
|
"files",
|
||||||
"videos",
|
"videos",
|
||||||
"audios"
|
"audios"
|
||||||
],
|
]
|
||||||
"type": "media",
|
},
|
||||||
"multiple": false
|
"pricePostfix": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "text"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
"info": {
|
"info": {
|
||||||
"singularName": "yoga-single-service",
|
"singularName": "yoga-single-service",
|
||||||
"pluralName": "yoga-single-services",
|
"pluralName": "yoga-single-services",
|
||||||
"displayName": "YogaSingleService"
|
"displayName": "YogaSingleService",
|
||||||
|
"description": ""
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"draftAndPublish": true
|
"draftAndPublish": true
|
||||||
@@ -40,14 +41,15 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"image": {
|
"image": {
|
||||||
|
"type": "media",
|
||||||
|
"multiple": false,
|
||||||
|
"required": false,
|
||||||
"allowedTypes": [
|
"allowedTypes": [
|
||||||
"images",
|
"images",
|
||||||
"files",
|
"files",
|
||||||
"videos",
|
"videos",
|
||||||
"audios"
|
"audios"
|
||||||
],
|
],
|
||||||
"type": "media",
|
|
||||||
"multiple": false,
|
|
||||||
"pluginOptions": {
|
"pluginOptions": {
|
||||||
"i18n": {
|
"i18n": {
|
||||||
"localized": true
|
"localized": true
|
||||||
@@ -69,6 +71,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"article": {
|
||||||
|
"pluginOptions": {
|
||||||
|
"i18n": {
|
||||||
|
"localized": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "richtext"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
yoga-cms/types/generated/contentTypes.d.ts
vendored
10
yoga-cms/types/generated/contentTypes.d.ts
vendored
@@ -1642,6 +1642,7 @@ export interface ApiYogaPriceComponentYogaPriceComponent
|
|||||||
export interface ApiYogaPriceYogaPrice extends Struct.CollectionTypeSchema {
|
export interface ApiYogaPriceYogaPrice extends Struct.CollectionTypeSchema {
|
||||||
collectionName: 'yoga_prices';
|
collectionName: 'yoga_prices';
|
||||||
info: {
|
info: {
|
||||||
|
description: '';
|
||||||
displayName: 'YogaPrice';
|
displayName: 'YogaPrice';
|
||||||
pluralName: 'yoga-prices';
|
pluralName: 'yoga-prices';
|
||||||
singularName: 'yoga-price';
|
singularName: 'yoga-price';
|
||||||
@@ -1654,6 +1655,7 @@ export interface ApiYogaPriceYogaPrice extends Struct.CollectionTypeSchema {
|
|||||||
createdAt: Schema.Attribute.DateTime;
|
createdAt: Schema.Attribute.DateTime;
|
||||||
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
Schema.Attribute.Private;
|
Schema.Attribute.Private;
|
||||||
|
description: Schema.Attribute.Text;
|
||||||
header: Schema.Attribute.String;
|
header: Schema.Attribute.String;
|
||||||
icon: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
|
icon: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
|
||||||
image: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
|
image: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
|
||||||
@@ -1666,6 +1668,7 @@ export interface ApiYogaPriceYogaPrice extends Struct.CollectionTypeSchema {
|
|||||||
option1: Schema.Attribute.String;
|
option1: Schema.Attribute.String;
|
||||||
option2: Schema.Attribute.String;
|
option2: Schema.Attribute.String;
|
||||||
price: Schema.Attribute.Integer;
|
price: Schema.Attribute.Integer;
|
||||||
|
pricePostfix: Schema.Attribute.String;
|
||||||
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'> &
|
||||||
@@ -1677,6 +1680,7 @@ export interface ApiYogaSingleServiceYogaSingleService
|
|||||||
extends Struct.CollectionTypeSchema {
|
extends Struct.CollectionTypeSchema {
|
||||||
collectionName: 'yoga_single_services';
|
collectionName: 'yoga_single_services';
|
||||||
info: {
|
info: {
|
||||||
|
description: '';
|
||||||
displayName: 'YogaSingleService';
|
displayName: 'YogaSingleService';
|
||||||
pluralName: 'yoga-single-services';
|
pluralName: 'yoga-single-services';
|
||||||
singularName: 'yoga-single-service';
|
singularName: 'yoga-single-service';
|
||||||
@@ -1690,6 +1694,12 @@ export interface ApiYogaSingleServiceYogaSingleService
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
attributes: {
|
attributes: {
|
||||||
|
article: Schema.Attribute.RichText &
|
||||||
|
Schema.Attribute.SetPluginOptions<{
|
||||||
|
i18n: {
|
||||||
|
localized: true;
|
||||||
|
};
|
||||||
|
}>;
|
||||||
buttonLink: Schema.Attribute.String &
|
buttonLink: Schema.Attribute.String &
|
||||||
Schema.Attribute.SetPluginOptions<{
|
Schema.Attribute.SetPluginOptions<{
|
||||||
i18n: {
|
i18n: {
|
||||||
|
|||||||
Reference in New Issue
Block a user