feature: Tasks tab added for lab organizations. tasks now can be assigned and their status can be updated by the assignee.
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
FileText,
|
||||
CreditCard,
|
||||
Package,
|
||||
ListTodo,
|
||||
} from 'lucide-react';
|
||||
import type { OrgTypeName } from '@/components/shared/permissions';
|
||||
import { useAuth } from '@/lib/hooks/useAuth';
|
||||
@@ -19,6 +20,7 @@ import { usePendingConnectionsCount } from '@/lib/hooks/usePendingConnectionsCou
|
||||
import {
|
||||
canAccessAppointmentsSection,
|
||||
canViewCases,
|
||||
canViewTasks,
|
||||
canViewTab,
|
||||
} from '@/components/shared/permissions';
|
||||
import {
|
||||
@@ -55,6 +57,7 @@ function Sidebar() {
|
||||
},
|
||||
{ name: t('patients'), path: '/patients', icon: Users, read: 'TAB_PATIENTS_READ', orgTypes: ['CLINIC'] },
|
||||
{ name: t('cases'), path: '/cases', icon: Package, read: 'TAB_CASES_READ', orgTypes: ['LAB'] },
|
||||
{ name: t('tasks'), path: '/tasks', icon: ListTodo, read: 'TAB_TASKS_READ', orgTypes: ['LAB'] },
|
||||
{ name: t('appointment'), path: '/appointments', icon: Calendar, read: 'TAB_APPOINTMENTS_READ', orgTypes: ['CLINIC'] },
|
||||
{ name: t('treatment'), path: '/treatment', icon: FlaskConical, read: 'TAB_TREATMENT_READ', orgTypes: ['CLINIC'] },
|
||||
{ name: t('billing'), path: '/billing', icon: CreditCard, read: 'TAB_BILLING_READ', orgTypes: ['CLINIC', 'LAB'] },
|
||||
@@ -75,6 +78,9 @@ function Sidebar() {
|
||||
if (item.path === '/cases') {
|
||||
return canViewCases(currentOrganization);
|
||||
}
|
||||
if (item.path === '/tasks') {
|
||||
return canViewTasks(currentOrganization);
|
||||
}
|
||||
return canViewTab(currentOrganization, item.read);
|
||||
}),
|
||||
[currentOrganization, menu, orgType],
|
||||
|
||||
Reference in New Issue
Block a user