fix fetch

This commit is contained in:
2025-06-24 12:05:43 +02:00
parent 26e7467f7f
commit a000f966eb
14 changed files with 3326 additions and 13451 deletions

40
types/PlanPrediction.ts Normal file
View File

@ -0,0 +1,40 @@
export interface PlanPrediction {
total_investement_value: number
total_input_price_increase: number
total_input_price_increase_covered_pieces: number
months_spent_on_plan: number
money_spent: number
bought_pieces: number
annual_investment_return: number
investment_piece: InvestmentPiece
max_pieces_in_package: number
period_to_first_piece: PeriodToFirstPiece
}
export interface InvestmentPiece {
referenced_product_id: number
name: string
cover_picture_uuid: string
weight: string
active: boolean
price: number
price_per_gram: number
currency_iso: string
currency_conversion_rate: string
max_comission_value: number
average_input_price_increase: number
features: Feature[]
}
export interface Feature {
feature_id: number
feature: string
value_id: number
value: string
}
export interface PeriodToFirstPiece {
years: number
months: number
days: number
}

View File

@ -1,3 +1,5 @@
import type { DefineComponent } from "vue";
export interface ListResponse {
page: number;
perPage: number;
@ -69,7 +71,7 @@ export interface PBPageItem {
section_name: string;
}
import type { DefineComponent } from "vue";
export interface SectionLangData {
title: string;
description: string;
@ -97,12 +99,12 @@ export type componentsListType = {
};
// menuStore
export type CountryList = {
call_prefix: string;
currency_iso_code: string;
iso_code: string;
name: string;
}
// export type CountryList = {
// call_prefix: string;
// currency_iso_code: string;
// iso_code: string;
// name: string;
// }
export type Countries = {
call_prefix: string;
@ -156,4 +158,48 @@ export type ProductType = {
tax_name: string,
cart_item_id?: number
product_id?: number
}
}
export interface Country {
iso_code: string
currency_iso_code: string
call_prefix: string
need_postcode: boolean
postcode_format: string
is_default: boolean
active: boolean
name: string
}
export interface Currency {
iso_code: string
name: string
UpdatedAt: string
iso_code_num: number
precision: number
sign: string
active: boolean
suffix: boolean
}
export interface UserCart {
id: number
checkout_in_progress: boolean
total_value: number
currency_iso: string
}
export interface GenericResponse<Data> {
data: Data
message?: string
status: number
}
export interface GenericResponseItems<Data> {
data: { items: Data , items_count: number }
message?: string
status: number
}
export type { InvestmentPiece, PlanPrediction, PeriodToFirstPiece} from './PlanPrediction'