Skip to content

Commit 5908384

Browse files
committedMar 27, 2025
feat(admin): add like on quest editor
1 parent 09bbfe0 commit 5908384

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed
 

Diff for: ‎admin/app/components/quests/requirements/object/form-field.gjs

+3
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export default class ObjectRequirementCreateOrEditFormField extends Component {
100100
return [
101101
{ value: 'equal', label: 'a exactement la valeur' },
102102
{ value: 'one-of', label: 'a la valeur parmi' },
103+
{ value: 'like', label: 'Contient ce texte dans la chaîne' },
103104
];
104105
}
105106
}
@@ -109,6 +110,8 @@ export default class ObjectRequirementCreateOrEditFormField extends Component {
109110
return this.checkboxLabel;
110111
} else if (['one-of', 'all'].includes(this.formComparison)) {
111112
return 'Saisir les valeurs séparées par des virgules, sans espaces';
113+
} else if (this.formComparison === 'like') {
114+
return 'Saisir la valeur (string)';
112115
} else {
113116
return 'Saisir la valeur';
114117
}

Diff for: ‎admin/app/components/quests/requirements/object/object-configuration.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,26 @@ const campaignParticipationsConfigField_targetProfileId = new FieldConfiguration
132132
type: FieldConfiguration.TYPES.NUMBER,
133133
refersToAnArray: false,
134134
});
135+
const campaignParticipationsConfigField_campaignName = new FieldConfiguration({
136+
name: 'campaignName',
137+
type: FieldConfiguration.TYPES.STRING,
138+
refersToAnArray: false,
139+
});
135140
const campaignParticipationsConfigField_status = new FieldConfiguration({
136141
name: 'status',
137142
type: FieldConfiguration.TYPES.STRING,
138143
refersToAnArray: false,
139144
allowedValues: ['STARTED', 'TO_SHARE', 'SHARED'],
140145
});
146+
141147
const campaignParticipationsConfiguration = new ObjectConfiguration({
142148
name: 'campaignParticipations',
143149
refersToAnArray: true,
144-
fieldConfigurations: [campaignParticipationsConfigField_targetProfileId, campaignParticipationsConfigField_status],
150+
fieldConfigurations: [
151+
campaignParticipationsConfigField_targetProfileId,
152+
campaignParticipationsConfigField_status,
153+
campaignParticipationsConfigField_campaignName,
154+
],
145155
});
146156

147157
// CAPPED TUBES

0 commit comments

Comments
 (0)