Porting repair_station to JSON configuration file

This commit is contained in:
Pieter Vander Vennet 2020-09-05 17:43:30 +02:00
parent b7b1bc13e4
commit 9e9d80c045
18 changed files with 455 additions and 503 deletions

View file

@ -1,18 +0,0 @@
import {Tag} from "../../../Logic/Tags";
import Translations from "../../../UI/i18n/Translations";
import {TagRenderingOptions} from "../../TagRenderingOptions";
export default class PumpManometer extends TagRenderingOptions {
constructor() {
const to = Translations.t.cyclofix.station.manometer
super({
question: to.question,
mappings: [
{k: new Tag("manometer", "yes"), txt: to.yes},
{k: new Tag("manometer", "no"), txt: to.no},
{k: new Tag("manometer", "broken"), txt: to.broken}
]
});
}
}

View file

@ -1,18 +0,0 @@
import {Tag} from "../../../Logic/Tags";
import Translations from "../../../UI/i18n/Translations";
import {TagRenderingOptions} from "../../TagRenderingOptions";
export default class PumpManual extends TagRenderingOptions {
constructor() {
const to = Translations.t.cyclofix.station.electric
super({
priority: 5,
question: to.question,
mappings: [
{k: new Tag("manual", "yes"), txt: to.manual},
{k: new Tag("manual", "no"), txt: to.electric}
]
});
}
}

View file

@ -1,17 +0,0 @@
import {Tag} from "../../../Logic/Tags";
import Translations from "../../../UI/i18n/Translations";
import {TagRenderingOptions} from "../../TagRenderingOptions";
export default class PumpOperational extends TagRenderingOptions {
constructor() {
const to = Translations.t.cyclofix.station.operational
super({
question: to.question,
mappings: [
{k: new Tag("service:bicycle:pump:operational_status","broken"), txt: to.broken},
{k: new Tag("service:bicycle:pump:operational_status",""), txt: to.operational}
]
});
}
}

View file

@ -1,29 +0,0 @@
import {Tag} from "../../../Logic/Tags";
import Translations from "../../../UI/i18n/Translations";
import {TagRenderingOptions} from "../../TagRenderingOptions";
export default class
PumpValves extends TagRenderingOptions{
constructor() {
const to = Translations.t.cyclofix.station.valves
super({
question: to.question,
mappings: [
{
k: new Tag("valves", "sclaverand;schrader;dunlop"),
txt: to.default
},
{k: new Tag("valves", "dunlop"), txt: to.dunlop},
{k: new Tag("valves", "sclaverand"), txt: to.sclaverand},
{k: new Tag("valves", "auto"), txt: to.auto},
],
freeform: {
extraTags: new Tag("fixme", "Freeform valves= tag used: possibly a wrong value"),
key: "valves",
template: to.template,
renderTemplate: to.render
}
});
}
}

View file

@ -1,18 +0,0 @@
import {Tag} from "../../../Logic/Tags";
import Translations from "../../../UI/i18n/Translations";
import {TagRenderingOptions} from "../../TagRenderingOptions";
export default class StationChain extends TagRenderingOptions {
constructor() {
const to = Translations.t.cyclofix.station.chain
super({
priority: 5,
question: to.question,
mappings: [
{k: new Tag("service:bicycle:chain_tool", "yes"), txt: to.yes},
{k: new Tag("service:bicycle:chain_tool", "no"), txt: to.no},
]
});
}
}

View file

@ -1,27 +0,0 @@
import {Tag} from "../../../Logic/Tags";
import Translations from "../../../UI/i18n/Translations";
import {TagRenderingOptions} from "../../TagRenderingOptions";
export default class BikeStationOperator extends TagRenderingOptions {
constructor() {
const to = Translations.t.cyclofix.station.operator
super({
priority: 15,
question: to.question,
mappings: [
{k: new Tag("operator", "KU Leuven"), txt: "KU Leuven"},
{k: new Tag("operator", "Stad Halle"), txt: "Stad Halle"},
{k: new Tag("operator", "Saint Gilles - Sint Gillis"), txt: "Saint Gilles - Sint Gillis"},
{k: new Tag("operator", "Jette"), txt: "Jette"},
{k: new Tag("operator", "private"), txt: to.private}
],
freeform: {
key: "operator",
template: to.template,
renderTemplate: to.render,
placeholder: "organisatie"
}
});
}
}

View file

@ -1,19 +0,0 @@
import {Tag, And} from "../../../Logic/Tags";
import Translations from "../../../UI/i18n/Translations";
import {TagRenderingOptions} from "../../TagRenderingOptions";
export default class BikeStationPumpTools extends TagRenderingOptions {
constructor() {
const to = Translations.t.cyclofix.station.services
super({
priority: 15,
question: to.question,
mappings: [
{k: new And([new Tag("service:bicycle:tools", "no"), new Tag("service:bicycle:pump", "yes")]), txt: to.pump},
{k: new And([new Tag("service:bicycle:tools", "yes"), new Tag("service:bicycle:pump", "no")]), txt: to.tools},
{k: new And([new Tag("service:bicycle:tools", "yes"), new Tag("service:bicycle:pump", "yes")]), txt: to.both}
]
});
}
}

View file

@ -1,18 +0,0 @@
import {Tag} from "../../../Logic/Tags";
import Translations from "../../../UI/i18n/Translations";
import {TagRenderingOptions} from "../../TagRenderingOptions";
export default class BikeStationStand extends TagRenderingOptions {
constructor() {
const to = Translations.t.cyclofix.station.stand;
super({
priority: 10,
question: to.question,
mappings: [
{k: new Tag("service:bicycle:stand", "yes"), txt: to.yes},
{k: new Tag("service:bicycle:stand", "no"), txt: to.no},
]
});
}
}