Skip to content

Commit

Permalink
fix: set default userDetails for admin users
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianGille committed Oct 20, 2023
1 parent 88577d8 commit bfecd99
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ const PersonalizedBlocksListComponent = Vue.component(
this.vm.personalizedBlocks(
response.data?.items.map(({ content, ...blockInformation }) => ({
...content,
blockInformation,
blockInformation: {
userDetails: {
name: 'admin'
},
...blockInformation,
},
id: '', // This line is crucial. The `viewModel.loadDefaultBlocks` function will override this `id` when the block is added to the email content. Without this placeholder, there could be issues when adding personalized blocks in emails.
}))
);
Expand All @@ -79,10 +84,10 @@ const PersonalizedBlocksListComponent = Vue.component(
<div id="personalized-blocks-list">
<!-- Input field with style and search icon -->
<div class="input-field search-container">
<input type="text"
v-model="searchTerm"
@input="handleSearch"
:placeholder="vm.t('personalized-blocks-search-placeholder')"
<input type="text"
v-model="searchTerm"
@input="handleSearch"
:placeholder="vm.t('personalized-blocks-search-placeholder')"
class="search-input"
id="searchBlock"/>
<label for="searchBlock"><i class="fa fa-search search-icon"></i></label> <!-- Search Icon -->
Expand Down

0 comments on commit bfecd99

Please sign in to comment.