Commit Graph

4 Commits

Author SHA1 Message Date
twotalesanimation 09198a9f7d fix: Generate A6 sticker PDF with inline HTML instead of blade template
Build HTML directly in service without relying on view files. This eliminates
dependency on blade template file existing on production server.

Include all styling inline in heredoc string with:
- A6 dimensions (148mm  105mm)
- Order number, customer surname, design name
- Order status and date
- QR code in SVG format
- Clean, printable layout

Add helper methods:
- truncate(): Truncate design name to fit sticker
- formatStatus(): Format order status for display
2026-01-02 20:28:44 +02:00
twotalesanimation 12f42d5efc fix: Use View::file() to render sticker template directly, add missing test route, and allow GET for regenerate
- Changed from View::make() to View::file() with full path resolution
- Added file existence check with detailed error logging
- Allow GET/POST for regenerate sticker endpoint for easier testing
- Add design name and customer surname to A6 PDF stickers
- Add regenerate sticker endpoint POST /test/sticker/{orderNumber}/regenerate
- Add test sticker preview page at /test/sticker/{orderNumber}
2026-01-02 20:25:02 +02:00
twotalesanimation e503cd3479 fix: Correct web.php syntax and use correct QR library
- Fix malformed route on line 84 (missing closing paren and semicolon)
- Replace SimpleSoftwareIO QrCode with chillerlan/php-qrcode (already installed)
- Update QrStickerService to use chillerlan\QRCode\QRCode
- Configure QR options for SVG output with H error correction
2026-01-02 20:10:06 +02:00
twotalesanimation 3040681842 feat: Add A6 PDF QR stickers with human-readable order info
Implement QrStickerService to generate both SVG (web) and PDF (print) stickers:

- Generate 32x32mm QR codes using SimpleSoftwareIO
- Create A6 (148mm  105mm) PDF stickers using DomPDF
- Include human-readable info: order number, customer, status, date, tracking
- Store order type (STOCK/CUSTOM) with visual badge
- Add generation timestamp to footer

Create stickers/qr-sticker.blade.php template:
- Two-column layout: info left, QR right
- Styled for A6 landscape printing
- Shows order number, customer, status, date, tracking info
- QR code positioned for easy scanning
- Print-optimized CSS

Update GenerateQrCodeOnOrderCreated listener:
- Now calls QrStickerService::generateSticker()
- Generates both SVG and PDF on OrderCreated event
- Logs paths to both formats

Add OpsController::downloadSticker() endpoint:
- GET /ops/orders/{id}/sticker/download
- Returns PDF with filename QR-{order_number}.pdf
- Requires ops access authorization
- Logs all downloads with user context

Update ops order-detail view:
- Add download button for A6 sticker PDF
- Position next to QR code display
- Link to new sticker download route
2026-01-02 19:51:23 +02:00