diff --git a/src/datagrid-bvue.ts b/src/datagrid-bvue.ts index 9dc9ed4..5863cb9 100644 --- a/src/datagrid-bvue.ts +++ b/src/datagrid-bvue.ts @@ -114,6 +114,8 @@ export enum EngineSubOperators { ContainsAll = 'containsAll', Before = 'before', After = 'after', + Empty = 'empty', + NotEmpty = 'notEmpty', } export enum SimpleRuleType { @@ -144,6 +146,8 @@ export const StringOperatorOptions: EngineSubOperators[] = [ EngineSubOperators.StartsWith, EngineSubOperators.EndsWith, EngineSubOperators.Matches, + EngineSubOperators.Empty, + EngineSubOperators.NotEmpty, ]; export const NumberOperatorOptions: EngineSubOperators[] = [ EngineSubOperators.EqualTo, diff --git a/src/rule/RuleInputs/StringRule.vue b/src/rule/RuleInputs/StringRule.vue index b837c35..7341c41 100644 --- a/src/rule/RuleInputs/StringRule.vue +++ b/src/rule/RuleInputs/StringRule.vue @@ -4,7 +4,12 @@ - +

Format: @@ -30,6 +35,11 @@ import OperatorDropdown from '@/rule/RuleInputs/OperatorDropdown.vue'; export default defineComponent({ name: 'StringRule', + computed: { + EngineSubOperators() { + return EngineSubOperators; + }, + }, mixins: [fieldInput], components: { BFormGroup, diff --git a/src/translation/filter.ts b/src/translation/filter.ts index d5cb44a..a401a79 100644 --- a/src/translation/filter.ts +++ b/src/translation/filter.ts @@ -33,6 +33,8 @@ export default { endsWith: 'Finit par', isNull: 'Est nul', isNotNull: "N'est pas nul", + empty: 'Est vide', + notEmpty: "N'est pas vide", and: 'Et', or: 'Ou', not: 'Non', @@ -85,6 +87,8 @@ export default { endsWith: 'Ends with', isNull: 'Is null', isNotNull: 'Is not null', + empty: 'Empty', + notEmpty: 'Not empty', and: 'And', or: 'Or', not: 'Not', diff --git a/src/translation/modal.ts b/src/translation/modal.ts index 1256cc8..c5b01b7 100644 --- a/src/translation/modal.ts +++ b/src/translation/modal.ts @@ -37,6 +37,8 @@ export default { endsWith: 'Finit par', isNull: 'Est nul', isNotNull: "N'est pas nul", + empty: 'Est vide', + notEmpty: "N'est pas vide", and: 'Et', or: 'Ou', not: 'Non', @@ -97,6 +99,8 @@ export default { endsWith: 'Ends with', isNull: 'Is null', isNotNull: 'Is not null', + empty: 'Empty', + notEmpty: 'Not empty', and: 'And', or: 'Or', not: 'Not', diff --git a/src/translation/table.ts b/src/translation/table.ts index cd9d2b4..6f5abb0 100644 --- a/src/translation/table.ts +++ b/src/translation/table.ts @@ -37,6 +37,8 @@ export default { endsWith: 'Finit par', isNull: 'Est nul', isNotNull: "N'est pas nul", + empty: 'Est vide', + notEmpty: "N'est pas vide", and: 'Et', or: 'Ou', not: 'Non', @@ -117,6 +119,8 @@ export default { endsWith: 'Ends with', isNull: 'Is null', isNotNull: 'Is not null', + empty: 'Empty', + notEmpty: 'Not empty', and: 'And', or: 'Or', not: 'Not',