Skip to content

Next: Adds organization management features #1919

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

niemyjski
Copy link
Member

This commit introduces the new organization management features, including:

image

  • CRUD operations for organizations.
  • User management within organizations.
  • View Invoices and usage tracking.
  • UI components for managing organizations, users, and billing information.

This commit introduces the new organization management features, including:

- CRUD operations for organizations.
- User management within organizations.
- View Invoices and usage tracking.
- UI components for managing organizations, users, and billing information.
@niemyjski niemyjski requested a review from Copilot July 7, 2025 02:00
@niemyjski niemyjski self-assigned this Jul 7, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive organization management functionality, including CRUD operations for organizations, user management, invoice viewing, and usage tracking, with corresponding Svelte UI components and API client enhancements.

  • Integrated organization routes into the main app navigation.
  • Introduced Svelte pages/components for organization list, add, manage, users, usage, billing, and an invoice payment view.
  • Extended API clients and models to support organization and user endpoints (invoices, invites, updates).

Reviewed Changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/routes/(app)/routes.svelte.ts Imported and spread organizationRoutes into top-level navigation.
src/routes/(app)/project/[projectId]/manage/+page.svelte Updated project management description text.
src/routes/(app)/payment/[id]/+page.svelte Added new invoice/payment detail page.
src/routes/(app)/organization/routes.svelte.ts Defined top-level “Organizations” nav entry and sub-routes.
src/routes/(app)/organization/list/+page.svelte Added organization list page with data table and “Add” button.
src/routes/(app)/organization/add/+page.svelte Added “Add Organization” form using superforms.
src/routes/(app)/organization/[organizationId]/manage/+page.svelte Added organization name management form with debounced updates.
src/routes/(app)/organization/[organizationId]/users/+page.svelte Added organization users management page with invite dialog.
src/routes/(app)/organization/[organizationId]/usage/+page.svelte Added monthly usage chart and plan summary.
src/routes/(app)/organization/[organizationId]/billing/+page.svelte Added billing page listing invoices and plan info.
src/routes/(app)/organization/[organizationId]/+layout.svelte Added organization-specific layout and sidebar navigation.
src/routes/(app)/organization/+layout.svelte Added wrapper layout for organization routes.
src/routes/(app)/+layout.svelte Updated organization switcher logic to use paginated response format.
src/lib/features/users/models.ts Exported ViewUser from generated API.
src/lib/features/users/api.svelte.ts Added getOrganizationUsersQuery and resendVerificationEmail mutations.
src/lib/features/users/components/... Added data-table components and invite/remove dialogs for users.
src/lib/features/organizations/models.ts Exported Invoice, InvoiceGridModel along with existing models.
src/lib/features/organizations/api.svelte.ts Added organization user invites, invoice endpoints, list/query/update/delete mutations.
src/lib/features/organizations/components/... Added data-table and action cells for organizations, and dialogs for delete/leave actions.
Comments suppressed due to low confidence (2)

src/Exceptionless.Web/ClientApp/src/routes/(app)/payment/[id]/+page.svelte:1

  • Consider adding tests for the new payment page to cover loading, error, and data display states when rendering invoice details.
<script lang="ts">

src/Exceptionless.Web/ClientApp/src/routes/(app)/payment/[id]/+page.svelte:13

  • The use of $derived here is incorrect: $derived is not a Svelte store helper. Consider importing derived from 'svelte/store' and creating const invoiceId = derived(page, $page => $page.params.id || ''); or directly using $page.params.id.
    const invoiceId = $derived(page.params.id || '');

</div>
<Separator />

{#if organizationQuery.isLoading || organizationQuery.isLoading}
Copy link
Preview

Copilot AI Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition organizationQuery.isLoading || organizationQuery.isLoading is duplicated. Consider revising this to include a different state (e.g., organizationQuery.isFetching) or simplify to a single isLoading check.

Suggested change
{#if organizationQuery.isLoading || organizationQuery.isLoading}
{#if organizationQuery.isLoading}

Copilot uses AI. Check for mistakes.

<Skeleton class="h-[200px] w-full" />
<Skeleton class="h-6 w-1/3" />
</div>
{:else if organizationQuery.error || organizationQuery.error}
Copy link
Preview

Copilot AI Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error condition checks organizationQuery.error twice. Remove the duplicate check or handle additional error states (e.g., organizationQuery.isError).

Suggested change
{:else if organizationQuery.error || organizationQuery.error}
{:else if organizationQuery.isError}

Copilot uses AI. Check for mistakes.

Copy link

github-actions bot commented Jul 7, 2025

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.AppHost 18% 6% 87
Exceptionless.Insulation 27% 24% 231
Exceptionless.Core 66% 44% 8566
Exceptionless.Web 44% 32% 2938
Summary 57% (9897 / 17222) 40% (3908 / 9690) 11822

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant