From 0301caa8812eed7a52d27014192d51ae64ae850e Mon Sep 17 00:00:00 2001 From: Owen Coogan Date: Mon, 30 Dec 2024 17:48:22 +0100 Subject: [PATCH] fix: added locked state on list cell renderer --- addon/components/hyper-table/cell-renderers/list.hbs | 11 ++++++++++- addon/components/hyper-table/cell-renderers/list.js | 1 + translations/en-us.yaml | 7 +++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/addon/components/hyper-table/cell-renderers/list.hbs b/addon/components/hyper-table/cell-renderers/list.hbs index 0d89366e..380f7279 100644 --- a/addon/components/hyper-table/cell-renderers/list.hbs +++ b/addon/components/hyper-table/cell-renderers/list.hbs @@ -10,10 +10,19 @@
{{#each this.value as |item|}}
+ {{log @column.key}} {{item.name}} + {{#if this.locked}} + + {{/if}}
{{/each}}
diff --git a/addon/components/hyper-table/cell-renderers/list.js b/addon/components/hyper-table/cell-renderers/list.js index 170f9403..5c88bf80 100644 --- a/addon/components/hyper-table/cell-renderers/list.js +++ b/addon/components/hyper-table/cell-renderers/list.js @@ -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) { diff --git a/translations/en-us.yaml b/translations/en-us.yaml index 1ae5e5bb..f479809a 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -86,3 +86,10 @@ hypertable: all_records_selected: All records ({count}) 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