zaphyra's git: oeffisearch

fast and simple tripplanner

commit f8cec391709adfd94f66342412318a047b75ebd1
parent 052e4105679206208898840cc985d1a7c1d958ba
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Wed, 5 Nov 2025 21:11:38 +0100

journeyView: add db-sperrliste
3 files changed, 66 insertions(+), 2 deletions(-)
M
src/journeyView.js
|
57
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
M
src/styles/icons.css
|
7
+++++--
M
src/styles/journeyView.css
|
4
++++
diff --git a/src/journeyView.js b/src/journeyView.js
@@ -14,6 +14,51 @@ import { cachedCoachSequence } from './coach-sequence/index.js';
 
 import { headerStyles, tableStyles, journeyViewStyles } from './styles.js';
 
+// Sunday - Saturday : 0 - 6
+const blockListDB = {
+	12:    { days: [ 0, 5],                 "from": "KK",   "to": "KA",    notes: null },
+	17:    { days: [ 0 ],                   "from": "KA",   "to": "KK",    notes: null },
+	28:    { days: [ 0, 1, 4, 5, 6],        "from": "NRH",  "to": "NN",    notes: "until 07.09.2025" },
+	29:    { days: [ 0, 1, 4, 5, 6],        "from": "NN",   "to": "NRH",   notes: "until 07.09.2025" },
+	77:    { days: [ 0 ],                   "from": "HH",   "to": "FF",    notes: null },
+	79:    { days: [ 0 ],                   "from": "HH",   "to": "FF",    notes: null },
+	83:    { days: [ 0, 5, 6 ],             "from": "MH",   "to": "XAKN",  notes: "05.07.2025 - 07.09.2025" },
+	85:    { days: [ 0, 5, 6 ],             "from": "MH",   "to": "XAKN",  notes: "05.07.2025 - 07.09.2025" },
+	86:    { days: [ 0, 6 ],                "from": "XAKN", "to": "MH",    notes: "until 05.10.2025" },
+	87:    { days: [ 0, 5, 6 ],             "from": "MH",   "to": "XAKN",  notes: "05.07.2025 - 07.09.2025" },
+	88:    { days: [ 0, 6 ],                "from": "XAKN", "to": "MH",    notes: "until 05.10.2025" },
+	124:   { days: [ 0, 5 ],                "from": "KK",   "to": "EOB",   notes: "until 19.10.2025" },
+	125:   { days: [ 0, 5 ],                "from": "EOB",  "to": "KK",    notes: "until 19.10.2025" },
+	127:   { days: [ 0, 5 ],                "from": "EOB",  "to": "KK",    notes: "until 19.10.2025" },
+	145:   { days: [ 0, 5 ],                "from": "HH",   "to": "BL",    notes: "from 06.08.2025" },
+	146:   { days: [ 0, 5 ],                "from": "BL",   "to": "HH",    notes: "from 06.08.2025" },
+	154:   { days: [ 0 ],                   "from": "KK",   "to": "KM",    notes: "until 26.10.2025" },
+	155:   { days: [ 0, 5 ],                "from": "KM",   "to": "KK",    notes: "until 26.10.2025" },
+	375:   { days: [ 0 ],                   "from": "HG",   "to": "FF",    notes: null },
+	557:   { days: [ 0, 5 ],                "from": "KK",   "to": "BL",    notes: null },
+	596:   { days: [ 0, 5 ],                "from": "FF",   "to": "LL",    notes: null },
+	650:   { days: [ 0, 5 ],                "from": "BL",   "to": "KK",    notes: null },
+	927:   { days: [ 0, 5 ],                "from": "HH",   "to": "KKDZ",  notes: null },
+	928:   { days: [ 0 ],                   "from": "KK",   "to": "HH",    notes: null },
+	1108:  { days: [ 0, 5 ],                "from": "MH",   "to": "BL",    notes: null },
+	1109:  { days: [ 0, 5 ],                "from": "BL",   "to": "MH",    notes: null },
+	1218:  { days: [ 0, 4, 5 ],             "from": "FF",   "to": "LL",    notes: null },
+	1558:  { days: [ 0, 1, 2, 3, 4, 5, 6 ], "from": "LL",   "to": "FF",    notes: null },
+	1559:  { days: [ 0, 1, 2, 3, 4, 5, 6 ], "from": "FF",   "to": "LL",    notes: null },
+	1650:  { days: [ 0, 1, 4, 5 ],          "from": "LL",   "to": "FF",    notes: null },
+	1651:  { days: [ 0, 1, 4, 5 ],          "from": "FF",   "to": "LL",    notes: null },
+	2172:  { days: [ 0, 1 ],                "from": "BEW",  "to": "BL",    notes: null },
+	2173:  { days: [ 0, 5, 6 ],             "from": "BL",   "to": "BEW",   notes: null },
+	2174:  { days: [ 0, 1, 2, 3, 4, 5, 6 ], "from": "BEW",  "to": "BL",    notes: null },
+	2175:  { days: [ 0, 1, 2, 3, 4, 5, 6 ], "from": "BL",   "to": "BEW",   notes: null },
+	2176:  { days: [ 0, 5 ],                "from": "BEW",  "to": "BL",    notes: null },
+	2177:  { days: [ 0, 1, 2, 3, 4, 5, 6 ], "from": "BL",   "to": "BEW",   notes: null },
+	2178:  { days: [ 0, 1, 2, 3, 4, 5, 6 ], "from": "BEW",  "to": "BL",    notes: null },
+	2179:  { days: [ 0, 1, 2, 3, 4, 5, 6 ], "from": "BL",   "to": "BEW",   notes: null },
+	2270:  { days: [ 0, 1, 2, 3, 4, 5, 6 ], "from": "BEW",  "to": "BL",    notes: null },
+	2271:  { days: [ 0, 1, 2, 3, 4, 5, 6 ], "from": "BL",   "to": "BEW",   notes: null },
+}
+
 class JourneyView extends BaseView {
 	static styles = [
 		super.styles,

@@ -141,6 +186,18 @@ class JourneyView extends BaseView {
 							leg.loadFactor,
 							() => html`<span>${t(`load-${leg.loadFactor}`)}</span>`
 						)}
+						${when(
+							(
+								this.profile == "db" &&
+								["IC", "ICE"].includes(leg.line.productName) &&
+								blockListDB[leg.line.fahrtNr] &&
+								blockListDB[leg.line.fahrtNr].days.includes(leg.departure.getDay())
+							),
+							() => html`<span class="icon-sperrliste"></span><span>${blockListDB[leg.line.fahrtNr].from} → ${blockListDB[leg.line.fahrtNr].to} ${when(
+								blockListDB[leg.line.fahrtNr].notes,
+								() => html`(${blockListDB[leg.line.fahrtNr].notes})`
+							)}</span>`
+						)}
 					</div>
 					<div class="table">
 						<div class="row head">
diff --git a/src/styles/icons.css b/src/styles/icons.css
@@ -16,4 +16,8 @@
 
 .icon-bahnexpert {
 	content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240.952 241.198" height="24" width="24"><path d="m156.283 14.31-76.155.03a6.102 6.102 0 0 0-.247 12.197c7.448.304 14.872 2.649 21.144 6.675 3.91 2.511 7.182 5.608 9.07 9.101.5.927.916 1.91 1.243 2.925-8.798.583-18.387 1.932-27.009 3.806-5.011 1.088-10.013 2.373-14.69 4.477-4.679 2.103-9.011 5.062-12.391 8.92s-5.735 8.575-6.962 13.555c-1.228 4.98-1.322 10.16-1.322 15.29v72.291c0 4.87.066 9.793 1.25 14.517s3.513 9.198 6.957 12.642 7.918 5.774 12.642 6.957c3.2.802 6.492 1.086 9.797 1.19l-21.18 31.596h16.19l8.39-12.515 75.786.067 8.284 12.355h16.189l-21.134-31.528c3.038-.124 6.059-.427 9.003-1.164 4.724-1.184 9.199-3.514 12.642-6.957 3.444-3.444 5.774-7.918 6.958-12.642 1.183-4.724 1.25-9.647 1.25-14.517V91.286c0-5.117-.096-10.285-1.328-15.25-1.232-4.967-3.594-9.668-6.98-13.504-3.385-3.837-7.72-6.77-12.393-8.853s-9.666-3.351-14.665-4.44c-9.599-2.092-18.512-3.595-28.316-4.119a20 20 0 0 1 1.782-3.754c1.785-2.919 4.444-5.549 7.575-7.78a39.47 39.47 0 0 1 19.172-7.098 6.1 6.1 0 0 0 5.522-6.351c-.148-3.25-2.82-5.797-6.074-5.826zm-29.096 12.215c-2.77 2.395-5.38 5.062-7.415 8.356-2.037-3.255-4.554-6.019-7.34-8.35zm-20.641 47.72q12.468 0 18.458 3.74 10.88-3.74 19.926-3.74 12.959 0 19.437 4.42 6.48 4.42 6.479 15.751v39.324h-22.249V99.403q0-4.42-2.567-6.346-2.566-2.04-7.579-2.04-2.2 0-3.912.566-1.71.567-2.078 1.247v40.91h-22.248V99.403q0-4.42-2.567-6.346-2.567-2.04-7.58-2.04-2.2 0-3.911.566-1.712.567-2.078 1.247v40.91H71.829V81.044q4.278-2.152 15.524-4.42 11.247-2.379 19.193-2.379M83.483 152.82c7.27 0 13.165 5.895 13.165 13.166 0 7.27-5.894 13.165-13.165 13.165s-13.166-5.894-13.166-13.165 5.895-13.166 13.166-13.166m74.655 0c7.272 0 13.166 5.895 13.166 13.166 0 7.27-5.895 13.165-13.166 13.165-7.27 0-13.165-5.894-13.165-13.165s5.894-13.166 13.165-13.166m-62.375 46.122H146l5.975 8.913-62.15-.054z" fill="white"/></svg>');
-}-
\ No newline at end of file
+}
+
+.icon-sperrliste {
+	content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 70" height="24" width="24"><path d="M30.6 57.9H13.8V12.1h16.8c11.9 0 18.4 7.4 18.4 22.7 0 13.2-4.5 23-18.4 23.1m7.3-22.2c0-9.2-1-16.4-10.9-16.4h-2.2v31.2h3.9c5.8 0 9.2-4.7 9.2-14.8M78 33.9c4.7-1.4 7.9-5.7 8-10.7 0-1-.2-11.2-13.1-11.2H53.8v45.8H70c4.3 0 17.7 0 17.7-12.9 0-3.1-1.4-9.2-9.7-11M64.7 19.2h3.5c4.9 0 6.9 1.7 6.9 5.5 0 3-2.2 5.5-6 5.5h-4.3v-11zm4.5 31.3h-4.5V38.7h4.8c5.7 0 7.1 3.3 7.1 5.9 0 5.9-5.6 5.9-7.4 5.9"/><path fill="none" stroke-width="5px" stroke-linejoin="round" stroke="black" d="M3.512 3.481h92.901v62.825H3.512z"/><path stroke-width="10px" stroke="red" d="m.042 69.848 100-69.875"/></svg>');
+}
diff --git a/src/styles/journeyView.css b/src/styles/journeyView.css
@@ -102,6 +102,10 @@ p.transfer::before {
 	content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M13 13h-2V7h2m-2 8h2v2h-2m4.73-14H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27z"/></svg>');
 }
 
+.icon-sperrliste {
+	margin: 0 -.5em 0 0 !important;
+}
+
 @media (min-width: 800px) {
 	.card {
 		margin: 50px auto;