+ {t.statuses[draft.status]} · {t.rowsCount(draft.rowCount)}
+ >
+ }
+ />
+
+ {!isDraft ? (
+
+ {draft.committed ? (
+
+ {t.committedSummary(
+ draft.committed.transactions,
+ draft.committed.skipped,
+ draft.committed.categoriesCreated,
+ )}
+
+ ) : null}
+
+
+ {draft.status === "committed" ? (
+
+ ) : null}
+
+
+ ) : null}
+
+ {isDraft && draft.neededRoles.length ? (
+
+ {!draft.canCreateAccounts ? (
+ {t.ownerOnly}
+ ) : null}
+
+ {draft.neededRoles.map((role) => (
+
+ ))}
+
+
+ ) : null}
+
+
+
+ {draft.checks.statements.length ? (
+ -
+ {okStatements === draft.checks.statements.length ? (
+
+ ) : (
+
+ )}
+
+ {t.statementsSummary(okStatements, draft.checks.statements.length)}
+ {draft.checks.statements
+ .filter((s) => !s.ok)
+ .map((s) => (
+
+ {t.statementBad(
+ day(s.cut),
+ formatMoney(s.rowsMinor),
+ s.statementMinor === null ? "—" : formatMoney(s.statementMinor),
+ )}
+
+ ))}
+
+
+ ) : (
+ - {t.noStatements}
+ )}
+ {draft.checks.balance.closingMinor !== null ? (
+ -
+ {draft.checks.balance.mismatchLine === null ? (
+
+ ) : (
+
+ )}
+ {draft.checks.balance.mismatchLine === null
+ ? t.balanceOk(formatMoney(draft.checks.balance.closingMinor))
+ : t.balanceBad(draft.checks.balance.mismatchLine)}
+
+ ) : null}
+ {duplicates ? (
+ - {t.duplicates(duplicates)}
+ ) : null}
+ {deferred ? (
+ -
+ {t.deferred(
+ deferred,
+ `${deferredNet < 0 ? "−" : "+"}${formatMoney(Math.abs(deferredNet))}`,
+ )}
+
+ ) : null}
+ {isDraft && draft.newCategories.length ? (
+ -
+ {t.newCategories(draft.newCategories.join(", "))}
+
+ ) : null}
+
+
+
+
+
+
{
+ setSheet(x as "card" | "bank");
+ setPage(0);
+ }}
+ >
+
+ {(["card", "bank"] as const)
+ .filter((s) => rows.some((r) => r.sheet === s))
+ .map((s) => (
+
+ {t.sheets[s]} ({rows.filter((r) => r.sheet === s).length})
+
+ ))}
+
+
+
+ {filters.map((f) => (
+
+ ))}
+
+ {isDraft ? (
+
+ ) : null}
+
+
+ {pageRows.map((r) => (
+
+ ))}
+ {!pageRows.length ? (
+ - {t.empty}
+ ) : null}
+
+ {visible.length > PAGE ? (
+
+
+ {t.page(page * PAGE + 1, Math.min(visible.length, (page + 1) * PAGE), visible.length)}
+
+
+
+
+ ) : null}
+
+
+ {isDraft ? (
+
+
+ {t.commitSummary(toCreate.length, rows.length - toCreate.length)}
+
+ {missingRoles.map((r) => (
+
+ {t.errors.roleMissing(t.roles[r] ?? r)}
+
+ ))}
+ {missingCategory.length ? (
+
+ {t.errors.category(String(missingCategory.length))}
+
+ ) : null}
+ {t.commitHint}
+
+
+
+
+
+ ) : null}
+
+
+
+
+ {t.revertTitle}
+ {t.revertDescription}
+
+
+ {tr.common.cancel}
+
+
+
+
+