Skip to content

Commit

Permalink
fix: quality
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammad-ammar committed Sep 19, 2024
1 parent 300f4d2 commit 1eb92e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/AdvanceAnalyticsV2/data/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { sum } from 'lodash';
import utc from 'dayjs/plugin/utc';
import quarterOfYear from 'dayjs/plugin/quarterOfYear';
import { CHART_TYPES, CALCULATION } from './constants';
import messages from '../messages';

dayjs.extend(utc);
dayjs.extend(quarterOfYear);
import messages from '../messages';

const simulateURL = (activeTab, chartType) => {
if (!Object.values(CHART_TYPES).includes(chartType)) {
Expand Down
5 changes: 2 additions & 3 deletions src/components/AdvanceAnalyticsV2/data/utils.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Jest test for utils.js

import { applyCalculation, applyGranularity } from './utils';
import { createIntl } from '@edx/frontend-platform/i18n';
import { applyCalculation, applyGranularity, constructChartHoverTemplate } from './utils';
import { CALCULATION, GRANULARITY } from './constants';

describe('utils', () => {
Expand Down Expand Up @@ -201,8 +202,6 @@ describe('utils', () => {
});
});
});
import { createIntl } from '@edx/frontend-platform/i18n';
import { constructChartHoverTemplate } from './utils';

describe('constructChartHoverTemplate', () => {
const intl = createIntl({
Expand Down
3 changes: 1 addition & 2 deletions src/components/AdvanceAnalyticsV2/tabs/Enrollments.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ import AnalyticsTable from './AnalyticsTable';
import ChartWrapper from '../charts/ChartWrapper';
import { useEnterpriseEnrollmentsData } from '../data/hooks';
import DownloadCSVButton from '../DownloadCSVButton';
import { modifyDataToIntroduceEnrollTypeCount } from '../data/utils';
import { modifyDataToIntroduceEnrollTypeCount, constructChartHoverTemplate } from '../data/utils';

dayjs.extend(utc);
import { constructChartHoverTemplate } from '../data/utils';

const Enrollments = ({
startDate, endDate, granularity, calculation, enterpriseId,
Expand Down

0 comments on commit 1eb92e9

Please sign in to comment.