Skip to content

Commit

Permalink
fix(console): fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlking committed Jul 3, 2024
1 parent fa2d58e commit 10016c2
Show file tree
Hide file tree
Showing 20 changed files with 276 additions and 276 deletions.
3 changes: 3 additions & 0 deletions apps/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
"@tailwindcss/container-queries": "0.1.1",
"@tailwindcss/forms": "0.5.7",
"@tailwindcss/typography": "0.5.13",
"@testing-library/jest-dom": "6.4.6",
"@testing-library/svelte": "5.2.0",
"@types/d3-scale": "4.0.8",
"@types/js-cookie": "3.0.6",
"@types/node": "20.14.9",
Expand All @@ -72,6 +74,7 @@
"houdini": "1.2.47",
"houdini-svelte": "1.2.47",
"js-cookie": "3.0.5",
"jsdom": "24.1.0",
"layerchart": "0.43.6",
"lucide-svelte": "0.399.0",
"paneforge": "0.0.5",
Expand Down
14 changes: 14 additions & 0 deletions apps/console/src/lib/components/chip-button.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script lang="ts">
export let tags: string[] | null;
</script>

{ #if tags === null}
N/A
{:else}
{#each tags as tag }
<span class="chip {tag? 'variant-filled' : 'variant-soft'}">
<span>{tag}</span>
</span>&nbsp
{/each}
{/if}
<slot />
5 changes: 0 additions & 5 deletions apps/console/src/lib/components/preview.svelte

This file was deleted.

21 changes: 21 additions & 0 deletions apps/console/src/lib/graphql/MUTATION.Updatenonhomeroles.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
mutation Updatenonhomeroles($userId: uuid!, $Org: String, $defrole: String, $delroles: [String!]!, $roles: [user_org_roles_insert_input!]!) {
delete_user_org_roles(where: {userId: {_eq: $userId}, organization: {_eq: $Org}, role: {_in: $delroles}}) {
affected_rows
}

insert_user_org_roles (objects: $roles) {
returning {
id
organization
}
}

update_user_org_roles (where: {userId: {_eq: $userId}, organization: {_eq: $Org}, role: {_eq: $defrole}}, _set: {isDefaultRole: true}) {
affected_rows
}

forother: update_user_org_roles(where: {userId: {_eq: $userId}, organization: {_eq: $Org}, role: {_neq: $defrole}}, _set: {isDefaultRole: false}) {
affected_rows
}

}
8 changes: 4 additions & 4 deletions apps/console/src/routes/(app)/delegation/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export async function load(event) {
});

if (errors) {
for (const error of errors) {
console.log('list subscriber api error', error);
}
return { status: 500 };
for (const error of errors) {
console.log('list subscriber api error', error);
}
return { status: 500 };
}
const UsersList = data?.users;
if (!UsersList) error(404, 'Users not found');
Expand Down
Loading

0 comments on commit 10016c2

Please sign in to comment.