feat: resolve filename template variables within barcode scanning service
Build and Push Multi-Platform Images / build-and-push (push) Successful in 30s

This commit is contained in:
2026-05-05 17:14:47 +02:00
parent 23bfa8d83d
commit 810afa52cd
@@ -11,6 +11,7 @@ import {
} from '../database/entities/barcode-template.entity';
import { InboxDocument, type StoredQrCode } from '../database/entities/inbox-document.entity';
import { PageCacheService } from './page-cache.service';
import { applyTemplate, buildVariables } from '../inbox-postprocessor/variable-resolver';
export interface MatchedBarcode {
page: number;
@@ -114,7 +115,12 @@ export class BarcodeScannerService implements OnApplicationBootstrap {
value: qr.value,
templateId: tpl?.Id ?? null,
templateName: tpl?.Name ?? null,
dateinameTemplate: tpl?.DateinameTemplate ?? null,
dateinameTemplate: tpl?.DateinameTemplate
? applyTemplate(
tpl.DateinameTemplate,
buildVariables({ doc: {} as InboxDocument, template: tpl, matchingQrValue: qr.value }),
)
: null,
splitBefore: tpl?.SplitBefore ?? false,
actions: tpl?.Actions ?? [],
};