Skip to content

Commit

Permalink
fix: added locked state on list cell renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenCoogan committed Dec 30, 2024
1 parent f9571d8 commit 0301caa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
11 changes: 10 additions & 1 deletion addon/components/hyper-table/cell-renderers/list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@
<div class="expandable-list">
{{#each this.value as |item|}}
<div
class="expandable-list__item"
class="expandable-list__item fx-row fx-xalign-center fx-gap-px-6"
{{on "click" (action "goToUrl" (concat this.url item.id) bubbles=false)}}
>
{{log @column.key}}
{{item.name}}
{{#if this.locked}}
<OSS::Tag
@icon="far fa-lock"
@size="xs"
@skin="secondary"
{{enable-tooltip title=(t (concat "hypertable.cell_renderers.no_permission." @column.key))}}
/>
{{/if}}
</div>
{{/each}}
</div>
Expand Down
1 change: 1 addition & 0 deletions addon/components/hyper-table/cell-renderers/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default Component.extend(CellRendererMixin, {
}),

isEditing: false,
locked: this.column.locked ?? false,

formattedList: computed('value', 'value.firstObject.name', function () {
if (this.value.firstObject.name) {
Expand Down
7 changes: 7 additions & 0 deletions translations/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,10 @@ hypertable:
all_records_selected: All records (<b>{count}</b>) are selected
select_all: '{count, plural, =1 {Select all {count} record} other {Select all {count} records}}'
clear: Clear selection
cell_renderers:
no_permission:
mailings: You don't have permission to access this mailing
lists: You don't have permission to access this list
campaigns: You don't have permission to access this campaign
tracking_plans: You don't have permission to access this tracking plan
acquisition_campaigns: You don't have permission to access this live capture campaign

0 comments on commit 0301caa

Please sign in to comment.