diff --git a/web/app/components/inputs/product-select.hbs b/web/app/components/inputs/product-select.hbs index 0b2e35cae..42eac6126 100644 --- a/web/app/components/inputs/product-select.hbs +++ b/web/app/components/inputs/product-select.hbs @@ -1,83 +1,65 @@ {{! https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/ }} -
- {{#if this.products}} - {{#if @formatIsBadge}} - - <:item as |dd|> - - - - - - {{else}} - - <:anchor as |dd|> - - - - - <:item as |dd|> - - - - - - {{/if}} - {{else if this.fetchProductAreas.isRunning}} -
- -
- {{else if this.errorIsShown}} -
- Failed to load -
- +
+ {{#if @formatIsBadge}} + + <:item as |dd|> + + + + + {{else}} -
+ + <:anchor as |dd|> + + + + + <:item as |dd|> + + + + + {{/if}}
diff --git a/web/app/components/inputs/product-select.ts b/web/app/components/inputs/product-select.ts index 26b5e8b94..8dc039ecb 100644 --- a/web/app/components/inputs/product-select.ts +++ b/web/app/components/inputs/product-select.ts @@ -4,7 +4,6 @@ import { inject as service } from "@ember/service"; import { OffsetOptions, Placement } from "@floating-ui/dom"; import Component from "@glimmer/component"; import { tracked } from "@glimmer/tracking"; -import { task } from "ember-concurrency"; import FetchService from "hermes/services/fetch"; import ProductAreasService, { ProductArea, @@ -31,7 +30,6 @@ export default class InputsProductSelectComponent extends Component { - try { - await this.productAreas.fetch.perform(); - this.errorIsShown = false; - } catch { - this.errorIsShown = true; - } - }); } declare module "@glint/environment-ember-loose/registry" { diff --git a/web/app/components/inputs/product-select/item.hbs b/web/app/components/inputs/product-select/item.hbs index 220738e38..39400c8bb 100644 --- a/web/app/components/inputs/product-select/item.hbs +++ b/web/app/components/inputs/product-select/item.hbs @@ -1,6 +1,6 @@
{{/if}} - {{#if @abbreviation}} - + {{#if this.abbreviationIsShown}} + {{@abbreviation}} {{/if}} diff --git a/web/app/components/inputs/product-select/item.ts b/web/app/components/inputs/product-select/item.ts index ccb127b39..e7abb4a54 100644 --- a/web/app/components/inputs/product-select/item.ts +++ b/web/app/components/inputs/product-select/item.ts @@ -9,7 +9,15 @@ interface InputsProductSelectItemComponentSignature { }; } -export default class InputsProductSelectItemComponent extends Component {} +export default class InputsProductSelectItemComponent extends Component { + protected get abbreviationIsShown(): boolean { + const { abbreviation, product } = this.args; + if (abbreviation && abbreviation !== product) { + return true; + } + return false; + } +} declare module "@glint/environment-ember-loose/registry" { export default interface Registry { diff --git a/web/app/components/settings/subscription-list-item.hbs b/web/app/components/settings/subscription-list-item.hbs index 119cfca8f..e696fb1a8 100644 --- a/web/app/components/settings/subscription-list-item.hbs +++ b/web/app/components/settings/subscription-list-item.hbs @@ -1,11 +1,10 @@ -{{! @glint-nocheck: not typesafe yet }}