Merge branch 'development' of https://gitlab.com/mbugroup/lti-web-client into dev/randy

This commit is contained in:
randy-ar
2026-01-13 10:47:32 +07:00
33 changed files with 1718 additions and 1514 deletions
+7
View File
@@ -116,3 +116,10 @@ export type BaseGroupedApproval = {
export type Approvals = BaseApiResponse<BaseApproval>;
export type GroupedApprovals = BaseApiResponse<BaseGroupedApproval[]>;
export type Document = {
id: number;
name: string;
size: number;
url: string;
};
+22
View File
@@ -0,0 +1,22 @@
import { BaseMetadata } from '@/types/api/api-general';
export type BaseConfiguration = {
id: number;
date: string;
percentage_threshold_bad: number;
percentage_threshold_enough: number;
};
export type DailyChecklistConfiguration = BaseMetadata & BaseConfiguration;
export type CreateDailyChecklistConfigurationPayload = {
date: string;
percentage_threshold_bad: number;
percentage_threshold_enough: number;
};
export type UpdateDailyChecklistConfigurationPayload = {
date: string;
percentage_threshold_bad: number;
percentage_threshold_enough: number;
};
+51 -1
View File
@@ -1,7 +1,10 @@
import { BaseMetadata } from '@/types/api/api-general';
import { BaseMetadata, Document } from '@/types/api/api-general';
import { BaseKandang } from '@/types/api/master-data/kandang';
import { Phase } from '@/types/api/daily-checklist/phase';
import { PhaseActivity } from '@/types/api/daily-checklist/phase-activity';
import { BaseArea } from '@/types/api/master-data/area';
import { BaseLocation } from '@/types/api/master-data/location';
import { BaseEmployee } from '@/types/api/master-data/employee';
export type BaseDailyChecklist = {
id: number;
@@ -46,6 +49,7 @@ export type DetailDailyChecklist = BaseDailyChecklist & {
id: number;
name: string;
}[];
document_urls: Document[];
};
export type CreateDailyChecklistPayload = {
@@ -54,3 +58,49 @@ export type CreateDailyChecklistPayload = {
category: string;
status: string;
};
export type PerformanceOverviewItem = {
employee_id: number;
employee_name: string;
total_activity: number;
activity_done: number;
activity_left: number;
kandang: Pick<BaseKandang, 'id' | 'name'>;
};
export type TrackingAbkItem = {
employee_id: number;
employee_name: string;
kandang_id: number;
kandang_name: string;
total_activity: number;
activity_done: number;
activity_left: number;
completion_rate: number;
last_activity: string;
};
export type DailyChecklistSummary = {
performance_overview: PerformanceOverviewItem[];
tracking_abk: TrackingAbkItem[];
};
export type DailyChecklistReport = {
area: Pick<BaseArea, 'id' | 'name'>;
farm: Pick<BaseLocation, 'id' | 'name'>;
kandang: Pick<BaseKandang, 'id' | 'name'>;
abk: Pick<BaseEmployee, 'id' | 'name'>;
phase: string;
daily_activities: Record<string, number>;
summary: {
total_checklist: number;
jumlah_hari_efektif: number;
abk_percentage: number;
kandang_percentage: number;
kategori: {
kurang: number;
cukup: number;
baik: number;
};
};
};
+4 -9
View File
@@ -1,15 +1,13 @@
import { BaseMetadata } from '@/types/api/api-general';
import { BaseCustomer } from '@/types/api/master-data/customer';
import { BaseProduct } from '@/types/api/master-data/product';
import { BaseMetadata } from '@/types/api/api-general';
export type CustomerPaymentRow = {
no: number;
id: number;
do_date: string;
payment_date: string;
realization_date: string;
aging: number;
aging_day: number | null;
reference: string;
vehicle_plate: string;
vehicle_plate: string[];
qty: number;
weight: number;
average_weight: number;
@@ -23,7 +21,6 @@ export type CustomerPaymentRow = {
notes: string;
pickup_info: string;
sales_marketing: string;
product?: BaseProduct;
};
export type CustomerPaymentSummary = {
@@ -40,8 +37,6 @@ export type CustomerPaymentSummary = {
export type CustomerPaymentReport = BaseMetadata & {
customer: BaseCustomer;
customer_npwp: string;
customer_address: string;
rows: CustomerPaymentRow[];
summary: CustomerPaymentSummary;
};
+11 -9
View File
@@ -1,4 +1,4 @@
import { BaseMetadata } from '@/types/api/api-general';
import { BaseApiResponse, BaseMetadata } from '@/types/api/api-general';
import { BaseCustomer, Customer } from '@/types/api/master-data/customer';
import {
BaseWarehouseArea,
@@ -9,16 +9,17 @@ import {
import { Location } from '@/types/api/master-data/location';
import { Area } from '@/types/api/master-data/area';
import { BaseProduct } from '@/types/api/master-data/product';
import { BaseUser } from '@/types/api/user';
export type BaseDailyMarketingRow = {
no: number;
so_date: string; // e.g. "01-Dec-2025"
do_date: string; // e.g. "08-Dec-2025"
id: number;
so_date: string;
realization_date: string;
aging_days: number;
warehouse: BaseWarehouseArea | BaseWarehouseLocation | BaseWarehouseKandang;
customer: BaseCustomer;
sales: string;
sales: BaseUser;
product: BaseProduct;
do_number: string;
@@ -43,12 +44,13 @@ export interface SalesSummary {
total_weight_kg: number;
total_sales_amount: number;
total_hpp_amount: number;
total_hpp_price_per_kg: number;
}
export type DailyMarketingReport = {
rows: DailyMarketingRow[];
summary: SalesSummary;
};
export type DailyMarketingReport = DailyMarketingRow[];
export type DailyMarketingReportResponse =
BaseApiResponse<DailyMarketingReport> & { total: SalesSummary };
export type MarketingReportFilters = {
area_id?: number;