Skip to content

Commit

Permalink
Merge pull request #5617 from Countly/SER-1927
Browse files Browse the repository at this point in the history
[SER-1927] Create Event Group Button missing from data-manager
  • Loading branch information
ArtursKadikis authored Oct 2, 2024
2 parents 942ad88 + 7b52459 commit 16e13eb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,14 @@
},
canUserCreateTransform: function() {
return countlyAuth.validateCreate(SUB_FEATURE_TRANSFORMATIONS);
},
showMoreOptions: function() {
return (
(this.isDrill && this.canUserCreateTransform && (this.currentSecondaryTab === 'events' || this.currentSecondaryTab === 'segmentation')) ||
(this.isDrill && this.canUserCreate && this.currentSecondaryTab === 'events') ||
(this.canUserCreate && this.currentSecondaryTab === 'event-groups') ||
(this.isDrill && this.canUserCreateTransform && this.currentSecondaryTab === 'transformations')
);
}
},
components: {
Expand Down
12 changes: 6 additions & 6 deletions plugins/data-manager/frontend/public/templates/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
<div v-if="isDrill">
<cly-report-manager-dialog class="bu-mr-2" origin="data-manager"></cly-report-manager-dialog>
</div>
<div v-if="isDrill && currentSecondaryTab !== 'validations'">
<cly-more-options v-if="canUserCreate || canUserCreateTransform" size="small" text="Create new" type="success" icon="el-icon-circle-plus" @command="handleCreateCommand($event, currentSecondaryTab)">
<el-dropdown-item v-if="canUserCreateTransform && (currentSecondaryTab === 'events' || currentSecondaryTab === 'segmentation') " command="create-transform">
<div v-if="currentSecondaryTab !== 'validations'">
<cly-more-options v-if="showMoreOptions" size="small" text="Create new" type="success" icon="el-icon-circle-plus" @command="handleCreateCommand($event, currentSecondaryTab)">
<el-dropdown-item v-if="isDrill && canUserCreateTransform && (currentSecondaryTab === 'events' || currentSecondaryTab === 'segmentation') " command="create-transform">
{{i18n('data-manager.create-transformation')}}
</el-dropdown-item>
<el-dropdown-item v-if="canUserCreate && (currentSecondaryTab === 'events' )" command="create-event">
<el-dropdown-item v-if="isDrill && canUserCreate && (currentSecondaryTab === 'events' )" command="create-event">
{{i18n('data-manager.create-event')}}
</el-dropdown-item>
<el-dropdown-item v-if="canUserCreate && (currentSecondaryTab === 'event-groups') " command="create-event-group">
{{i18n('data-manager.create-group')}}
</el-dropdown-item>
<el-dropdown-item v-if="canUserCreateTransform && (currentSecondaryTab === 'transformations') " command="create-event-transform">
<el-dropdown-item v-if="isDrill && canUserCreateTransform && (currentSecondaryTab === 'transformations') " command="create-event-transform">
{{i18n('data-manager.create-event-transformation')}}
</el-dropdown-item>
<el-dropdown-item v-if="canUserCreateTransform && (currentSecondaryTab === 'transformations') " command="create-segment-transform">
<el-dropdown-item v-if="isDrill && canUserCreateTransform && (currentSecondaryTab === 'transformations') " command="create-segment-transform">
{{i18n('data-manager.create-segment-transformation')}}
</el-dropdown-item>
</cly-more-options>
Expand Down

0 comments on commit 16e13eb

Please sign in to comment.