Skip to content

Commit 02347bf

Browse files
Merge pull request #1683 from openedx/maham/ENT-10916
2 parents 9387ffe + 997845c commit 02347bf

File tree

3 files changed

+26
-41
lines changed

3 files changed

+26
-41
lines changed

src/components/AdvanceAnalyticsV2.0/charts/TopSkillsChart.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const TopSkillsChart = ({
1515
const markerSizes = calculateMarkerSizes(data, 'completions');
1616

1717
return (
18-
<div className="bg-primary-100 rounded-lg container-fluid p-3 mb-3 mt-3 outcomes-chart-container">
18+
<div className="bg-primary-100 rounded-lg container-fluid p-3 mb-3 outcomes-chart-container">
1919
<div className="mb-4 h-100 overflow-hidden">
2020
<Header
2121
title={intl.formatMessage({

src/components/AdvanceAnalyticsV2.0/tabs/Engagements.jsx

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ import {
99
import {
1010
useEnterpriseEngagementData,
1111
useEnterpriseAnalyticsAggregatesData,
12-
useEnterpriseAnalyticsData,
1312
useEnterpriseEnrollmentsData,
1413
useEnterpriseCourses,
1514
useEnterpriseBudgets,
1615
} from '../data/hooks';
1716
import AnalyticsFilters from '../AnalyticsFilters';
1817
import Stats from '../Stats';
19-
import SkillsByEnrollmentChart from '../charts/SkillsByEnrollmentChart';
20-
import SkillsByLearningHoursChart from '../charts/SkillsByLearningHoursChart';
2118
import Leaderboard from '../tables/LeaderboardTable';
2219
import EnrollmentsOverTimeChart from '../charts/EnrollmentsOverTimeChart';
2320
import LearningHoursOverTimeChart from '../charts/LearningHoursOverTimeChart';
@@ -54,20 +51,6 @@ const Engagements = ({ enterpriseId }) => {
5451
budgetUUID,
5552
});
5653

57-
// Skills Data
58-
const {
59-
isFetching: isSkillsFetching, isError: isSkillsError, data: skillsData,
60-
} = useEnterpriseAnalyticsData({
61-
enterpriseCustomerUUID: enterpriseId,
62-
key: ANALYTICS_TABS.SKILLS,
63-
startDate,
64-
endDate,
65-
groupUUID,
66-
courseType,
67-
course,
68-
budgetUUID,
69-
});
70-
7154
// Engagements Data
7255
const {
7356
isFetching: isEngagementFetching, isError: isEngagementError, data: engagementData,
@@ -189,30 +172,8 @@ const Engagements = ({ enterpriseId }) => {
189172
activeTab={ANALYTICS_TABS.ENGAGEMENTS}
190173
/>
191174

192-
{/* Skills Chart */}
193-
<div className="row py-3 gx-4 mb-2">
194-
{/* Skills By Enrollment Chart */}
195-
<div className="col-6">
196-
<SkillsByEnrollmentChart
197-
isFetching={isSkillsFetching}
198-
isError={isSkillsError}
199-
data={skillsData?.topSkillsByEnrollments}
200-
onClick={handleChartClick}
201-
/>
202-
</div>
203-
{/* Skills By Learning Hours Charts */}
204-
<div className="col-6">
205-
<SkillsByLearningHoursChart
206-
isFetching={isSkillsFetching}
207-
isError={isSkillsError}
208-
data={skillsData?.skillsByLearningHours}
209-
onClick={handleChartClick}
210-
/>
211-
</div>
212-
</div>
213-
214175
{/* Leaderboard */}
215-
<div className="bg-primary-100 rounded-lg container-fluid mb-3">
176+
<div className="bg-primary-100 rounded-lg container-fluid mb-3 mt-3">
216177
<div className="h-100 overflow-hidden">
217178
<Leaderboard
218179
startDate={startDate}

src/components/AdvanceAnalyticsV2.0/tabs/Outcomes.jsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import EVENT_NAMES from '../../../eventTracking';
1818
import { get90DayPriorDate } from '../data/utils';
1919
import { ALL_COURSES, GRANULARITY, CALCULATION } from '../data/constants';
2020
import { useAllFlexEnterpriseGroups } from '../../learner-credit-management/data';
21+
import SkillsByEnrollmentChart from '../charts/SkillsByEnrollmentChart';
22+
import SkillsByLearningHoursChart from '../charts/SkillsByLearningHoursChart';
2123

2224
const Outcomes = ({ enterpriseId }) => {
2325
const currentDate = new Date().toISOString().split('T')[0];
@@ -144,6 +146,28 @@ const Outcomes = ({ enterpriseId }) => {
144146
activeTab={ANALYTICS_TABS.OUTCOMES}
145147
/>
146148

149+
{/* Skills Chart */}
150+
<div className="row py-3 gx-4 mb-2">
151+
{/* Skills By Enrollment Chart */}
152+
<div className="col-6">
153+
<SkillsByEnrollmentChart
154+
isFetching={isSkillsFetching}
155+
isError={isSkillsError}
156+
data={skillsData?.topSkillsByEnrollments}
157+
onClick={handleChartClick}
158+
/>
159+
</div>
160+
{/* Skills By Learning Hours Charts */}
161+
<div className="col-6">
162+
<SkillsByLearningHoursChart
163+
isFetching={isSkillsFetching}
164+
isError={isSkillsError}
165+
data={skillsData?.skillsByLearningHours}
166+
onClick={handleChartClick}
167+
/>
168+
</div>
169+
</div>
170+
147171
{/* Top Skills */}
148172
<TopSkillsChart
149173
isFetching={isSkillsFetching}

0 commit comments

Comments
 (0)