fix(accounting): lock company-expense to company, first-page categorise preview, auto-refresh inbox
#1 Incoming-invoice triage: 'Company expense' (eigener_aufwand) no longer shows the event picker — it always books to the company (removed from BOOKING_DISPOSITIONS, so categorize sends event_id null). #2 Auto-refresh: AccountingInboxPage + ReceivedEmailsPanel poll every 30s (refetchInterval) so background IMAP ingests appear without a manual reload. #3 DocumentPreview defaults to the FIRST page (invoice header) for triage/view; PayModal opts into the LAST page (Swiss QR-bill) via initialPage='last'.
This commit is contained in:
@@ -21,7 +21,7 @@ export const ReceivedEmailsPanel: React.FC = () => {
|
||||
const { t } = useTranslation();
|
||||
const { formatDateTime: fmtDateTime } = useLocalizedDate();
|
||||
const [page, setPage] = useState(1);
|
||||
const { data, isLoading } = useQuery({ queryKey: ['received-emails', page], queryFn: () => emailService.listReceived({ page, pageSize: 25 }) });
|
||||
const { data, isLoading } = useQuery({ queryKey: ['received-emails', page], queryFn: () => emailService.listReceived({ page, pageSize: 25 }), refetchInterval: 30000, refetchOnWindowFocus: true });
|
||||
|
||||
if (isLoading) return <Loading />;
|
||||
const items = data?.items ?? [];
|
||||
|
||||
Reference in New Issue
Block a user