Fix internal navigation links: add /kitchen/ prefix to all bare hrefs

Bare <a href="/invoice/..."> tags bypass React Router basename, causing
hard navigations to absolute paths with no NPM route. Added /kitchen/
prefix to all internal href values across 12 components.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-12 20:11:41 +00:00
parent 9cd1683572
commit 0d6ca9b979
12 changed files with 17666 additions and 17666 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -989,7 +989,7 @@ export default function GPReport() {
<div style={{ ...styles.breakdownContainer, textAlign: 'center', marginBottom: '1.5rem' }}>
<h3 style={styles.sectionTitle}>Top Sellers</h3>
<p style={{ color: '#666', margin: '2rem 0' }}>
No categories configured. <a href="/sambapos" style={{ color: '#e94560' }}>Configure SambaPOS categories</a> to see top sellers by category.
No categories configured. <a href="/kitchen/sambapos" style={{ color: '#e94560' }}>Configure SambaPOS categories</a> to see top sellers by category.
</p>
</div>
) : (

View file

@ -161,7 +161,7 @@ export default function InvoiceList() {
<div>
<div style={styles.header}>
<h2 style={styles.title}>Uploaded Invoices</h2>
<a href="/upload" style={styles.uploadBtn}>
<a href="/kitchen/upload" style={styles.uploadBtn}>
+ Upload New
</a>
</div>
@ -226,7 +226,7 @@ export default function InvoiceList() {
{invoices.length === 0 ? (
<div style={styles.empty}>
<p>No invoices pending confirmation.</p>
<a href="/upload" style={styles.link}>
<a href="/kitchen/upload" style={styles.link}>
Upload one now
</a>
</div>
@ -235,7 +235,7 @@ export default function InvoiceList() {
{invoices.map((invoice) => (
<a
key={invoice.id}
href={`/invoice/${invoice.id}`}
href={`/kitchen/invoice/${invoice.id}`}
style={{
...styles.card,
borderLeft: `4px solid ${statusColors[invoice.status] || '#999'}`,
@ -341,7 +341,7 @@ export default function InvoiceList() {
{completedInvoices.map((invoice) => (
<a
key={invoice.id}
href={`/invoice/${invoice.id}`}
href={`/kitchen/invoice/${invoice.id}`}
style={{
...styles.card,
borderLeft: `4px solid ${statusColors[invoice.status] || '#999'}`,

View file

@ -388,7 +388,7 @@ export default function LineItemHistoryModal({
{data.description || '-'}
</span>
<a
href={`/invoice/${point.invoice_id}`}
href={`/kitchen/invoice/${point.invoice_id}`}
target="_blank"
rel="noopener noreferrer"
style={{

File diff suppressed because it is too large Load diff

View file

@ -617,7 +617,7 @@ export default function SearchDefinitions() {
<td style={tdStyle}>
{def.source_invoice_number ? (
<a
href={`/invoice/${def.source_invoice_id}`}
href={`/kitchen/invoice/${def.source_invoice_id}`}
target="_blank"
rel="noopener noreferrer"
style={{ color: '#2563eb', textDecoration: 'none' }}
@ -692,7 +692,7 @@ export default function SearchDefinitions() {
<div>
<strong>Source Invoice:</strong>{' '}
<a
href={`/invoice/${editingDef.source_invoice_id}`}
href={`/kitchen/invoice/${editingDef.source_invoice_id}`}
target="_blank"
rel="noopener noreferrer"
style={{ color: '#2563eb' }}

View file

@ -415,7 +415,7 @@ export default function SearchInvoices() {
<tr key={inv.id} style={{ borderBottom: '1px solid #e5e7eb' }}>
<td style={tdStyle}>
<a
href={`/invoice/${inv.id}`}
href={`/kitchen/invoice/${inv.id}`}
target="_blank"
rel="noopener noreferrer"
style={{ color: '#2563eb', textDecoration: 'none' }}
@ -466,7 +466,7 @@ export default function SearchInvoices() {
<tr key={inv.id} style={{ borderBottom: '1px solid #e5e7eb' }}>
<td style={tdStyle}>
<a
href={`/invoice/${inv.id}`}
href={`/kitchen/invoice/${inv.id}`}
target="_blank"
rel="noopener noreferrer"
style={{ color: '#2563eb', textDecoration: 'none' }}

File diff suppressed because it is too large Load diff

View file

@ -502,7 +502,7 @@ export default function Upload() {
Install App
</button>
) : (
<a href="/upload-app" style={styles.openAppLink}>Open Upload App</a>
<a href="/kitchen/upload-app" style={styles.openAppLink}>Open Upload App</a>
)}
</div>
</div>

View file

@ -144,7 +144,7 @@ export default function NewbookData() {
return (
<div style={styles.container}>
<div style={styles.titleRow}>
<a href="/settings" style={styles.backLink}>&larr; Back to Settings</a>
<a href="/kitchen/settings" style={styles.backLink}>&larr; Back to Settings</a>
<h1 style={styles.title}>Newbook Data</h1>
</div>

File diff suppressed because it is too large Load diff