Skip to content

Commit

Permalink
Merge pull request #610 from lblod/feature/add-message-when-no-kbo-or…
Browse files Browse the repository at this point in the history
…ganization

Add message when kboOrganization is missing
  • Loading branch information
aliokan authored May 15, 2024
2 parents 2aefea1 + cf126d6 commit 76fa27e
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 75 deletions.
156 changes: 81 additions & 75 deletions app/components/kbo-organization/data-card.hbs
Original file line number Diff line number Diff line change
@@ -1,80 +1,86 @@
<DataCard>
<:title>Bestuurseenheid</:title>
<:card as |Card|>
<Card.Columns>
<:left as |Item|>
<Item>
<:label>Naam</:label>
<:content>
{{@kboOrganization.legalName}}
</:content>
</Item>
<Item>
<:label>Commerciële naam</:label>
<:content>
{{@kboOrganization.name}}
</:content>
</Item>
{{#if @kboOrganization}}
<DataCard>
<:title>Bestuurseenheid</:title>
<:card as |Card|>
<Card.Columns>
<:left as |Item|>
<Item>
<:label>Naam</:label>
<:content>
{{@kboOrganization.legalName}}
</:content>
</Item>
<Item>
<:label>Commerciële naam</:label>
<:content>
{{@kboOrganization.name}}
</:content>
</Item>

<Item>
<:label>Afgekorte naam</:label>
<:content>
{{@kboOrganization.alternativeName}}
</:content>
</Item>
<Item>
<:label>Afgekorte naam</:label>
<:content>
{{@kboOrganization.alternativeName}}
</:content>
</Item>

<Item>
<:label>Rechtsvorm</:label>
<:content>
{{@kboOrganization.rechtsvorm}}
</:content>
</Item>
</:left>
<:right as |Item|>
<Item>
<:label>Status</:label>
<:content>
<OrganizationStatus
@id={{@kboOrganization.organizationStatus.id}}
@label={{@kboOrganization.organizationStatus.label}}
/>
</:content>
</Item>
<Item>
<:label>Rechtsvorm</:label>
<:content>
{{@kboOrganization.rechtsvorm}}
</:content>
</Item>
</:left>
<:right as |Item|>
<Item>
<:label>Status</:label>
<:content>
<OrganizationStatus
@id={{@kboOrganization.organizationStatus.id}}
@label={{@kboOrganization.organizationStatus.label}}
/>
</:content>
</Item>

<Item>
<:label>Begindatum</:label>
<:content>
{{date-format @kboOrganization.startDate}}
</:content>
</Item>
<Item>
<:label>Begindatum</:label>
<:content>
{{date-format @kboOrganization.startDate}}
</:content>
</Item>

<Item>
<:label>Ondernemingsnummer</:label>
<:content>
{{#each @kboOrganization.identifiers as |identifier|}}
<Item>
<:label>Ondernemingsnummer</:label>
<:content>
{{#each @kboOrganization.identifiers as |identifier|}}
{{kbo-format identifier.structuredIdentifier.localId}}
{{/each}}
</:content>
</Item>
<Item>
<:label>Website KBO</:label>
<:content>
<AuLinkExternal
href="https://kbopub.economie.fgov.be/kbopub/zoeknummerform.html?nummer={{@kboIdentifier.structuredIdentifier.localId}}"
>
Link to page (externe link)
</AuLinkExternal>
</:content>
</Item>
</:right>
</Card.Columns>
</:card>
</DataCard>
<Site::ContactDataCard
@address={{@kboContact.contactAddress}}
@primaryContact={{@kboContact}}
>
<:title>
Maatschappelijke zetel
</:title>
</Site::ContactDataCard>
{{/each}}
</:content>
</Item>
<Item>
<:label>Website KBO</:label>
<:content>
<AuLinkExternal
href="https://kbopub.economie.fgov.be/kbopub/zoeknummerform.html?nummer={{@kboIdentifier.structuredIdentifier.localId}}"
>
Link to page (externe link)
</AuLinkExternal>
</:content>
</Item>
</:right>
</Card.Columns>
</:card>
</DataCard>
<Site::ContactDataCard
@address={{@kboContact.contactAddress}}
@primaryContact={{@kboContact}}
>
<:title>
Maatschappelijke zetel
</:title>
</Site::ContactDataCard>
{{else}}
<AuAlert @skin="warning" @size="tiny">
<p>{{if @kboIdentifier this.noKboOrganizationMessage this.noKboMessage}}</p>
</AuAlert>
{{/if}}
8 changes: 8 additions & 0 deletions app/components/kbo-organization/data-card.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import Component from '@glimmer/component';

export default class DataCardComponent extends Component {
noKboMessage =
'Het KBO nummer is niet ingevuld. Hierdoor kunnen we de KBO gegevens niet tonen.';
noKboOrganizationMessage =
'De KBO gegevens van deze organisatie kunnen we niet tonen omdat deze momenteel niet beschikbaar zijn in onze bron Organisatieregister Wegwijs.';
}

0 comments on commit 76fa27e

Please sign in to comment.