render_formats: A6-Greifrand lange Seite, A5 + DIN-lang, show_check
- Feld margin_bottom_mm (unterer Greifrand) + show_check (Textmengencheck). - a6l: Greifrand von rechts nach unten (margin_right_mm=null loescht Altwert, margin_bottom_mm=14); a6p: margin_right_mm=14 (lange Seite rechts). - Neue render_formats a5p, a5l, dinlang_karte (kind brief) + format_templates a5_v1, a5l_v1, dl_v1 (nur bei leerer Collection). - formats: a5p/a5l/dinlang_karte manuell+check, nicht oeffentlich bestellbar; show_check auf allen Text-Seiten-Formaten. - produktion: manuelles Format-Dropdown + Template-Map um A5/DIN-lang erweitert. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user