diff --git a/ayanova/src/api/locale.js b/ayanova/src/api/locale.js index 14e0a30d..c77088ef 100644 --- a/ayanova/src/api/locale.js +++ b/ayanova/src/api/locale.js @@ -155,8 +155,6 @@ export default { "RowsPerPage", "PageOfPageText", "Loading", - "AM", - "PM", "DataListView", "FilterUnsaved" ], @@ -412,7 +410,7 @@ export default { // setVuetifyDefaultLanguageElements(vm) { vm.$vuetify.lang.locales.en.close = this.get("OK"); - vm.$vuetify.lang.locales.en.timePicker.am = this.get("AM"); - vm.$vuetify.lang.locales.en.timePicker.pm = this.get("PM"); + // vm.$vuetify.lang.locales.en.timePicker.am = this.get("AM"); + // vm.$vuetify.lang.locales.en.timePicker.pm = this.get("PM"); } }; diff --git a/ayanova/src/views/ay-data-list-view.vue b/ayanova/src/views/ay-data-list-view.vue index b043dc83..c2d36519 100644 --- a/ayanova/src/views/ay-data-list-view.vue +++ b/ayanova/src/views/ay-data-list-view.vue @@ -294,116 +294,13 @@ export default { effectiveListView: undefined, concurrencyToken: undefined, pickLists: { - dateFilterOperators: [ - { name: this.lt("GridRowFilterDropDownBlanksItem"), id: "*NOVALUE*" }, - { - name: this.lt("GridRowFilterDropDownNonBlanksItem"), - id: "*HASVALUE*" - }, - { name: this.lt("GridRowFilterDropDownEquals"), id: "=" }, - { name: this.lt("GridRowFilterDropDownGreaterThan"), id: ">" }, - { - name: this.lt("GridRowFilterDropDownGreaterThanOrEqualTo"), - id: ">=" - }, - { name: this.lt("GridRowFilterDropDownLessThan"), id: "<" }, - { name: this.lt("GridRowFilterDropDownLessThanOrEqualTo"), id: "<=" }, - { name: this.lt("GridRowFilterDropDownNotEquals"), id: "!=" } - ], - dateFilterTokens: [ - { name: this.lt("SelectItem"), id: "*select*" }, //If select then use entry in date /time picker - { name: this.lt("DateRangeYesterday"), id: "*yesterday*" }, - { name: this.lt("DateRangeToday"), id: "*today*" }, - { name: this.lt("DateRangeTomorrow"), id: "*tomorrow*" }, - { name: this.lt("DateRangeLastWeek"), id: "*lastweek*" }, - { name: this.lt("DateRangeThisWeek"), id: "*thisweek*" }, - { name: this.lt("DateRangeNextWeek"), id: "*nextweek*" }, - { name: this.lt("DateRangeLastMonth"), id: "*lastmonth*" }, - { name: this.lt("DateRangeThisMonth"), id: "*thismonth*" }, - { name: this.lt("DateRangeNextMonth"), id: "*nextmonth*" }, - { name: this.lt("DateRange14DayWindow"), id: "*14daywindow*" }, - { name: this.lt("DateRangePast"), id: "*past*" }, - { name: this.lt("DateRangeFuture"), id: "*future*" }, - { name: this.lt("DateRangeLastYear"), id: "*lastyear*" }, //prior year from jan to dec - { name: this.lt("DateRangeThisYear"), id: "*thisyear*" }, - { - name: this.lt("DateRangeInTheLastThreeMonths"), - id: "*last3months*" - }, - { - name: this.lt("DateRangeInTheLastSixMonths"), - id: "*last6months*" - }, - { name: this.lt("DateRangePastYear"), id: "*pastyear*" }, //last 365 days - - { name: this.lt("DateRangePast90Days"), id: "*past90days*" }, - { name: this.lt("DateRangePast30Days"), id: "*past30days*" }, - { name: this.lt("DateRangePast24Hours"), id: "*past24hours*" } - ], - stringFilterOperators: [ - { name: this.lt("GridRowFilterDropDownBlanksItem"), id: "*NOVALUE*" }, - { - name: this.lt("GridRowFilterDropDownNonBlanksItem"), - id: "*HASVALUE*" - }, - { name: this.lt("GridRowFilterDropDownEquals"), id: "=" }, - { name: this.lt("GridRowFilterDropDownGreaterThan"), id: ">" }, - { - name: this.lt("GridRowFilterDropDownGreaterThanOrEqualTo"), - id: ">=" - }, - { name: this.lt("GridRowFilterDropDownLessThan"), id: "<" }, - { name: this.lt("GridRowFilterDropDownLessThanOrEqualTo"), id: "<=" }, - { name: this.lt("GridRowFilterDropDownNotEquals"), id: "!=" }, - { name: this.lt("GridRowFilterDropDownDoesNotContain"), id: "!-%-" }, - { name: this.lt("GridRowFilterDropDownContains"), id: "-%-" }, - { name: this.lt("GridRowFilterDropDownStartsWith"), id: "%-" }, - { name: this.lt("GridRowFilterDropDownEndsWith"), id: "-%" } - ], - integerFilterOperators: [ - { name: this.lt("GridRowFilterDropDownBlanksItem"), id: "*NOVALUE*" }, - { - name: this.lt("GridRowFilterDropDownNonBlanksItem"), - id: "*HASVALUE*" - }, - { name: this.lt("GridRowFilterDropDownEquals"), id: "=" }, - { name: this.lt("GridRowFilterDropDownGreaterThan"), id: ">" }, - { - name: this.lt("GridRowFilterDropDownGreaterThanOrEqualTo"), - id: ">=" - }, - { name: this.lt("GridRowFilterDropDownLessThan"), id: "<" }, - { name: this.lt("GridRowFilterDropDownLessThanOrEqualTo"), id: "<=" }, - { name: this.lt("GridRowFilterDropDownNotEquals"), id: "!=" } - ], - boolFilterOperators: [ - { name: this.lt("GridRowFilterDropDownBlanksItem"), id: "*NOVALUE*" }, - { - name: this.lt("GridRowFilterDropDownNonBlanksItem"), - id: "*HASVALUE*" - }, - { name: this.lt("GridRowFilterDropDownEquals"), id: "=" }, - { name: this.lt("GridRowFilterDropDownNotEquals"), id: "!=" } - ], - decimalFilterOperators: [ - { name: this.lt("GridRowFilterDropDownBlanksItem"), id: "*NOVALUE*" }, - { - name: this.lt("GridRowFilterDropDownNonBlanksItem"), - id: "*HASVALUE*" - }, - { name: this.lt("GridRowFilterDropDownEquals"), id: "=" }, - { name: this.lt("GridRowFilterDropDownGreaterThan"), id: ">" }, - { - name: this.lt("GridRowFilterDropDownGreaterThanOrEqualTo"), - id: ">=" - }, - { name: this.lt("GridRowFilterDropDownLessThan"), id: "<" }, - { name: this.lt("GridRowFilterDropDownLessThanOrEqualTo"), id: "<=" }, - { name: this.lt("GridRowFilterDropDownNotEquals"), id: "!=" } - ], - tagFilterOperators: [ - { name: this.lt("GridRowFilterDropDownEquals"), id: "=" } - ] //tags filter only by equals in initial release, see DataListSqlFilterCriteriaBuilder.cs line 523 for deets + dateFilterOperators: [], + dateFilterTokens: [], + stringFilterOperators: [], + integerFilterOperators: [], + boolFilterOperators: [], + decimalFilterOperators: [], + tagFilterOperators: [] }, formState: { ready: false, @@ -652,6 +549,7 @@ function initForm(vm) { (async function() { try { await fetchUILocalizedText(vm); + await populatePickLists(vm); await populateFieldDefinitions(vm); await fetchLocalizedFieldNames(vm); await setEffectiveListView(vm); @@ -714,6 +612,141 @@ function fetchUILocalizedText(vm) { return window.$gz.locale.fetch(ltKeysRequired); } +///////////////////////////////// +// +// +function populatePickLists(vm) { + vm.pickLists.dateFilterOperators.push( + ...[ + { name: vm.lt("GridRowFilterDropDownBlanksItem"), id: "*NOVALUE*" }, + { + name: vm.lt("GridRowFilterDropDownNonBlanksItem"), + id: "*HASVALUE*" + }, + { name: vm.lt("GridRowFilterDropDownEquals"), id: "=" }, + { name: vm.lt("GridRowFilterDropDownGreaterThan"), id: ">" }, + { + name: vm.lt("GridRowFilterDropDownGreaterThanOrEqualTo"), + id: ">=" + }, + { name: vm.lt("GridRowFilterDropDownLessThan"), id: "<" }, + { name: vm.lt("GridRowFilterDropDownLessThanOrEqualTo"), id: "<=" }, + { name: vm.lt("GridRowFilterDropDownNotEquals"), id: "!=" } + ] + ); + + vm.pickLists.dateFilterTokens.push( + ...[ + { name: vm.lt("SelectItem"), id: "*select*" }, //If select then use entry in date /time picker + { name: vm.lt("DateRangeYesterday"), id: "*yesterday*" }, + { name: vm.lt("DateRangeToday"), id: "*today*" }, + { name: vm.lt("DateRangeTomorrow"), id: "*tomorrow*" }, + { name: vm.lt("DateRangeLastWeek"), id: "*lastweek*" }, + { name: vm.lt("DateRangeThisWeek"), id: "*thisweek*" }, + { name: vm.lt("DateRangeNextWeek"), id: "*nextweek*" }, + { name: vm.lt("DateRangeLastMonth"), id: "*lastmonth*" }, + { name: vm.lt("DateRangeThisMonth"), id: "*thismonth*" }, + { name: vm.lt("DateRangeNextMonth"), id: "*nextmonth*" }, + { name: vm.lt("DateRange14DayWindow"), id: "*14daywindow*" }, + { name: vm.lt("DateRangePast"), id: "*past*" }, + { name: vm.lt("DateRangeFuture"), id: "*future*" }, + { name: vm.lt("DateRangeLastYear"), id: "*lastyear*" }, //prior year from jan to dec + { name: vm.lt("DateRangeThisYear"), id: "*thisyear*" }, + { + name: vm.lt("DateRangeInTheLastThreeMonths"), + id: "*last3months*" + }, + { + name: vm.lt("DateRangeInTheLastSixMonths"), + id: "*last6months*" + }, + { name: vm.lt("DateRangePastYear"), id: "*pastyear*" }, //last 365 days + + { name: vm.lt("DateRangePast90Days"), id: "*past90days*" }, + { name: vm.lt("DateRangePast30Days"), id: "*past30days*" }, + { name: vm.lt("DateRangePast24Hours"), id: "*past24hours*" } + ] + ); + + vm.pickLists.stringFilterOperators.push( + ...[ + { name: vm.lt("GridRowFilterDropDownBlanksItem"), id: "*NOVALUE*" }, + { + name: vm.lt("GridRowFilterDropDownNonBlanksItem"), + id: "*HASVALUE*" + }, + { name: vm.lt("GridRowFilterDropDownEquals"), id: "=" }, + { name: vm.lt("GridRowFilterDropDownGreaterThan"), id: ">" }, + { + name: vm.lt("GridRowFilterDropDownGreaterThanOrEqualTo"), + id: ">=" + }, + { name: vm.lt("GridRowFilterDropDownLessThan"), id: "<" }, + { name: vm.lt("GridRowFilterDropDownLessThanOrEqualTo"), id: "<=" }, + { name: vm.lt("GridRowFilterDropDownNotEquals"), id: "!=" }, + { name: vm.lt("GridRowFilterDropDownDoesNotContain"), id: "!-%-" }, + { name: vm.lt("GridRowFilterDropDownContains"), id: "-%-" }, + { name: vm.lt("GridRowFilterDropDownStartsWith"), id: "%-" }, + { name: vm.lt("GridRowFilterDropDownEndsWith"), id: "-%" } + ] + ); + + vm.pickLists.integerFilterOperators.push( + ...[ + { name: vm.lt("GridRowFilterDropDownBlanksItem"), id: "*NOVALUE*" }, + { + name: vm.lt("GridRowFilterDropDownNonBlanksItem"), + id: "*HASVALUE*" + }, + { name: vm.lt("GridRowFilterDropDownEquals"), id: "=" }, + { name: vm.lt("GridRowFilterDropDownGreaterThan"), id: ">" }, + { + name: vm.lt("GridRowFilterDropDownGreaterThanOrEqualTo"), + id: ">=" + }, + { name: vm.lt("GridRowFilterDropDownLessThan"), id: "<" }, + { name: vm.lt("GridRowFilterDropDownLessThanOrEqualTo"), id: "<=" }, + { name: vm.lt("GridRowFilterDropDownNotEquals"), id: "!=" } + ] + ); + + vm.pickLists.boolFilterOperators.push( + ...[ + { name: vm.lt("GridRowFilterDropDownBlanksItem"), id: "*NOVALUE*" }, + { + name: vm.lt("GridRowFilterDropDownNonBlanksItem"), + id: "*HASVALUE*" + }, + { name: vm.lt("GridRowFilterDropDownEquals"), id: "=" }, + { name: vm.lt("GridRowFilterDropDownNotEquals"), id: "!=" } + ] + ); + + vm.pickLists.decimalFilterOperators.push( + ...[ + { name: vm.lt("GridRowFilterDropDownBlanksItem"), id: "*NOVALUE*" }, + { + name: vm.lt("GridRowFilterDropDownNonBlanksItem"), + id: "*HASVALUE*" + }, + { name: vm.lt("GridRowFilterDropDownEquals"), id: "=" }, + { name: vm.lt("GridRowFilterDropDownGreaterThan"), id: ">" }, + { + name: vm.lt("GridRowFilterDropDownGreaterThanOrEqualTo"), + id: ">=" + }, + { name: vm.lt("GridRowFilterDropDownLessThan"), id: "<" }, + { name: vm.lt("GridRowFilterDropDownLessThanOrEqualTo"), id: "<=" }, + { name: vm.lt("GridRowFilterDropDownNotEquals"), id: "!=" } + ] + ); + //tags filter only by equals in initial release, see DataListSqlFilterCriteriaBuilder.cs line 523 for deets + vm.pickLists.tagFilterOperators.push({ + name: vm.lt("GridRowFilterDropDownEquals"), + id: "=" + }); +} + //////////////////// // function populateFieldDefinitions(vm) {