From 580515ab82b86d2ea9180ff52429965568f1c712 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 23 Mar 2022 10:13:44 +0100 Subject: [PATCH] MOBILE-4012 enrol: Support 'fee' enrolment method --- .../features/course/pages/course-summary/course-summary.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/features/course/pages/course-summary/course-summary.ts b/src/core/features/course/pages/course-summary/course-summary.ts index 21a7de434..1adcc8c72 100644 --- a/src/core/features/course/pages/course-summary/course-summary.ts +++ b/src/core/features/course/pages/course-summary/course-summary.ts @@ -40,6 +40,8 @@ import { CoreColors } from '@singletons/colors'; import { CoreText } from '@singletons/text'; import { CorePromisedValue } from '@classes/promised-value'; +const ENROL_BROWSER_METHODS = ['fee', 'paypal']; + /** * Page that shows the summary of a course including buttons to enrol and other available options. */ @@ -256,7 +258,7 @@ export class CoreCourseSummaryPage implements OnInit, OnDestroy { } // enrollmentmethods contains ALL enrolment methods including manual. - if (!this.isEnrolled && courseByField.enrollmentmethods?.some((method) => method === 'paypal')) { + if (!this.isEnrolled && courseByField.enrollmentmethods?.some((method) => ENROL_BROWSER_METHODS.includes(method))) { this.otherEnrolments = true; }