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:
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
|
|
@ -989,7 +989,7 @@ export default function GPReport() {
|
||||||
<div style={{ ...styles.breakdownContainer, textAlign: 'center', marginBottom: '1.5rem' }}>
|
<div style={{ ...styles.breakdownContainer, textAlign: 'center', marginBottom: '1.5rem' }}>
|
||||||
<h3 style={styles.sectionTitle}>Top Sellers</h3>
|
<h3 style={styles.sectionTitle}>Top Sellers</h3>
|
||||||
<p style={{ color: '#666', margin: '2rem 0' }}>
|
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ export default function InvoiceList() {
|
||||||
<div>
|
<div>
|
||||||
<div style={styles.header}>
|
<div style={styles.header}>
|
||||||
<h2 style={styles.title}>Uploaded Invoices</h2>
|
<h2 style={styles.title}>Uploaded Invoices</h2>
|
||||||
<a href="/upload" style={styles.uploadBtn}>
|
<a href="/kitchen/upload" style={styles.uploadBtn}>
|
||||||
+ Upload New
|
+ Upload New
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -226,7 +226,7 @@ export default function InvoiceList() {
|
||||||
{invoices.length === 0 ? (
|
{invoices.length === 0 ? (
|
||||||
<div style={styles.empty}>
|
<div style={styles.empty}>
|
||||||
<p>No invoices pending confirmation.</p>
|
<p>No invoices pending confirmation.</p>
|
||||||
<a href="/upload" style={styles.link}>
|
<a href="/kitchen/upload" style={styles.link}>
|
||||||
Upload one now
|
Upload one now
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -235,7 +235,7 @@ export default function InvoiceList() {
|
||||||
{invoices.map((invoice) => (
|
{invoices.map((invoice) => (
|
||||||
<a
|
<a
|
||||||
key={invoice.id}
|
key={invoice.id}
|
||||||
href={`/invoice/${invoice.id}`}
|
href={`/kitchen/invoice/${invoice.id}`}
|
||||||
style={{
|
style={{
|
||||||
...styles.card,
|
...styles.card,
|
||||||
borderLeft: `4px solid ${statusColors[invoice.status] || '#999'}`,
|
borderLeft: `4px solid ${statusColors[invoice.status] || '#999'}`,
|
||||||
|
|
@ -341,7 +341,7 @@ export default function InvoiceList() {
|
||||||
{completedInvoices.map((invoice) => (
|
{completedInvoices.map((invoice) => (
|
||||||
<a
|
<a
|
||||||
key={invoice.id}
|
key={invoice.id}
|
||||||
href={`/invoice/${invoice.id}`}
|
href={`/kitchen/invoice/${invoice.id}`}
|
||||||
style={{
|
style={{
|
||||||
...styles.card,
|
...styles.card,
|
||||||
borderLeft: `4px solid ${statusColors[invoice.status] || '#999'}`,
|
borderLeft: `4px solid ${statusColors[invoice.status] || '#999'}`,
|
||||||
|
|
|
||||||
|
|
@ -388,7 +388,7 @@ export default function LineItemHistoryModal({
|
||||||
{data.description || '-'}
|
{data.description || '-'}
|
||||||
</span>
|
</span>
|
||||||
<a
|
<a
|
||||||
href={`/invoice/${point.invoice_id}`}
|
href={`/kitchen/invoice/${point.invoice_id}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
style={{
|
style={{
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -617,7 +617,7 @@ export default function SearchDefinitions() {
|
||||||
<td style={tdStyle}>
|
<td style={tdStyle}>
|
||||||
{def.source_invoice_number ? (
|
{def.source_invoice_number ? (
|
||||||
<a
|
<a
|
||||||
href={`/invoice/${def.source_invoice_id}`}
|
href={`/kitchen/invoice/${def.source_invoice_id}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
style={{ color: '#2563eb', textDecoration: 'none' }}
|
style={{ color: '#2563eb', textDecoration: 'none' }}
|
||||||
|
|
@ -692,7 +692,7 @@ export default function SearchDefinitions() {
|
||||||
<div>
|
<div>
|
||||||
<strong>Source Invoice:</strong>{' '}
|
<strong>Source Invoice:</strong>{' '}
|
||||||
<a
|
<a
|
||||||
href={`/invoice/${editingDef.source_invoice_id}`}
|
href={`/kitchen/invoice/${editingDef.source_invoice_id}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
style={{ color: '#2563eb' }}
|
style={{ color: '#2563eb' }}
|
||||||
|
|
|
||||||
|
|
@ -415,7 +415,7 @@ export default function SearchInvoices() {
|
||||||
<tr key={inv.id} style={{ borderBottom: '1px solid #e5e7eb' }}>
|
<tr key={inv.id} style={{ borderBottom: '1px solid #e5e7eb' }}>
|
||||||
<td style={tdStyle}>
|
<td style={tdStyle}>
|
||||||
<a
|
<a
|
||||||
href={`/invoice/${inv.id}`}
|
href={`/kitchen/invoice/${inv.id}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
style={{ color: '#2563eb', textDecoration: 'none' }}
|
style={{ color: '#2563eb', textDecoration: 'none' }}
|
||||||
|
|
@ -466,7 +466,7 @@ export default function SearchInvoices() {
|
||||||
<tr key={inv.id} style={{ borderBottom: '1px solid #e5e7eb' }}>
|
<tr key={inv.id} style={{ borderBottom: '1px solid #e5e7eb' }}>
|
||||||
<td style={tdStyle}>
|
<td style={tdStyle}>
|
||||||
<a
|
<a
|
||||||
href={`/invoice/${inv.id}`}
|
href={`/kitchen/invoice/${inv.id}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
style={{ color: '#2563eb', textDecoration: 'none' }}
|
style={{ color: '#2563eb', textDecoration: 'none' }}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -502,7 +502,7 @@ export default function Upload() {
|
||||||
Install App
|
Install App
|
||||||
</button>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ export default function NewbookData() {
|
||||||
return (
|
return (
|
||||||
<div style={styles.container}>
|
<div style={styles.container}>
|
||||||
<div style={styles.titleRow}>
|
<div style={styles.titleRow}>
|
||||||
<a href="/settings" style={styles.backLink}>← Back to Settings</a>
|
<a href="/kitchen/settings" style={styles.backLink}>← Back to Settings</a>
|
||||||
<h1 style={styles.title}>Newbook Data</h1>
|
<h1 style={styles.title}>Newbook Data</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue