Skip to content

Commit

Permalink
feat: Always show a notice when no search-query provided
Browse files Browse the repository at this point in the history
  • Loading branch information
elwinschmitz committed Jan 15, 2025
1 parent d174b08 commit fe7b5f0
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<div class="w-full bg-purple-300 px-6 py-5 txt-system-s lg:px-24">
@if (registrations.isPending() || assignedProjects.isPending()) {
<ng-container i18n>Loading...</ng-container>
} @else if (!registrations.data()?.length) {
<ng-container i18n
>We couldn't find any information linked to this person's phone number in
the projects you have access to on the 121 Platform.</ng-container
>
} @else {
} @else if (registrations.data()?.length) {
<span i18n>
<strong class="txt-system-bold-s"
>{{ registrations.data()?.length }} registration(s)</strong
>
found with this number</span
>
<strong class="txt-system-bold-s">
{{ registrations.data()?.length }} registration(s)
</strong>
found with this number.
</span>
} @else {
<ng-container i18n>
We couldn't find any information linked to this person's phone number in
the projects you have access to on the 121 Platform.
</ng-container>
}
</div>
@if (registrationMenuItems().length > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
input,
} from '@angular/core';

import { injectQuery, QueryClient } from '@tanstack/angular-query-experimental';
import { injectQuery } from '@tanstack/angular-query-experimental';
import { MenuItem } from 'primeng/api';

import { TabsMenuComponent } from '~/components/tabs-menu/tabs-menu.component';
Expand All @@ -26,7 +26,6 @@ export class RegistrationLookupMenuComponent {
readonly phonenumber = input.required<string>();

readonly projectApiService = inject(ProjectApiService);
readonly queryClient = inject(QueryClient);
readonly registrationApiService = inject(RegistrationApiService);
readonly translatableStringService = inject(TranslatableStringService);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<app-page-layout>
<!-- This page does not actually have any content -->
<!-- We only need to show the registration-lookup-menu component, which is handled by the page-layout component -->
<!--
When there is a search-query for a phone-number, the registration-lookup-menu component will be shown.
This is handled by the page-layout component.
-->
@if (!registrations.data()) {
<p i18n>
When you receive a task, any information linked to the person's phone
number found in active programs in the 121 Platform will appear here.
</p>
}
</app-page-layout>
12 changes: 8 additions & 4 deletions interfaces/Portalicious/src/locale/messages.nl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1816,13 +1816,17 @@
<source>Loading...</source>
<target state="new">Loading...</target>
</trans-unit>
<trans-unit id="296794328137675469" datatype="html">
<trans-unit id="4009667361617596446" datatype="html">
<source>We couldn&apos;t find any information linked to this person&apos;s phone number in the projects you have access to on the 121 Platform.</source>
<target state="new">We couldn&apos;t find any information linked to this person&apos;s phone number in the projects you have access to on the 121 Platform.</target>
</trans-unit>
<trans-unit id="836413862079537522" datatype="html">
<source><x ctype="x-strong" equiv-text="&lt;strong class=&quot;txt-system-bold-s&quot; &gt;" id="START_TAG_STRONG"/><x equiv-text="{{ registrations.data()?.length }}" id="INTERPOLATION"/> registration(s)<x ctype="x-strong" equiv-text="&lt;/strong &gt;" id="CLOSE_TAG_STRONG"/> found with this number</source>
<target state="new"><x ctype="x-strong" equiv-text="&lt;strong class=&quot;txt-system-bold-s&quot; &gt;" id="START_TAG_STRONG"/><x equiv-text="{{ registrations.data()?.length }}" id="INTERPOLATION"/> registration(s)<x ctype="x-strong" equiv-text="&lt;/strong &gt;" id="CLOSE_TAG_STRONG"/> found with this number</target>
<trans-unit id="8097251469414276924" datatype="html">
<source><x ctype="x-strong" equiv-text="&lt;strong class=&quot;txt-system-bold-s&quot;&gt;" id="START_TAG_STRONG"/> <x equiv-text="{{ registrations.data()?.length }}" id="INTERPOLATION"/> registration(s) <x ctype="x-strong" equiv-text="&lt;/strong&gt;" id="CLOSE_TAG_STRONG"/> found with this number.</source>
<target state="new"><x ctype="x-strong" equiv-text="&lt;strong class=&quot;txt-system-bold-s&quot;&gt;" id="START_TAG_STRONG"/> <x equiv-text="{{ registrations.data()?.length }}" id="INTERPOLATION"/> registration(s) <x ctype="x-strong" equiv-text="&lt;/strong&gt;" id="CLOSE_TAG_STRONG"/> found with this number.</target>
</trans-unit>
<trans-unit id="8209340100752123472" datatype="html">
<source>When you receive a task, any information linked to the person&apos;s phone number found in active programs in the 121 Platform will appear here.</source>
<target state="new">When you receive a task, any information linked to the person&apos;s phone number found in active programs in the 121 Platform will appear here.</target>
</trans-unit>
</body>
</file>
Expand Down
9 changes: 6 additions & 3 deletions interfaces/Portalicious/src/locale/messages.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1361,14 +1361,17 @@
<trans-unit id="attribute-edit-info-paymentCountRemaining" datatype="html">
<source>This is automatically calculated based on Max. payments and payments sucessfully sent</source>
</trans-unit>
<trans-unit id="296794328137675469" datatype="html">
<trans-unit id="4009667361617596446" datatype="html">
<source>We couldn&apos;t find any information linked to this person&apos;s phone number in the projects you have access to on the 121 Platform.</source>
</trans-unit>
<trans-unit id="3894950702316166331" datatype="html">
<source>Loading...</source>
</trans-unit>
<trans-unit id="836413862079537522" datatype="html">
<source><x ctype="x-strong" equiv-text="&lt;strong class=&quot;txt-system-bold-s&quot; &gt;" id="START_TAG_STRONG"/><x equiv-text="{{ registrations.data()?.length }}" id="INTERPOLATION"/> registration(s)<x ctype="x-strong" equiv-text="&lt;/strong &gt;" id="CLOSE_TAG_STRONG"/> found with this number</source>
<trans-unit id="8097251469414276924" datatype="html">
<source><x ctype="x-strong" equiv-text="&lt;strong class=&quot;txt-system-bold-s&quot;&gt;" id="START_TAG_STRONG"/> <x equiv-text="{{ registrations.data()?.length }}" id="INTERPOLATION"/> registration(s) <x ctype="x-strong" equiv-text="&lt;/strong&gt;" id="CLOSE_TAG_STRONG"/> found with this number.</source>
</trans-unit>
<trans-unit id="8209340100752123472" datatype="html">
<source>When you receive a task, any information linked to the person&apos;s phone number found in active programs in the 121 Platform will appear here.</source>
</trans-unit>
</body>
</file>
Expand Down

0 comments on commit fe7b5f0

Please sign in to comment.