diff --git a/frontend/app/src/app/modules/about/about-licenses.html b/frontend/app/src/app/modules/about/about-licenses.html index e8562129..c131db3e 100644 --- a/frontend/app/src/app/modules/about/about-licenses.html +++ b/frontend/app/src/app/modules/about/about-licenses.html @@ -33,7 +33,7 @@ {{ license.name }} - + diff --git a/frontend/app/src/app/modules/about/about-page/about-page-content.html b/frontend/app/src/app/modules/about/about-page/about-page-content.html index 0c837632..a1254a6b 100644 --- a/frontend/app/src/app/modules/about/about-page/about-page-content.html +++ b/frontend/app/src/app/modules/about/about-page/about-page-content.html @@ -13,31 +13,29 @@ ~ this program. If not, see . --> -
- -
- - - {{ 'title' | translateSimple : content }} - - - - - - -

{{ 'title' | translateSimple : content }}

+ +
+ + + {{ 'title' | translateSimple : content }} + + - -
- - - - - - - - - - {{ 'title' | translateSimple : content }} - + + + +

{{ 'title' | translateSimple : content }}

+ +
+ + + + + + + + + + {{ 'title' | translateSimple : content }} + diff --git a/frontend/app/src/app/modules/assessments/page/assessments-page.html b/frontend/app/src/app/modules/assessments/page/assessments-page.html index 92c89f2c..077c78ab 100644 --- a/frontend/app/src/app/modules/assessments/page/assessments-page.html +++ b/frontend/app/src/app/modules/assessments/page/assessments-page.html @@ -27,7 +27,7 @@ #segment [scrollable]="true" mode="md" - (ionChange)="sharedAxisChoreographer.changeViewForState(segment.value)" + (ionChange)="sharedAxisChoreographer.changeViewForState($any(segment.value))" value="" > diff --git a/frontend/app/src/app/modules/assessments/types/course-of-study/course-of-study-assessment.component.ts b/frontend/app/src/app/modules/assessments/types/course-of-study/course-of-study-assessment.component.ts index 94a87b63..8f177a0b 100644 --- a/frontend/app/src/app/modules/assessments/types/course-of-study/course-of-study-assessment.component.ts +++ b/frontend/app/src/app/modules/assessments/types/course-of-study/course-of-study-assessment.component.ts @@ -22,7 +22,7 @@ import {SCAssessment, SCCourseOfStudyWithoutReferences} from '@openstapps/core'; styleUrls: ['course-of-study-assessment.scss'], }) export class CourseOfStudyAssessmentComponent { - @Input() courseOfStudy: SCCourseOfStudyWithoutReferences | null; + @Input() courseOfStudy?: SCCourseOfStudyWithoutReferences | null; _assessments: Promise; diff --git a/frontend/app/src/app/modules/catalog/catalog.component.html b/frontend/app/src/app/modules/catalog/catalog.component.html index 3373fb25..23a7bdb9 100644 --- a/frontend/app/src/app/modules/catalog/catalog.component.html +++ b/frontend/app/src/app/modules/catalog/catalog.component.html @@ -35,7 +35,6 @@

{{ catalog.name }}

-

{{ catalog.acronym }}

diff --git a/frontend/app/src/app/modules/dashboard/dashboard.component.html b/frontend/app/src/app/modules/dashboard/dashboard.component.html index f5610cf6..12cb4a37 100644 --- a/frontend/app/src/app/modules/dashboard/dashboard.component.html +++ b/frontend/app/src/app/modules/dashboard/dashboard.component.html @@ -20,7 +20,7 @@
- + diff --git a/frontend/app/src/app/modules/dashboard/sections/favorites-section/favorites-section.component.html b/frontend/app/src/app/modules/dashboard/sections/favorites-section/favorites-section.component.html index ac771633..5ea3b28d 100644 --- a/frontend/app/src/app/modules/dashboard/sections/favorites-section/favorites-section.component.html +++ b/frontend/app/src/app/modules/dashboard/sections/favorites-section/favorites-section.component.html @@ -15,13 +15,13 @@ - + diff --git a/frontend/app/src/app/modules/dashboard/sections/jobs-section/job-section.component.html b/frontend/app/src/app/modules/dashboard/sections/jobs-section/job-section.component.html index 418d9edb..4708bbe4 100644 --- a/frontend/app/src/app/modules/dashboard/sections/jobs-section/job-section.component.html +++ b/frontend/app/src/app/modules/dashboard/sections/jobs-section/job-section.component.html @@ -15,7 +15,7 @@ - + {{ 'dashboard.jobs.title' | translate | titlecase }} - + @@ -37,7 +37,7 @@ - + diff --git a/frontend/app/src/app/modules/dashboard/sections/mensa-section/mensa-section.component.html b/frontend/app/src/app/modules/dashboard/sections/mensa-section/mensa-section.component.html index cf55a5c5..7c6970f8 100644 --- a/frontend/app/src/app/modules/dashboard/sections/mensa-section/mensa-section.component.html +++ b/frontend/app/src/app/modules/dashboard/sections/mensa-section/mensa-section.component.html @@ -18,9 +18,9 @@ - + - + diff --git a/frontend/app/src/app/modules/dashboard/sections/news-section/news-section.component.html b/frontend/app/src/app/modules/dashboard/sections/news-section/news-section.component.html index 4bcb7516..223d0077 100644 --- a/frontend/app/src/app/modules/dashboard/sections/news-section/news-section.component.html +++ b/frontend/app/src/app/modules/dashboard/sections/news-section/news-section.component.html @@ -22,7 +22,7 @@ {{ 'dashboard.news.moreNews' | translate | titlecase }} - + diff --git a/frontend/app/src/app/modules/data/chips/filter/chip-filter.component.html b/frontend/app/src/app/modules/data/chips/filter/chip-filter.component.html index 42f523c7..2b14c0f6 100644 --- a/frontend/app/src/app/modules/data/chips/filter/chip-filter.component.html +++ b/frontend/app/src/app/modules/data/chips/filter/chip-filter.component.html @@ -13,7 +13,7 @@ ~ this program. If not, see . --> - - + + {{ displayValue }} diff --git a/frontend/app/src/app/modules/data/chips/filter/chip-filter.component.ts b/frontend/app/src/app/modules/data/chips/filter/chip-filter.component.ts index 5c8a258f..ddcebd8c 100644 --- a/frontend/app/src/app/modules/data/chips/filter/chip-filter.component.ts +++ b/frontend/app/src/app/modules/data/chips/filter/chip-filter.component.ts @@ -30,7 +30,7 @@ export class ChipFilterComponent { /** * Text to display on the chip */ - @Input() displayValue: string; + @Input() displayValue?: string | null; /** * Emits when the chip has been activated/deactivated diff --git a/frontend/app/src/app/modules/data/data.module.ts b/frontend/app/src/app/modules/data/data.module.ts index f064f371..09697966 100644 --- a/frontend/app/src/app/modules/data/data.module.ts +++ b/frontend/app/src/app/modules/data/data.module.ts @@ -73,7 +73,7 @@ import {SkeletonListComponent} from './list/skeleton-list.component'; import {TreeListFragmentComponent} from './list/tree-list-fragment.component'; import {TreeListComponent} from './list/tree-list.component'; import {StAppsWebHttpClient} from './stapps-web-http-client.provider'; -import {ArticleContentComponent} from './types/article/article-content.component'; +import {ArticleDetailContentComponent} from './types/article/article-detail-content.component'; import {ArticleListItemComponent} from './types/article/article-item.component'; import {BookDetailContentComponent} from './types/book/book-detail-content.component'; import {BookListItemComponent} from './types/book/book-list-item.component'; @@ -176,7 +176,7 @@ import {ShareButtonComponent} from './elements/share-button.component'; TitleCardComponent, ExternalLinkComponent, ArticleListItemComponent, - ArticleContentComponent, + ArticleDetailContentComponent, BookListItemComponent, BookDetailContentComponent, PeriodicalListItemComponent, @@ -238,7 +238,7 @@ import {ShareButtonComponent} from './elements/share-button.component'; FavoriteButtonComponent, TreeListComponent, ExternalLinkComponent, - ArticleContentComponent, + ArticleDetailContentComponent, BookDetailContentComponent, PeriodicalDetailContentComponent, TitleCardComponent, diff --git a/frontend/app/src/app/modules/data/detail/data-detail-content.html b/frontend/app/src/app/modules/data/detail/data-detail-content.html index 737e6d72..491e28d0 100644 --- a/frontend/app/src/app/modules/data/detail/data-detail-content.html +++ b/frontend/app/src/app/modules/data/detail/data-detail-content.html @@ -82,7 +82,7 @@ - {{ item.type | dataIcon }} + diff --git a/frontend/app/src/app/modules/data/detail/data-detail.html b/frontend/app/src/app/modules/data/detail/data-detail.html index dcb2e068..bf4b2e25 100644 --- a/frontend/app/src/app/modules/data/detail/data-detail.html +++ b/frontend/app/src/app/modules/data/detail/data-detail.html @@ -50,11 +50,13 @@ - - + + + + diff --git a/frontend/app/src/app/modules/data/detail/data-path.component.ts b/frontend/app/src/app/modules/data/detail/data-path.component.ts index c0c343f4..ccbff453 100644 --- a/frontend/app/src/app/modules/data/detail/data-path.component.ts +++ b/frontend/app/src/app/modules/data/detail/data-path.component.ts @@ -34,7 +34,7 @@ export class DataPathComponent implements OnInit { @Input() autoRouting = true; - @Input() maxItems = 2; + @Input() maxItems?: number = 2; @Input() set item(item: SCThings) { if (item.type === SCThingType.Catalog && item.superCatalogs) { diff --git a/frontend/app/src/app/modules/data/detail/data-path.html b/frontend/app/src/app/modules/data/detail/data-path.html index 896aa6b6..689946dc 100644 --- a/frontend/app/src/app/modules/data/detail/data-path.html +++ b/frontend/app/src/app/modules/data/detail/data-path.html @@ -17,7 +17,7 @@ @@ -29,7 +29,7 @@ ? '100%' : stack.length === 2 ? '40vw' - : ($width | async) >= 768 + : (($width | async) ?? 0) >= 768 ? '30vw' : 'calc(100vw - 120px)' " diff --git a/frontend/app/src/app/modules/data/elements/favorite-button.component.html b/frontend/app/src/app/modules/data/elements/favorite-button.component.html index 6fbb5e76..ea5787e3 100644 --- a/frontend/app/src/app/modules/data/elements/favorite-button.component.html +++ b/frontend/app/src/app/modules/data/elements/favorite-button.component.html @@ -16,7 +16,7 @@ diff --git a/frontend/app/src/app/modules/data/elements/long-inline-text.component.ts b/frontend/app/src/app/modules/data/elements/long-inline-text.component.ts index 41ee3434..5e7bb79d 100644 --- a/frontend/app/src/app/modules/data/elements/long-inline-text.component.ts +++ b/frontend/app/src/app/modules/data/elements/long-inline-text.component.ts @@ -30,5 +30,5 @@ export class LongInlineTextComponent { /** * TODO */ - @Input() text: string; + @Input() text?: string; } diff --git a/frontend/app/src/app/modules/data/elements/long-inline-text.html b/frontend/app/src/app/modules/data/elements/long-inline-text.html index 1b0ad343..129e385c 100644 --- a/frontend/app/src/app/modules/data/elements/long-inline-text.html +++ b/frontend/app/src/app/modules/data/elements/long-inline-text.html @@ -12,16 +12,17 @@ ~ You should have received a copy of the GNU General Public License along with ~ this program. If not, see . --> - - - {{ text | slice : 0 : size }} - - - - {{ text | slice : 0 : size * 2 }} - - - - {{ text | slice : 0 : size * 3 }} - - + + + {{ text | slice : 0 : size }} + + + + {{ text | slice : 0 : size * 2 }} + + + + {{ text | slice : 0 : size * 3 }} + + + diff --git a/frontend/app/src/app/modules/data/elements/offers-detail.component.ts b/frontend/app/src/app/modules/data/elements/offers-detail.component.ts index e5785e09..c806734c 100644 --- a/frontend/app/src/app/modules/data/elements/offers-detail.component.ts +++ b/frontend/app/src/app/modules/data/elements/offers-detail.component.ts @@ -15,21 +15,10 @@ import {Component, Input} from '@angular/core'; import {SCAcademicPriceGroup, SCThingThatCanBeOfferedOffer} from '@openstapps/core'; -/** - * TODO - */ @Component({ selector: 'stapps-offers-detail', templateUrl: 'offers-detail.html', }) export class OffersDetailComponent { - /** - * TODO - */ - objectKeys = Object.keys; - - /** - * TODO - */ @Input() offers: Array>; } diff --git a/frontend/app/src/app/modules/data/elements/offers-detail.html b/frontend/app/src/app/modules/data/elements/offers-detail.html index 42620693..6755b9cc 100644 --- a/frontend/app/src/app/modules/data/elements/offers-detail.html +++ b/frontend/app/src/app/modules/data/elements/offers-detail.html @@ -19,13 +19,13 @@
- + {{ 'name' | thingTranslate : offer.inPlace }} - + @@ -36,11 +36,13 @@ - - {{ 'data.detail.offers.' + group | translate }} - -

{{ offer.prices[group] | currency : 'EUR' : 'symbol' : undefined : 'de' }}

-
+ + + {{ 'data.detail.offers.' + group.key | translate }} + +

{{ $any(group.value) | currency : 'EUR' : 'symbol' : undefined : 'de' }}

+
+
diff --git a/frontend/app/src/app/modules/data/elements/origin-detail.component.ts b/frontend/app/src/app/modules/data/elements/origin-detail.component.ts index c9c46647..5ede56ec 100644 --- a/frontend/app/src/app/modules/data/elements/origin-detail.component.ts +++ b/frontend/app/src/app/modules/data/elements/origin-detail.component.ts @@ -13,7 +13,7 @@ * this program. If not, see . */ import {Component, Input} from '@angular/core'; -import {SCThingOrigin} from '@openstapps/core'; +import {SCThingUserOrigin, SCThingRemoteOrigin} from '@openstapps/core'; /** * TODO @@ -26,5 +26,5 @@ export class OriginDetailComponent { /** * TODO */ - @Input() origin: SCThingOrigin; + @Input() origin: SCThingUserOrigin | SCThingRemoteOrigin; } diff --git a/frontend/app/src/app/modules/data/elements/origin-detail.html b/frontend/app/src/app/modules/data/elements/origin-detail.html index 1e4e67d5..b0f68d92 100644 --- a/frontend/app/src/app/modules/data/elements/origin-detail.html +++ b/frontend/app/src/app/modules/data/elements/origin-detail.html @@ -31,7 +31,6 @@ {{ 'data.types.origin.detail.MODIFIED' | translate | titlecase }}: {{ origin.modified | amDateFormat : 'll' }}

-

{{ 'data.types.origin.detail.MAINTAINER' | translate }}: {{ origin.name }}

{{ 'data.types.origin.detail.MAINTAINER' | translate }}: {{ origin.maintainer.name }} diff --git a/frontend/app/src/app/modules/data/elements/origin-in-list.component.ts b/frontend/app/src/app/modules/data/elements/origin-in-list.component.ts index 810d1cfc..e470c375 100644 --- a/frontend/app/src/app/modules/data/elements/origin-in-list.component.ts +++ b/frontend/app/src/app/modules/data/elements/origin-in-list.component.ts @@ -13,7 +13,7 @@ * this program. If not, see . */ import {Component, Input} from '@angular/core'; -import {SCThingOrigin} from '@openstapps/core'; +import {SCThingUserOrigin, SCThingRemoteOrigin} from '@openstapps/core'; /** * TODO @@ -26,5 +26,5 @@ export class OriginInListComponent { /** * TODO */ - @Input() origin: SCThingOrigin; + @Input() origin: SCThingUserOrigin | SCThingRemoteOrigin; } diff --git a/frontend/app/src/app/modules/data/elements/rating.html b/frontend/app/src/app/modules/data/elements/rating.html index 05cec835..0ea33f3d 100644 --- a/frontend/app/src/app/modules/data/elements/rating.html +++ b/frontend/app/src/app/modules/data/elements/rating.html @@ -32,7 +32,7 @@ *ngFor="let i of [5, 4, 3, 2, 1]" (click)="$event.stopPropagation(); userRating.next(i)" slot="icon-only" - size="32" + [size]="32" color="medium" name="grade" > diff --git a/frontend/app/src/app/modules/data/elements/share-button.html b/frontend/app/src/app/modules/data/elements/share-button.html index fcf1723c..3335a186 100644 --- a/frontend/app/src/app/modules/data/elements/share-button.html +++ b/frontend/app/src/app/modules/data/elements/share-button.html @@ -1,4 +1,4 @@ - + diff --git a/frontend/app/src/app/modules/data/elements/simple-card.component.ts b/frontend/app/src/app/modules/data/elements/simple-card.component.ts index e286a3a0..a4cfbf6e 100644 --- a/frontend/app/src/app/modules/data/elements/simple-card.component.ts +++ b/frontend/app/src/app/modules/data/elements/simple-card.component.ts @@ -15,45 +15,24 @@ import {Component, Input} from '@angular/core'; import {SCThingWithoutReferences} from '@openstapps/core'; -/** - * TODO - */ @Component({ selector: 'stapps-simple-card', templateUrl: 'simple-card.html', }) export class SimpleCardComponent { - /** - * TODO - */ areThings = false; - /** - * TODO - */ - @Input() content: string | string[] | SCThingWithoutReferences[]; + @Input() content?: string | string[] | SCThingWithoutReferences[]; - /** - * TODO - */ @Input() isMarkdown = false; - /** - * TODO - */ @Input() title: string; - /** - * TODO - */ // eslint-disable-next-line class-methods-use-this isString(data: unknown): data is string { return typeof data === 'string'; } - /** - * TODO - */ // eslint-disable-next-line class-methods-use-this isThing(something: unknown): something is SCThingWithoutReferences { // bypass the 'type' field check because of translated values diff --git a/frontend/app/src/app/modules/data/elements/simple-card.html b/frontend/app/src/app/modules/data/elements/simple-card.html index e44722c6..b8150ea2 100644 --- a/frontend/app/src/app/modules/data/elements/simple-card.html +++ b/frontend/app/src/app/modules/data/elements/simple-card.html @@ -16,24 +16,22 @@ {{ title }} - - +

{{ content }}

- + - - - + +

{{ 'name' | thingTranslate : thing }}

-
+ -

{{ text }}

+

{{ text }}

diff --git a/frontend/app/src/app/modules/data/elements/title-card.component.html b/frontend/app/src/app/modules/data/elements/title-card.component.html index 3dc776d7..d4af940a 100644 --- a/frontend/app/src/app/modules/data/elements/title-card.component.html +++ b/frontend/app/src/app/modules/data/elements/title-card.component.html @@ -27,8 +27,8 @@ -
- +
+
diff --git a/frontend/app/src/app/modules/data/list/data-list-item.html b/frontend/app/src/app/modules/data/list/data-list-item.html index 3d478f66..3824e5b7 100644 --- a/frontend/app/src/app/modules/data/list/data-list-item.html +++ b/frontend/app/src/app/modules/data/list/data-list-item.html @@ -22,7 +22,7 @@ >
- + diff --git a/frontend/app/src/app/modules/data/list/data-list.component.ts b/frontend/app/src/app/modules/data/list/data-list.component.ts index a8883cc1..a261c035 100644 --- a/frontend/app/src/app/modules/data/list/data-list.component.ts +++ b/frontend/app/src/app/modules/data/list/data-list.component.ts @@ -48,7 +48,7 @@ export class DataListComponent implements OnChanges, OnInit { /** * All SCThings to display */ - @Input() items?: SCThings[]; + @Input() items?: SCThings[] | null; @ContentChild(TemplateRef) listItemTemplateRef: TemplateRef>; diff --git a/frontend/app/src/app/modules/data/list/tree-list.html b/frontend/app/src/app/modules/data/list/tree-list.html index 58114e46..26c9a2a8 100644 --- a/frontend/app/src/app/modules/data/list/tree-list.html +++ b/frontend/app/src/app/modules/data/list/tree-list.html @@ -16,7 +16,7 @@ diff --git a/frontend/app/src/app/modules/data/types/article/article-content.component.ts b/frontend/app/src/app/modules/data/types/article/article-detail-content.component.ts similarity index 84% rename from frontend/app/src/app/modules/data/types/article/article-content.component.ts rename to frontend/app/src/app/modules/data/types/article/article-detail-content.component.ts index 569fc73f..2d9b0f2b 100644 --- a/frontend/app/src/app/modules/data/types/article/article-content.component.ts +++ b/frontend/app/src/app/modules/data/types/article/article-detail-content.component.ts @@ -15,16 +15,10 @@ import {Component, Input} from '@angular/core'; import {SCArticle} from '@openstapps/core'; -/** - * TODO - */ @Component({ - selector: 'stapps-article-content', - templateUrl: 'article-content.html', + selector: 'stapps-article-detail-content', + templateUrl: 'article-detail-content.html', }) -export class ArticleContentComponent { - /** - * TODO - */ +export class ArticleDetailContentComponent { @Input() item: SCArticle; } diff --git a/frontend/app/src/app/modules/data/types/article/article-content.html b/frontend/app/src/app/modules/data/types/article/article-detail-content.html similarity index 100% rename from frontend/app/src/app/modules/data/types/article/article-content.html rename to frontend/app/src/app/modules/data/types/article/article-detail-content.html diff --git a/frontend/app/src/app/modules/data/types/date-series/date-series-detail-content.html b/frontend/app/src/app/modules/data/types/date-series/date-series-detail-content.html index a9b31a4b..f2e661e4 100644 --- a/frontend/app/src/app/modules/data/types/date-series/date-series-detail-content.html +++ b/frontend/app/src/app/modules/data/types/date-series/date-series-detail-content.html @@ -14,7 +14,7 @@ --> - + {{'chips.addEvent.addedToEvents' | translate}} @@ -47,7 +47,7 @@ @@ -63,4 +63,4 @@ - + diff --git a/frontend/app/src/app/modules/data/types/event/event-detail-content.html b/frontend/app/src/app/modules/data/types/event/event-detail-content.html index 5ceb0989..61e6f7d7 100644 --- a/frontend/app/src/app/modules/data/types/event/event-detail-content.html +++ b/frontend/app/src/app/modules/data/types/event/event-detail-content.html @@ -33,15 +33,15 @@ [title]="'organizers' | propertyNameTranslate : item | titlecase" [content]="item.organizers" > - + + + - {{ $any('superCatalogs' | propertyNameTranslate : 'catalog') | titlecase }} + {{ 'superCatalogs' | propertyNameTranslate : 'catalog' | titlecase }} - - + + + + - - + + + + diff --git a/frontend/app/src/app/modules/data/types/message/message-detail-content.html b/frontend/app/src/app/modules/data/types/message/message-detail-content.html index 991be619..45b9136b 100644 --- a/frontend/app/src/app/modules/data/types/message/message-detail-content.html +++ b/frontend/app/src/app/modules/data/types/message/message-detail-content.html @@ -43,7 +43,7 @@ diff --git a/frontend/app/src/app/modules/data/types/person/person-detail-content.component.ts b/frontend/app/src/app/modules/data/types/person/person-detail-content.component.ts index ba8d8de0..b8650cf1 100644 --- a/frontend/app/src/app/modules/data/types/person/person-detail-content.component.ts +++ b/frontend/app/src/app/modules/data/types/person/person-detail-content.component.ts @@ -22,9 +22,6 @@ import { } from '@openstapps/core'; import {DataProvider} from '../../data.provider'; -/** - * TODO - */ @Component({ selector: 'stapps-person-detail-content', templateUrl: 'person-detail-content.html', @@ -32,7 +29,7 @@ import {DataProvider} from '../../data.provider'; export class PersonDetailContentComponent { private _item: SCPerson; - contactPoints: SCContactPoint[] | SCContactPointWithoutReferences[]; + contactPoints: Array; get item(): SCPerson { return this._item; @@ -70,4 +67,10 @@ export class PersonDetailContentComponent { return contactPoints; } + + isContactPoint( + contactPoint: SCContactPoint | SCContactPointWithoutReferences, + ): contactPoint is SCContactPoint { + return 'areaServed' in contactPoint; + } } diff --git a/frontend/app/src/app/modules/data/types/person/person-detail-content.html b/frontend/app/src/app/modules/data/types/person/person-detail-content.html index c145970f..20650aee 100644 --- a/frontend/app/src/app/modules/data/types/person/person-detail-content.html +++ b/frontend/app/src/app/modules/data/types/person/person-detail-content.html @@ -12,41 +12,41 @@ ~ You should have received a copy of the GNU General Public License along with ~ this program. If not, see . --> - - - + + - {{ i + 1 }}. + {{ i + 1 }}. {{ 'type' | thingTranslate : contactPoint | titlecase }}

- {{ 'telephone' | propertyNameTranslate : contactPoint | titlecase }}: + {{ 'telephone' | propertyNameTranslate : 'contact point' | titlecase }}: {{ contactPoint.telephone }}

- {{ 'email' | propertyNameTranslate : contactPoint | titlecase }}: + {{ 'email' | propertyNameTranslate : 'contact point' | titlecase }}: {{ contactPoint.email }}

- {{ 'faxNumber' | propertyNameTranslate : contactPoint | titlecase }}: {{ contactPoint.faxNumber }} + {{ 'faxNumber' | propertyNameTranslate : 'contact point' | titlecase }}: {{ contactPoint.faxNumber }}

- {{ 'officeHours' | propertyNameTranslate : contactPoint | titlecase }}: {{ contactPoint.officeHours }} + {{ 'officeHours' | propertyNameTranslate : 'contact point' | titlecase }}: {{ contactPoint.officeHours + }}

- {{ 'url' | propertyNameTranslate : contactPoint | titlecase }}: + {{ 'url' | propertyNameTranslate : 'contact point' | titlecase }}: {{ contactPoint.url }}

-

+

{{ 'areaServed' | propertyNameTranslate : contactPoint | titlecase }}: {{ contactPoint.areaServed.name }}

-
+ diff --git a/frontend/app/src/app/modules/data/types/place/place-detail-content.component.ts b/frontend/app/src/app/modules/data/types/place/place-detail-content.component.ts index f376815f..d59071c8 100644 --- a/frontend/app/src/app/modules/data/types/place/place-detail-content.component.ts +++ b/frontend/app/src/app/modules/data/types/place/place-detail-content.component.ts @@ -13,7 +13,7 @@ * this program. If not, see . */ import {Component, Input, OnInit} from '@angular/core'; -import {SCBuilding, SCFloor, SCPointOfInterest, SCRoom, SCThings} from '@openstapps/core'; +import {SCBuilding, SCFloor, SCPointOfInterest, SCRoom, SCThings, SCPlace} from '@openstapps/core'; import {DataProvider} from '../../data.provider'; import {hasValidLocation, isSCFloor} from './place-types'; import {DataRoutingService} from '../../data-routing.service'; @@ -36,7 +36,7 @@ export class PlaceDetailContentComponent implements OnInit { */ hasValidLocation = false; - hasCategories(item: SCThings): item is SCThings & {categories: string[]} { + hasCategories(item: object): item is SCThings & {categories: string[]} { return (item as {categories: string[]}).categories !== undefined; } @@ -44,7 +44,7 @@ export class PlaceDetailContentComponent implements OnInit { * Helper function as 'typeof' is not accessible in HTML * @param item TODO */ - isMensaThing(item: SCThings): boolean { + isMensaThing(item: SCThings | SCPlace): item is SCPlace { return ( this.hasCategories(item) && ((item.categories as string[]).includes('canteen') || diff --git a/frontend/app/src/app/modules/data/types/place/place-detail-content.html b/frontend/app/src/app/modules/data/types/place/place-detail-content.html index 811980ce..d9513e50 100644 --- a/frontend/app/src/app/modules/data/types/place/place-detail-content.html +++ b/frontend/app/src/app/modules/data/types/place/place-detail-content.html @@ -20,23 +20,20 @@ > - + {{ 'inPlace' | propertyNameTranslate: item | titlecase }} - + - + diff --git a/frontend/app/src/app/modules/hebis/daia-availability/daia-holding.html b/frontend/app/src/app/modules/hebis/daia-availability/daia-holding.html index 6d21aabe..96dd067c 100644 --- a/frontend/app/src/app/modules/hebis/daia-availability/daia-holding.html +++ b/frontend/app/src/app/modules/hebis/daia-availability/daia-holding.html @@ -52,13 +52,13 @@ {{ 'hebisSearch.daia.status_states' + '.' + holding.status | translate }} diff --git a/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail-content.html b/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail-content.html index 727cbab2..be5728c0 100644 --- a/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail-content.html +++ b/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail-content.html @@ -14,12 +14,15 @@ -->
- + - + diff --git a/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail.html b/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail.html index d0476a5e..4124fccb 100644 --- a/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail.html +++ b/frontend/app/src/app/modules/hebis/hebis-detail/hebis-detail.html @@ -43,7 +43,7 @@ - +
diff --git a/frontend/app/src/app/modules/library/account/checked-out/checked-out-page.html b/frontend/app/src/app/modules/library/account/checked-out/checked-out-page.html index 707f12cd..21501283 100644 --- a/frontend/app/src/app/modules/library/account/checked-out/checked-out-page.html +++ b/frontend/app/src/app/modules/library/account/checked-out/checked-out-page.html @@ -35,7 +35,7 @@
diff --git a/frontend/app/src/app/modules/library/account/elements/paia-item/paiaitem.html b/frontend/app/src/app/modules/library/account/elements/paia-item/paiaitem.html index c359ec6e..314e2bd3 100644 --- a/frontend/app/src/app/modules/library/account/elements/paia-item/paiaitem.html +++ b/frontend/app/src/app/modules/library/account/elements/paia-item/paiaitem.html @@ -23,7 +23,7 @@ {{ item[property] }} - {{ item[property] | amDateFormat : 'll' }} + {{ $any(item[property]) | amDateFormat : 'll' }}

diff --git a/frontend/app/src/app/modules/library/account/fines/fines-page.html b/frontend/app/src/app/modules/library/account/fines/fines-page.html index a5cfd88d..4a8b5f29 100644 --- a/frontend/app/src/app/modules/library/account/fines/fines-page.html +++ b/frontend/app/src/app/modules/library/account/fines/fines-page.html @@ -26,8 +26,7 @@ - - + diff --git a/frontend/app/src/app/modules/library/account/holds/holds-page.html b/frontend/app/src/app/modules/library/account/holds/holds-page.html index c08ba734..98035566 100644 --- a/frontend/app/src/app/modules/library/account/holds/holds-page.html +++ b/frontend/app/src/app/modules/library/account/holds/holds-page.html @@ -67,7 +67,7 @@ diff --git a/frontend/app/src/app/modules/map/page/map-page.html b/frontend/app/src/app/modules/map/page/map-page.html index a7b71a5b..ee5c6ca6 100644 --- a/frontend/app/src/app/modules/map/page/map-page.html +++ b/frontend/app/src/app/modules/map/page/map-page.html @@ -77,7 +77,7 @@ @@ -89,7 +89,7 @@ - +
diff --git a/frontend/app/src/app/modules/menu/context/context-menu.html b/frontend/app/src/app/modules/menu/context/context-menu.html index ec1247b0..06a861ca 100644 --- a/frontend/app/src/app/modules/menu/context/context-menu.html +++ b/frontend/app/src/app/modules/menu/context/context-menu.html @@ -79,8 +79,8 @@ class="filter-item-label" > ({{ bucket.count }}) {{ facet.field === 'type' ? (getTranslatedPropertyValue($any(bucket.key), - 'type') | titlecase) : (getTranslatedPropertyValue(facet.onlyOnType, facet.field, bucket.key) - | titlecase) }} + 'type') | titlecase) : (facet.onlyOnType && getTranslatedPropertyValue(facet.onlyOnType, + facet.field, bucket.key) | titlecase) }} - {{ category.translations[language].title | titlecase }} + {{ category.translations[language]?.title | titlecase }} - {{ item.translations[language].title | titlecase }} + {{ item.translations[language]?.title | titlecase }} diff --git a/frontend/app/src/app/modules/menu/navigation/offline-notice.html b/frontend/app/src/app/modules/menu/navigation/offline-notice.html index ebd5e89a..f435ad6b 100644 --- a/frontend/app/src/app/modules/menu/navigation/offline-notice.html +++ b/frontend/app/src/app/modules/menu/navigation/offline-notice.html @@ -13,13 +13,13 @@ ~ this program. If not, see . --> - + {{ 'app.errors.OFFLINE' | translate }} - + {{ 'app.errors.CONNECTION_ERROR' | translate }} diff --git a/frontend/app/src/app/modules/menu/navigation/tabs.template.html b/frontend/app/src/app/modules/menu/navigation/tabs.template.html index 93fe858b..4e1a809a 100644 --- a/frontend/app/src/app/modules/menu/navigation/tabs.template.html +++ b/frontend/app/src/app/modules/menu/navigation/tabs.template.html @@ -46,6 +46,6 @@ [tab]="category.title" > - {{ category.translations[language].title | titlecase }} + {{ category.translations[language]?.title | titlecase }} diff --git a/frontend/app/src/app/modules/news/page/news-page.html b/frontend/app/src/app/modules/news/page/news-page.html index bf4766fc..752ab70a 100644 --- a/frontend/app/src/app/modules/news/page/news-page.html +++ b/frontend/app/src/app/modules/news/page/news-page.html @@ -23,7 +23,7 @@ - + {{ 'search.nothing_found' | translate | titlecase }} - + diff --git a/frontend/app/src/app/modules/profile/id-cards.html b/frontend/app/src/app/modules/profile/id-cards.html index e3bb74e2..be489d0a 100644 --- a/frontend/app/src/app/modules/profile/id-cards.html +++ b/frontend/app/src/app/modules/profile/id-cards.html @@ -17,7 +17,7 @@
diff --git a/frontend/app/src/app/modules/profile/page/profile-page-section.html b/frontend/app/src/app/modules/profile/page/profile-page-section.html index 50aef702..f8b71b69 100644 --- a/frontend/app/src/app/modules/profile/page/profile-page-section.html +++ b/frontend/app/src/app/modules/profile/page/profile-page-section.html @@ -31,7 +31,7 @@ [detail]="false" >
- + {{ 'name' | translateSimple : link }}
diff --git a/frontend/app/src/app/modules/schedule/page/grid/schedule-card.html b/frontend/app/src/app/modules/schedule/page/grid/schedule-card.html index bf219c2e..362d25b7 100644 --- a/frontend/app/src/app/modules/schedule/page/grid/schedule-card.html +++ b/frontend/app/src/app/modules/schedule/page/grid/schedule-card.html @@ -25,14 +25,11 @@ > - {{ this.scheduleEvent?.dateSeries?.event?.name | nullishCoalesce : this.scheduleEvent?.dateSeries?.name - }} + {{ this.scheduleEvent.dateSeries.event.name | nullishCoalesce : this.scheduleEvent.dateSeries.name }} {{ getNote() }} - {{ scheduleEvent?.dateSeries?.inPlace?.name }} + {{ scheduleEvent.dateSeries.inPlace?.name }} diff --git a/frontend/app/src/app/modules/schedule/page/schedule-single-events.html b/frontend/app/src/app/modules/schedule/page/schedule-single-events.html index 8ea2ccf0..6ab56c49 100644 --- a/frontend/app/src/app/modules/schedule/page/schedule-single-events.html +++ b/frontend/app/src/app/modules/schedule/page/schedule-single-events.html @@ -28,7 +28,7 @@ [scheduleEvent]="event.event" [noOffset]="true" [scale]="scale" - showPlaceName="true" + [showPlaceName]="true" > diff --git a/frontend/app/src/app/modules/schedule/page/schedule-view.html b/frontend/app/src/app/modules/schedule/page/schedule-view.html index 8fd1bbf7..7a1935e6 100644 --- a/frontend/app/src/app/modules/schedule/page/schedule-view.html +++ b/frontend/app/src/app/modules/schedule/page/schedule-view.html @@ -59,7 +59,7 @@ diff --git a/frontend/app/src/app/modules/settings/item/settings-item.component.ts b/frontend/app/src/app/modules/settings/item/settings-item.component.ts index e67aa918..68e741cf 100644 --- a/frontend/app/src/app/modules/settings/item/settings-item.component.ts +++ b/frontend/app/src/app/modules/settings/item/settings-item.component.ts @@ -65,11 +65,11 @@ export class SettingsItemComponent { * @param title Title of the alert * @param message Message of the alert */ - async presentAlert(title: string, message: string) { + async presentAlert(title: string, message: string | null) { const alert = await this.alertCtrl.create({ buttons: ['OK'], header: title, - message: message, + message: message ?? undefined, }); await alert.present(); } diff --git a/frontend/app/src/app/modules/settings/item/settings-item.html b/frontend/app/src/app/modules/settings/item/settings-item.html index 8e62ef21..2a93ea38 100644 --- a/frontend/app/src/app/modules/settings/item/settings-item.html +++ b/frontend/app/src/app/modules/settings/item/settings-item.html @@ -75,7 +75,7 @@ >
- {{ ('values' | thingTranslate : setting)[i] | titlecase }} + {{ $any(('values' | thingTranslate : setting)?.[i]) | titlecase }}
{{ val }}
@@ -86,7 +86,7 @@
- {{ ('values' | thingTranslate : setting)[i] | titlecase }} + {{ $any(('values' | thingTranslate : setting)?.[i]) | titlecase }}
{{ val }}
diff --git a/frontend/app/src/app/modules/settings/page/calendar-sync-settings.html b/frontend/app/src/app/modules/settings/page/calendar-sync-settings.html index 22db7154..a48c6652 100644 --- a/frontend/app/src/app/modules/settings/page/calendar-sync-settings.html +++ b/frontend/app/src/app/modules/settings/page/calendar-sync-settings.html @@ -32,9 +32,9 @@ justify="start" (ionChange)=" setSetting({ - sync: $event.detail.checked + sync: $any($event).detail.checked }); - syncCalendar($event.detail.checked) + syncCalendar($any($event).detail.checked) " > {{ 'settings.calendar.sync.syncWithCalendar' | translate }} diff --git a/frontend/app/src/app/modules/settings/setting-translate.pipe.ts b/frontend/app/src/app/modules/settings/setting-translate.pipe.ts index 8afcc234..da6be7db 100644 --- a/frontend/app/src/app/modules/settings/setting-translate.pipe.ts +++ b/frontend/app/src/app/modules/settings/setting-translate.pipe.ts @@ -24,6 +24,7 @@ import {ThingTranslateService} from '../../translation/thing-translate.service'; */ @Pipe({ name: 'settingValueTranslate', + pure: true, }) export class SettingTranslatePipe implements PipeTransform { constructor( @@ -31,12 +32,12 @@ export class SettingTranslatePipe implements PipeTransform { private readonly thingTranslate: ThingTranslateService, ) {} - transform(setting: SCSetting) { + transform(setting: SCSetting): string | undefined { const thingTranslatePipe = new ThingTranslatePipe(this.translate, this.thingTranslate); const translatedSettingValues = thingTranslatePipe.transform('values', setting); return translatedSettingValues - ? translatedSettingValues[setting.values?.indexOf(setting.value as string) as number] + ? String(translatedSettingValues[setting.values?.indexOf(setting.value as string) as number]) : undefined; } } diff --git a/frontend/app/src/app/translation/property-name-translate.pipe.ts b/frontend/app/src/app/translation/property-name-translate.pipe.ts index 4b30b33e..d75876ac 100644 --- a/frontend/app/src/app/translation/property-name-translate.pipe.ts +++ b/frontend/app/src/app/translation/property-name-translate.pipe.ts @@ -41,6 +41,8 @@ export class PropertyNameTranslatePipe implements PipeTransform, OnDestroy { this.value = this.thingTranslate.getPropertyName(type as SCThingType, key); } + transform>(query: Q, type: K): string; + transform(query: K, thing: T): string; transform(query: unknown, thingOrType: SCThings | string | unknown): unknown { if (typeof query !== 'string' || query.length <= 0) { return query; diff --git a/frontend/app/src/app/translation/translate-simple.pipe.ts b/frontend/app/src/app/translation/translate-simple.pipe.ts index a0ea2cc8..44da2389 100644 --- a/frontend/app/src/app/translation/translate-simple.pipe.ts +++ b/frontend/app/src/app/translation/translate-simple.pipe.ts @@ -51,10 +51,8 @@ export class TranslateSimplePipe implements PipeTransform { } } - transform( - query: P, - thing: T, - ): P extends keyof T ? T[P] : P | unknown { + transform(query: P, thing: T): T[P]; + transform(query: P, thing: T): P | unknown { // store the params, in case they change this.query = query; this.thing = thing; diff --git a/frontend/app/src/app/util/ion-icon/ion-icon.directive.ts b/frontend/app/src/app/util/ion-icon/ion-icon.directive.ts index 66279caf..80b96bc8 100644 --- a/frontend/app/src/app/util/ion-icon/ion-icon.directive.ts +++ b/frontend/app/src/app/util/ion-icon/ion-icon.directive.ts @@ -50,7 +50,7 @@ export class IonIconDirective implements OnInit, OnDestroy, OnChanges { @Input() weight: number; - @Input() size: number; + @Input() size: number | 'small' | 'large'; @Input() grade: number; diff --git a/frontend/app/src/app/util/section.html b/frontend/app/src/app/util/section.html index 261f07dc..6f1f3615 100644 --- a/frontend/app/src/app/util/section.html +++ b/frontend/app/src/app/util/section.html @@ -34,7 +34,7 @@ (click)="swiper.scrollBy({left: -swiper.offsetWidth, behavior: 'smooth'})" [disabled]="firstSlideVisible | async" > - +
@@ -44,7 +44,7 @@ (click)="swiper.scrollBy({left: swiper.offsetWidth, behavior: 'smooth'})" [disabled]="lastSlideVisible | async" > - + diff --git a/frontend/app/tsconfig.json b/frontend/app/tsconfig.json index 39b1d1d8..d8bba7e5 100644 --- a/frontend/app/tsconfig.json +++ b/frontend/app/tsconfig.json @@ -16,5 +16,8 @@ "module": "ES2022", "moduleResolution": "Node" }, + "angularCompilerOptions": { + "strictTemplates": true + }, "exclude": ["**/*.spec.ts"] }