- Introduced CashAccountController for managing cash accounts. - Created CashTransactionRequest and CashAccountRequest for transaction validation. - Developed CashAccountService to handle business logic for cash transactions. - Added UI components for cash account management, including deposit and withdrawal dialogs. - Implemented data tables for displaying transactions and cash account details. - Updated routes to include cash account management endpoints. - Added tests for cash account functionality, including deposit and withdrawal operations.
21 lines
596 B
TypeScript
21 lines
596 B
TypeScript
import type { InertiaLinkProps } from '@inertiajs/react';
|
|
import { clsx } from 'clsx';
|
|
import type { ClassValue } from 'clsx';
|
|
import { twMerge } from 'tailwind-merge';
|
|
|
|
export function cn(...inputs: ClassValue[]) {
|
|
return twMerge(clsx(inputs));
|
|
}
|
|
|
|
export function toUrl(url: NonNullable<InertiaLinkProps['href']>): string {
|
|
return typeof url === 'string' ? url : url.url;
|
|
}
|
|
|
|
export function formatCurrency(amount: number): string {
|
|
return new Intl.NumberFormat('id-ID', {
|
|
style: 'currency',
|
|
currency: 'IDR',
|
|
minimumFractionDigits: 0,
|
|
}).format(amount);
|
|
}
|