diff --git a/src/components/manifest/QuoteList.jsx b/src/components/manifest/QuoteList.jsx index ee36f97..001af30 100644 --- a/src/components/manifest/QuoteList.jsx +++ b/src/components/manifest/QuoteList.jsx @@ -50,7 +50,7 @@ export function createDummyTestQuote() { id: 999999, number: maxNumber, date: '2030-10-30T12:00:00Z', - customerName: 'Testkunde (Mustermann GmbH)', + customerName: 'Kunde', positions: 999, grossTotal: 30000.90, files: [ @@ -76,17 +76,6 @@ export function createDummyTestQuote() { thumby: 200, skeledash: '6w5VujjmxhSpoO8VSwebe2yXU3Tj4108PysbXPqoHmyYcs9oXH8z6npbrjwK90StUBOXY0LLPiDgZy9qjYjkFDVKSjUp3dcWQ', }, - { - id: 99993, - manifestId: 999999, - fileId: 99993, - name: 'skizze-entwurf.pdf', - mimetype: 'application/pdf', - size: 8900, - thumbx: 141, - thumby: 200, - skeledash: '6w5VujjmxhSpoO8VSwebe2yXU3Tj4108PysbXPqoHmyYcs9oXH8z6npbrjwK90StUBOXY0LLPiDgZy9qjYjkFDVKSjUp3dcWQ', - } ], }; } @@ -102,33 +91,51 @@ const rowGridSx = { const ellipsisSx = { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }; +const measuringCellSx = { + border: '1px dashed #1976d2', + opacity: 0.55, + boxSizing: 'border-box', + pointerEvents: 'none', + textTransform: 'none', + letterSpacing: 'normal', +}; + +const headerCellSx = { + color: 'text.secondary', + typography: 'caption', + fontWeight: 600, + textTransform: 'uppercase', + letterSpacing: '0.04em', + userSelect: 'none', +}; + function renderInvisibleDummyRow(dummy) { - if (!dummy) return null; + const d = dummy || createDummyTestQuote(); return ( <> - - {dummy.number} + + {d.number} - - {dummy.date ? formatDate(dummy.date) : '–'} + + {d.date ? formatDate(d.date) : '–'} - - {dummy.customerName} + + {d.customerName} - - + + - - {[0, 1, 2, 3].map((i) => ( - + + {(d.files || []).map((file, i) => ( + ))} - + - {formatPrice(dummy.grossTotal)} + {formatPrice(d.grossTotal)} - + @@ -169,15 +176,15 @@ class QuoteRow extends PureComponent { ); } return ( - + {renderInvisibleDummyRow(dummy)} - - - - - - - + + + + + + + ); } @@ -192,31 +199,31 @@ class QuoteRow extends PureComponent { return ( onOpen?.(quote)} disabled={disabled} > {renderInvisibleDummyRow(dummy)} - + {quote.number} - + {quote.date ? formatDate(quote.date) : '–'} - + {customer} - + - {/* Files / Attachments column after Pos.: space for 4 per row, 2 lines max */} + {/* Files / Attachments column after Pos.: space for 2 per row, 2 lines max (up to 4 thumbnails) */} - {files.slice(0, 8).map((file, index) => { + {files.slice(0, 4).map((file, index) => { const fileId = file.fileId ?? file.id; const title = file.name ? `${file.name} (Öffnen)` : 'Datei öffnen'; return ( @@ -305,7 +315,7 @@ class QuoteRow extends PureComponent { })} - + - + {renderInvisibleDummyRow(this.headerItem)} - Nr. - Datum - Kunde - Pos. - Dateien - Gesamt - + Nr. + Datum + Kunde + Pos. + + Gesamt + } onPageChange={this.handlePageChange}