Compare commits

..

10 commits

Author SHA1 Message Date
c2e8fca613 chore: add .mcp.json and ignore .playwright-mcp/
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 16:12:05 +02:00
94b8ea5f48 feat(libra/balance): clarify income/expenses cards with info captions
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 16:12:05 +02:00
8d9768aeff feat(libra/balance): show lifetime income vs expenses breakdown
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 16:12:05 +02:00
0d28d221cd feat(libra/balance): show fiat balances alongside sats
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 15:45:02 +02:00
2287ea7440 fix(libra): drop payment-method field from income submission
Income now lands on the submitting user as a receivable rather than
on an entity asset account — see the matching libra backend change.
Removes the "Received into" select and its supporting state from the
form, and drops payment_method_account from IncomeEntryRequest /
IncomeEntry. The form is now description + amount + currency + revenue
account + optional reference.
2026-05-16 23:44:05 +02:00
9252c86f5c feat(libra): shrink filter controls on mobile
Drop the date-range/type-filter buttons and custom-date inputs from
h-8 to h-7 below md to claw back a bit of vertical space on phones,
keeping h-8 on tablet/desktop where it's comfortable.
2026-05-16 23:28:29 +02:00
22ad5fd974 feat(libra): drop User and Source rows from transaction cards
User row is noise on a personal history view, and Source is always
libra-api right now — both just clutter the card. Drop them; can
bring back if/when there's a second source to disambiguate.
2026-05-16 23:27:41 +02:00
8b91c7bd72 feat(libra): add income/expense type filter to transaction history
All / Income / Expenses toggle row with a Filter icon, aligned to the
Calendar-iconed date range row above. Filters transactionsToDisplay
client-side using the existing isIncome/isExpense helpers; works on
top of the search and date filters.
2026-05-16 23:25:59 +02:00
396b012707 feat(libra): color-code income/expense entries in transaction history
Left green/red stripe on each card plus a matching tint on the
income-entry / expense-entry tag badge — mirrors the Record page's
red/green palette so the two screens read consistently.
2026-05-16 23:24:20 +02:00
1fcffac670 feat(libra): wire up income submission flow
Adds the frontend pair to libra's new POST /entries/income endpoint:
SUBMIT_INCOME in PermissionType, IncomeEntry/IncomeEntryRequest types,
ExpensesAPI.submitIncome wrapping the new endpoint, and the AddIncome
view collecting description / amount / revenue account / payment-method
account / currency / reference. Mirrors the existing expense flow so
non-admin users can log income on behalf of the organization for
super-user review.
2026-05-16 23:16:42 +02:00

View file

@ -236,8 +236,7 @@ export function useCheckout(): UseCheckoutReturn {
async function payBolt11Raw(
bolt11: string,
adminkey: string,
extra?: Record<string, unknown>
adminkey: string
): Promise<void> {
const response = await fetch(`${apiBaseUrl}/api/v1/payments`, {
method: 'POST',
@ -245,7 +244,7 @@ export function useCheckout(): UseCheckoutReturn {
'Content-Type': 'application/json',
'X-Api-Key': adminkey,
},
body: JSON.stringify({ out: true, bolt11, ...(extra ? { extra } : {}) }),
body: JSON.stringify({ out: true, bolt11 }),
})
if (!response.ok) {
let detail = response.statusText
@ -273,15 +272,7 @@ export function useCheckout(): UseCheckoutReturn {
state.value.step = 'paying'
state.value.currentRestaurantSlug = placed.restaurantSlug
try {
// Tag the outgoing payment so the customer's wallet history
// can later surface it as a restaurant order. Mirrors the
// `extra={"tag": "restaurant", ...}` the extension stamps on
// its incoming invoice.
await payBolt11Raw(placed.invoice.bolt11, adminkey, {
tag: 'restaurant',
restaurant_id: placed.restaurantId,
order_id: placed.order.id,
})
await payBolt11Raw(placed.invoice.bolt11, adminkey)
// Set semantics keeps `paidOrderIds` from re-renders; rebuild
// it on update so Vue picks up the change.
state.value.paidOrderIds = new Set([