Skip to content

Conversation

@Sobyt483
Copy link
Collaborator

@Sobyt483 Sobyt483 commented Oct 16, 2025

Summary by CodeRabbit

  • New Features

    • Select shows the chosen organization name in the label, displays readiness alert icons and tooltips for not-ready items, and disables the switch action unless the selected organization is ready (switch uses click).
    • Onboard action is disabled when the selection is invalid.
  • Style

    • Added option layout styling for clearer spacing and alignment.
  • Tests

    • Expanded tests for list-based organization handling, readiness states, update flows, and error scenarios.
image image image

@coderabbitai
Copy link

coderabbitai bot commented Oct 16, 2025

Walkthrough

Replaces string-based organizations with objects { name, ready }, replaces component GraphQL reads from readOrganizations() to list(), removes readOrganizations from ResourceService, adds observable lifecycle handling via DestroyRef, and updates template, styles, and tests to reflect readiness UI and object-based state.

Changes

Cohort / File(s) Summary
Template updates
projects/wc/src/app/components/organization-management/organization-management.component.html
Uses a local newOrganization derived from organizationToSwitch() and newOrganization?.name for select value; consolidates event bindings to ui5Change/ui5Click; iterates organizations as { name, ready }; adds tooltip and alert icon for not-ready items; renders label slot showing selected org name with conditional alert icon; disables switch/onboard buttons based on newOrganization / newOrganizationControl.invalid.
Styling enhancements
projects/wc/src/app/components/organization-management/organization-management.component.scss
Adds .option class (display: flex, align-items: center, gap: 0.5rem) for option layout.
Component logic
projects/wc/src/app/components/organization-management/organization-management.component.ts
Introduces DestroyRef + takeUntilDestroyed. Converts organizations signal from string[] to { name: string; ready: boolean }[] and organizationToSwitch to `{ name: string; ready: boolean }
Component tests
projects/wc/src/app/components/organization-management/organization-management.component.spec.ts
Replaces readOrganizations mocks with list(); adapts mocked return shape to arrays of { metadata.name, status.conditions } and component expectations to { name, ready }; updates setOrganizationToSwitch interactions and assertions to object form; adds tests for list() error handling and for updating a pre-set organizationToSwitch.
Resource service implementation
projects/lib/services/resource/resource.service.ts
Removes the public method readOrganizations(...) from ResourceService (no replacement added).
Resource service tests
projects/lib/services/resource/resource.service.spec.ts
Removes the test suite covering readOrganizations (happy-path and error tests deleted).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Free

📥 Commits

Reviewing files that changed from the base of the PR and between 2feb8e7 and e2cc357.

📒 Files selected for processing (2)
  • projects/lib/services/resource/resource.service.spec.ts (0 hunks)
  • projects/lib/services/resource/resource.service.ts (0 hunks)
💤 Files with no reviewable changes (2)
  • projects/lib/services/resource/resource.service.ts
  • projects/lib/services/resource/resource.service.spec.ts

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@gkrajniak
Copy link
Collaborator

I don't see the screenshots, pls attache

@Sobyt483 Sobyt483 merged commit cf5a471 into main Oct 16, 2025
7 checks passed
@Sobyt483 Sobyt483 deleted the resource-creation-status-check branch October 16, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

3 participants