fix langs

This commit is contained in:
2025-06-25 15:55:50 +02:00
parent 4fc12ff9bf
commit 9d7fd3d52a
3 changed files with 132 additions and 106 deletions

View File

@ -1,110 +1,14 @@
import type { DefineComponent } from "vue";
import type { FrontSection } from "~/types/frontSection";
export interface ListResponse {
page: number;
perPage: number;
totalItems: number;
totalPages: number;
}
export interface PBMenuItem {
page: number;
page_name: string;
perPage: number;
totalItems: number;
totalPages: number;
is_root: boolean;
is_default: boolean;
id_page: string;
id: string;
id_parent: string;
url: string;
name: string;
link_rewrite: string;
active: boolean;
collectionId: string;
collectionName: string;
created: string;
link_title: string;
meta_description: string;
meta_title: string;
position_id: number;
updated: string;
}
export interface PBFooterItem {
id: string;
id_lang: string;
address: string;
phone: string;
email: string;
contact_info: Array<{
field: keyof PBFooterItem;
title: string;
}>;
data: Array<{
title: string;
items: Array<string>;
}>;
company_info: Array<{
data: string;
title: string;
}>;
}
// export interface PBPageItem {
// collectionId: string;
// collectionName: string;
// component_name: string;
// id: string;
// image_collection: string;
// page_created: string;
// page_id: string;
// page_name: string;
// page_section_id_position: number;
// page_updated: string;
// section_id: string;
// section_img: string[];
// section_lang_created: string;
// section_lang_data: SectionLangData;
// section_lang_id_lang: string;
// section_name: string;
// }
// export interface SectionLangData {
// title: string;
// description: string;
// button: string;
// button_call: string;
// }
export interface UIMenuItem extends PBMenuItem {
children?: UIMenuItem[];
}
export interface MenuListResponse extends ListResponse {
items: PBMenuItem[];
}
export interface FooterListResponse extends ListResponse {
items: PBFooterItem[];
}
export type componentsListType = {
name: string;
component: FrontSection;
componentInstance: DefineComponent;
// data: unknown;
};
// menuStore
// export type CountryList = {
// call_prefix: string;
// currency_iso_code: string;
// iso_code: string;
// name: string;
// }
export type Countries = {
call_prefix: string;
currency_iso_code: string;
@ -170,6 +74,7 @@ export interface Country {
name: string;
}
export interface Currency {
iso_code: string;
name: string;
@ -181,6 +86,21 @@ export interface Currency {
suffix: boolean;
}
export interface Language {
id: number
name: string
iso_code: string
lang_code: string
date_format: string
date_format_short: string
rtl: boolean
is_default: boolean
active: boolean
}
export interface CookieData { country: Country, currency: Currency, language: Language }
export interface CartItem {
cart_item_id: number;
link_rewrite: string;