diff --git a/admin/app/models/training.js b/admin/app/models/training.js index 1bc55d1e258..39f882c69e0 100644 --- a/admin/app/models/training.js +++ b/admin/app/models/training.js @@ -5,6 +5,9 @@ import { memberAction } from 'ember-api-actions'; export const typeCategories = { webinaire: 'Webinaire', autoformation: "Parcours d'autoformation", + 'e-learning': 'Formation en ligne', + 'hybrid-training': 'Formation hybride', + 'in-person-training': 'Formation en présentiel', }; export const optionsTypeList = formatList(typeCategories); diff --git a/admin/tests/integration/components/trainings/create-or-update-training-form_test.js b/admin/tests/integration/components/trainings/create-or-update-training-form_test.js index a6b16a3191b..53521e50580 100644 --- a/admin/tests/integration/components/trainings/create-or-update-training-form_test.js +++ b/admin/tests/integration/components/trainings/create-or-update-training-form_test.js @@ -17,7 +17,7 @@ module('Integration | Component | Trainings::CreateOrUpdateTrainingForm', functi form = { title: 'Un contenu formatif', link: 'https://un-contenu-formatif', - type: 'Webinaire', + type: 'webinaire', locale: 'fr-fr', editorName: 'Un éditeur de contenu formatif', editorLogoUrl: 'un-logo.svg', diff --git a/admin/tests/integration/components/trainings/training-details-card_test.js b/admin/tests/integration/components/trainings/training-details-card_test.js index 9fa07741f60..b81afa8dce4 100644 --- a/admin/tests/integration/components/trainings/training-details-card_test.js +++ b/admin/tests/integration/components/trainings/training-details-card_test.js @@ -10,7 +10,7 @@ module('Integration | Component | Trainings::TrainingDetailsCard', function (hoo this.set('training', { title: 'Un contenu formatif', link: 'https://un-contenu-formatif', - type: 'Webinaire', + type: 'webinaire', locale: 'fr-fr', editorName: 'Un éditeur de contenu formatif', editorLogoUrl: 'un-logo.svg', @@ -28,7 +28,7 @@ module('Integration | Component | Trainings::TrainingDetailsCard', function (hoo // then assert.dom(screen.getByText('Un contenu formatif')).exists(); assert.dom(screen.getByText('https://un-contenu-formatif')).exists(); - assert.dom(screen.getByText('Webinaire')).exists(); + assert.dom(screen.getByText('webinaire')).exists(); assert.dom(screen.getByText('2j')).exists(); assert.dom(screen.getByText('Franco-français (fr-fr)')).exists(); assert.dom(screen.getByText('Un éditeur de contenu formatif')).exists(); diff --git a/admin/tests/unit/controllers/authenticated/trainings/new_test.js b/admin/tests/unit/controllers/authenticated/trainings/new_test.js index 168d3fe7dd2..5965ab9ecb9 100644 --- a/admin/tests/unit/controllers/authenticated/trainings/new_test.js +++ b/admin/tests/unit/controllers/authenticated/trainings/new_test.js @@ -27,7 +27,7 @@ module('Unit | Controller | authenticated/trainings/new', function (hooks) { id: 3, title: 'Ma formation', link: 'https://mon-lien', - type: 'Webinaire', + type: 'webinaire', locale: 'fr-fr', editorLogoUrl: 'https//images.fr/mon-logo.svg', editorName: 'Un éditeur de contenu formatif', diff --git a/api/db/seeds/data/team-contenu/data-builder.js b/api/db/seeds/data/team-contenu/data-builder.js index 9585b15826d..aa82a1f50a0 100644 --- a/api/db/seeds/data/team-contenu/data-builder.js +++ b/api/db/seeds/data/team-contenu/data-builder.js @@ -343,7 +343,7 @@ async function _createTraining(databaseBuilder) { trainingId: TEAM_CONTENU_OFFSET_ID, title: 'Contenu formatif / équipe contenu', link: 'https://www.youtube.com/watch?v=qq09UkPRdFY', - type: 'Webinaire', + type: 'webinaire', duration: '00:04:08', locale: 'fr-fr', editorName: 'Mariah Carey', diff --git a/api/src/devcomp/application/trainings/index.js b/api/src/devcomp/application/trainings/index.js index db1cd128f1e..f27587e99e6 100644 --- a/api/src/devcomp/application/trainings/index.js +++ b/api/src/devcomp/application/trainings/index.js @@ -125,7 +125,9 @@ const register = async function (server) { hours: Joi.number().min(0).max(23).default(0), minutes: Joi.number().min(0).max(59).default(0), }).required(), - type: Joi.string().valid('autoformation', 'webinaire').required(), + type: Joi.string() + .valid('autoformation', 'e-learning', 'hybrid-training', 'in-person-training', 'webinaire') + .required(), locale: Joi.string().valid('fr-fr', 'fr', 'en-gb').required(), 'editor-name': Joi.string().required(), 'editor-logo-url': Joi.string().uri().required(), @@ -169,7 +171,9 @@ const register = async function (server) { hours: Joi.number().min(0).max(23).required(), minutes: Joi.number().min(0).max(59).required(), }).allow(null), - type: Joi.string().valid('autoformation', 'webinaire').allow(null), + type: Joi.string() + .valid('autoformation', 'e-learning', 'hybrid-training', 'in-person-training', 'webinaire') + .allow(null), locale: Joi.string().valid('fr-fr', 'fr', 'en-gb').allow(null), 'editor-name': Joi.string().allow(null), 'editor-logo-url': Joi.string().allow(null), diff --git a/mon-pix/translations/en.json b/mon-pix/translations/en.json index 6962f7a20cf..f670d0c2f34 100644 --- a/mon-pix/translations/en.json +++ b/mon-pix/translations/en.json @@ -1510,6 +1510,9 @@ "editor": "Training provided by", "type": { "autoformation": "Autoformation course", + "e-learning": "E-Learning", + "hybrid-training": "Hybrid training", + "in-person-training": "In person training", "webinaire": "Webinar" } }, diff --git a/mon-pix/translations/fr.json b/mon-pix/translations/fr.json index 2cad7478d45..247524ca569 100644 --- a/mon-pix/translations/fr.json +++ b/mon-pix/translations/fr.json @@ -1510,6 +1510,9 @@ "editor": "Contenu formatif proposé par", "type": { "autoformation": "Parcours d'autoformation", + "e-learning": "Formation à distance", + "hybrid-training": "Formation hybride", + "in-person-training": "Formation en présentiel", "webinaire": "Webinaire" } },