Commit fba3443c authored by MARCO Jonathan's avatar MARCO Jonathan
Browse files

Display AND or OR and not && or ||

parent 09bef249
......@@ -88,15 +88,19 @@ export default vue.extend({
},
},
data: (): ComponentData => ({
data: function (): ComponentData {
return {
itemLinked: null,
valueSelected: null,
operators: [
{ text: 'ET', value: '&&' },
{ text: 'OU', value: '||' },
// @ts-ignore
{ text: this._uct('builder.tabs.conditional.operators.and'), value: '&&' },
// @ts-ignore
{ text: this._uct('builder.tabs.conditional.operators.or'), value: '||' },
],
operatorSelected: null,
}),
}
},
computed: {
fieldIsSelectWithValue(): boolean {
......
......@@ -64,11 +64,18 @@ export default vue.extend({
switch (item.type) {
case 'field':
case 'token':
const field = this.getFieldById(item.id)
const field = this.getFieldById(item.id);
return `${field?.name || item.id}=${item.value}`;
case 'item':
return item.value;
switch (item.value) {
case '&&':
return this._uct('builder.tabs.conditional.operators.and');
case '||':
return this._uct('builder.tabs.conditional.operators.or');
default:
return item.value;
}
}
},
onDeleteItem(itemDeleted: FieldCondition): void {
......
......@@ -59,6 +59,10 @@ export const fr: AppMessages = {
user: 'Données de l\'utilisateur',
},
noValue: 'Ce champ n\'a pas de condition associée',
operators: {
and: 'ET',
or: 'OU',
},
title: 'Les conditions liées à ce champ',
types: {
error: 'Vous devez sélectionner le type de condition',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment