File

apps/recallassess/recallassess-api/src/api/shared/email/services/recall-email-template-html-export.hooks.ts

Description

Recall sample merge data + catalog branding for HTML export.

Index

Methods

Constructor

constructor(emailTestService: EmailTestService)
Parameters :
Name Type Optional
emailTestService EmailTestService No

Methods

getActiveCatalogFilenamePrefix
getActiveCatalogFilenamePrefix()
Returns : string
getCatalogTitle
getCatalogTitle()
Returns : string
getSampleMergeVariables
getSampleMergeVariables(templateKey: string)
Parameters :
Name Type Optional
templateKey string No
Returns : Record<string, string>
getSingleFilenamePrefix
getSingleFilenamePrefix()
Returns : string
import { EmailTestService } from "@api/shared/email/services/email-test.service";
import {
  BNestEmailTemplateHtmlExportHooks,
} from "@bish-nest/admin/modules/email-template";
import { Injectable } from "@nestjs/common";

/**
 * Recall sample merge data + catalog branding for HTML export.
 */
@Injectable()
export class RecallEmailTemplateHtmlExportHooks implements BNestEmailTemplateHtmlExportHooks {
  constructor(private readonly emailTestService: EmailTestService) {}

  getSampleMergeVariables(templateKey: string): Record<string, string> {
    return this.emailTestService.generateTestDataForExport(templateKey);
  }

  getCatalogTitle(): string {
    return "Recall Email Templates (Active)";
  }

  getSingleFilenamePrefix(): string {
    return "recall-email-template";
  }

  getActiveCatalogFilenamePrefix(): string {
    return "recall-email-templates-active";
  }
}

results matching ""

    No results matching ""