fix: convert areachart to working barchart in trend-chart.svelte and fixed empty data issue (#930)
Co-authored-by: richarddkenneth <[email protected]>
This commit is contained in:
co-authored by
richarddkenneth
parent
913db2a525
commit
ce663fe365
@@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { t } from '$lib/utils/functions/translations';
|
||||
import { currentOrg } from '$lib/utils/store/org';
|
||||
import * as Page from '@cio/ui/base/page';
|
||||
@@ -15,9 +14,8 @@
|
||||
analyticsApi
|
||||
} from '$features/analytics';
|
||||
|
||||
onMount(() => {
|
||||
const orgId = $currentOrg.id;
|
||||
if (orgId) analyticsApi.ensureFetched(orgId);
|
||||
$effect(() => {
|
||||
analyticsApi.ensureFetched($currentOrg.id);
|
||||
});
|
||||
|
||||
function handleRangeChange(days: 7 | 30 | 90) {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { t } from '$lib/utils/functions/translations';
|
||||
import { currentOrg } from '$lib/utils/store/org';
|
||||
import * as Page from '@cio/ui/base/page';
|
||||
@@ -10,9 +9,8 @@
|
||||
import { StatusTiles, CourseBreakdown, LearnersTable, complianceApi } from '$features/compliance';
|
||||
import type { ComplianceLearnerRow } from '$features/compliance/utils/types';
|
||||
|
||||
onMount(() => {
|
||||
const orgId = $currentOrg.id;
|
||||
if (orgId) complianceApi.ensureFetched(orgId);
|
||||
$effect(() => {
|
||||
complianceApi.ensureFetched($currentOrg.id);
|
||||
});
|
||||
|
||||
function handleRefresh() {
|
||||
|
||||
Reference in New Issue
Block a user