Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aha dev #30

Merged
merged 31 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2ae7290
Fixed text issue of user roles
rupali-inflection Jun 10, 2024
d961288
Fixed app user text issue
rupali-inflection Jun 10, 2024
afbb819
Fixed the badges pagination isssue.
Dattatraya-Londhe Jun 10, 2024
ab932b9
Fixed funnel chart color issue
rupali-inflection Jun 10, 2024
ecb2efa
Resolved create symptoms issue by adding form enctype.
Dattatraya-Londhe Jun 10, 2024
8506aff
Removed default dropdown selection for assessment type.
Dattatraya-Londhe Jun 10, 2024
1dd51d4
Made table heading inline.
Dattatraya-Londhe Jun 10, 2024
cd1f276
Fixed placeholder issue of custom queries
rupali-inflection Jun 10, 2024
19260b9
Text changes for user role
rupali-inflection Jun 10, 2024
690c41e
Fixed search text issue of hospital
rupali-inflection Jun 10, 2024
8246588
Text fixes for the hospital system
rupali-inflection Jun 10, 2024
049d8d8
Updated AHA options
Dattatraya-Londhe Jun 11, 2024
08c32d7
Fixed text issue of success message for health system
rupali-inflection Jun 11, 2024
091f6e4
Merge remote-tracking branch 'origin/aha-dev' into admin_panel_dev_is…
rupali-inflection Jun 11, 2024
0ba61b8
Removed tailwind config file.
Dattatraya-Londhe Jun 11, 2024
869fba3
Hide the options in the assessment node update
rupali-inflection Jun 11, 2024
04ad4a0
Removed custom error message.
Dattatraya-Londhe Jun 11, 2024
be60ec0
Updated options fields.
Dattatraya-Londhe Jun 11, 2024
38b2f54
Hide the generate otp and forgot password from ui
rupali-inflection Jun 11, 2024
106cf3d
Hide country table form ui
rupali-inflection Jun 11, 2024
eec6850
Fixes for message text
rupali-inflection Jun 11, 2024
ebdeaa3
assessment delete msg fixes
rupali-inflection Jun 11, 2024
e867292
Resolved edit symptoms issue by adding form enctype.
Dattatraya-Londhe Jun 11, 2024
97b462b
Merge branch 'aha-dev' into aha_admin_panel_issues
rupali-inflection Jun 11, 2024
fb78a86
Lab record text fixes
rupali-inflection Jun 12, 2024
731a9ad
Success message changes for delete
rupali-inflection Jun 12, 2024
80f1e78
Fixed issue of row content distraction.
Dattatraya-Londhe Jun 13, 2024
aa7f17e
Added sorting on types.
Dattatraya-Londhe Jun 13, 2024
4d5e152
Merge branch 'aha-dev' into bug-fix-03
Dattatraya-Londhe Jun 13, 2024
68986aa
Fixed type sorting issue.
Dattatraya-Londhe Jun 13, 2024
3906b99
Fixed hospital sorting issue.
Dattatraya-Londhe Jun 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/lib/components/dashboard/funnel.card.svelte
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
<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';

export let labels: string[];
export let dataSource: number[];

const chartColors = getChartColors();
interface FunnelDataPoint {
label: string;
count: number;
color: string;
}

let dataPoints : FunnelDataPoint[] = []
onMount (() => {
dataPoints = labels.map((label, index) => {
return {
label,
count: dataSource[index]
count: dataSource[index],
color: chartColors[index % chartColors.length]
}
})
});
Expand All @@ -32,7 +36,8 @@
<div class="mt-10 px-4 w-1/2">
{ #each dataPoints as dp}
<div class="flex gap-4 w-full py-1">
<div class="h-3 w-3 mt-1 border bg-primary-700" />
<!-- <div class="h-3 w-3 mt-1 border bg-primary-700" /> -->
<div class="h-3 w-3 mt-1 border" style="background-color: {dp.color};"></div>
<div class="text-sm w-2/3 font-normal text-primary-500 dark:text-primary-100">{dp.label}</div>
<div class="text-sm w-1/3 font-normal text-primary-500 dark:text-primary-100">{dp.count}</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/dashboard/super.admin.dashboard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

let labels = [
'Onboarded',
'Not-Deleted ',
'Users With Active Session',
'Not Deleted ',
'Current Active',
];

$: funnelChartData = [
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/navbar/sidebar/sidebar.menus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ function addClinicalMenus(

const labRecordType: SidebarMenu = {
name : 'Lab-Records',
title : 'Lab-Records',
title : 'Lab Records',
icon : 'material-symbols:lab-research-outline-rounded',
link : `/users/${userId}/lab-record-types`,
children: []
Expand Down
10 changes: 5 additions & 5 deletions src/lib/components/users-stats/users-stats.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@
</div>
</div>

<div
<!-- <div
class="grid grid-cols-3 overflow-x-auto justify-center rounded-lg shadow-xl border border-secondary-100 dark:border-surface-700 sm:px-4 w-full h-full gap-3 "
>
<div class="px-4 sm:px-6 lg:px-8 col-span-2">
Expand All @@ -456,7 +456,7 @@
>
</tr>
</thead>
<tbody>
<tbody> -->
<!-- {#each countryWiseUsers as data}
<tr class="hover:bg-secondary-50 dark:hover:bg-surface-800 transition">
<td
Expand Down Expand Up @@ -486,7 +486,7 @@
</td>
</tr>
{/each} -->
</tbody>
<!-- </tbody>
</table>
</div>
</div>
Expand Down Expand Up @@ -514,8 +514,8 @@
{/if}
</div>
</div>
</div>
</div>
</div>-->
</div>

<div class="flex justify-center items-center h-full gap-10 w-full">
<div
Expand Down
2 changes: 1 addition & 1 deletion src/lib/constants.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const SYSTEM_ID = 'REAN';
export const SYSTEM_ID = 'AHA';
10 changes: 5 additions & 5 deletions src/lib/options/aha.options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const Options: FeatureOptions[] = [
},
{
Name: 'Clients',
Enabled: true
Enabled: false
},
{
Name: 'Tenants',
Expand All @@ -29,11 +29,11 @@ export const Options: FeatureOptions[] = [
//..............................
{
Name: 'Analysis',
Enabled: true
Enabled: false
},
{
Name: 'Custom-Queries',
Enabled: true
Enabled: false
},
//..............................
{
Expand Down Expand Up @@ -97,11 +97,11 @@ export const Options: FeatureOptions[] = [
},
{
Name: 'Courses',
Enabled: true
Enabled: false
},
{
Name: 'Learning-Journeys',
Enabled: true
Enabled: false
},
{
Name: 'Knowledge-Nuggets',
Expand Down
8 changes: 4 additions & 4 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,23 @@
<div class="justify-center w-full mt-5 h-50">
<!-- svelte-ignore a11y-label-has-associated-control -->
<label class="mb-2" for="username">
<span class="text-primary-500">Username / Email</span>
<span class="text-primary-500">Username</span>
<span class="label-text-alt" />
</label>
<input type="text" name="username" required class="input mb-4" />
<!-- svelte-ignore a11y-label-has-associated-control -->
<label class="mb-2" for="password">
<div class="grid grid-flow-col">
<span class="text-left text-primary-500">Password / OTP</span>
<span class="text-right text-primary-500 ml-4 sm:ml-12">
<span class="text-left text-primary-500">Password</span>
<span class="text-right text-primary-500 ml-4 sm:ml-12 invisible">
<b>Generate OTP</b>
</span>
</div>
</label>
<input type="password" name="password" required class=" input" />
<!-- svelte-ignore a11y-label-has-associated-control -->
<label class="lable">
<span class=" text-primary-500">
<span class=" text-primary-500 hidden">
<b>Forgot Password?</b>
</span>
</label>
Expand Down
7 changes: 4 additions & 3 deletions src/routes/api/server/assessments/assessment-nodes/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import { deleteAssessmentNode } from '../../../services/reancare/assessments/ass
export const DELETE = async (event: RequestEvent) => {
const request = event.request;
const data = await request.json();
let response;
try {
console.log('Inside assessment node server endpoints');
const response = await deleteAssessmentNode(
response = await deleteAssessmentNode(
data.sessionId,
data.assessmentTemplateId,
data.assessmentNodeId
Expand All @@ -18,10 +19,10 @@ export const DELETE = async (event: RequestEvent) => {
Message : response.Message
}));
} catch (err) {
console.error(`Error deleting assessment node: ${err.message}`);
console.error(`Error deleting assessment node: ${JSON.parse(err).message}`);
return new Response(JSON.stringify({
Status: "failure",
Message : 'Error deleting assessment node'
Message : JSON.parse(err).message ? JSON.parse(err).message : 'Error deleting assessment node'
}));
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const DELETE = async (event: RequestEvent) => {
);
}
throw redirect(
successMessage(response.Message),
successMessage('Assessment deleted successfully!'),
event
);
};
2 changes: 1 addition & 1 deletion src/routes/api/server/drugs/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const DELETE = async (event: RequestEvent) => {
);
}
throw redirect(
successMessage(response.Message),
successMessage('Drug deleted successfully!'),
event
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const GET = async (event: RequestEvent) => {
const categoryId = searchParams.get('categoryId') ?? undefined;
const sortBy = searchParams.get('sortBy') ?? 'CreatedAt';
const sortOrder = searchParams.get('sortOrder') ?? 'ascending';
const itemsPerPage_ = searchParams.get('pageIndex');
const itemsPerPage_ = searchParams.get('itemsPerPage');
const itemsPerPage = itemsPerPage_ ? parseInt(itemsPerPage_) : 10;
const pageIndex_ = searchParams.get('pageIndex');
const pageIndex = pageIndex_ ? parseInt(pageIndex_) : 0;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/api/server/health-systems/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const DELETE = async (event: RequestEvent) => {
);
}
throw redirect(
successMessage(response.Message),
successMessage('Health system deleted successfully!'),
event
);
};
2 changes: 1 addition & 1 deletion src/routes/api/server/lab-record-types/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const DELETE = async (event: RequestEvent) => {
);
}
throw redirect(
successMessage(response.Message),
successMessage('Lab record deleted successfully!'),
event
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/routes/api/server/person-role-types/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const DELETE = async (event: RequestEvent) => {
);
}
throw redirect(
successMessage(response.Message),
successMessage('User role deleted successfully!'),
event
);
};
2 changes: 1 addition & 1 deletion src/routes/api/server/priorities/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const DELETE = async (event: RequestEvent) => {
);
}
throw redirect(
successMessage(response.Message),
successMessage('Priorite deleted successfully!'),
event
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import { searchAssessmentTemplates } from '../../../api/services/reancare/assess
export const load: PageServerLoad = async ({cookies,depends}) => {
const sessionId = cookies.get('sessionId');
depends('app:assessmentTemplate')
const response = await searchAssessmentTemplates(sessionId);
const response = await searchAssessmentTemplates(sessionId,{
orderBy: "Title",
order: "ascending"
});
if (response.Status === 'failure' || response.HttpCode !== 200) {
throw error(response.HttpCode, response.Message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
</button>
<span slot="title">Delete</span>
<span slot="description">
Are you sure you want to delete a assessment template?
Are you sure you want to delete a assessment?
</span>
</Confirm>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,22 +164,23 @@
<select
id="mySelect"
name="queryType"
disabled
class="select select-info w-full"
placeholder="Select query type here..."
bind:value={queryType}
on:change={(val) => onSelectQueryResponseType(val)}
>
<option selected value={queryType}>{queryType}</option>
{#each queryResponseTypes as responseType}
<option value={responseType}>{responseType}</option>
{/each}
<!-- {#each queryResponseTypes as responseType}
<option disabled value={responseType}>{responseType}</option>
{/each} -->
</select>
</td>
</tr>
{#if selectedQueryType === 'Single Choice Selection' || selectedQueryType === 'Multi Choice Selection'}
<tr class="!border-b !border-b-secondary-100 dark:!border-b-surface-700">
<td class="align-top">Options</td>
<td><Choice {optionValueStore} /></td>
<td><Choice {optionValueStore} readonly={true}/></td>
</tr>
{/if}
{:else if selectedNodeType === 'Message'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const load: PageServerLoad = async (event: RequestEvent) => {
const createAssessmentNodeSchema = zfd.formData({
nodeType: z.string(),
parentNodeId: z.string().uuid(),
title: z.string().min(8).max(256),
title: z.string().min(4).max(256),
description: z.string().optional(),
sequence: zfd.numeric(z.number().optional()),
queryType: z.string().optional(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import Icon from '@iconify/svelte';
import type { PageServerData } from './$types';
import Choice from './choice.svelte';
import { enhance } from '$app/forms';
import { enhance } from '$app/forms';

/////////////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -64,7 +64,7 @@
<table class="table">
<thead class="!variant-soft-secondary">
<tr>
<th>Create Assessment Node</th>
<th class="whitespace-nowrap" >Create Assessment Node</th>
<th class="text-end">
<a href={assessmentNodeRoutes} class="btn p-2 -my-2 variant-soft-secondary">
<Icon icon="material-symbols:close-rounded" class="text-lg" />
Expand Down Expand Up @@ -190,7 +190,7 @@
<tr>
<td class="align-top">Options</td>
<td>
<Choice />
<Choice/>
</td>
</tr>
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
import Icon from '@iconify/svelte';

export let optionValueStore = [{ Text: '' }];
export let readonly = false;

// const addOptionField = () => (optionValueStore = [...optionValueStore, { Text: '' }]);
// const removeOptionField = () =>
// (optionValueStore = optionValueStore.slice(0, optionValueStore.length - 1));
const addOptionField = () => (optionValueStore = [...optionValueStore, { Text: '' }]);
const removeOptionField = () =>
(optionValueStore = optionValueStore.slice(0, optionValueStore.length - 1));
</script>

<div class="border dark:border-surface-700 flex flex-col rounded my-2 p-2 gap-2">
Expand All @@ -15,17 +16,22 @@
type="text"
class="input"
name="options"
disabled
bind:value={optionValueStore[i].Text}
placeholder="Add option here..."
disabled={readonly}
/>
<!-- <button class="btn p-2 variant-soft-error" on:click={removeOptionField}>
<Icon icon="material-symbols:close-rounded" />
</button> -->
{#if !readonly}
<button class="btn p-2 variant-soft-error" on:click={removeOptionField}>
<Icon icon="material-symbols:close-rounded" />
</button>
{/if}
</div>
{/each}

<!-- <button class="btn btn-sm variant-soft-secondary" on:click|preventDefault={addOptionField}>
Add Option
</button> -->

<!-- Only show the add button if not readonly -->
{#if !readonly}
<button class="btn btn-sm variant-soft-secondary" on:click|preventDefault={addOptionField}>
Add Option
</button>
{/if}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const actions = {
throw redirect(
303,
`/users/${userId}/assessment-templates/${id}/view`,
successMessage(`Assessment template updated successfully!`),
successMessage(`Assessment updated successfully!`),
event
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const actions = {
throw redirect(
303,
`/users/${userId}/assessment-templates/${id}/view`,
successMessage(`Assessment template created successfully!`),
successMessage(`Assessment created successfully!`),
event
);
}
Expand Down
Loading
Loading