feat(admin, settlement, dashboard): strengthen permission gating and billing workflows

This commit is contained in:
2026-06-09 13:44:19 +08:00
parent 7e65c53732
commit b7278e68a4
41 changed files with 900 additions and 199 deletions

View File

@@ -141,6 +141,8 @@ export type SettlementCreditLedgerRow = {
play_code?: string | null;
draw_no?: string | null;
ticket_item_id?: number | null;
settlement_bill_id?: number | null;
bill_status?: string | null;
};
export async function getCreditLedger(params: {
@@ -202,6 +204,15 @@ export type SettlementPaymentRow = {
created_at?: string;
};
export type SettlementBillPaymentRow = {
id: number;
amount: number;
status: string;
method?: string | null;
proof?: string | null;
remark?: string | null;
};
export async function getSettlementPayments(params?: {
settlement_period_id?: number;
admin_site_id?: number;
@@ -245,18 +256,9 @@ export type RebateAllocationRow = {
allocation_rule: string;
};
export type SettlementPaymentRow = {
id: number;
amount: number;
status: string;
method?: string | null;
proof?: string | null;
remark?: string | null;
};
export async function getSettlementBill(billId: number): Promise<{
bill: SettlementBillRow;
payments: SettlementPaymentRow[];
payments: SettlementBillPaymentRow[];
rebate_allocations: RebateAllocationRow[];
adjustments: Array<{ id: number; amount: number; adjustment_type: string; reason: string | null }>;
tier_edge?: string | null;