File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
client/src/components/Flags Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ const flagMeta = {
2626 icon : 'verified' ,
2727 color : '#caac00' ,
2828 } ,
29+ versions : {
30+ icon : 'group' ,
31+ color : '#1E2019' ,
32+ } ,
2933}
3034
3135const Flag = ( { flag, withlabel, style, ...otherProps } ) => {
@@ -68,6 +72,7 @@ Flag.translations = {
6872 unanswered : 'unanswered' ,
6973 certified : 'certified' ,
7074 certifiedAdd : ' on ' ,
75+ versions : 'multiple versions' ,
7176 } ,
7277 fr : {
7378 duplicate : 'doublon' ,
@@ -76,6 +81,7 @@ Flag.translations = {
7681 unanswered : 'sans réponse' ,
7782 certified : 'certifiée' ,
7883 certifiedAdd : ' le ' ,
84+ versions : 'plusieurs versions' ,
7985 } ,
8086}
8187
Original file line number Diff line number Diff line change 33 ctxUser,
44 refreshCertifiedFlag,
55 addCertifiedFlagWhenSpecialist,
6- storeTranslation
6+ storeTranslation,
7+ createFlagAndUpdateHistoryAndAlgolia
78} = require ( '../helpers' )
89const { algolia, mailgun } = require ( '../integrations' )
910
@@ -239,6 +240,16 @@ module.exports = {
239240 certifiedContent = answer . certified
240241 }
241242
243+ if ( certifiedContent && ! answer . node . flags . find ( flag => flag . type === 'versions' ) ) {
244+ await createFlagAndUpdateHistoryAndAlgolia (
245+ history ,
246+ 'versions' ,
247+ ctx ,
248+ answer . node . id ,
249+ ctxUser ( ctx ) . id
250+ )
251+ }
252+
242253 const { language, translation } = await storeTranslation ( content )
243254
244255 const updateAnswerData = {
You can’t perform that action at this time.
0 commit comments