mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 15:55:48 +00:00
refactor(FE-327): change closing API paths and sales types
This commit is contained in:
@@ -15,7 +15,7 @@ export class ClosingApiService extends BaseApiService<
|
|||||||
id: number
|
id: number
|
||||||
): Promise<BaseApiResponse<ClosingSales> | undefined> {
|
): Promise<BaseApiResponse<ClosingSales> | undefined> {
|
||||||
try {
|
try {
|
||||||
const getPenjualanPath = `http://localhost:4010/api/closing/${id}/penjualan`;
|
const getPenjualanPath = `${id}/penjualan`;
|
||||||
return await this.customRequest<BaseApiResponse<ClosingSales>>(
|
return await this.customRequest<BaseApiResponse<ClosingSales>>(
|
||||||
getPenjualanPath
|
getPenjualanPath
|
||||||
);
|
);
|
||||||
@@ -25,4 +25,4 @@ export class ClosingApiService extends BaseApiService<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ClosingApi = new ClosingApiService('/closing');
|
export const ClosingApi = new ClosingApiService('/closings');
|
||||||
|
|||||||
Vendored
+8
-12
@@ -1,31 +1,27 @@
|
|||||||
import { BaseMetadata } from '@/types/api/api-general';
|
import { BaseMetadata } from '@/types/api/api-general';
|
||||||
import { Kandang } from '@type/api/master-data/kandang';
|
|
||||||
import { Product } from '@type/api/master-data/product';
|
import { Product } from '@type/api/master-data/product';
|
||||||
import { ProductCategory } from '@type/api/master-data/product-category';
|
|
||||||
import { Customer } from '@type/api/master-data/customer';
|
import { Customer } from '@type/api/master-data/customer';
|
||||||
|
|
||||||
export type BaseSales = {
|
export type BaseSales = {
|
||||||
id: number;
|
id: number;
|
||||||
realization_date: string;
|
realization_date: string;
|
||||||
week_age: number;
|
age: number;
|
||||||
age_label: string;
|
do_number: string;
|
||||||
delivery_order_number: string;
|
|
||||||
product: Product;
|
product: Product;
|
||||||
product_category: ProductCategory;
|
|
||||||
customer: Customer;
|
customer: Customer;
|
||||||
quantity: number;
|
qty: number;
|
||||||
weight: number;
|
weight: number;
|
||||||
average: number;
|
avg_weight: number;
|
||||||
price: number;
|
price: number;
|
||||||
total: number;
|
total_price: number;
|
||||||
kandang: Kandang;
|
|
||||||
kandang_id: number;
|
|
||||||
payment_status: string;
|
payment_status: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type BaseClosingSales = {
|
export type BaseClosingSales = {
|
||||||
project_type: string;
|
project_type: string;
|
||||||
penjualan: BaseSales[];
|
flock_id: number;
|
||||||
|
period: number;
|
||||||
|
sales: BaseSales[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ClosingSales = BaseMetadata & BaseClosingSales;
|
export type ClosingSales = BaseMetadata & BaseClosingSales;
|
||||||
|
|||||||
Reference in New Issue
Block a user