complated order
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { AxiosResponse } from 'axios';
|
||||
import httpClient from '../httpClient';
|
||||
import { API_URLS } from '../URLs';
|
||||
import { Category } from './type';
|
||||
import { CategoryResult } from './type';
|
||||
|
||||
export const category_api = {
|
||||
async getCategory(params: {
|
||||
page: number;
|
||||
page_size: number;
|
||||
}): Promise<AxiosResponse<Category>> {
|
||||
}): Promise<AxiosResponse<CategoryResult[]>> {
|
||||
const res = await httpClient.get(API_URLS.Category, { params });
|
||||
return res;
|
||||
},
|
||||
|
||||
@@ -9,7 +9,12 @@ export interface Category {
|
||||
}
|
||||
|
||||
export interface CategoryResult {
|
||||
id: string;
|
||||
id: number;
|
||||
name: string;
|
||||
image: string | null;
|
||||
product_types: ProductTypes[];
|
||||
}
|
||||
export interface ProductTypes {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@ export const product_api = {
|
||||
async list(params: {
|
||||
page: number;
|
||||
page_size: number;
|
||||
product_type_id?: number;
|
||||
category_id?: number;
|
||||
}): Promise<AxiosResponse<ProductList>> {
|
||||
const res = await httpClient.get(`${API_URLS.Product}list/`, { params });
|
||||
return res;
|
||||
|
||||
@@ -204,5 +204,8 @@
|
||||
"Tez-tez So'raladigan Savollar": "Часто задаваемые вопросы",
|
||||
"Gastro Market haqida eng ko'p so'raladigan savollarga javoblar": "Ответы на самые часто задаваемые вопросы о Gastro Market",
|
||||
|
||||
"Barcha mahsulotlar": "Все товары"
|
||||
"Barcha mahsulotlar": "Все товары",
|
||||
"Xatolik yuz berdi: Mahsulot omborxonada yetarli emas": "Произошла ошибка: недостаточно товаров на складе",
|
||||
"Bu kategoriyada hozircha mahsulot yo‘q": "В этой категории пока нет товаров",
|
||||
"Tez orada qo‘shiladi": "Скоро будет добавлено"
|
||||
}
|
||||
|
||||
@@ -204,5 +204,8 @@ declare const messages: {
|
||||
"Gastro Market haqida eng ko'p so'raladigan savollarga javoblar": "Gastro Market haqida eng ko'p so'raladigan savollarga javoblar";
|
||||
|
||||
'Barcha mahsulotlar': 'Barcha mahsulotlar';
|
||||
'Xatolik yuz berdi: Mahsulot omborxonada yetarli emas': 'Xatolik yuz berdi: Mahsulot omborxonada yetarli emas';
|
||||
'Bu kategoriyada hozircha mahsulot yo‘q': 'Bu kategoriyada hozircha mahsulot yo‘q';
|
||||
'Tez orada qo‘shiladi': 'Tez orada qo‘shiladi';
|
||||
};
|
||||
export default messages;
|
||||
|
||||
@@ -200,5 +200,8 @@
|
||||
"Tez-tez So'raladigan Savollar": "Tez-tez So'raladigan Savollar",
|
||||
"Gastro Market haqida eng ko'p so'raladigan savollarga javoblar": "Gastro Market haqida eng ko'p so'raladigan savollarga javoblar",
|
||||
|
||||
"Barcha mahsulotlar": "Barcha mahsulotlar"
|
||||
"Barcha mahsulotlar": "Barcha mahsulotlar",
|
||||
"Xatolik yuz berdi: Mahsulot omborxonada yetarli emas": "Xatolik yuz berdi: Mahsulot omborxonada yetarli emas",
|
||||
"Bu kategoriyada hozircha mahsulot yo‘q": "Bu kategoriyada hozircha mahsulot yo‘q",
|
||||
"Tez orada qo‘shiladi": "Tez orada qo‘shiladi"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user