From 03f602686f1e8178fe776343cea6767f4befed02 Mon Sep 17 00:00:00 2001
From: Sepideh Alassi <>
Date: Thu, 4 Apr 2024 15:04:07 +0200
Subject: [PATCH] refactor the table content and the order of components
---
.../manuscript-entry.component.html | 32 +++++++++----------
.../manuscript-entry.component.ts | 8 +++++
src/app/services/beol.service.ts | 16 ++++++----
3 files changed, 34 insertions(+), 22 deletions(-)
diff --git a/src/app/resource/manuscript-entry/manuscript-entry.component.html b/src/app/resource/manuscript-entry/manuscript-entry.component.html
index f5fce7bc..e6dfbfb1 100644
--- a/src/app/resource/manuscript-entry/manuscript-entry.component.html
+++ b/src/app/resource/manuscript-entry/manuscript-entry.component.html
@@ -35,34 +35,32 @@
Pages
-
-
-
-
-
- {{props?.title[0].propertyLabel}}
-
-
-
-
{{props?.manuscriptEntryOf[0].propertyLabel}}
-
Manuscript number
{{props.seqnum[0].int}}
+
+
+
+
-
+ isJouneryLoading
0">
Journey
@@ -90,7 +88,11 @@ Journey
-
+ isJouneryLoading
+
+ 0" [mapData]="coordinates">
+
+ isJouneryLoading
0">
Stages
@@ -119,9 +121,7 @@ Stages
-
- 0" [mapData]="coordinates">
-
+
diff --git a/src/app/resource/manuscript-entry/manuscript-entry.component.ts b/src/app/resource/manuscript-entry/manuscript-entry.component.ts
index c136a465..42e2f10a 100644
--- a/src/app/resource/manuscript-entry/manuscript-entry.component.ts
+++ b/src/app/resource/manuscript-entry/manuscript-entry.component.ts
@@ -42,6 +42,9 @@ export class ManuscriptEntryComponent extends BeolResource {
ontologyInfo: ResourceClassAndPropertyDefinitions;
incomingStillImageRepresentationCurrentOffset: number; // last offset requested for `this.resource.incomingStillImageRepresentations`
isLoading = true;
+ isJouneryLoading = true
+ isStageLoading = true
+ isMapLoading = true
errorMessage: any;
dspConstants = Constants;
navigationSubscription: Subscription;
@@ -149,6 +152,7 @@ export class ManuscriptEntryComponent extends BeolResource {
.pipe(
map((data: DataGraphDB) => this.addURI(data))
);
+ this.isJouneryLoading = false
}
private getStages() {
@@ -156,10 +160,14 @@ export class ManuscriptEntryComponent extends BeolResource {
.pipe(
map((data: DataGraphDB) => this.addURI(data)),
);
+ this.isStageLoading = false
}
private getMapCoordinates() {
this.mapCoordinates$ = this._beolService.make_coordinates_query(this.iri);
+
+ this.isMapLoading = false
+
}
goToLocation(resIri) {
diff --git a/src/app/services/beol.service.ts b/src/app/services/beol.service.ts
index e23b995f..7a076864 100644
--- a/src/app/services/beol.service.ts
+++ b/src/app/services/beol.service.ts
@@ -710,7 +710,7 @@ export class BeolService {
PREFIX ofn:
PREFIX owl:
PREFIX rdfs:
- SELECT ?From ?FromIri ?To ?ToIri ?Departure ?Arrival ?End ?Duration
+ SELECT ?From ?FromIri ?To ?ToIri ?Departure ?Arrival ?Duration_Journey ?Stay_End ?Duration_Stay
WHERE {
BIND (<< ?person trip-onto:hasJourney ?journey>> AS ?journeyTriple)
BIND(<${entryIri}> AS ?entryIRI)
@@ -731,11 +731,15 @@ export class BeolService {
BIND(fn:concat(?arr_calendar, " ", STR(?ArrivalDate)) AS ?Arrival)
?journeyTriple trip-onto:hasEndDate ?EndDate .
<< ?journeyTriple trip-onto:hasEndDate ?EndDate >> trip-onto:calendar ?end_calendar .
- BIND(fn:concat(?end_calendar, " ", STR(?EndDate)) AS ?End)
- BIND(ofn:days-from-duration(?EndDate-?ArrivalDate) AS ?duration_d)
- BIND(ofn:years-from-duration(?EndDate-?ArrivalDate) AS ?duration_y)
- BIND(ofn:months-from-duration(?EndDate-?ArrivalDate) AS ?duration_m)
- BIND(fn:concat( STR(?duration_y *365+ ?duration_m*30 + ?duration_d), " days") AS ?Duration)
+ BIND(fn:concat(?end_calendar, " ", STR(?EndDate)) AS ?Stay_End)
+ BIND(ofn:days-from-duration(?EndDate-?ArrivalDate) AS ?duration_s_d)
+ BIND(ofn:years-from-duration(?EndDate-?ArrivalDate) AS ?duration_s_y)
+ BIND(ofn:months-from-duration(?EndDate-?ArrivalDate) AS ?duration_s_m)
+ BIND(fn:concat( STR(?duration_s_y *365+ ?duration_s_m*30 + ?duration_s_d), " days") AS ?Duration_Stay)
+ BIND(ofn:days-from-duration(?DepartureDate-?ArrivalDate) AS ?duration_d)
+ BIND(ofn:years-from-duration(?DepartureDate-?ArrivalDate) AS ?duration_y)
+ BIND(ofn:months-from-duration(?DepartureDate-?ArrivalDate) AS ?duration_m)
+ BIND(fn:concat( STR(?duration_y *365+ ?duration_m*30 + ?duration_d), " days") AS ?Duration_Journey)
SERVICE <${this._appInitService.config['fusekiUrl']}> {
?FromIri rdfs:label ?From .
?ToIri rdfs:label ?To .