diff --git a/bootstrap/bootstrap.mjs b/bootstrap/bootstrap.mjs index 203df01..3ea1751 100644 --- a/bootstrap/bootstrap.mjs +++ b/bootstrap/bootstrap.mjs @@ -184,6 +184,7 @@ const collections = [ f('name', 'string', { interface: 'input', required: true }), f('active', 'boolean', { interface: 'boolean', default: true, note: 'Im Konfigurator (app.skrift.de) sichtbar.' }), f('show_manual', 'boolean', { interface: 'boolean', default: true, note: 'Im manuellen Druck (Admin) sichtbar.' }), + f('show_check', 'boolean', { interface: 'boolean', default: false, note: 'Im Textmengencheck (app.skrift.de/textmenge) wählbar – auch ohne öffentliche Bestellung.' }), ] }, { collection: 'motifs', meta: { icon: 'image', note: 'Motiv-Katalog für Postkarten.' }, fields: [ @@ -433,7 +434,8 @@ const collections = [ f('page_height_mm', 'float', { interface: 'input', required: true, note: 'Seitenhöhe in mm.' }), f('margin_top_mm', 'float', { interface: 'input', default: 25 }), f('margin_left_mm', 'float', { interface: 'input', default: 20 }), - f('margin_right_mm', 'float', { interface: 'input', note: 'Optional (v. a. Querformat).' }), + f('margin_right_mm', 'float', { interface: 'input', note: 'Optional (v. a. Querformat). Greifrand rechts (z. B. A6 hoch).' }), + f('margin_bottom_mm', 'float', { interface: 'input', note: 'Optional. Unterer Greifrand (z. B. A6 quer) – hält untere Zeilen frei.' }), f('line_height_factor', 'float', { interface: 'input', default: 1.35, note: 'Zeilenhöhe = Schriftgröße × Faktor.' }), f('line_limit', 'integer', { interface: 'input', note: 'Max. Zeilen. Leer = automatisch aus Höhe.' }), // Zugehöriges Plotter-Druck-Template (Platzierung an der Maschine). @@ -840,9 +842,14 @@ async function applySeed() { } catch { /* nicht kritisch */ } const formats = [ - { product: productByKey.briefe.id, key: 'a4', name: 'A4', active: true }, - { product: productByKey.postkarten.id, key: 'a6_hoch', name: 'A6 Hochformat', active: true }, - { product: productByKey.postkarten.id, key: 'a6_quer', name: 'A6 Querformat', active: true }, + { product: productByKey.briefe.id, key: 'a4', name: 'A4', active: true, show_check: true }, + // A5 + DIN lang (komplett beschrieben, Volltext): NUR manueller Druck + Textmengencheck, + // NICHT im öffentlichen Konfigurator bestellbar. Render-Keys = Directus-render_formats-Keys. + { product: productByKey.briefe.id, key: 'a5p', name: 'A5 Hochformat', active: false, show_manual: true, show_check: true }, + { product: productByKey.briefe.id, key: 'a5l', name: 'A5 Querformat', active: false, show_manual: true, show_check: true }, + { product: productByKey.briefe.id, key: 'dinlang_karte', name: 'DIN lang (komplett beschrieben)', active: false, show_manual: true, show_check: true }, + { product: productByKey.postkarten.id, key: 'a6_hoch', name: 'A6 Hochformat', active: true, show_check: true }, + { product: productByKey.postkarten.id, key: 'a6_quer', name: 'A6 Querformat', active: true, show_check: true }, // Postkarten-Layout (Text links, Adresse rechts) – NUR manueller Druck, nicht in der App. { product: productByKey.postkarten.id, key: 'a6_postkarte', name: 'A6 Postkarte (Text + Adresse)', active: false, show_manual: true }, { product: productByKey.postkarten.id, key: 'dinlang_postkarte', name: 'DIN lang Postkarte (Text + Adresse)', active: false, show_manual: true }, @@ -973,6 +980,9 @@ async function applySeed() { // Upsert gesetzt, damit falsche Altwerte beim Bootstrap korrigiert werden. const formatTemplates = [ { key: 'a4_single', name: 'A4 Brief', type: 'brief', width: 8.27, height: 11.69, xpos: 0.0, ypos: -0.3, scale: 1.0, rotation: 0 }, + { key: 'a5_v1', name: 'A5 Hochformat', type: 'brief', width: 5.83, height: 8.27, xpos: -0.3, ypos: -0.3, scale: 1.0, rotation: 0 }, + { key: 'a5l_v1', name: 'A5 Querformat', type: 'brief', width: 8.27, height: 5.83, xpos: -0.3, ypos: -0.3, scale: 1.0, rotation: 0 }, + { key: 'dl_v1', name: 'DIN lang (komplett beschrieben)', type: 'brief', width: 8.27, height: 4.13, xpos: -0.3, ypos: -0.3, scale: 1.0, rotation: 0 }, { key: 'a6_v1', name: 'A6 Hochformat – Variante 1', type: 'brief', width: 4.1, height: 5.8, xpos: -0.3, ypos: -0.3, scale: 1.0, rotation: 0 }, { key: 'a6_v2', name: 'A6 Hochformat – Variante 2', type: 'brief', width: 4.1, height: 5.8, xpos: 4.0, ypos: -0.3, scale: 1.0, rotation: 90 }, { key: 'a6l_v1', name: 'A6 Querformat – Variante 1', type: 'brief', width: 5.8, height: 4.1, xpos: -0.3, ypos: -0.3, scale: 1.0, rotation: 0 }, @@ -999,8 +1009,14 @@ async function applySeed() { // Rendering-Formate (zentral fürs Backend). Werte = bisherige Defaults. const renderFormats = [ { key: 'a4', name: 'A4', kind: 'brief', page_width_mm: 210, page_height_mm: 297, margin_top_mm: 25, margin_left_mm: 20, line_height_factor: 1.35, line_limit: 27, active: true }, - { key: 'a6p', name: 'A6 Hochformat', kind: 'brief', page_width_mm: 105, page_height_mm: 148, margin_top_mm: 8, margin_left_mm: 8, line_height_factor: 1.3, line_limit: 14, active: true }, - { key: 'a6l', name: 'A6 Querformat', kind: 'brief', page_width_mm: 148, page_height_mm: 105, margin_top_mm: 8, margin_left_mm: 8, margin_right_mm: 14, line_height_factor: 1.2, line_limit: 11, active: true }, + // A6-Greifrand IMMER an der langen (148 mm) Seite: hoch → rechts, quer → unten. + { key: 'a6p', name: 'A6 Hochformat', kind: 'brief', page_width_mm: 105, page_height_mm: 148, margin_top_mm: 8, margin_left_mm: 8, margin_right_mm: 14, line_height_factor: 1.3, line_limit: 14, active: true }, + // margin_right_mm bewusst null: löscht den früheren rechten Greifrand beim Upsert-PATCH (jetzt unten). + { key: 'a6l', name: 'A6 Querformat', kind: 'brief', page_width_mm: 148, page_height_mm: 105, margin_top_mm: 8, margin_left_mm: 8, margin_right_mm: null, margin_bottom_mm: 14, line_height_factor: 1.2, line_limit: 11, active: true }, + { key: 'a5p', name: 'A5 Hochformat', kind: 'brief', page_width_mm: 148, page_height_mm: 210, margin_top_mm: 20, margin_left_mm: 15, line_height_factor: 1.35, line_limit: 19, active: true }, + { key: 'a5l', name: 'A5 Querformat', kind: 'brief', page_width_mm: 210, page_height_mm: 148, margin_top_mm: 20, margin_left_mm: 15, line_height_factor: 1.35, line_limit: 13, active: true }, + // DIN lang komplett beschrieben (Volltext, KEIN Adress-Layout) – kind brief. + { key: 'dinlang_karte', name: 'DIN lang (komplett beschrieben)', kind: 'brief', page_width_mm: 210, page_height_mm: 105, margin_top_mm: 8, margin_left_mm: 10, line_height_factor: 1.2, line_limit: 11, active: true }, { key: 'din_lang', name: 'DIN Lang Kuvert', kind: 'umschlag', page_width_mm: 220, page_height_mm: 110, margin_top_mm: 50, margin_left_mm: 10, line_height_factor: 1.2, active: true }, { key: 'c6', name: 'C6 Kuvert', kind: 'umschlag', page_width_mm: 162, page_height_mm: 114, margin_top_mm: 60, margin_left_mm: 10, line_height_factor: 1.2, active: true }, // Postkarten (nur manueller Druck): Text links, Absender+Empfänger rechts, diff --git a/extensions/directus-extension-skrift-produktion/dist/index.js b/extensions/directus-extension-skrift-produktion/dist/index.js index 7449e45..dd80709 100644 --- a/extensions/directus-extension-skrift-produktion/dist/index.js +++ b/extensions/directus-extension-skrift-produktion/dist/index.js @@ -23,7 +23,7 @@ import { defineComponent, ref, reactive, computed, onMounted, onUnmounted, h, Te import { useApi } from '@directus/extensions-sdk'; // Auftragsformat → Standard-Template-Schlüssel (wie im Backend /enqueue). -const LETTER_TPL = { a4: 'a4_single', a6_hoch: 'a6_v1', a6_quer: 'a6l_v1' }; +const LETTER_TPL = { a4: 'a4_single', a5p: 'a5_v1', a5l: 'a5l_v1', dinlang_karte: 'dl_v1', a6_hoch: 'a6_v1', a6_quer: 'a6l_v1' }; // v1 = Empfängeradresse (Standardvorschlag). Für individuelle Beschriftung // wählt der Operator im Popup die Variante 2 (kuvert_a_v2 / kuvert_b_v2). const ENVELOPE_TPL = { dinlang: 'kuvert_a_v1', c6: 'kuvert_b_v1' }; @@ -1838,7 +1838,7 @@ const Board = defineComponent({ h('select', { style: S_SELECT + 'width:100%;', value: manuell.font, onChange: (e) => { manuell.font = e.target.value; } }, ['tilda', 'alva', 'ellie'].map((f) => h('option', { value: f, selected: manuell.font === f }, f)))]), h('div', {}, [h('label', { style: 'font-size:11px;color:var(--foreground-subdued);' }, 'Format'), h('select', { style: S_SELECT + 'width:100%;', value: manuell.format, onChange: (e) => { manuell.format = e.target.value; } }, - [['a4', 'A4'], ['a6_hoch', 'A6 hoch'], ['a6_quer', 'A6 quer']].map(([v, l]) => h('option', { value: v, selected: manuell.format === v }, l)))]), + [['a4', 'A4'], ['a5p', 'A5 hoch'], ['a5l', 'A5 quer'], ['dinlang_karte', 'DIN lang'], ['a6_hoch', 'A6 hoch'], ['a6_quer', 'A6 quer']].map(([v, l]) => h('option', { value: v, selected: manuell.format === v }, l)))]), h('div', {}, [h('label', { style: 'font-size:11px;color:var(--foreground-subdued);' }, 'Template'), h('select', { style: S_SELECT + 'width:100%;', value: manuell.template, onChange: (e) => { manuell.template = e.target.value; } }, briefTpls.map((t) => h('option', { value: t.id, selected: String(manuell.template) === String(t.id) }, t.name)))]), h('div', {}, [h('label', { style: 'font-size:11px;color:var(--foreground-subdued);' }, 'Maschine'),