Draft
Conversation
e40c518 to
77541c5
Compare
Alec4r
commented
Nov 18, 2025
Comment on lines
-7
to
+14
| const response = await client.get(`${getConfig().LMS_BASE_URL}/api/learning_paths/v1/learning-paths/`); | ||
| const response = await client.get(`${getConfig().LMS_BASE_URL}/partner_catalog/api/v1/partners/1/catalogs/`); | ||
| const data = response.data.results || response.data; | ||
| return camelCaseObject(data); | ||
| } | ||
|
|
||
| export async function fetchLearningPathDetail(key) { | ||
| const client = getAuthenticatedHttpClient(); | ||
| const response = await client.get(`${getConfig().LMS_BASE_URL}/api/learning_paths/v1/learning-paths/${key}/`); | ||
| const response = await client.get(`${getConfig().LMS_BASE_URL}/partner_catalog/api/v1/partners/1/catalogs/${key}/`); |
Member
Author
Alec4r
commented
Nov 18, 2025
| statusVariant = 'pending'; | ||
| buttonText = 'Accept the invitation'; | ||
| buttonIcon = Check | ||
| statusAltText = "Pending Invitation" |
Member
Author
There was a problem hiding this comment.
@dcoa I'm not sure how the i18n works here, I mean I know that NAU has a "language selector" so how can we make this works?
There was a problem hiding this comment.
we need to use frontend-platform i18n (which under the hood uses react-intl: https://formatjs.github.io/docs/react-intl/)
This mean:
// import the hook
import { useIntl } from '@edx/frontend-platform/i18n';
// import the default messages
import messages
...
const LearningPathCard = ({ learningPath, showFilters = false }) => {
// init the hook
const intl = useIntl();
...
// add the default messages
buttonText = intl.formatMessage(messages['learning.path.card.button.sent.label'])The message files looks like this one https://github.com/openedx/frontend-app-admin-console/blob/master/src/authz-module/libraries-manager/messages.ts
Alec4r
commented
Nov 18, 2025
| } flex-column justify-content-center align-items-end`} | ||
| > | ||
| {isManager && ( | ||
| <Link to={`/learningpath/${key}`}> |
Member
Author
There was a problem hiding this comment.
@dcoa we should change this for the "corporate dashboard" link
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.