Move production to beenvoice.app with migrated accounts, refreshed auth and timer UX, and expanded invoice flows.
Official URL migration preserves sessions, shortcuts prefs, and last clock-in client; auth screens match web with legal links; time clock and invoice editor/send flows are updated for the new domain and UI patterns. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
type BusinessOption = {
|
||||
id: string;
|
||||
isDefault?: boolean | null;
|
||||
};
|
||||
|
||||
export function pickDefaultBusinessId(businesses: BusinessOption[] | undefined): string {
|
||||
if (!businesses?.length) return "";
|
||||
return businesses.find((business) => business.isDefault)?.id ?? businesses[0]!.id;
|
||||
}
|
||||
|
||||
export function resolveInvoiceBusinessId(
|
||||
explicitId: string | null | undefined,
|
||||
businesses: BusinessOption[] | undefined,
|
||||
): string {
|
||||
if (explicitId?.trim()) return explicitId.trim();
|
||||
return pickDefaultBusinessId(businesses);
|
||||
}
|
||||
Reference in New Issue
Block a user