Fix invoice file 500 and pdf.worker MIME error
- Remove stale import of non-existent require_cap_from_token from get_invoice_file endpoint — caused ImportError → 500 on every PDF load - Fix pdf.js worker path from '/pdf.worker.min.mjs' to '/kitchen/pdf.worker.min.mjs' in Review.tsx and SearchDefinitions.tsx — worker was being fetched from domain root instead of under the /kitchen/ base, causing MIME type rejection Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1502ab8ed2
commit
cd9e7dbfef
3 changed files with 2 additions and 3 deletions
|
|
@ -13,7 +13,7 @@ import IngredientModal from './IngredientModal'
|
|||
import { IngredientModalResult, LineItemResult } from '../utils/ingredientHelpers'
|
||||
|
||||
// Use local worker file from public directory
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = '/pdf.worker.min.mjs'
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = '/kitchen/pdf.worker.min.mjs'
|
||||
|
||||
// Simple Scale icon SVG component
|
||||
const ScaleIcon = ({ style }: { style?: React.CSSProperties }) => (
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import {
|
|||
import * as pdfjsLib from 'pdfjs-dist'
|
||||
|
||||
// Configure PDF.js worker
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = '/pdf.worker.min.mjs'
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = '/kitchen/pdf.worker.min.mjs'
|
||||
|
||||
interface ProductDefinition {
|
||||
id: number
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue