diff --git a/client/web/compose/src/components/Chart/Report/ReportEdit.vue b/client/web/compose/src/components/Chart/Report/ReportEdit.vue index 3c1b659c7..f7882d230 100644 --- a/client/web/compose/src/components/Chart/Report/ReportEdit.vue +++ b/client/web/compose/src/components/Chart/Report/ReportEdit.vue @@ -230,8 +230,7 @@
+ + diff --git a/client/web/compose/src/components/PageBlocks/RecordListBase.vue b/client/web/compose/src/components/PageBlocks/RecordListBase.vue index 20032c240..9392f5acc 100644 --- a/client/web/compose/src/components/PageBlocks/RecordListBase.vue +++ b/client/web/compose/src/components/PageBlocks/RecordListBase.vue @@ -80,37 +80,36 @@ @export="onExport" /> - + + +
@@ -987,7 +986,7 @@ export default { filterPresets () { return [ - ...this.options.filterPresets.filter(({ name }) => name), + ...this.options.filterPresets.filter(({ name, roles }) => name && this.isUserRoleMember(roles)), ...this.customPresetFilters, ] }, @@ -1696,6 +1695,16 @@ export default { } }, + removeStorageRecordListFilterPreset (name) { + this.customPresetFilters = this.customPresetFilters.filter(f => f.name !== name) + + try { + setItem(`record-list-preset-${this.uniqueID}`, this.customPresetFilters) + } catch (e) { + console.warn(this.$t('notification:record-list.corrupted-filter')) + } + }, + onImportSuccessful () { this.refresh(true) }, diff --git a/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue b/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue index 1576bb648..1ee34d134 100644 --- a/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue +++ b/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue @@ -250,117 +250,128 @@ +
+ - - - - - {{ $t('recordList.filter.name.label') }} - - - {{ $t('recordList.filter.role.label') }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ $t('recordList.filter.addFilter') }} - + + + - - - + +
+ + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + {{ $t('general:label.add') }} + + +
@@ -373,7 +384,8 @@
{{ $t('recordList.record.presortLabel') }}
- + + - - - +
+ + + +
@@ -739,6 +753,7 @@ import { mapGetters } from 'vuex' import { NoID } from '@cortezaproject/corteza-js' import { VueSelect } from 'vue-select' +import Draggable from 'vuedraggable' import base from './base' import AutomationTab from './Shared/AutomationTab' import FieldPicker from 'corteza-webapp-compose/src/components/Common/FieldPicker' @@ -759,6 +774,7 @@ export default { CInputPresort, RecordListFilter, VueSelect, + Draggable, }, extends: base, @@ -958,3 +974,9 @@ export default { width: fit-content; } + + diff --git a/client/web/compose/src/components/PageBlocks/Wrap/Card.vue b/client/web/compose/src/components/PageBlocks/Wrap/Card.vue index 588757c1e..25f9ed01d 100644 --- a/client/web/compose/src/components/PageBlocks/Wrap/Card.vue +++ b/client/web/compose/src/components/PageBlocks/Wrap/Card.vue @@ -2,7 +2,7 @@
- - - - - - - - - - - + + - - - - - - + + + + + + + + + + + + + + + +
{{ labels.add }} diff --git a/locale/en/corteza-webapp-compose/block.yaml b/locale/en/corteza-webapp-compose/block.yaml index 1391a609c..25b8d29cb 100644 --- a/locale/en/corteza-webapp-compose/block.yaml +++ b/locale/en/corteza-webapp-compose/block.yaml @@ -329,7 +329,6 @@ recordList: fields: Module fields filter: addField: Add new filter field - addFilter: + Add filter byValue: Filter records based on field value addFilterToPreset: Save as preset conditions: @@ -368,7 +367,7 @@ recordList: placeholder: Filter name role: label: Role(s) - placeholder: Select role(s) to apply filter to + placeholder: Select role(s) that will be able to use preset hideRecordCloneButton: Hide clone record button hideRecordEditButton: Hide edit record button hideRecordPermissionsButton: Hide record permissions button