Skip to content

Commit

Permalink
Merge branch 'kiram15/ENT-9526' of github.com:openedx/frontend-app-ad…
Browse files Browse the repository at this point in the history
…min-portal into kiram15/ENT-9526
  • Loading branch information
kiram15 committed Jan 7, 2025
2 parents dca7c56 + 3158181 commit 6833024
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/components/Admin/AIAnalyticsSummary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const AnalyticsDetailCard = ({
const messages = defineMessages({
errorMessage: {
id: 'adminPortal.analyticsCardText.errorMessage',
defaultMessage: 'An error occurred: {error_message}',
defaultMessage: 'We encountered an issue while fetching analytics data. Kindly try again later or contact support for assistance. (Error: {error_message})',
description: 'Message shown to the user in case of error returned byt analytics API.',
values: { error_message: error?.message },
},
Expand All @@ -38,7 +38,7 @@ const AnalyticsDetailCard = ({
</Badge>
<Stack gap={1} direction="horizontal">
<p className="card-text text-justify small">
${
{
error ? (
<FormattedMessage {...messages.errorMessage} />
) : (
Expand Down
4 changes: 3 additions & 1 deletion src/components/Admin/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,8 @@ class Admin extends React.Component {
searchBudgetQuery: queryParams.get('budget_uuid') || '',
};

const hasCompleteInsights = insights?.learner_engagement && insights?.learner_progress;

return (
<main role="main" className="learner-progress-report">
{!loading && !error && !this.hasAnalyticsData() ? <EnterpriseAppSkeleton /> : (
Expand All @@ -445,7 +447,7 @@ class Admin extends React.Component {
<div className="row mt-4">
<div className="col">
{insightsLoading ? <AIAnalyticsSummarySkeleton /> : (
insights && <AIAnalyticsSummary enterpriseId={enterpriseId} />
hasCompleteInsights && <AIAnalyticsSummary enterpriseId={enterpriseId} />
)}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const CreateGroupModalContent = ({
});
setMemberInviteMetadata(inviteMetadata);
if (inviteMetadata.canInvite) {
onEmailAddressesChange(learnerEmails, { canInvite: true });
onEmailAddressesChange(inviteMetadata.lowerCasedEmails, { canInvite: true });
} else {
onEmailAddressesChange([]);
}
Expand Down

0 comments on commit 6833024

Please sign in to comment.