@edx/frontend-app-subscription-learner-dashboard 1.38.3 → 1.38.4
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.
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgress.js +1 -1
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgress.js.map +1 -1
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgressInfo.js +9 -2
- package/dist/containers/ProgramDashboard/ProgramProgress/ProgramProgressInfo.js.map +1 -1
- package/package.json +1 -1
|
@@ -38,7 +38,7 @@ const ProgramProgress = () => {
|
|
|
38
38
|
const remainingCourseCount = ((_j = courseData === null || courseData === void 0 ? void 0 : courseData.notStarted) === null || _j === void 0 ? void 0 : _j.length) || 0;
|
|
39
39
|
const completedCourseCount = ((_k = courseData === null || courseData === void 0 ? void 0 : courseData.completed) === null || _k === void 0 ? void 0 : _k.length) || 0;
|
|
40
40
|
const discountData = programData === null || programData === void 0 ? void 0 : programData.discountData;
|
|
41
|
-
return (_jsxs(_Fragment, { children: [_jsx(Helmet, { title: `${programData === null || programData === void 0 ? void 0 : programData.title}` }), _jsxs(Container, { fluid: false, size: "xl", className: "p-4.5", children: [_jsx("div", { className: "d-block d-lg-none mb-4", children: _jsxs(Link, { to: subscriptionDashboardUrlPath, className: "text-reset text-decoration-none d-inline-flex align-items-center", children: [_jsx(Icon, { src: ArrowBack, className: "mr-2" }), formatMessage(messages.programProgressReturnToDashboardText)] }) }), _jsx(ProgramProgressHeader, { programTitle: (_l = programData === null || programData === void 0 ? void 0 : programData.title) !== null && _l !== void 0 ? _l : '', programType: (_m = programData === null || programData === void 0 ? void 0 : programData.type) !== null && _m !== void 0 ? _m : '', authoringOrganizations: programData === null || programData === void 0 ? void 0 : programData.authoringOrganizations }), _jsxs(Row, { children: [_jsxs(Col, { sm: 12, md: 8, children: [_jsx(ProgramProgressInfo, { allCoursesCompleted: allCoursesCompleted, totalCoursesInProgram: totalCoursesInProgram, programTitle: (_o = programData === null || programData === void 0 ? void 0 : programData.title) !== null && _o !== void 0 ? _o : '', discountData: discountData }), _jsx(ProgramProgressTabs, { counts: { inProgress: inProgressCourseCount, remaining: remainingCourseCount, completed: completedCourseCount }, type: programType })] }), _jsx(Col, { sm: 12, md: 4, children: _jsx(ProgramProgressSidebar, { inProgress: inProgressCourseCount, remaining: remainingCourseCount, completed: completedCourseCount }) })] })] })] }));
|
|
41
|
+
return (_jsxs(_Fragment, { children: [_jsx(Helmet, { title: `${programData === null || programData === void 0 ? void 0 : programData.title}` }), _jsxs(Container, { fluid: false, size: "xl", className: "p-4.5", children: [_jsx("div", { className: "d-block d-lg-none mb-4", children: _jsxs(Link, { to: subscriptionDashboardUrlPath, className: "text-reset text-decoration-none d-inline-flex align-items-center", children: [_jsx(Icon, { src: ArrowBack, className: "mr-2" }), formatMessage(messages.programProgressReturnToDashboardText)] }) }), _jsx(ProgramProgressHeader, { programTitle: (_l = programData === null || programData === void 0 ? void 0 : programData.title) !== null && _l !== void 0 ? _l : '', programType: (_m = programData === null || programData === void 0 ? void 0 : programData.type) !== null && _m !== void 0 ? _m : '', authoringOrganizations: programData === null || programData === void 0 ? void 0 : programData.authoringOrganizations }), _jsxs(Row, { children: [_jsxs(Col, { sm: 12, md: 8, children: [_jsx(ProgramProgressInfo, { allCoursesCompleted: allCoursesCompleted, totalCoursesInProgram: totalCoursesInProgram, programTitle: (_o = programData === null || programData === void 0 ? void 0 : programData.title) !== null && _o !== void 0 ? _o : '', discountData: discountData, programType: programType }), _jsx(ProgramProgressTabs, { counts: { inProgress: inProgressCourseCount, remaining: remainingCourseCount, completed: completedCourseCount }, type: programType })] }), _jsx(Col, { sm: 12, md: 4, children: _jsx(ProgramProgressSidebar, { inProgress: inProgressCourseCount, remaining: remainingCourseCount, completed: completedCourseCount }) })] })] })] }));
|
|
42
42
|
};
|
|
43
43
|
export default ProgramProgress;
|
|
44
44
|
//# sourceMappingURL=ProgramProgress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgramProgress.js","sourceRoot":"","sources":["../../../../src/containers/ProgramDashboard/ProgramProgress/ProgramProgress.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,eAAe,GAAO,GAAG,EAAE;;IAC/B,MAAM,EAAE,mBAAmB,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,eAAe,EAAE,CAAC;IACpE,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IAEpC,IAAI,mBAAmB,KAAK,IAAI,EAAE,CAAC;QACjC,OAAO,wCAAsB,CAAC;IAChC,CAAC;IAED,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,uCAAqB,CAAC;IAC/B,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,2CAAyB,CAAC;IACnC,CAAC;IAED,MAAM,WAAW,GAAG,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,WAAW,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C,SAAS,EAAC,OAAO,aAClD,cAAK,SAAS,EAAC,wBAAwB,YACrC,MAAC,IAAI,IAAC,EAAE,EAAE,4BAA4B,EAAE,SAAS,EAAC,kEAAkE,aAClH,KAAC,IAAI,IAAC,GAAG,EAAE,SAAS,EAAE,SAAS,EAAC,MAAM,GAAG,EACxC,aAAa,CAAC,QAAQ,CAAC,oCAAoC,CAAC,IACxD,GACH,EACN,KAAC,qBAAqB,IACpB,YAAY,EAAE,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,mCAAI,EAAE,EACtC,WAAW,EAAE,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAAI,mCAAI,EAAE,EACpC,sBAAsB,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,sBAAsB,GAC3D,EACF,MAAC,GAAG,eACF,MAAC,GAAG,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,aAChB,KAAC,mBAAmB,IAClB,mBAAmB,EAAE,mBAAmB,EACxC,qBAAqB,EAAE,qBAAqB,EAC5C,YAAY,EAAE,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,mCAAI,EAAE,EACtC,YAAY,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"ProgramProgress.js","sourceRoot":"","sources":["../../../../src/containers/ProgramDashboard/ProgramProgress/ProgramProgress.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM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W,uBAAX,WAAW,CAAE,sBAAsB,GAC3D,EACF,MAAC,GAAG,eACF,MAAC,GAAG,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,aAChB,KAAC,mBAAmB,IAClB,mBAAmB,EAAE,mBAAmB,EACxC,qBAAqB,EAAE,qBAAqB,EAC5C,YAAY,EAAE,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,mCAAI,EAAE,EACtC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,GACxB,EACF,KAAC,mBAAmB,IAAC,MAAM,EAAE,EAAE,UAAU,EAAE,qBAAqB,EAAE,SAAS,EAAE,oBAAoB,EAAE,SAAS,EAAE,oBAAoB,EAAE,EAAE,IAAI,EAAE,WAAW,GAAI,IACvJ,EAEN,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,YAChB,KAAC,sBAAsB,IACrB,UAAU,EAAE,qBAAqB,EACjC,SAAS,EAAE,oBAAoB,EAC/B,SAAS,EAAE,oBAAoB,GAC/B,GACE,IACF,IACI,IACX,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { FC } from 'react';\nimport { Helmet } from 'react-helmet';\nimport { Link } from 'react-router-dom';\nimport { Col, Container, Icon, Row } from '@openedx/paragon';\nimport { ArrowBack } from '@openedx/paragon/icons';\nimport { useIntl } from '@openedx/frontend-base';\n\nimport './index.scss';\nimport { useProgressData } from '@src/hooks';\nimport ProgramProgressHeader from './ProgramProgressHeader';\nimport ProgramProgressInfo from './ProgramProgressInfo';\nimport { ProgramProgressTabs } from './ProgramProgressTabs';\nimport { ProgramProgressSidebar } from './ProgramProgressSidebar';\nimport { subscriptionDashboardUrlPath } from '@src/constants';\nimport messages from './messages';\n\nconst ProgramProgress: FC = () => {\n const { programProgressData, isLoading, error } = useProgressData();\n const { formatMessage } = useIntl();\n\n if (programProgressData === null) {\n return <div>Invalid URL</div>;\n }\n\n if (isLoading) {\n return <div>Loading...</div>;\n }\n\n if (error) {\n return <div>Error occurred</div>;\n }\n\n const programData = programProgressData?.programData;\n const courseData = programProgressData?.courseData;\n\n const totalCoursesInProgram = (courseData.notStarted?.length || 0)\n + (courseData.completed?.length || 0)\n + (courseData.inProgress?.length || 0);\n\n const allCoursesCompleted = !courseData.notStarted?.length\n && !courseData.inProgress?.length\n && courseData.completed?.length;\n\n const programType = programData?.type ?? '';\n const inProgressCourseCount = courseData?.inProgress?.length || 0;\n const remainingCourseCount = courseData?.notStarted?.length || 0;\n const completedCourseCount = courseData?.completed?.length || 0;\n const discountData = programData?.discountData;\n\n return (\n <>\n <Helmet title={`${programData?.title}`} />\n <Container fluid={false} size=\"xl\" className=\"p-4.5\">\n <div className=\"d-block d-lg-none mb-4\">\n <Link to={subscriptionDashboardUrlPath} className=\"text-reset text-decoration-none d-inline-flex align-items-center\">\n <Icon src={ArrowBack} className=\"mr-2\" />\n {formatMessage(messages.programProgressReturnToDashboardText)}\n </Link>\n </div>\n <ProgramProgressHeader\n programTitle={programData?.title ?? ''}\n programType={programData?.type ?? ''}\n authoringOrganizations={programData?.authoringOrganizations}\n />\n <Row>\n <Col sm={12} md={8}>\n <ProgramProgressInfo\n allCoursesCompleted={allCoursesCompleted}\n totalCoursesInProgram={totalCoursesInProgram}\n programTitle={programData?.title ?? ''}\n discountData={discountData}\n programType={programType}\n />\n <ProgramProgressTabs counts={{ inProgress: inProgressCourseCount, remaining: remainingCourseCount, completed: completedCourseCount }} type={programType} />\n </Col>\n\n <Col sm={12} md={4}>\n <ProgramProgressSidebar\n inProgress={inProgressCourseCount}\n remaining={remainingCourseCount}\n completed={completedCourseCount}\n />\n </Col>\n </Row>\n </Container>\n </>\n );\n};\n\nexport default ProgramProgress;\n"]}
|
|
@@ -2,11 +2,18 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { useIntl } from '@openedx/frontend-base';
|
|
3
3
|
import messages from './messages';
|
|
4
4
|
import { UpgradeAllButton } from './UpgradeButton';
|
|
5
|
-
|
|
5
|
+
import { PROGRAM_TYPE_MAP } from '../data/constants';
|
|
6
|
+
const ProgramProgressInfo = ({ allCoursesCompleted, totalCoursesInProgram, programTitle, discountData, programType }) => {
|
|
6
7
|
const { formatMessage } = useIntl();
|
|
8
|
+
const isProfessionalProgram = programType === PROGRAM_TYPE_MAP.PROFESSIONAL_CERTIFICATE;
|
|
9
|
+
const isXSeriesProgram = programType === PROGRAM_TYPE_MAP.XSERIES;
|
|
10
|
+
const showUpgradeButton = !isProfessionalProgram && !isXSeriesProgram
|
|
11
|
+
&& (discountData === null || discountData === void 0 ? void 0 : discountData.currency)
|
|
12
|
+
&& typeof (discountData === null || discountData === void 0 ? void 0 : discountData.totalInclTax) === 'number'
|
|
13
|
+
&& typeof (discountData === null || discountData === void 0 ? void 0 : discountData.totalInclTaxExclDiscounts) === 'number';
|
|
7
14
|
return (_jsx("div", { className: "pb-4.5", children: allCoursesCompleted
|
|
8
15
|
? (_jsxs(_Fragment, { children: [_jsx("h3", { children: formatMessage(messages.programProgressCompleteHeader) }), _jsx("p", { children: formatMessage(messages.programProgressCompleteText, { programTitle }) })] }))
|
|
9
|
-
: (_jsxs(_Fragment, { children: [_jsx("h3", { className: "program-journey-header font-weight-bold", children: formatMessage(messages.programProgressIncompleteHeader) }), _jsx("p", { className: "program-journey-text", "data-testid": "program-incomplete-info-text", children: formatMessage(messages.programProgressIncompleteText, { totalCoursesInProgram }) }),
|
|
16
|
+
: (_jsxs(_Fragment, { children: [_jsx("h3", { className: "program-journey-header font-weight-bold", children: formatMessage(messages.programProgressIncompleteHeader) }), _jsx("p", { className: "program-journey-text", "data-testid": "program-incomplete-info-text", children: formatMessage(messages.programProgressIncompleteText, { totalCoursesInProgram }) }), showUpgradeButton && (_jsx(UpgradeAllButton, {}))] })) }));
|
|
10
17
|
};
|
|
11
18
|
export default ProgramProgressInfo;
|
|
12
19
|
//# sourceMappingURL=ProgramProgressInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgramProgressInfo.js","sourceRoot":"","sources":["../../../../src/containers/ProgramDashboard/ProgramProgress/ProgramProgressInfo.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ProgramProgressInfo.js","sourceRoot":"","sources":["../../../../src/containers/ProgramDashboard/ProgramProgress/ProgramProgressInfo.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,mBAAmB,GAAuC,CAAC,EAC/D,mBAAmB,EAAE,qBAAqB,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EACpF,EAAE,EAAE;IACH,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IACpC,MAAM,qBAAqB,GAAG,WAAW,KAAK,gBAAgB,CAAC,wBAAwB,CAAC;IACxF,MAAM,gBAAgB,GAAG,WAAW,KAAK,gBAAgB,CAAC,OAAO,CAAC;IAClE,MAAM,iBAAiB,GAAG,CAAC,qBAAqB,IAAI,CAAC,gBAAgB;YAChE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,CAAA;WACtB,OAAO,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,YAAY,CAAA,KAAK,QAAQ;WAC9C,OAAO,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,yBAAyB,CAAA,KAAK,QAAQ,CAAC;IAEjE,OAAO,CACL,cAAK,SAAS,EAAC,QAAQ,YACpB,mBAAmB;YAClB,CAAC,CAAC,CACE,8BACE,uBAAK,aAAa,CAAC,QAAQ,CAAC,6BAA6B,CAAC,GAAM,EAChE,sBAAI,aAAa,CAAC,QAAQ,CAAC,2BAA2B,EAAE,EAAE,YAAY,EAAE,CAAC,GAAK,IAC7E,CACJ;YACH,CAAC,CAAC,CACE,8BACE,aAAI,SAAS,EAAC,yCAAyC,YAAE,aAAa,CAAC,QAAQ,CAAC,+BAA+B,CAAC,GAAM,EACtH,YAAG,SAAS,EAAC,sBAAsB,iBAAa,8BAA8B,YAC3E,aAAa,CAAC,QAAQ,CAAC,6BAA6B,EAAE,EAAE,qBAAqB,EAAE,CAAC,GAC/E,EACH,iBAAiB,IAAI,CACpB,KAAC,gBAAgB,KAAG,CACrB,IACA,CACJ,GACD,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import React from 'react';\nimport { useIntl } from '@openedx/frontend-base';\nimport { ProgramProgressInfoProps } from '../data/types';\nimport messages from './messages';\n\nimport { UpgradeAllButton } from './UpgradeButton';\nimport { PROGRAM_TYPE_MAP } from '../data/constants';\n\nconst ProgramProgressInfo: React.FC<ProgramProgressInfoProps> = ({\n allCoursesCompleted, totalCoursesInProgram, programTitle, discountData, programType\n}) => {\n const { formatMessage } = useIntl();\n const isProfessionalProgram = programType === PROGRAM_TYPE_MAP.PROFESSIONAL_CERTIFICATE;\n const isXSeriesProgram = programType === PROGRAM_TYPE_MAP.XSERIES;\n const showUpgradeButton = !isProfessionalProgram && !isXSeriesProgram\n && discountData?.currency\n && typeof discountData?.totalInclTax === 'number'\n && typeof discountData?.totalInclTaxExclDiscounts === 'number';\n\n return (\n <div className=\"pb-4.5\">\n {allCoursesCompleted\n ? (\n <>\n <h3>{formatMessage(messages.programProgressCompleteHeader)}</h3>\n <p>{formatMessage(messages.programProgressCompleteText, { programTitle })}</p>\n </>\n )\n : (\n <>\n <h3 className=\"program-journey-header font-weight-bold\">{formatMessage(messages.programProgressIncompleteHeader)}</h3>\n <p className=\"program-journey-text\" data-testid=\"program-incomplete-info-text\">\n {formatMessage(messages.programProgressIncompleteText, { totalCoursesInProgram })}\n </p>\n {showUpgradeButton && (\n <UpgradeAllButton />\n )}\n </>\n )}\n </div>\n );\n};\n\nexport default ProgramProgressInfo;\n"]}
|