Closed omar-bear closed 1 year ago
SonarCloud Quality Gate failed.
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
4.0% Duplication
Catch issues before they fail your Quality Gate with our IDE extension SonarLint
Feature: Filter Personalized Blocks by Template Origin Using Mailing ID
Description:
The objective of this feature is to solve the issue related to adding personalized blocks from one template (Template A) into an email based on another template (Template B). The solution aims to filter the personalized blocks according to the current template being used in the email.
Implementation Details:
Backend:
Utilize Existing API Endpoint for Fetching Mail Information
mailingId
as a parameter returns detailed mail information, including thetemplateId
.Extend API to Include Template-based Filtering
personalized-block-service.js
templateId
in thegetPersonalizedBlocks
method.templateId
.Add
templateId
to Personalized Block Schemapersonalized-block-schema.js
templateId
to the schema definition for personalized blocks.Frontend:
Create
badsender-current-mailing
ExtensionmailingId
and update the ViewModel.currentMailing
, which will be an observable object containing all the mail information.Integrate Filtering Logic in Personalized Blocks List Component
fetchPersonalizedBlocks
method to include thetemplateId
fromcurrentMailing
as a parameter during the API call togetPersonalizedBlocks
.Update Create Logic in Save Block Modal Component
packages/editor/src/js/vue/components/save-block-modal/save-modal.js
templateId
fromcurrentMailing
to the relevant API endpoint. (Note: Updating a personalized block will not require sending thetemplateId
again.)Handle Empty States
Acceptance Criteria:
templateId
, is successfully fetched and stored in the ViewModel under thecurrentMailing
property.templateId
is successfully passed when creating personalized blocks.Time Estimate:
1 days