mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-21 22:05:45 +00:00
Merge branch 'development' of https://gitlab.com/mbugroup/lti-web-client into dev/randy
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
import { BaseMetadata } 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';
|
||||
|
||||
export type BaseDailyChecklist = {
|
||||
id: number;
|
||||
name: string;
|
||||
status: string;
|
||||
category: string;
|
||||
date: string;
|
||||
kandang: Pick<BaseKandang, 'id' | 'name' | 'status' | 'capacity'>;
|
||||
total_phase: number;
|
||||
total_activity: number;
|
||||
progress: number;
|
||||
};
|
||||
|
||||
export type DailyChecklist = BaseMetadata & BaseDailyChecklist;
|
||||
|
||||
export type DetailDailyChecklist = BaseDailyChecklist & {
|
||||
reject_reason: string | null;
|
||||
phases: {
|
||||
id: number;
|
||||
phase_id: number;
|
||||
phase: Phase;
|
||||
}[];
|
||||
tasks: {
|
||||
id: number;
|
||||
checklist_id: number;
|
||||
phase_id: number;
|
||||
phase_activity_id: number;
|
||||
time_type: string;
|
||||
notes: string | null;
|
||||
phase: Phase;
|
||||
phase_activity: PhaseActivity;
|
||||
assignments: {
|
||||
employee: {
|
||||
id: number;
|
||||
name: string;
|
||||
};
|
||||
checked: boolean;
|
||||
note: string | null;
|
||||
}[];
|
||||
}[];
|
||||
assigned_employees: {
|
||||
id: number;
|
||||
name: string;
|
||||
}[];
|
||||
};
|
||||
|
||||
export type CreateDailyChecklistPayload = {
|
||||
date: string;
|
||||
kandang_id: number;
|
||||
category: string;
|
||||
status: string;
|
||||
};
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { BaseMetadata } from '@/types/api/api-general';
|
||||
import { BaseLocation } from '@/types/api/master-data/location';
|
||||
import { BaseUser } from '@/types/api/user';
|
||||
import { BaseKandang } from '@/types/api/master-data/kandang';
|
||||
|
||||
export type BaseEmployee = {
|
||||
id: number;
|
||||
name: string;
|
||||
is_active: boolean;
|
||||
kandangs: Pick<BaseKandang, 'id' | 'name' | 'status' | 'capacity'>[];
|
||||
};
|
||||
|
||||
export type Employee = BaseMetadata & BaseEmployee;
|
||||
|
||||
export type CreateEmployeePayload = {
|
||||
name: string;
|
||||
is_active: boolean;
|
||||
kandang_ids: number[];
|
||||
};
|
||||
|
||||
export type UpdateEmployeePayload = CreateEmployeePayload;
|
||||
@@ -0,0 +1,24 @@
|
||||
import { BaseMetadata } from '@/types/api/api-general';
|
||||
|
||||
export type BasePhaseActivity = {
|
||||
id: number;
|
||||
phase_id: number;
|
||||
name: string;
|
||||
description: string;
|
||||
time_type: string;
|
||||
};
|
||||
|
||||
export type PhaseActivity = BaseMetadata & BasePhaseActivity;
|
||||
|
||||
export type CreatePhaseActivityPayload = {
|
||||
phase_id: number;
|
||||
name: string;
|
||||
description: string;
|
||||
time_type: string;
|
||||
};
|
||||
|
||||
export type UpdatePhaseActivityPayload = {
|
||||
name: string;
|
||||
description: string;
|
||||
time_type: string;
|
||||
};
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
import { BaseMetadata } from '@/types/api/api-general';
|
||||
|
||||
export type BasePhase = {
|
||||
id: number;
|
||||
name: string;
|
||||
is_active: boolean;
|
||||
category: string;
|
||||
activity_count: number;
|
||||
};
|
||||
|
||||
export type Phase = BaseMetadata & BasePhase;
|
||||
|
||||
export type CreatePhasePayload = {
|
||||
name: string;
|
||||
category: string;
|
||||
};
|
||||
|
||||
export type UpdatePhasePayload = {
|
||||
name: string;
|
||||
};
|
||||
+65
@@ -1,6 +1,70 @@
|
||||
import { BaseMetadata } from '@/types/api/api-general';
|
||||
import { BaseApproval } from '@/types/api/approval/approval';
|
||||
|
||||
// ==================== CHART DATA TYPES ====================
|
||||
export type WeightDistributionRange = {
|
||||
range: string;
|
||||
min_weight: number;
|
||||
max_weight: number;
|
||||
bird_count: number;
|
||||
is_ideal_range: boolean;
|
||||
ideal_range?: string;
|
||||
outside_range?: string;
|
||||
};
|
||||
|
||||
export type IdealRange = {
|
||||
min_weight: number;
|
||||
max_weight: number;
|
||||
total_ideal_birds: number;
|
||||
};
|
||||
|
||||
export type StatisticsData = {
|
||||
min_weight: number;
|
||||
max_weight: number;
|
||||
average_weight: number;
|
||||
total_birds_measured: number;
|
||||
};
|
||||
|
||||
export type WeekBarChartData = {
|
||||
has_data: boolean;
|
||||
weight_distribution: WeightDistributionRange[];
|
||||
ideal_range: IdealRange;
|
||||
statistics: StatisticsData;
|
||||
};
|
||||
|
||||
export type BarChart = {
|
||||
current_week: number;
|
||||
all_weeks: Record<string, WeekBarChartData>;
|
||||
};
|
||||
|
||||
export type AvailableWeek = {
|
||||
week: number;
|
||||
uniformity_percentage: number;
|
||||
ideal_count: number;
|
||||
outside_ideal_count: number;
|
||||
total_count: number;
|
||||
has_data: boolean;
|
||||
};
|
||||
|
||||
export type WeekInfo = {
|
||||
total_weeks: number;
|
||||
weeks_with_data: number;
|
||||
current_week_index: number;
|
||||
has_prev_week: boolean;
|
||||
has_next_week: boolean;
|
||||
};
|
||||
|
||||
export type GaugeChart = {
|
||||
current_week: number;
|
||||
available_weeks: AvailableWeek[];
|
||||
week_info: WeekInfo;
|
||||
};
|
||||
|
||||
export type ChartData = {
|
||||
bar_chart: BarChart;
|
||||
gauge_chart: GaugeChart;
|
||||
};
|
||||
|
||||
// ==================== GET ALL RESPONSE ====================
|
||||
export type Uniformity = BaseMetadata & {
|
||||
id: number;
|
||||
@@ -21,6 +85,7 @@ export type Uniformity = BaseMetadata & {
|
||||
standard_mean_weight: number | null;
|
||||
standard_uniformity: number | null;
|
||||
created_at: string;
|
||||
chart_data?: ChartData;
|
||||
created_by: number;
|
||||
latest_approval?: BaseApproval;
|
||||
};
|
||||
|
||||
Vendored
-1
@@ -120,7 +120,6 @@ export type CreateAcceptApprovalRequestPayload = {
|
||||
purchase_item_id: number;
|
||||
received_date: string;
|
||||
travel_number: string;
|
||||
travel_document_path: string;
|
||||
vehicle_number: string;
|
||||
expedition_vendor_id: number;
|
||||
received_qty: number;
|
||||
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
import { BaseMetadata } from '@/types/api/api-general';
|
||||
import { BaseCustomer } from '@/types/api/master-data/customer';
|
||||
import { BaseProduct } from '@/types/api/master-data/product';
|
||||
|
||||
export type CustomerPaymentRow = {
|
||||
no: number;
|
||||
do_date: string;
|
||||
payment_date: string;
|
||||
realization_date: string;
|
||||
aging: number;
|
||||
reference: string;
|
||||
vehicle_plate: string;
|
||||
qty: number;
|
||||
weight: number;
|
||||
average_weight: number;
|
||||
price: number;
|
||||
credit_note: number;
|
||||
final_price: number;
|
||||
ppn: number;
|
||||
total: number;
|
||||
payment: number;
|
||||
accounts_receivable: number;
|
||||
notes: string;
|
||||
pickup_info: string;
|
||||
sales_marketing: string;
|
||||
product?: BaseProduct;
|
||||
};
|
||||
|
||||
export type CustomerPaymentSummary = {
|
||||
total_qty: number;
|
||||
total_weight: number;
|
||||
total_initial_amount: number;
|
||||
total_credit_note: number;
|
||||
total_final_amount: number;
|
||||
total_ppn: number;
|
||||
total_grand_amount: number;
|
||||
total_payment: number;
|
||||
total_accounts_receivable: number;
|
||||
};
|
||||
|
||||
export type CustomerPaymentReport = BaseMetadata & {
|
||||
customer: BaseCustomer;
|
||||
customer_npwp: string;
|
||||
customer_address: string;
|
||||
rows: CustomerPaymentRow[];
|
||||
summary: CustomerPaymentSummary;
|
||||
};
|
||||
Reference in New Issue
Block a user