Skip to content

Commit

Permalink
Merge pull request #38 from REAN-Foundation/eslint-issue-fix
Browse files Browse the repository at this point in the history
Eslint issue fix
  • Loading branch information
rupali-inflection authored Jun 24, 2024
2 parents d2031a9 + 069783a commit da07ef4
Show file tree
Hide file tree
Showing 103 changed files with 314 additions and 395 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/dashboard/funnel.card.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import Funnel from '$lib/components/users-stats/charts/funnel.svelte';
import { getChartColors } from '$lib/themes/theme.selector';
import { afterUpdate, onMount } from 'svelte';
import { onMount } from 'svelte';
export let labels: string[];
export let dataSource: number[];
Expand Down
9 changes: 3 additions & 6 deletions src/lib/components/dashboard/tenant.admin.dashboard.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<script lang="ts">
import FunnelCard from '$lib/components/dashboard/funnel.card.svelte';
import NumberCard from '$lib/components/dashboard/number.card.svelte';
import PlatformStatsCard from '$lib/components/dashboard/platform.stats.card.svelte';
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
export let data;
Expand All @@ -12,14 +11,14 @@
let iOSUsers = [];
let funnelChartData;
function extractYearWiseUserCount(data:any[]) {
function extractYearWiseUserCount(data) {
data.forEach((value)=>{
yearsArray.push(value.Year);
totalUsers.push(value.UserCount);
})
}
function extractYearWiseDeviceDetails(data:any[]) {
function extractYearWiseDeviceDetails(data) {
data.forEach(value=>{
if (value.DeviceDetails.length===0){
androidUsers.push(0);
Expand Down Expand Up @@ -53,10 +52,8 @@
}
let userCountStats = data.userCountStats;
let deviceDetailsStats = data.deviceDetailsStats;
let userCountByYears = data.userCountByYears
let deviceDetailsByYears = data.deviceDetailsByYears;
let appDownloads = data.appDownloadCount;
let totalUsers = userCountStats.TotalUsers;
let activeUsers = userCountStats.UsersWithActiveSession;
Expand Down
6 changes: 2 additions & 4 deletions src/lib/components/navbar/dashboard.tabs.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts">
import { dashboardMenu, type TabDefinition } from '../../components/navbar/navigation.tabs';
import { page } from '$app/stores';
import { page } from '$app/stores';
import { createEventDispatcher } from 'svelte';
const dispatch = createEventDispatcher();
Expand All @@ -10,8 +9,7 @@
dispatch('downloadReport',{});
}
export let userId = undefined;
const dashboardTabs: TabDefinition[] = dashboardMenu(userId);
let homeLink = `/users/${userId}/home`;
let usersLink = `/users/${userId}/home/users-stats`;
// let rhgLink;
Expand Down
11 changes: 0 additions & 11 deletions src/lib/components/navbar/navbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import Icon from '@iconify/svelte';
import type { DrawerSettings } from '@skeletonlabs/skeleton';
import { AppBar, AppShell, Drawer, getDrawerStore} from '@skeletonlabs/skeleton';
import { afterUpdate, onMount } from 'svelte';
import { navbarMenu, sidebarMenu, type TabDefinition } from './navigation.tabs';
import SettingMenu from './setting.menus.svelte';
import Sidebar from './sidebar/sidebar.svelte';
Expand All @@ -25,16 +24,6 @@
const footerText = `© ${new Date().getFullYear()} ${getPublicFooterText()}`;
const footerLink = getPublicFooterLink();
function drawerLeftOpen(): void {
const settings: DrawerSettings = {
id: 'leftSidebar',
position: 'left',
width: '800px',
bgDrawer: 'bg-primary-50 text-on-primary-token',
bgBackdrop: 'bg-primary-500/50'
};
drawerStore.open(settings);
}
function drawerRightOpen(): void {
const settings: DrawerSettings = {
Expand Down
1 change: 0 additions & 1 deletion src/lib/components/navbar/setting.menus.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import { goto } from '$app/navigation';
import Icon from '@iconify/svelte';
import { LightSwitch } from '@skeletonlabs/skeleton';
import { createEventDispatcher } from 'svelte';
import { writable } from 'svelte/store';
const expandedMenus = writable({});
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/tags.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script lang="ts">
// @ts-nocheck
import { createEventDispatcher } from 'svelte';
const dispatch = createEventDispatcher();
let tag = '';
Expand Down Expand Up @@ -216,7 +215,8 @@
"'": '&#x27;',
'/': '&#x2F;'
};
return ('' + string).replace(/[&<>"'\/]/g, (match) => htmlEscapes[match]);
// return ('' + string).replace(/[&<>"'\/]/g, (match) => htmlEscapes[match]);
return ('' + string).replace(/[&<>"']/g, (match) => htmlEscapes[match]);
}
function buildMatchMarkup(search, value) {
Expand Down
3 changes: 1 addition & 2 deletions src/lib/components/tenant-settings/common-setting.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import Icon from '@iconify/svelte';
import Icons from '$lib/components/icons.svelte';
import InfoIcon from '$lib/components/infoIcon.svelte';
import type { Common } from '$lib/types/tenant.settings.types';
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
const userId = $page.params.userId;
Expand Down
1 change: 0 additions & 1 deletion src/lib/components/tenant-settings/patient-app.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts">
import { page } from '$app/stores';
import { createEventDispatcher } from 'svelte';
import Icon from '@iconify/svelte';
import Icons from '$lib/components/icons.svelte';
import InfoIcon from '$lib/components/infoIcon.svelte';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@
import {
getChartColors,
getHoverChartColors,
getTickColorLight,
getTickColorDark
} from '$lib/themes/theme.selector';
/////////////////////////////////////////////////////////////////////////////
const chartColors = getChartColors();
const hoverChartColors = getHoverChartColors();
const tickColorLight = getTickColorLight();
const tickColorDark = getTickColorDark();
export let ageWiseUsers;
Expand Down
2 changes: 0 additions & 2 deletions src/lib/components/users-stats/charts/bar-chart.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
import Chart from 'chart.js/auto';
import {
getChartColors,
getHoverChartColors,
getTickColorLight,
getTickColorDark
} from '$lib/themes/theme.selector';
/////////////////////////////////////////////////////////////////////////////
const chartColors = getChartColors();
const hoverChartColors = getHoverChartColors();
const tickColorLight = getTickColorLight();
const tickColorDark = getTickColorDark();
Expand Down
6 changes: 2 additions & 4 deletions src/lib/components/users-stats/charts/biometrics-chart.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
import { onMount } from 'svelte';
import Chart from 'chart.js/auto';
import {
getChartColors,
getHoverChartColors,
getTickColorLight,
getTickColorDark
} from '$lib/themes/theme.selector';
/////////////////////////////////////////////////////////////////////////////
const chartColors = getChartColors();
const hoverChartColors = getHoverChartColors();
const tickColorLight = getTickColorLight();
const tickColorDark = getTickColorDark();
Expand Down
8 changes: 1 addition & 7 deletions src/lib/components/users-stats/charts/funnel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@
import { onMount } from 'svelte';
import Chart, { LinearScale, CategoryScale } from 'chart.js/auto';
import { FunnelController, TrapezoidElement } from 'chartjs-chart-funnel';
import datalabels from 'chartjs-plugin-datalabels';
import {
getChartColors,
getHoverChartColors,
getTickColorLight,
getTickColorDark
} from '$lib/themes/theme.selector';
/////////////////////////////////////////////////////////////////////////////
const chartColors = getChartColors();
const hoverChartColors = getHoverChartColors();
const tickColorLight = getTickColorLight();
const tickColorDark = getTickColorDark();
export let labels: string[];
export let dataSource: number[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@
import {
getChartColors,
getHoverChartColors,
getTickColorLight,
getTickColorDark
} from '$lib/themes/theme.selector';
/////////////////////////////////////////////////////////////////////////////
const chartColors = getChartColors();
const hoverChartColors = getHoverChartColors();
const tickColorLight = getTickColorLight();
const tickColorDark = getTickColorDark();
export let lablesList: string[] = [];
export let dataSource: number[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
import { onMount } from 'svelte';
import Chart from 'chart.js/auto';
import {
getChartColors,
getHoverChartColors,
getTickColorLight,
getTickColorDark
} from '$lib/themes/theme.selector';
/////////////////////////////////////////////////////////////////////////////
const chartColors = getChartColors();
const hoverChartColors = getHoverChartColors();
const tickColorLight = getTickColorLight();
const tickColorDark = getTickColorDark();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
import Chart from 'chart.js/auto';
import {
getChartColors,
getHoverChartColors,
getTickColorLight,
getTickColorDark
} from '$lib/themes/theme.selector';
/////////////////////////////////////////////////////////////////////////////
const chartColors = getChartColors();
const hoverChartColors = getHoverChartColors();
const tickColorLight = getTickColorLight();
const tickColorDark = getTickColorDark();
Expand Down
2 changes: 0 additions & 2 deletions src/lib/components/users-stats/charts/pie-chart.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
import Chart from 'chart.js/auto';
import {
getChartColors,
getHoverChartColors,
getTickColorLight,
getTickColorDark
} from '$lib/themes/theme.selector';
/////////////////////////////////////////////////////////////////////////////
const chartColors = getChartColors();
const hoverChartColors = getHoverChartColors();
const tickColorLight = getTickColorLight();
const tickColorDark = getTickColorDark();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
import { onMount } from 'svelte';
import Chart from 'chart.js/auto';
import {
getChartColors,
getHoverChartColors,
getTickColorLight,
getTickColorDark
} from '$lib/themes/theme.selector';
/////////////////////////////////////////////////////////////////////////////
const chartColors = getChartColors();
const hoverChartColors = getHoverChartColors();
const tickColorLight = getTickColorLight();
const tickColorDark = getTickColorDark();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
import {onMount} from 'svelte';
import Chart from 'chart.js/auto';
import {
getChartColors,
getHoverChartColors,
getTickColorLight,
getTickColorDark
} from '$lib/themes/theme.selector';
/////////////////////////////////////////////////////////////////////////////
const chartColors = getChartColors();
const hoverChartColors = getHoverChartColors();
const tickColorLight = getTickColorLight();
const tickColorDark = getTickColorDark();
Expand Down
17 changes: 3 additions & 14 deletions src/lib/components/users-stats/users-stats.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@
});
}
let cuntryDistributionLabels;
let cuntryDistributionData;
// $: if (countryWiseUsers) {
// cuntryDistributionLabels = false;
Expand All @@ -120,8 +119,6 @@
});
}
let obesityDistributionData;
let obesityDistributionLabels;
let addictionDistributionData;
let addictionDistributionLabels;
Expand Down Expand Up @@ -150,11 +147,7 @@
});
};
const handlelSelectYearForCountry = (year) => {
dispatch('selectCountryDistributionYearly', {
year: year
});
};
const handlelSelectYearForMaritalStatus = (year) => {
dispatch('selectMaritalStatusDistributionYearly', {
Expand All @@ -168,11 +161,7 @@
});
};
const handlelSelectYearForObesity = (year) => {
dispatch('selectObesityDistributionYearly', {
year: year
});
};
const handlelSelectYearForAddiction = (year) => {
dispatch('selectAddictionDistributionYearly', {
Expand Down
3 changes: 0 additions & 3 deletions src/routes/+error.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
import { page } from '$app/stores';
import { getPublicLogoImageSource } from '$lib/themes/theme.selector';
const userId = $page.error.userId;
const message = $page.error.message;
const code = $page.error.code;
const stack = $page.error.stack;
// const stackMessages = stack.split('\n');
const isProd = false;
Expand Down
6 changes: 2 additions & 4 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
import { browser } from '$app/environment';
import { personRolesStore } from '$lib/store/general.store';
import type { PageServerData } from './$types';
import { enhance } from '$app/forms';
import {
getPublicLogoImageSource,
getPublicFooterText,
getPublicFooterLink,
getSystemName,
} from '$lib/themes/theme.selector';
import { invalidate } from '$app/navigation';
import { errorMessage, successMessage } from '$lib/utils/message.utils';
import { errorMessage } from '$lib/utils/message.utils';
import { z } from 'zod';
import toast from 'svelte-french-toast';
Expand Down Expand Up @@ -262,4 +260,4 @@
.tab-content {
margin-top: 1rem;
}
</style>
</style>
Loading

0 comments on commit da07ef4

Please sign in to comment.