richie-education 2.18.0 → 2.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/i18n/locales/ar-SA.json +62 -10
  2. package/i18n/locales/es-ES.json +62 -10
  3. package/i18n/locales/fa-IR.json +62 -10
  4. package/i18n/locales/fr-CA.json +63 -11
  5. package/i18n/locales/fr-FR.json +62 -10
  6. package/i18n/locales/ko-KR.json +62 -10
  7. package/i18n/locales/pt-PT.json +63 -11
  8. package/i18n/locales/ru-RU.json +62 -10
  9. package/js/components/Button/index.tsx +1 -1
  10. package/js/components/CourseProductCourseRuns/EnrolledCourseRun.tsx +52 -18
  11. package/js/components/CourseProductCourseRuns/_styles.scss +5 -0
  12. package/js/components/CourseProductCourseRuns/index.spec.tsx +38 -9
  13. package/js/components/CourseProductItem/CourseRunItem.tsx +5 -8
  14. package/js/components/CourseProductItem/PurchaseButton.spec.tsx +154 -0
  15. package/js/components/CourseProductItem/PurchaseButton.tsx +93 -0
  16. package/js/components/CourseProductItem/_styles.scss +14 -0
  17. package/js/components/CourseProductItem/index.spec.tsx +112 -30
  18. package/js/components/CourseProductItem/index.tsx +40 -30
  19. package/js/components/CourseRunEnrollment/_styles.scss +28 -10
  20. package/js/components/CourseRunEnrollment/index.joanie.spec.tsx +275 -0
  21. package/js/components/CourseRunEnrollment/{index.spec.tsx → index.openedx.spec.tsx} +18 -2
  22. package/js/components/CourseRunEnrollment/index.tsx +61 -12
  23. package/js/components/CourseRunUnenrollmentButton/_styles.scss +3 -0
  24. package/js/components/CourseRunUnenrollmentButton/index.spec.tsx +21 -0
  25. package/js/components/CourseRunUnenrollmentButton/index.tsx +25 -0
  26. package/js/components/Dashboard/index.spec.tsx +1 -1
  27. package/js/components/DashboardCourses/_styles.scss +5 -0
  28. package/js/components/DashboardCourses/index.spec.tsx +110 -0
  29. package/js/components/DashboardCourses/index.tsx +33 -0
  30. package/js/components/DashboardItem/DashboardItemCourseEnrolling.spec.tsx +64 -0
  31. package/js/components/DashboardItem/DashboardItemCourseEnrolling.stories.tsx +75 -0
  32. package/js/components/DashboardItem/DashboardItemCourseEnrolling.tsx +294 -0
  33. package/js/components/DashboardItem/DashboardSubItem.tsx +2 -1
  34. package/js/components/DashboardItem/{DashboardItemEnrollment.spec.tsx → Enrollment/DashboardItemEnrollment.spec.tsx} +24 -16
  35. package/js/components/DashboardItem/{DashboardItemEnrollment.stories.tsx → Enrollment/DashboardItemEnrollment.stories.tsx} +1 -1
  36. package/js/components/DashboardItem/{DashboardItemEnrollment.tsx → Enrollment/DashboardItemEnrollment.tsx} +5 -3
  37. package/js/components/DashboardItem/Order/DashboardItemOrder.spec.tsx +806 -0
  38. package/js/components/DashboardItem/{DashboardItemOrder.tsx → Order/DashboardItemOrder.tsx} +50 -36
  39. package/js/components/DashboardItem/Order/DashboardItemOrderReadonly.stories.tsx +73 -0
  40. package/js/components/DashboardItem/Order/DashboardItemOrderWritable.stories.tsx +76 -0
  41. package/js/components/DashboardItem/_styles.scss +76 -29
  42. package/js/components/DashboardItem/index.tsx +4 -3
  43. package/js/components/DashboardItem/mock.stories.ts +8 -6
  44. package/js/components/DashboardOrderLoader/index.tsx +45 -0
  45. package/js/components/SaleTunnel/index.spec.tsx +24 -89
  46. package/js/components/SaleTunnel/index.tsx +33 -86
  47. package/js/data/useCourseEnrollment/index.ts +29 -13
  48. package/js/hooks/useEnroll/index.spec.tsx +88 -0
  49. package/js/hooks/useEnroll/index.ts +93 -0
  50. package/js/hooks/useOrders.ts +15 -0
  51. package/js/hooks/useProduct.ts +2 -2
  52. package/js/hooks/useResources/useResourcesOmniscient.ts +1 -1
  53. package/js/translations/ar-SA.json +1 -1
  54. package/js/translations/es-ES.json +1 -1
  55. package/js/translations/fa-IR.json +1 -1
  56. package/js/translations/fr-CA.json +1 -1
  57. package/js/translations/fr-FR.json +1 -1
  58. package/js/translations/ko-KR.json +1 -1
  59. package/js/translations/pt-PT.json +1 -1
  60. package/js/translations/ru-RU.json +1 -1
  61. package/js/types/Joanie.ts +5 -6
  62. package/js/types/api.ts +9 -1
  63. package/js/utils/CoursesHelper/index.spec.ts +110 -0
  64. package/js/utils/CoursesHelper/index.ts +20 -0
  65. package/js/utils/StorybookHelper/index.tsx +4 -9
  66. package/js/utils/api/configuration.ts +9 -0
  67. package/js/utils/api/enrollment.ts +11 -16
  68. package/js/utils/api/joanie.ts +2 -3
  69. package/js/utils/api/lms/index.ts +3 -9
  70. package/js/utils/api/lms/joanie.ts +88 -0
  71. package/js/utils/api/lms/openedx-hawthorn.ts +0 -1
  72. package/js/utils/relativeDate.ts +42 -0
  73. package/js/utils/routers/dashboard/index.tsx +11 -0
  74. package/js/utils/routers/dashboard/useDashboardRouter/index.tsx +16 -1
  75. package/js/utils/sleep.ts +3 -0
  76. package/js/utils/test/createTestQueryClient.ts +5 -2
  77. package/js/utils/test/expectBannerError.ts +2 -2
  78. package/js/utils/test/expectSpinner.ts +7 -0
  79. package/js/utils/test/factories.ts +3 -2
  80. package/js/utils/useDateFormat.tsx +5 -0
  81. package/js/utils/useDateRelative.tsx +9 -0
  82. package/package.json +29 -25
  83. package/scss/colors/_theme.scss +9 -1
  84. package/scss/components/_index.scss +2 -0
  85. package/scss/generic/_icons.scss +1 -0
  86. package/js/components/DashboardItem/DashboardItemEnrollmentFooter.tsx +0 -75
  87. package/js/components/DashboardItem/DashboardItemOrder.spec.tsx +0 -99
  88. package/js/components/DashboardItem/DashboardItemOrder.stories.tsx +0 -46
@@ -175,6 +175,10 @@
175
175
  "description": "Accessible text for the initial loading spinner displayed when product is fetching",
176
176
  "message": "Loading product information..."
177
177
  },
178
+ "components.CourseProductItem.pending": {
179
+ "description": "Message displayed when authenticated user has purchased the product but order is still pending",
180
+ "message": "Pending"
181
+ },
178
182
  "components.CourseProductsList.end": {
179
183
  "description": "End label displayed in the header of course run dates section",
180
184
  "message": "End"
@@ -207,6 +211,10 @@
207
211
  "description": "Help text below the \"Enroll now\" CTA when an enrollment attempt has already failed.",
208
212
  "message": "فشل طلب التسجيل الخاص بك."
209
213
  },
214
+ "components.CourseRunEnrollment.getEnrollmentFailed": {
215
+ "description": "Help text replacing the CTA on a course run when when enrollment fetching failed.",
216
+ "message": "Enrollment fetching failed"
217
+ },
210
218
  "components.CourseRunEnrollment.goToCourse": {
211
219
  "description": "CTA for users who are already enrolled in a course run.",
212
220
  "message": "الذهاب إلى الدورة"
@@ -219,6 +227,14 @@
219
227
  "description": "Helper text in the enroll button for non logged in users",
220
228
  "message": "تسجيل الدخول للتسجيل"
221
229
  },
230
+ "components.CourseRunEnrollment.unenroll": {
231
+ "description": "Help text below the \"Unenroll now\" CTA when an enrollment attempt has already failed.",
232
+ "message": "Unenroll from this course"
233
+ },
234
+ "components.CourseRunEnrollment.unenrollmentFailed": {
235
+ "description": "Help text below the \"Unenroll now\" CTA when an enrollment attempt has already failed.",
236
+ "message": "Your unenrollment request failed."
237
+ },
222
238
  "components.CourseRunList.enrollFromTo": {
223
239
  "description": "Text label for the enrollment dates",
224
240
  "message": "Enrollment from {start} to {end}"
@@ -227,6 +243,10 @@
227
243
  "description": "Text displayed when no course run are opened for the course",
228
244
  "message": "No session available for this course."
229
245
  },
246
+ "components.CourseRunUnenrollmentButton.unenroll": {
247
+ "description": "Help text below the \"Unenroll now\" CTA when an enrollment attempt has already failed.",
248
+ "message": "Unenroll from this course"
249
+ },
230
250
  "components.Dashboard.DashboardRoutes.course.path": {
231
251
  "description": "The path to display a course detail view.",
232
252
  "message": "/courses/{code}"
@@ -243,6 +263,14 @@
243
263
  "description": "The path to display the courses view.",
244
264
  "message": "/courses"
245
265
  },
266
+ "components.Dashboard.DashboardRoutes.order.label": {
267
+ "description": "Label of the order view used in navigation components.",
268
+ "message": "{orderTitle}"
269
+ },
270
+ "components.Dashboard.DashboardRoutes.order.path": {
271
+ "description": "The path to display an order detail view.",
272
+ "message": "/courses/orders/{orderId}"
273
+ },
246
274
  "components.Dashboard.DashboardRoutes.preferences.addresses.creation.label": {
247
275
  "description": "Label of the addresses creation view.",
248
276
  "message": "Create address"
@@ -311,6 +339,10 @@
311
339
  "description": "The dashboard's breadcrumb back button's label",
312
340
  "message": "Back"
313
341
  },
342
+ "components.DashboardCourses.loading": {
343
+ "description": "Message displayed while loading orders and enrollments",
344
+ "message": "Loading ..."
345
+ },
314
346
  "components.DashboardCreateAddressForm.header": {
315
347
  "description": "Title of the dashboard address creation form",
316
348
  "message": "Create an address"
@@ -399,6 +431,10 @@
399
431
  "description": "Label of the title input on the credit card edit page",
400
432
  "message": "Name of the credit card"
401
433
  },
434
+ "components.DashboardOrderLoader.loading": {
435
+ "description": "Message displayed while loading an order",
436
+ "message": "Loading order ..."
437
+ },
402
438
  "components.DashboardSidebar.header": {
403
439
  "description": "Title of the dashboard sidebar",
404
440
  "message": "Welcome {name}"
@@ -443,17 +479,25 @@
443
479
  "description": "Label displayed when user do not have select a course run.",
444
480
  "message": "Select a course run"
445
481
  },
482
+ "components.EnrolledCourseRun.courseRunStartIn": {
483
+ "description": "Error displayed when user is enrolled but the course run is not started",
484
+ "message": "The course starts {relativeStartDate}"
485
+ },
446
486
  "components.EnrolledCourseRun.goToCourse": {
447
487
  "description": "CTA displayed when user is enrolled to the course run.",
448
488
  "message": "الذهاب إلى الدورة"
449
489
  },
450
- "components.EnrolledCourseRun.unroll": {
451
- "description": "Button label to unroll.",
452
- "message": "Unroll"
490
+ "components.EnrolledCourseRun.isEnroll": {
491
+ "description": "Message displayed when user is enrolled but the course run is not started",
492
+ "message": "You are enrolled"
493
+ },
494
+ "components.EnrolledCourseRun.unenroll": {
495
+ "description": "Button label to unenroll.",
496
+ "message": "Unenroll"
453
497
  },
454
- "components.EnrolledCourseRun.unrolling": {
455
- "description": "Accessible label displayed when user is being unrolled.",
456
- "message": "Unrolling..."
498
+ "components.EnrolledCourseRun.unenrolling": {
499
+ "description": "Accessible label displayed when user is being unenrolled.",
500
+ "message": "Unenrolling..."
457
501
  },
458
502
  "components.LanguageSelector.currentlySelected": {
459
503
  "description": "Accessible hint to mark the currently selected language in the language selector",
@@ -827,14 +871,22 @@
827
871
  "description": "Error message shown to the user when enrollment update request fails.",
828
872
  "message": "An error occurred while updating the enrollment. Please retry later."
829
873
  },
830
- "hooks.useProduct.errorNotFound": {
831
- "description": "Error message shown to the user when no product matches.",
832
- "message": "Cannot find the product"
874
+ "hooks.useOrders.errorGet": {
875
+ "description": "Error message shown to the user when orders fetch request fails.",
876
+ "message": "An error occurred while fetching orders. Please retry later."
833
877
  },
834
- "hooks.useProduct.errorSelect": {
878
+ "hooks.useOrders.errorNotFound": {
879
+ "description": "Error message shown to the user when no orders matches.",
880
+ "message": "Cannot find the orders."
881
+ },
882
+ "hooks.useProduct.errorGet": {
835
883
  "description": "Error message shown to the user when product fetch request fails.",
836
884
  "message": "An error occurred while fetching product. Please retry later."
837
885
  },
886
+ "hooks.useProduct.errorNotFound": {
887
+ "description": "Error message shown to the user when no product matches.",
888
+ "message": "Cannot find the product."
889
+ },
838
890
  "hooks.useResources.errorCreate": {
839
891
  "description": "Error message shown to the user when resource creation request fails.",
840
892
  "message": "An error occurred while creating a resource. Please retry later."
@@ -175,6 +175,10 @@
175
175
  "description": "Accessible text for the initial loading spinner displayed when product is fetching",
176
176
  "message": "Loading product information..."
177
177
  },
178
+ "components.CourseProductItem.pending": {
179
+ "description": "Message displayed when authenticated user has purchased the product but order is still pending",
180
+ "message": "Pending"
181
+ },
178
182
  "components.CourseProductsList.end": {
179
183
  "description": "End label displayed in the header of course run dates section",
180
184
  "message": "Fin"
@@ -207,6 +211,10 @@
207
211
  "description": "Help text below the \"Enroll now\" CTA when an enrollment attempt has already failed.",
208
212
  "message": "Su solicitud de inscripción ha fallado."
209
213
  },
214
+ "components.CourseRunEnrollment.getEnrollmentFailed": {
215
+ "description": "Help text replacing the CTA on a course run when when enrollment fetching failed.",
216
+ "message": "Enrollment fetching failed"
217
+ },
210
218
  "components.CourseRunEnrollment.goToCourse": {
211
219
  "description": "CTA for users who are already enrolled in a course run.",
212
220
  "message": "Ir al curso"
@@ -219,6 +227,14 @@
219
227
  "description": "Helper text in the enroll button for non logged in users",
220
228
  "message": "Inicia sesión para inscribirse"
221
229
  },
230
+ "components.CourseRunEnrollment.unenroll": {
231
+ "description": "Help text below the \"Unenroll now\" CTA when an enrollment attempt has already failed.",
232
+ "message": "Unenroll from this course"
233
+ },
234
+ "components.CourseRunEnrollment.unenrollmentFailed": {
235
+ "description": "Help text below the \"Unenroll now\" CTA when an enrollment attempt has already failed.",
236
+ "message": "Your unenrollment request failed."
237
+ },
222
238
  "components.CourseRunList.enrollFromTo": {
223
239
  "description": "Text label for the enrollment dates",
224
240
  "message": "Inscripción de {start} a {end}"
@@ -227,6 +243,10 @@
227
243
  "description": "Text displayed when no course run are opened for the course",
228
244
  "message": "No session available for this course."
229
245
  },
246
+ "components.CourseRunUnenrollmentButton.unenroll": {
247
+ "description": "Help text below the \"Unenroll now\" CTA when an enrollment attempt has already failed.",
248
+ "message": "Unenroll from this course"
249
+ },
230
250
  "components.Dashboard.DashboardRoutes.course.path": {
231
251
  "description": "The path to display a course detail view.",
232
252
  "message": "/courses/{code}"
@@ -243,6 +263,14 @@
243
263
  "description": "The path to display the courses view.",
244
264
  "message": "/courses"
245
265
  },
266
+ "components.Dashboard.DashboardRoutes.order.label": {
267
+ "description": "Label of the order view used in navigation components.",
268
+ "message": "{orderTitle}"
269
+ },
270
+ "components.Dashboard.DashboardRoutes.order.path": {
271
+ "description": "The path to display an order detail view.",
272
+ "message": "/courses/orders/{orderId}"
273
+ },
246
274
  "components.Dashboard.DashboardRoutes.preferences.addresses.creation.label": {
247
275
  "description": "Label of the addresses creation view.",
248
276
  "message": "Create address"
@@ -311,6 +339,10 @@
311
339
  "description": "The dashboard's breadcrumb back button's label",
312
340
  "message": "Back"
313
341
  },
342
+ "components.DashboardCourses.loading": {
343
+ "description": "Message displayed while loading orders and enrollments",
344
+ "message": "Loading ..."
345
+ },
314
346
  "components.DashboardCreateAddressForm.header": {
315
347
  "description": "Title of the dashboard address creation form",
316
348
  "message": "Create an address"
@@ -399,6 +431,10 @@
399
431
  "description": "Label of the title input on the credit card edit page",
400
432
  "message": "Name of the credit card"
401
433
  },
434
+ "components.DashboardOrderLoader.loading": {
435
+ "description": "Message displayed while loading an order",
436
+ "message": "Loading order ..."
437
+ },
402
438
  "components.DashboardSidebar.header": {
403
439
  "description": "Title of the dashboard sidebar",
404
440
  "message": "Welcome {name}"
@@ -443,17 +479,25 @@
443
479
  "description": "Label displayed when user do not have select a course run.",
444
480
  "message": "Seleccione una sesión de curso"
445
481
  },
482
+ "components.EnrolledCourseRun.courseRunStartIn": {
483
+ "description": "Error displayed when user is enrolled but the course run is not started",
484
+ "message": "The course starts {relativeStartDate}"
485
+ },
446
486
  "components.EnrolledCourseRun.goToCourse": {
447
487
  "description": "CTA displayed when user is enrolled to the course run.",
448
488
  "message": "Ir al curso"
449
489
  },
450
- "components.EnrolledCourseRun.unroll": {
451
- "description": "Button label to unroll.",
452
- "message": "Desinscribirse"
490
+ "components.EnrolledCourseRun.isEnroll": {
491
+ "description": "Message displayed when user is enrolled but the course run is not started",
492
+ "message": "You are enrolled"
493
+ },
494
+ "components.EnrolledCourseRun.unenroll": {
495
+ "description": "Button label to unenroll.",
496
+ "message": "Unenroll"
453
497
  },
454
- "components.EnrolledCourseRun.unrolling": {
455
- "description": "Accessible label displayed when user is being unrolled.",
456
- "message": "Unrolling..."
498
+ "components.EnrolledCourseRun.unenrolling": {
499
+ "description": "Accessible label displayed when user is being unenrolled.",
500
+ "message": "Unenrolling..."
457
501
  },
458
502
  "components.LanguageSelector.currentlySelected": {
459
503
  "description": "Accessible hint to mark the currently selected language in the language selector",
@@ -827,14 +871,22 @@
827
871
  "description": "Error message shown to the user when enrollment update request fails.",
828
872
  "message": "An error occurred while updating the enrollment. Please retry later."
829
873
  },
830
- "hooks.useProduct.errorNotFound": {
831
- "description": "Error message shown to the user when no product matches.",
832
- "message": "Cannot find the product"
874
+ "hooks.useOrders.errorGet": {
875
+ "description": "Error message shown to the user when orders fetch request fails.",
876
+ "message": "An error occurred while fetching orders. Please retry later."
833
877
  },
834
- "hooks.useProduct.errorSelect": {
878
+ "hooks.useOrders.errorNotFound": {
879
+ "description": "Error message shown to the user when no orders matches.",
880
+ "message": "Cannot find the orders."
881
+ },
882
+ "hooks.useProduct.errorGet": {
835
883
  "description": "Error message shown to the user when product fetch request fails.",
836
884
  "message": "An error occurred while fetching product. Please retry later."
837
885
  },
886
+ "hooks.useProduct.errorNotFound": {
887
+ "description": "Error message shown to the user when no product matches.",
888
+ "message": "Cannot find the product."
889
+ },
838
890
  "hooks.useResources.errorCreate": {
839
891
  "description": "Error message shown to the user when resource creation request fails.",
840
892
  "message": "An error occurred while creating a resource. Please retry later."
@@ -175,6 +175,10 @@
175
175
  "description": "Accessible text for the initial loading spinner displayed when product is fetching",
176
176
  "message": "Loading product information..."
177
177
  },
178
+ "components.CourseProductItem.pending": {
179
+ "description": "Message displayed when authenticated user has purchased the product but order is still pending",
180
+ "message": "Pending"
181
+ },
178
182
  "components.CourseProductsList.end": {
179
183
  "description": "End label displayed in the header of course run dates section",
180
184
  "message": "End"
@@ -207,6 +211,10 @@
207
211
  "description": "Help text below the \"Enroll now\" CTA when an enrollment attempt has already failed.",
208
212
  "message": "Your enrollment request failed."
209
213
  },
214
+ "components.CourseRunEnrollment.getEnrollmentFailed": {
215
+ "description": "Help text replacing the CTA on a course run when when enrollment fetching failed.",
216
+ "message": "Enrollment fetching failed"
217
+ },
210
218
  "components.CourseRunEnrollment.goToCourse": {
211
219
  "description": "CTA for users who are already enrolled in a course run.",
212
220
  "message": "Go to course"
@@ -219,6 +227,14 @@
219
227
  "description": "Helper text in the enroll button for non logged in users",
220
228
  "message": "Log in to enroll"
221
229
  },
230
+ "components.CourseRunEnrollment.unenroll": {
231
+ "description": "Help text below the \"Unenroll now\" CTA when an enrollment attempt has already failed.",
232
+ "message": "Unenroll from this course"
233
+ },
234
+ "components.CourseRunEnrollment.unenrollmentFailed": {
235
+ "description": "Help text below the \"Unenroll now\" CTA when an enrollment attempt has already failed.",
236
+ "message": "Your unenrollment request failed."
237
+ },
222
238
  "components.CourseRunList.enrollFromTo": {
223
239
  "description": "Text label for the enrollment dates",
224
240
  "message": "Enrollment from {start} to {end}"
@@ -227,6 +243,10 @@
227
243
  "description": "Text displayed when no course run are opened for the course",
228
244
  "message": "No session available for this course."
229
245
  },
246
+ "components.CourseRunUnenrollmentButton.unenroll": {
247
+ "description": "Help text below the \"Unenroll now\" CTA when an enrollment attempt has already failed.",
248
+ "message": "Unenroll from this course"
249
+ },
230
250
  "components.Dashboard.DashboardRoutes.course.path": {
231
251
  "description": "The path to display a course detail view.",
232
252
  "message": "/courses/{code}"
@@ -243,6 +263,14 @@
243
263
  "description": "The path to display the courses view.",
244
264
  "message": "/courses"
245
265
  },
266
+ "components.Dashboard.DashboardRoutes.order.label": {
267
+ "description": "Label of the order view used in navigation components.",
268
+ "message": "{orderTitle}"
269
+ },
270
+ "components.Dashboard.DashboardRoutes.order.path": {
271
+ "description": "The path to display an order detail view.",
272
+ "message": "/courses/orders/{orderId}"
273
+ },
246
274
  "components.Dashboard.DashboardRoutes.preferences.addresses.creation.label": {
247
275
  "description": "Label of the addresses creation view.",
248
276
  "message": "Create address"
@@ -311,6 +339,10 @@
311
339
  "description": "The dashboard's breadcrumb back button's label",
312
340
  "message": "Back"
313
341
  },
342
+ "components.DashboardCourses.loading": {
343
+ "description": "Message displayed while loading orders and enrollments",
344
+ "message": "Loading ..."
345
+ },
314
346
  "components.DashboardCreateAddressForm.header": {
315
347
  "description": "Title of the dashboard address creation form",
316
348
  "message": "Create an address"
@@ -399,6 +431,10 @@
399
431
  "description": "Label of the title input on the credit card edit page",
400
432
  "message": "Name of the credit card"
401
433
  },
434
+ "components.DashboardOrderLoader.loading": {
435
+ "description": "Message displayed while loading an order",
436
+ "message": "Loading order ..."
437
+ },
402
438
  "components.DashboardSidebar.header": {
403
439
  "description": "Title of the dashboard sidebar",
404
440
  "message": "Welcome {name}"
@@ -443,17 +479,25 @@
443
479
  "description": "Label displayed when user do not have select a course run.",
444
480
  "message": "Select a course run"
445
481
  },
482
+ "components.EnrolledCourseRun.courseRunStartIn": {
483
+ "description": "Error displayed when user is enrolled but the course run is not started",
484
+ "message": "The course starts {relativeStartDate}"
485
+ },
446
486
  "components.EnrolledCourseRun.goToCourse": {
447
487
  "description": "CTA displayed when user is enrolled to the course run.",
448
488
  "message": "Go to course"
449
489
  },
450
- "components.EnrolledCourseRun.unroll": {
451
- "description": "Button label to unroll.",
452
- "message": "Unroll"
490
+ "components.EnrolledCourseRun.isEnroll": {
491
+ "description": "Message displayed when user is enrolled but the course run is not started",
492
+ "message": "You are enrolled"
493
+ },
494
+ "components.EnrolledCourseRun.unenroll": {
495
+ "description": "Button label to unenroll.",
496
+ "message": "Unenroll"
453
497
  },
454
- "components.EnrolledCourseRun.unrolling": {
455
- "description": "Accessible label displayed when user is being unrolled.",
456
- "message": "Unrolling..."
498
+ "components.EnrolledCourseRun.unenrolling": {
499
+ "description": "Accessible label displayed when user is being unenrolled.",
500
+ "message": "Unenrolling..."
457
501
  },
458
502
  "components.LanguageSelector.currentlySelected": {
459
503
  "description": "Accessible hint to mark the currently selected language in the language selector",
@@ -827,14 +871,22 @@
827
871
  "description": "Error message shown to the user when enrollment update request fails.",
828
872
  "message": "An error occurred while updating the enrollment. Please retry later."
829
873
  },
830
- "hooks.useProduct.errorNotFound": {
831
- "description": "Error message shown to the user when no product matches.",
832
- "message": "Cannot find the product"
874
+ "hooks.useOrders.errorGet": {
875
+ "description": "Error message shown to the user when orders fetch request fails.",
876
+ "message": "An error occurred while fetching orders. Please retry later."
833
877
  },
834
- "hooks.useProduct.errorSelect": {
878
+ "hooks.useOrders.errorNotFound": {
879
+ "description": "Error message shown to the user when no orders matches.",
880
+ "message": "Cannot find the orders."
881
+ },
882
+ "hooks.useProduct.errorGet": {
835
883
  "description": "Error message shown to the user when product fetch request fails.",
836
884
  "message": "An error occurred while fetching product. Please retry later."
837
885
  },
886
+ "hooks.useProduct.errorNotFound": {
887
+ "description": "Error message shown to the user when no product matches.",
888
+ "message": "Cannot find the product."
889
+ },
838
890
  "hooks.useResources.errorCreate": {
839
891
  "description": "Error message shown to the user when resource creation request fails.",
840
892
  "message": "An error occurred while creating a resource. Please retry later."
@@ -175,6 +175,10 @@
175
175
  "description": "Accessible text for the initial loading spinner displayed when product is fetching",
176
176
  "message": "Chargement des informations du produit..."
177
177
  },
178
+ "components.CourseProductItem.pending": {
179
+ "description": "Message displayed when authenticated user has purchased the product but order is still pending",
180
+ "message": "Pending"
181
+ },
178
182
  "components.CourseProductsList.end": {
179
183
  "description": "End label displayed in the header of course run dates section",
180
184
  "message": "Fin"
@@ -207,6 +211,10 @@
207
211
  "description": "Help text below the \"Enroll now\" CTA when an enrollment attempt has already failed.",
208
212
  "message": "Votre demande d'inscription a échoué."
209
213
  },
214
+ "components.CourseRunEnrollment.getEnrollmentFailed": {
215
+ "description": "Help text replacing the CTA on a course run when when enrollment fetching failed.",
216
+ "message": "Enrollment fetching failed"
217
+ },
210
218
  "components.CourseRunEnrollment.goToCourse": {
211
219
  "description": "CTA for users who are already enrolled in a course run.",
212
220
  "message": "Accéder au cours"
@@ -219,6 +227,14 @@
219
227
  "description": "Helper text in the enroll button for non logged in users",
220
228
  "message": "Connectez-vous pour vous inscrire"
221
229
  },
230
+ "components.CourseRunEnrollment.unenroll": {
231
+ "description": "Help text below the \"Unenroll now\" CTA when an enrollment attempt has already failed.",
232
+ "message": "Unenroll from this course"
233
+ },
234
+ "components.CourseRunEnrollment.unenrollmentFailed": {
235
+ "description": "Help text below the \"Unenroll now\" CTA when an enrollment attempt has already failed.",
236
+ "message": "Your unenrollment request failed."
237
+ },
222
238
  "components.CourseRunList.enrollFromTo": {
223
239
  "description": "Text label for the enrollment dates",
224
240
  "message": "Inscription du {start} au {end}"
@@ -227,6 +243,10 @@
227
243
  "description": "Text displayed when no course run are opened for the course",
228
244
  "message": "Aucune session disponible pour ce cours."
229
245
  },
246
+ "components.CourseRunUnenrollmentButton.unenroll": {
247
+ "description": "Help text below the \"Unenroll now\" CTA when an enrollment attempt has already failed.",
248
+ "message": "Unenroll from this course"
249
+ },
230
250
  "components.Dashboard.DashboardRoutes.course.path": {
231
251
  "description": "The path to display a course detail view.",
232
252
  "message": "/courses/{code}"
@@ -243,6 +263,14 @@
243
263
  "description": "The path to display the courses view.",
244
264
  "message": "/courses"
245
265
  },
266
+ "components.Dashboard.DashboardRoutes.order.label": {
267
+ "description": "Label of the order view used in navigation components.",
268
+ "message": "{orderTitle}"
269
+ },
270
+ "components.Dashboard.DashboardRoutes.order.path": {
271
+ "description": "The path to display an order detail view.",
272
+ "message": "/courses/orders/{orderId}"
273
+ },
246
274
  "components.Dashboard.DashboardRoutes.preferences.addresses.creation.label": {
247
275
  "description": "Label of the addresses creation view.",
248
276
  "message": "Create address"
@@ -311,6 +339,10 @@
311
339
  "description": "The dashboard's breadcrumb back button's label",
312
340
  "message": "Back"
313
341
  },
342
+ "components.DashboardCourses.loading": {
343
+ "description": "Message displayed while loading orders and enrollments",
344
+ "message": "Loading ..."
345
+ },
314
346
  "components.DashboardCreateAddressForm.header": {
315
347
  "description": "Title of the dashboard address creation form",
316
348
  "message": "Créer une adresse"
@@ -399,6 +431,10 @@
399
431
  "description": "Label of the title input on the credit card edit page",
400
432
  "message": "Nom de la carte de crédit"
401
433
  },
434
+ "components.DashboardOrderLoader.loading": {
435
+ "description": "Message displayed while loading an order",
436
+ "message": "Loading order ..."
437
+ },
402
438
  "components.DashboardSidebar.header": {
403
439
  "description": "Title of the dashboard sidebar",
404
440
  "message": "Welcome {name}"
@@ -443,17 +479,25 @@
443
479
  "description": "Label displayed when user do not have select a course run.",
444
480
  "message": "Sélectionnez une session"
445
481
  },
482
+ "components.EnrolledCourseRun.courseRunStartIn": {
483
+ "description": "Error displayed when user is enrolled but the course run is not started",
484
+ "message": "The course starts {relativeStartDate}"
485
+ },
446
486
  "components.EnrolledCourseRun.goToCourse": {
447
487
  "description": "CTA displayed when user is enrolled to the course run.",
448
488
  "message": "Accéder au cours"
449
489
  },
450
- "components.EnrolledCourseRun.unroll": {
451
- "description": "Button label to unroll.",
452
- "message": "Se désinscrire"
490
+ "components.EnrolledCourseRun.isEnroll": {
491
+ "description": "Message displayed when user is enrolled but the course run is not started",
492
+ "message": "You are enrolled"
493
+ },
494
+ "components.EnrolledCourseRun.unenroll": {
495
+ "description": "Button label to unenroll.",
496
+ "message": "Unenroll"
453
497
  },
454
- "components.EnrolledCourseRun.unrolling": {
455
- "description": "Accessible label displayed when user is being unrolled.",
456
- "message": "Désinscription en cours..."
498
+ "components.EnrolledCourseRun.unenrolling": {
499
+ "description": "Accessible label displayed when user is being unenrolled.",
500
+ "message": "Unenrolling..."
457
501
  },
458
502
  "components.LanguageSelector.currentlySelected": {
459
503
  "description": "Accessible hint to mark the currently selected language in the language selector",
@@ -827,13 +871,21 @@
827
871
  "description": "Error message shown to the user when enrollment update request fails.",
828
872
  "message": "An error occurred while updating the enrollment. Please retry later."
829
873
  },
830
- "hooks.useProduct.errorNotFound": {
831
- "description": "Error message shown to the user when no product matches.",
832
- "message": "Impossible de trouver le produit"
874
+ "hooks.useOrders.errorGet": {
875
+ "description": "Error message shown to the user when orders fetch request fails.",
876
+ "message": "An error occurred while fetching orders. Please retry later."
833
877
  },
834
- "hooks.useProduct.errorSelect": {
878
+ "hooks.useOrders.errorNotFound": {
879
+ "description": "Error message shown to the user when no orders matches.",
880
+ "message": "Cannot find the orders."
881
+ },
882
+ "hooks.useProduct.errorGet": {
835
883
  "description": "Error message shown to the user when product fetch request fails.",
836
- "message": "Une erreur s'est produite lors de la récupération du produit. Veuillez réessayer plus tard."
884
+ "message": "An error occurred while fetching product. Please retry later."
885
+ },
886
+ "hooks.useProduct.errorNotFound": {
887
+ "description": "Error message shown to the user when no product matches.",
888
+ "message": "Cannot find the product."
837
889
  },
838
890
  "hooks.useResources.errorCreate": {
839
891
  "description": "Error message shown to the user when resource creation request fails.",