Skip to content

Commit

Permalink
Merge pull request #1348 from openedx/eahmadjaved/ENT-9705-3
Browse files Browse the repository at this point in the history
fix: csv name issue in analytics v2
  • Loading branch information
jajjibhai008 authored Nov 14, 2024
2 parents 2306588 + 8a65672 commit 3b6adae
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/components/AdvanceAnalyticsV2/AnalyticsV2Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const AnalyticsV2Page = ({ enterpriseId }) => {
const [activeTab, setActiveTab] = useState('enrollments');
const [granularity, setGranularity] = useState(GRANULARITY.WEEKLY);
const [calculation, setCalculation] = useState('Total');
const [startDate, setStartDate] = useState('');
const [endDate, setEndDate] = useState('');
const [startDate, setStartDate] = useState();
const [endDate, setEndDate] = useState();
const intl = useIntl();
const { isFetching, isError, data } = useEnterpriseAnalyticsAggregatesData({
enterpriseCustomerUUID: enterpriseId,
Expand Down Expand Up @@ -195,7 +195,6 @@ const AnalyticsV2Page = ({ enterpriseId }) => {
<div className="tabs-container">
<Tabs
variant="tabs"
className="d-flex justify-content-between px-2"
activeKey={activeTab}
onSelect={(tab) => {
setActiveTab(tab);
Expand All @@ -210,8 +209,8 @@ const AnalyticsV2Page = ({ enterpriseId }) => {
})}
>
<Enrollments
startDate={startDate}
endDate={endDate}
startDate={startDate || data?.minEnrollmentDate}
endDate={endDate || currentDate}
granularity={granularity}
calculation={calculation}
enterpriseId={enterpriseId}
Expand All @@ -226,8 +225,8 @@ const AnalyticsV2Page = ({ enterpriseId }) => {
})}
>
<Engagements
startDate={startDate}
endDate={endDate}
startDate={startDate || data?.minEnrollmentDate}
endDate={endDate || currentDate}
enterpriseId={enterpriseId}
granularity={granularity}
calculation={calculation}
Expand All @@ -242,8 +241,8 @@ const AnalyticsV2Page = ({ enterpriseId }) => {
})}
>
<Completions
startDate={startDate}
endDate={endDate}
startDate={startDate || data?.minEnrollmentDate}
endDate={endDate || currentDate}
granularity={granularity}
calculation={calculation}
enterpriseId={enterpriseId}
Expand All @@ -258,8 +257,8 @@ const AnalyticsV2Page = ({ enterpriseId }) => {
})}
>
<Leaderboard
startDate={startDate}
endDate={endDate}
startDate={startDate || data?.minEnrollmentDate}
endDate={endDate || currentDate}
enterpriseId={enterpriseId}
/>
</Tab>
Expand All @@ -272,8 +271,8 @@ const AnalyticsV2Page = ({ enterpriseId }) => {
})}
>
<Skills
startDate={startDate}
endDate={endDate}
startDate={startDate || data?.minEnrollmentDate}
endDate={endDate || currentDate}
enterpriseId={enterpriseId}
/>
</Tab>
Expand Down

0 comments on commit 3b6adae

Please sign in to comment.