feat(manager): online ordering settings in tabs beside Test an order; expense lines and documents

- Online orders -> Settings: takeaway / delivery / any time side by side (wrapping, with room),
  the days of the week apart; fee rules, delivery areas and fee settings (the fee line) as tabs
  on the left, Test an order on the right; a rule's switch at the far right, equal padding,
  'Order price from' / 'Total items count from' in the rule editor.
- Expenses: the dialog lists what was bought (quantity, price before VAT, VAT; they make the
  total, with net / VAT / total) and keeps documents (attach a PDF or photo, open, remove;
  picked for a new expense, uploaded when it's saved); a paperclip in the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 14:57:58 +02:00
co-authored by Claude Opus 5.5
parent 9297cbcd3b
commit f3fc3340d2
10 changed files with 318 additions and 87 deletions
@@ -5,7 +5,7 @@
import { useState } from 'react'
import { useMutation } from '@tanstack/react-query'
import toast from 'react-hot-toast'
import { Banknote, Pencil, Plus, Receipt, Trash2 } from 'lucide-react'
import { Banknote, Pencil, Plus, Receipt, Trash2, Paperclip } from 'lucide-react'
import { errorMessage } from '@xenia/api'
import { useFormat, useTranslation } from '@xenia/i18n'
import { Button, Dialog, Dropdown, EmptyState, IconButton, Page, PageHeader, SearchInput, Spinner, Toolbar } from '@xenia/ui'
@@ -44,7 +44,8 @@ export default function ExpensesPage() {
const columns = [
{ key: 'description', label: t('finance.exp.what'), render: e => (
<span className="grid">
<span className="font-semibold text-ink">{e.description}</span>
<span className="font-semibold text-ink flex items-center gap-1.5">{e.description}
{e.documents?.length > 0 && <Paperclip size={13} className="text-ink-3" aria-label={t('finance.exp.documents')} />}</span>
{e.contact_name && <span className="text-caption text-ink-2">{e.contact_name}</span>}
</span>) },
{ key: 'category', label: t('finance.exp.category'), sort: e => cat(e.category), render: e => cat(e.category) },