add medreport schema
This commit is contained in:
@@ -27,7 +27,7 @@ import { RenewInvitationDialog } from './renew-invitation-dialog';
|
||||
import { UpdateInvitationDialog } from './update-invitation-dialog';
|
||||
|
||||
type Invitations =
|
||||
Database['public']['Functions']['get_account_invitations']['Returns'];
|
||||
Database['medreport']['Functions']['get_account_invitations']['Returns'];
|
||||
|
||||
type AccountInvitationsTableProps = {
|
||||
invitations: Invitations;
|
||||
|
||||
@@ -27,7 +27,7 @@ import { TransferOwnershipDialog } from './transfer-ownership-dialog';
|
||||
import { UpdateMemberRoleDialog } from './update-member-role-dialog';
|
||||
|
||||
type Members =
|
||||
Database['public']['Functions']['get_account_members']['Returns'];
|
||||
Database['medreport']['Functions']['get_account_members']['Returns'];
|
||||
|
||||
interface Permissions {
|
||||
canUpdateRole: (roleHierarchy: number) => boolean;
|
||||
@@ -87,7 +87,7 @@ export function AccountMembersTable({
|
||||
|
||||
return (
|
||||
displayName.includes(searchString) ||
|
||||
member.role.toLowerCase().includes(searchString) ||
|
||||
member.role.toLowerCase().includes(searchString) ||
|
||||
(member.personal_code || '').includes(searchString)
|
||||
);
|
||||
})
|
||||
|
||||
@@ -21,7 +21,7 @@ export function RolesDataProvider(props: {
|
||||
}
|
||||
|
||||
function useFetchRoles(props: { maxRoleHierarchy: number }) {
|
||||
const supabase = useSupabase();
|
||||
const supabase = useSupabase().schema('medreport');
|
||||
|
||||
return useQuery({
|
||||
queryKey: ['roles', props.maxRoleHierarchy],
|
||||
|
||||
@@ -53,6 +53,7 @@ export function UpdateTeamAccountImage(props: {
|
||||
uploadUserProfilePhoto(client, file, props.account.id).then(
|
||||
(pictureUrl) => {
|
||||
return client
|
||||
.schema('medreport')
|
||||
.from('accounts')
|
||||
.update({
|
||||
picture_url: pictureUrl,
|
||||
@@ -68,6 +69,7 @@ export function UpdateTeamAccountImage(props: {
|
||||
const promise = () =>
|
||||
removeExistingStorageFile().then(() => {
|
||||
return client
|
||||
.schema('medreport')
|
||||
.from('accounts')
|
||||
.update({
|
||||
picture_url: null,
|
||||
|
||||
@@ -7,8 +7,8 @@ import { User } from '@supabase/supabase-js';
|
||||
import { Database } from '@kit/supabase/database';
|
||||
|
||||
interface AccountWorkspace {
|
||||
accounts: Database['public']['Views']['user_accounts']['Row'][];
|
||||
account: Database['public']['Functions']['team_account_workspace']['Returns'][0];
|
||||
accounts: Database['medreport']['Views']['user_accounts']['Row'][];
|
||||
account: Database['medreport']['Functions']['team_account_workspace']['Returns'][0];
|
||||
user: User;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user