Skip to content

Commit

Permalink
various: fix some display problems
Browse files Browse the repository at this point in the history
* Fixes aqcquisition receipt without identifier.
* Closes: rero/rero-ils#3732
* Displays authorized access point for places and topics.
* Closes: rero/rero-ils#3770
* Fixes RERO data without idendifiedBy.
* Closes: rero/rero-ils#3763

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
  • Loading branch information
rerowep committed Nov 20, 2024
1 parent 0c6ae55 commit 286a423
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,19 @@ <h1 class="mb-0" *ngVar="icon($any(record).metadata.type) as icon">
}
}
<!-- IDENTIFIED BY -->
@if (identifiedByFilter($any(record).metadata[source].identifiedBy).length > 0) {
<dt translate>Identified by</dt>
<dd>
<ul>
@for (identifiedBy of identifiedByFilter($any(record).metadata[source].identifiedBy); track identifiedBy) {
<li>
<a href="{{ identifiedBy.value }}" title="{{ identifiedBy.value }}" target="_blank">{{ identifiedBy.source }}</a>
</li>
}
</ul>
</dd>
@if ($any(record).metadata[source].identifiedBy?.length) {
@if (identifiedByFilter($any(record).metadata[source].identifiedBy).length > 0) {
<dt translate>Identified by</dt>
<dd>
<ul>
@for (identifiedBy of identifiedByFilter($any(record).metadata[source].identifiedBy); track identifiedBy) {
<li>
<a href="{{ identifiedBy.value }}" title="{{ identifiedBy.value }}" target="_blank">{{ identifiedBy.source }}</a>
</li>
}
</ul>
</dd>
}
}
<dt translate>Id</dt>
<dd>{{ $any(record).metadata[source].pid }}</dd>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<!-- AUTHORIZED ACCESS POINT -->
@if (record.authorized_access_point) {
<dt translate>Authorized access point</dt>
<dd>{{ record.authorized_access_point }}</dd>
}

<!-- DATE OF ESTABLISHMENT -->
@if (record.date_of_establishment) {
<dt translate>Date of establishment</dt>
Expand Down Expand Up @@ -42,11 +48,6 @@
<dd>{{ 'country_' + record.country_associated | translate }}</dd>
}

<!-- AUTHORIZED ACCESS POINT -->
@if (record.authorized_access_point) {
<dt translate>Authorized access point</dt>
<dd>{{ record.authorized_access_point }}</dd>
}
<!-- VARIANT NAME -->
@if (record.variant_access_point) {
<dt translate>Variant name</dt>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<!-- AUTHORIZED ACCESS POINT -->
@if (record.authorized_access_point) {
<dt translate>Authorized access point</dt>
<dd>{{ record.authorized_access_point }}</dd>
}
<!-- DATE OF BIRTH -->
@if (record.date_of_birth) {
<dt translate>Birth date</dt>
Expand Down Expand Up @@ -62,8 +67,3 @@
</ul>
</dd>
}
<!-- AUTHORIZED ACCESS POINT -->
@if (record.authorized_access_point) {
<dt translate>Authorized access point</dt>
<dd>{{ record.authorized_access_point }}</dd>
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<!-- AUTHORIZED ACCESS POINT(S) -->
@if (record.authorized_access_point) {
<dt translate>Authorized access point</dt>
<dd>{{ record.authorized_access_point }}</dd>
}
<!-- BNF TYPE -->
@if (record.bnf_type) {
<dt translate>Type</dt>
Expand Down
2 changes: 1 addition & 1 deletion projects/shared/src/lib/pipe/identifiedby-label.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class IdentifiedByLabelPipe implements PipeTransform {
* @return the entity label
*/
transform(identifiedBy: any[], types: string[], separator: string = this._defaultSeparator): string | null {
const identifiers: Array<any> = types
const identifiers: Array<any> = (types && identifiedBy?.length)
? identifiedBy.filter(identifier => types.includes(identifier.type))
: identifiedBy;
return identifiers
Expand Down

0 comments on commit 286a423

Please sign in to comment.