Fix mobile overflow on reconciliation, safe count, and settings tables

Tables with multiple columns now scroll horizontally within their cards
instead of overflowing off-screen on mobile.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-14 11:59:15 +00:00
parent 82348bc834
commit 2b04d99fd6
3 changed files with 14 additions and 4 deletions

View file

@ -476,7 +476,8 @@ export function DailyCashUp({ user }: Props) {
{newbookTotals && (
<>
<table style={{ width: '100%', fontSize: '0.875rem', borderCollapse: 'collapse' }}>
<div style={{ overflowX: 'auto' }}>
<table style={{ width: '100%', fontSize: '0.875rem', borderCollapse: 'collapse', minWidth: '360px' }}>
<thead>
<tr style={{ borderBottom: '2px solid var(--card-border)' }}>
<th style={{ padding: '0.4rem 0.5rem', textAlign: 'left', color: 'var(--text-mid)', fontWeight: 600 }}>Category</th>
@ -522,12 +523,14 @@ export function DailyCashUp({ user }: Props) {
})}
</tbody>
</table>
</div>
{tillPayments.length > 0 && (
<div style={{ marginTop: '1rem' }}>
<h3 style={{ fontSize: '0.875rem', fontWeight: 600, marginBottom: '0.5rem', color: 'var(--text-mid)' }}>
Till / Restaurant Transactions
</h3>
<div style={{ overflowX: 'auto' }}>
<table style={{ width: '100%', fontSize: '0.8rem', borderCollapse: 'collapse' }}>
<thead>
<tr style={{ borderBottom: '1px solid var(--card-border)' }}>
@ -546,6 +549,7 @@ export function DailyCashUp({ user }: Props) {
))}
</tbody>
</table>
</div>
</div>
)}
{transactionBreakdown && (

View file

@ -134,7 +134,8 @@ function SafeCountAdjust() {
)}
<Card style={{ marginBottom: '1rem', padding: 0, overflow: 'hidden' }}>
<table style={{ width: '100%', borderCollapse: 'collapse', fontSize: '0.875rem' }}>
<div style={{ overflowX: 'auto' }}>
<table style={{ width: '100%', borderCollapse: 'collapse', fontSize: '0.875rem', minWidth: '380px' }}>
<thead>
<tr style={{ background: 'var(--body-bg)', borderBottom: '2px solid var(--card-border)' }}>
<th style={thL}>Denomination</th>
@ -198,6 +199,7 @@ function SafeCountAdjust() {
</tr>
</tfoot>
</table>
</div>
</Card>
<Card style={{ marginBottom: '1rem' }}>

View file

@ -260,7 +260,8 @@ export function SettingsPage({ user }: { user: User }) {
<p style={{ fontSize: '0.75rem', color: 'var(--text-mid)', marginBottom: '0.75rem' }}>
Set par stock targets. Coins use sealed bags; notes use individual note count.
</p>
<table style={{ width: '100%', borderCollapse: 'collapse', fontSize: '0.8rem' }}>
<div style={{ overflowX: 'auto' }}>
<table style={{ width: '100%', borderCollapse: 'collapse', fontSize: '0.8rem', minWidth: '420px' }}>
<thead>
<tr style={{ borderBottom: '2px solid var(--card-border)' }}>
<th style={thS}>Denom</th>
@ -300,6 +301,7 @@ export function SettingsPage({ user }: { user: User }) {
})}
</tbody>
</table>
</div>
</Card>
{/* Sales breakdown GL columns — requires settings capability */}
@ -319,7 +321,8 @@ export function SettingsPage({ user }: { user: User }) {
No columns configured. Click "Sync from Newbook" to import GL account groups, or "+ Placeholder" to add a blank column.
</p>
) : (
<div style={{ display: 'flex', flexDirection: 'column', gap: '0.4rem' }}>
<div style={{ overflowX: 'auto' }}>
<div style={{ display: 'flex', flexDirection: 'column', gap: '0.4rem', minWidth: '380px' }}>
{columns.map((col, i) => (
<div key={i} style={{
display: 'grid', gridTemplateColumns: '24px 1fr 140px 60px 28px', gap: '0.5rem',
@ -349,6 +352,7 @@ export function SettingsPage({ user }: { user: User }) {
</div>
))}
</div>
</div>
)}
</Card>
)}