diff --git a/packages/features/team-accounts/src/components/members/account-members-table.tsx b/packages/features/team-accounts/src/components/members/account-members-table.tsx
index d345ff7..1d248d9 100644
--- a/packages/features/team-accounts/src/components/members/account-members-table.tsx
+++ b/packages/features/team-accounts/src/components/members/account-members-table.tsx
@@ -84,22 +84,22 @@ export function AccountMembersTable({
});
const searchString = search.toLowerCase();
- const filteredMembers = searchString.length > 0
- ? members
- .filter((member) => {
- const displayName = (
- member.name ??
- member.email.split('@')[0] ??
- ''
- ).toLowerCase();
+ const filteredMembers =
+ searchString.length > 0
+ ? members.filter((member) => {
+ const displayName = (
+ member.name ??
+ member.email.split('@')[0] ??
+ ''
+ ).toLowerCase();
- return (
- displayName.includes(searchString) ||
- member.role.toLowerCase().includes(searchString) ||
- (member.personal_code || '').includes(searchString)
- );
- })
- : members;
+ return (
+ displayName.includes(searchString) ||
+ member.role.toLowerCase().includes(searchString) ||
+ (member.personal_code || '').includes(searchString)
+ );
+ })
+ : members;
return (
@@ -221,16 +221,6 @@ function useGetColumns(
}
>
-
-
-
- {t('primaryOwnerLabel')}
-
-
);
},
diff --git a/packages/features/team-accounts/src/components/members/role-badge.tsx b/packages/features/team-accounts/src/components/members/role-badge.tsx
index 9a480bf..23dec0e 100644
--- a/packages/features/team-accounts/src/components/members/role-badge.tsx
+++ b/packages/features/team-accounts/src/components/members/role-badge.tsx
@@ -6,22 +6,25 @@ import { Trans } from '@kit/ui/trans';
type Role = string;
const roles = {
- owner: '',
+ owner: 'bg-yellow-400 text-black',
member:
- 'bg-blue-50 hover:bg-blue-50 text-blue-500 dark:bg-blue-500/10 dark:hover:bg-blue-500/10',
+ 'bg-blue-50 text-blue-500 dark:bg-blue-500/10 dark:hover:bg-blue-500/10',
};
-const roleClassNameBuilder = cva('font-medium capitalize shadow-none', {
- variants: {
- role: roles,
+const roleClassNameBuilder = cva(
+ 'px-2.5 py-1 font-medium capitalize shadow-none',
+ {
+ variants: {
+ role: roles,
+ },
},
-});
+);
export function RoleBadge({ role }: { role: Role }) {
// @ts-expect-error: hard to type this since users can add custom roles
const className = roleClassNameBuilder({ role });
const isCustom = !(role in roles);
-
+ console.log('role', role);
return (
diff --git a/packages/supabase/src/database.types.ts b/packages/supabase/src/database.types.ts
index 454e7fb..1fc4d6d 100644
--- a/packages/supabase/src/database.types.ts
+++ b/packages/supabase/src/database.types.ts
@@ -341,6 +341,7 @@ export type Database = {
Row: {
account_id: string
amount: number
+ benefit_distribution_schedule_id: string | null
created_at: string
created_by: string | null
description: string | null
@@ -348,14 +349,15 @@ export type Database = {
expires_at: string | null
id: string
is_active: boolean
- is_analysis_order: boolean
- is_analysis_package_order: boolean
+ is_analysis_order: boolean | null
+ is_analysis_package_order: boolean | null
reference_id: string | null
source_company_id: string | null
}
Insert: {
account_id: string
amount: number
+ benefit_distribution_schedule_id?: string | null
created_at?: string
created_by?: string | null
description?: string | null
@@ -363,14 +365,15 @@ export type Database = {
expires_at?: string | null
id?: string
is_active?: boolean
- is_analysis_order?: boolean
- is_analysis_package_order?: boolean
+ is_analysis_order?: boolean | null
+ is_analysis_package_order?: boolean | null
reference_id?: string | null
source_company_id?: string | null
}
Update: {
account_id?: string
amount?: number
+ benefit_distribution_schedule_id?: string | null
created_at?: string
created_by?: string | null
description?: string | null
@@ -378,8 +381,8 @@ export type Database = {
expires_at?: string | null
id?: string
is_active?: boolean
- is_analysis_order?: boolean
- is_analysis_package_order?: boolean
+ is_analysis_order?: boolean | null
+ is_analysis_package_order?: boolean | null
reference_id?: string | null
source_company_id?: string | null
}
@@ -2214,6 +2217,8 @@ export type Database = {
p_account_id: string
p_amount: number
p_description: string
+ p_is_analysis_order?: boolean
+ p_is_analysis_package_order?: boolean
p_reference_id?: string
}
Returns: boolean
@@ -2271,14 +2276,6 @@ export type Database = {
updated_by: string | null
}
}
- distribute_health_benefits: {
- Args: {
- p_benefit_amount: number
- p_benefit_occurrence?: string
- p_company_id: string
- }
- Returns: undefined
- }
get_account_balance: {
Args: { p_account_id: string }
Returns: number
@@ -2317,14 +2314,12 @@ export type Database = {
}[]
}
get_benefits_usages_for_company_members: {
- Args: {
- p_account_id: string
- }
+ Args: { p_account_id: string }
Returns: {
- personal_account_id: string
benefit_amount: number
benefit_unused_amount: number
- }
+ personal_account_id: string
+ }[]
}
get_config: {
Args: Record
@@ -2530,6 +2525,10 @@ export type Database = {
p_benefit_occurrence: string
p_company_id: string
}
+ Returns: string
+ }
+ upsert_health_benefits: {
+ Args: { p_benefit_distribution_schedule_id: string }
Returns: undefined
}
upsert_order: {
@@ -2619,6 +2618,7 @@ export type Database = {
| "settings.manage"
| "members.manage"
| "invites.manage"
+ | "benefit.manage"
application_role: "user" | "doctor" | "super_admin"
billing_provider: "stripe" | "lemon-squeezy" | "paddle" | "montonio"
connected_online_order_status:
@@ -8540,6 +8540,7 @@ export const Constants = {
"settings.manage",
"members.manage",
"invites.manage",
+ "benefit.manage",
],
application_role: ["user", "doctor", "super_admin"],
billing_provider: ["stripe", "lemon-squeezy", "paddle", "montonio"],
diff --git a/public/locales/et/common.json b/public/locales/et/common.json
index 4006383..c4744bc 100644
--- a/public/locales/et/common.json
+++ b/public/locales/et/common.json
@@ -88,7 +88,7 @@
},
"roles": {
"owner": {
- "label": "Admin"
+ "label": "Haldur"
},
"member": {
"label": "Liige"