diff --git a/svc/routes/order_pdf.go b/svc/routes/order_pdf.go index 11b0966..75f40ab 100644 --- a/svc/routes/order_pdf.go +++ b/svc/routes/order_pdf.go @@ -710,12 +710,28 @@ func drawOrderHeader(pdf *gofpdf.Fpdf, h *OrderHeader, showDesc bool) float64 { pageW, _ := pdf.GetPageSize() marginL := 10.0 y := 8.0 + shorten := func(s string, max int) string { + r := []rune(strings.TrimSpace(s)) + if len(r) <= max { + return string(r) + } + if max < 3 { + return string(r[:max]) + } + return string(r[:max-3]) + "..." + } /* ---------------------------------------------------- 1) LOGO ---------------------------------------------------- */ if logoPath, err := resolvePdfImagePath("Baggi-Tekstil-A.s-Logolu.jpeg"); err == nil { pdf.ImageOptions(logoPath, marginL, y, 32, 0, false, gofpdf.ImageOptions{}, 0, "") + } else { + pdf.SetFont("dejavu", "B", 12) + pdf.SetTextColor(149, 113, 22) + pdf.SetXY(marginL, y+6) + pdf.CellFormat(32, 6, "BAGGI", "", 0, "L", false, 0, "") + pdf.SetTextColor(0, 0, 0) } /* ---------------------------------------------------- @@ -737,19 +753,19 @@ func drawOrderHeader(pdf *gofpdf.Fpdf, h *OrderHeader, showDesc bool) float64 { 3) SAĞ TARAF BİLGİ KUTUSU ---------------------------------------------------- */ boxW := 78.0 - boxH := 30.0 boxX := pageW - marginL - boxW boxY := y - 2 - pdf.SetDrawColor(180, 180, 180) - pdf.Rect(boxX, boxY, boxW, boxH, "") - pdf.SetFont("dejavu", "B", 9) pdf.SetTextColor(149, 113, 22) rep := strings.TrimSpace(h.CustomerRep) if rep == "" { rep = strings.TrimSpace(h.CreatedUser) } + desc := strings.TrimSpace(h.Description) + if desc == "" { + desc = strings.TrimSpace(h.InternalDesc) + } info := []string{ "Formun Basılma Tarihi: " + time.Now().Format("02.01.2006"), @@ -759,12 +775,24 @@ func drawOrderHeader(pdf *gofpdf.Fpdf, h *OrderHeader, showDesc bool) float64 { "Cari Kod: " + h.CurrAccCode, "Müşteri: " + h.CurrAccName, } + if desc != "" { + info = append(info, "Sipariş Açıklaması: "+shorten(desc, 52)) + } + + lineH := 4.5 + boxH := float64(len(info))*lineH + 3 + if boxH < 30 { + boxH = 30 + } + + pdf.SetDrawColor(180, 180, 180) + pdf.Rect(boxX, boxY, boxW, boxH, "") iy := boxY + 3 for _, line := range info { pdf.SetXY(boxX+3, iy) - pdf.CellFormat(boxW-6, 4.5, line, "", 0, "L", false, 0, "") - iy += 4.5 + pdf.CellFormat(boxW-6, lineH, line, "", 0, "L", false, 0, "") + iy += lineH } /* ---------------------------------------------------- @@ -780,10 +808,6 @@ func drawOrderHeader(pdf *gofpdf.Fpdf, h *OrderHeader, showDesc bool) float64 { /* ---------------------------------------------------- 5) AÇIKLAMA (Varsa) ---------------------------------------------------- */ - desc := strings.TrimSpace(h.Description) - if desc == "" { - desc = strings.TrimSpace(h.InternalDesc) - } if showDesc && desc != "" { text := desc diff --git a/ui/quasar.config.js.temporary.compiled.1771666977328.mjs b/ui/quasar.config.js.temporary.compiled.1771666977328.mjs deleted file mode 100644 index 4a501bd..0000000 --- a/ui/quasar.config.js.temporary.compiled.1771666977328.mjs +++ /dev/null @@ -1,125 +0,0 @@ -/* eslint-disable */ -/** - * THIS FILE IS GENERATED AUTOMATICALLY. - * 1. DO NOT edit this file directly as it won't do anything. - * 2. EDIT the original quasar.config file INSTEAD. - * 3. DO NOT git commit this file. It should be ignored. - * - * This file is still here because there was an error in - * the original quasar.config file and this allows you to - * investigate the Node.js stack error. - * - * After you fix the original file, this file will be - * deleted automatically. - **/ - - -// quasar.config.js -import { defineConfig } from "@quasar/app-webpack/wrappers"; -var quasar_config_default = defineConfig(() => { - const apiBaseUrl = (process.env.VITE_API_BASE_URL || "/api").trim(); - return { - /* ===================================================== - APP INFO - ===================================================== */ - productName: "Baggi BSS", - productDescription: "Baggi Tekstil Business Support System", - /* ===================================================== - BOOT FILES - ===================================================== */ - boot: ["dayjs"], - /* ===================================================== - GLOBAL CSS - ===================================================== */ - css: ["app.css"], - /* ===================================================== - ICONS / FONTS - ===================================================== */ - extras: [ - "roboto-font", - "material-icons" - ], - /* ===================================================== - BUILD (PRODUCTION) - ===================================================== */ - build: { - vueRouterMode: "hash", - env: { - VITE_API_BASE_URL: apiBaseUrl - }, - esbuildTarget: { - browser: ["es2022", "firefox115", "chrome115", "safari14"], - node: "node20" - }, - // Cache & performance - gzip: true, - preloadChunks: true - }, - /* ===================================================== - DEV SERVER (LOCAL) - ===================================================== */ - devServer: { - server: { type: "http" }, - port: 9e3, - open: true, - // DEV proxy (CORS'suz) - proxy: [ - { - context: ["/api"], - target: "http://localhost:8080", - changeOrigin: true, - secure: false - } - ] - }, - /* ===================================================== - QUASAR FRAMEWORK - ===================================================== */ - framework: { - config: { - notify: { - position: "top", - timeout: 2500 - } - }, - lang: "tr", - plugins: [ - "Loading", - "Dialog", - "Notify" - ] - }, - animations: [], - /* ===================================================== - SSR / PWA (DISABLED) - ===================================================== */ - ssr: { - prodPort: 3e3, - middlewares: ["render"], - pwa: false - }, - pwa: { - workboxMode: "GenerateSW" - }, - /* ===================================================== - MOBILE / DESKTOP - ===================================================== */ - capacitor: { - hideSplashscreen: true - }, - electron: { - preloadScripts: ["electron-preload"], - inspectPort: 5858, - bundler: "packager", - builder: { - appId: "baggisowtfaresystem" - } - }, - bex: { - extraScripts: [] - } - }; -}); -export { - quasar_config_default as default -}; diff --git a/ui/src/pages/OrderProductionUpdate.vue b/ui/src/pages/OrderProductionUpdate.vue index 86e2299..c30c7e5 100644 --- a/ui/src/pages/OrderProductionUpdate.vue +++ b/ui/src/pages/OrderProductionUpdate.vue @@ -1,11 +1,8 @@