mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-23 06:45:46 +00:00
refactor(FE-87-106): refactor api integration untuk project flock dan project flock kandang
This commit is contained in:
@@ -144,7 +144,7 @@ export const dummyProductWarehouses: ProductWarehouse[] = [
|
||||
name: 'Pakan Ayam Premium',
|
||||
sku: 'PAK-001',
|
||||
category: 'PAKAN',
|
||||
} as unknown as Product, // bisa diganti sesuai tipe Product
|
||||
} as unknown as Product,
|
||||
warehouse: dummyWarehouses[0],
|
||||
created_user: createdUser,
|
||||
created_at: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
||||
@@ -160,7 +160,7 @@ export const dummyProductWarehouses: ProductWarehouse[] = [
|
||||
name: 'Vitamin Ayam Super',
|
||||
sku: 'VIT-002',
|
||||
category: 'VITAMIN',
|
||||
} as unknown as Product, // bisa diganti sesuai tipe Product
|
||||
} as unknown as Product,
|
||||
warehouse: dummyWarehouses[1],
|
||||
created_user: createdUser,
|
||||
created_at: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
||||
@@ -172,6 +172,7 @@ export const dummyProductWarehouses: ProductWarehouse[] = [
|
||||
// 💼 Marketing Dummy
|
||||
// ======================
|
||||
export const dummyMarketings: Marketing[] = [
|
||||
// Step 1: Pengajuan Order
|
||||
{
|
||||
id: 1,
|
||||
status: 'APPROVED',
|
||||
@@ -197,7 +198,7 @@ export const dummyMarketings: Marketing[] = [
|
||||
grand_total: 7500000,
|
||||
approval: {
|
||||
step_number: 1,
|
||||
step_name: 'Manager Approval',
|
||||
step_name: 'Pengajuan Order',
|
||||
action: 'APPROVED',
|
||||
action_by: createdUser,
|
||||
action_at: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
||||
@@ -227,9 +228,11 @@ export const dummyMarketings: Marketing[] = [
|
||||
created_at: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
||||
updated_at: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
||||
},
|
||||
|
||||
// Step 2: Sales Order
|
||||
{
|
||||
id: 2,
|
||||
status: 'PENDING',
|
||||
status: 'APPROVED',
|
||||
so_number: 'SO-002-2025',
|
||||
so_docs: 'https://example.com/docs/so002.pdf',
|
||||
so_date: format(new Date(), 'yyyy-MM-dd'),
|
||||
@@ -251,9 +254,9 @@ export const dummyMarketings: Marketing[] = [
|
||||
notes: 'Pesanan kedua untuk stok akhir tahun.',
|
||||
grand_total: 3750000,
|
||||
approval: {
|
||||
step_number: 1,
|
||||
step_name: 'Manager Approval',
|
||||
action: 'PENDING',
|
||||
step_number: 2,
|
||||
step_name: 'Sales Order',
|
||||
action: 'APPROVED',
|
||||
action_by: createdUser,
|
||||
action_at: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
||||
},
|
||||
@@ -282,4 +285,80 @@ export const dummyMarketings: Marketing[] = [
|
||||
created_at: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
||||
updated_at: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
||||
},
|
||||
|
||||
// Step 3: Delivery Order
|
||||
{
|
||||
id: 3,
|
||||
status: 'APPROVED',
|
||||
so_number: 'SO-003-2025',
|
||||
so_docs: 'https://example.com/docs/so003.pdf',
|
||||
so_date: format(new Date(), 'yyyy-MM-dd'),
|
||||
customer: {
|
||||
id: 3,
|
||||
name: 'UD Ternak Sejahtera',
|
||||
pic_id: 3,
|
||||
pic: createdUser,
|
||||
type: 'Reseller',
|
||||
address: 'Jl. Pasteur No. 88',
|
||||
phone: '083333333333',
|
||||
email: 'halo@ternaksejahtera.com',
|
||||
account_number: '1122334455',
|
||||
created_user: createdUser,
|
||||
created_at: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
||||
updated_at: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
||||
},
|
||||
sales_person: createdUser,
|
||||
notes: 'Order untuk pengiriman ke luar kota.',
|
||||
grand_total: 5600000,
|
||||
approval: {
|
||||
step_number: 3,
|
||||
step_name: 'Delivery Order',
|
||||
action: 'APPROVED',
|
||||
action_by: createdUser,
|
||||
action_at: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
||||
},
|
||||
marketing_products: [
|
||||
{
|
||||
id: 3,
|
||||
qty: 80,
|
||||
unit_price: 70000,
|
||||
avg_weight: 2.4,
|
||||
total_weight: 192,
|
||||
total_price: 5600000,
|
||||
product_warehouse: dummyProductWarehouses[0],
|
||||
marketing_delivery_products: {
|
||||
id: 3,
|
||||
qty: 80,
|
||||
unit_price: 70000,
|
||||
avg_weight: 2.4,
|
||||
total_weight: 192,
|
||||
total_price: 5600000,
|
||||
delivery_date: format(new Date(), 'yyyy-MM-dd'),
|
||||
vehicle_number: 'D 9090 ZZ',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
qty: 80,
|
||||
unit_price: 70000,
|
||||
avg_weight: 2.4,
|
||||
total_weight: 192,
|
||||
total_price: 5600000,
|
||||
product_warehouse: dummyProductWarehouses[0],
|
||||
marketing_delivery_products: {
|
||||
id: 3,
|
||||
qty: 80,
|
||||
unit_price: 70000,
|
||||
avg_weight: 2.4,
|
||||
total_weight: 192,
|
||||
total_price: 5600000,
|
||||
delivery_date: format(new Date(), 'yyyy-MM-dd'),
|
||||
vehicle_number: 'D 9090 ZZ',
|
||||
},
|
||||
},
|
||||
],
|
||||
created_user: createdUser,
|
||||
created_at: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
||||
updated_at: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user