refactor(FE-238-106): change dateinput and create chickin page and pull development

This commit is contained in:
randy-ar
2025-11-03 10:12:15 +07:00
90 changed files with 1603 additions and 1484 deletions
+20 -20
View File
@@ -1,27 +1,27 @@
import { BaseMetadata, CreatedUser } from "@/types/api/api-general";
import { BaseMetadata, CreatedUser } from '@/types/api/api-general';
export type BaseCustomer = {
id: number;
name: string;
pic_id: number;
pic: CreatedUser;
type: string;
address: string;
phone: string;
email: string;
account_number: string;
}
id: number;
name: string;
pic_id: number;
pic: CreatedUser;
type: string;
address: string;
phone: string;
email: string;
account_number: string;
};
export type Customer = BaseMetadata & BaseCustomer;
export type CreateCustomerPayload = {
name: string;
pic_id: number;
type: string;
address: string;
phone: string;
email: string;
account_number: string;
}
name: string;
pic_id: number;
type: string;
address: string;
phone: string;
email: string;
account_number: string;
};
export type UpdateCustomerPayload = CreateCustomerPayload;
export type UpdateCustomerPayload = CreateCustomerPayload;
+1 -1
View File
@@ -34,4 +34,4 @@ export type CreateProductPayload = {
flags: string[];
};
export type UpdateProductPayload = CreateProductPayload;
export type UpdateProductPayload = CreateProductPayload;
+30 -30
View File
@@ -1,38 +1,38 @@
import { BaseMetadata } from '@/types/api/api-general';
export type BaseSupplier = {
id: number;
name: string;
alias: string;
pic: string;
type: string;
category: string;
hatchery: string;
phone: string;
email: string;
address: string;
npwp: string;
account_number: string;
due_date: number;
balance?: number;
}
id: number;
name: string;
alias: string;
pic: string;
type: string;
category: string;
hatchery: string;
phone: string;
email: string;
address: string;
npwp: string;
account_number: string;
due_date: number;
balance?: number;
};
export type Supplier = BaseMetadata & BaseSupplier;
export type CreateSupplierPayload = {
name: string;
alias: string;
pic: string;
type: string;
category: string;
hatchery: string;
phone: string;
email: string;
address: string;
npwp: string;
account_number: string;
due_date: number;
balance?: number;
}
name: string;
alias: string;
pic: string;
type: string;
category: string;
hatchery: string;
phone: string;
email: string;
address: string;
npwp: string;
account_number: string;
due_date: number;
balance?: number;
};
export type UpdateSupplierPayload = CreateSupplierPayload;
export type UpdateSupplierPayload = CreateSupplierPayload;
+5 -5
View File
@@ -1,5 +1,5 @@
import { BaseApproval, BaseMetadata } from "@/types/api/api-general";
import { ProjectFlockKandang } from "@/types/api/production/project-flock-kandang";
import { BaseApproval, BaseMetadata } from '@/types/api/api-general';
import { ProjectFlockKandang } from '@/types/api/production/project-flock-kandang';
export type BaseChickin = {
id?: number;
@@ -8,7 +8,7 @@ export type BaseChickin = {
note?: string;
project_flock_kandang?: ProjectFlockKandang;
approval: BaseApproval;
}
};
export type Chickin = BaseMetadata & BaseChickin;
@@ -17,7 +17,7 @@ export type CreateChickinPayload = {
chick_in_date: string;
note: string;
quantity?: number;
}
};
export type UpdateChickinPayload = CreateChickinPayload & {
id: number;
@@ -26,4 +26,4 @@ export type UpdateChickinPayload = CreateChickinPayload & {
export type ChickinApprovalPayload = {
action: 'APPROVED' | 'REJECTED';
approvable_ids: number[];
};
};
+4 -4
View File
@@ -1,5 +1,5 @@
import { Kandang } from "@/type/master-data/kandang";
import { ProjectFlock } from "@/types/api/production/project-flock";
import { Kandang } from '@/type/master-data/kandang';
import { ProjectFlock } from '@/types/api/production/project-flock';
export type BaseProjectFlockKandang = {
id: number;
@@ -8,11 +8,11 @@ export type BaseProjectFlockKandang = {
kandang: Kandang;
project_flock: ProjectFlock;
available_quantity?: number;
}
};
export type ProjectFlockKandang = BaseProjectFlockKandang;
export type LookupProjectFlockKandangPayload = {
project_flock_id: number;
kandang_id: number;
}
};