refactor: type name
This commit is contained in:
parent
548f10feab
commit
f26f6b51d6
7 changed files with 24 additions and 24 deletions
|
|
@ -9,7 +9,7 @@ import {
|
|||
ProductGroup,
|
||||
ProductGroupCreate,
|
||||
ProductGroupUpdate,
|
||||
ProductList,
|
||||
Product,
|
||||
ProductCreate,
|
||||
ProductUpdate,
|
||||
Service,
|
||||
|
|
@ -170,7 +170,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
|||
|
||||
const query = params.toString();
|
||||
|
||||
const res = await api.get<Pagination<ProductList[]>>(
|
||||
const res = await api.get<Pagination<Product[]>>(
|
||||
`/product${(params && '?'.concat(query)) || ''}`,
|
||||
{
|
||||
headers: { 'X-Rtid': flowStore.rtid },
|
||||
|
|
@ -222,7 +222,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
|||
}
|
||||
|
||||
async function fetchListProductById(productId: string) {
|
||||
const res = await api.get<ProductList>(`/product/${productId}`);
|
||||
const res = await api.get<Product>(`/product/${productId}`);
|
||||
|
||||
if (!res) return false;
|
||||
|
||||
|
|
@ -534,7 +534,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
|||
|
||||
const query = params.toString();
|
||||
|
||||
const res = await api.get<Pagination<ProductList[]>>(
|
||||
const res = await api.get<Pagination<Product[]>>(
|
||||
`/work/${workId}/product${(params && '?'.concat(query)) || ''}`,
|
||||
{
|
||||
headers: {
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ export interface ServiceById {
|
|||
}
|
||||
|
||||
export interface ProductOnWork {
|
||||
product: ProductList;
|
||||
product: Product;
|
||||
registeredBranchId: string;
|
||||
updatedAt: string;
|
||||
updatedBy: UpdatedBy;
|
||||
|
|
@ -131,10 +131,10 @@ export interface WorkItems {
|
|||
id: string;
|
||||
name: string;
|
||||
attributes: Attributes;
|
||||
product: (ProductList & { nameEn: string })[];
|
||||
product: (Product & { nameEn: string })[];
|
||||
}
|
||||
|
||||
export interface ProductList {
|
||||
export interface Product {
|
||||
selectedImage?: string;
|
||||
expenseType: string;
|
||||
vatIncluded: boolean;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue