forked from MapComplete/MapComplete
Beheading the hydra
This commit is contained in:
commit
eeef63be9f
6 changed files with 114 additions and 13 deletions
19
Customizations/Questions/bike/ShopDiy.ts
Normal file
19
Customizations/Questions/bike/ShopDiy.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
import {TagRenderingOptions} from "../../TagRendering";
|
||||
import {Tag} from "../../../Logic/TagsFilter";
|
||||
import Translations from "../../../UI/i18n/Translations";
|
||||
|
||||
|
||||
export default class ShopPump extends TagRenderingOptions {
|
||||
constructor() {
|
||||
const key = 'service:bicycle:diy'
|
||||
const to = Translations.t.cylofix.shop.diy
|
||||
super({
|
||||
priority: 5,
|
||||
question: to.question.Render(),
|
||||
mappings: [
|
||||
{k: new Tag(key, "yes"), txt: to.yes.Render()},
|
||||
{k: new Tag(key, "no"), txt: to.no.Render()},
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
18
Customizations/Questions/bike/ShopName.ts
Normal file
18
Customizations/Questions/bike/ShopName.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import {TagRenderingOptions} from "../../TagRendering";
|
||||
import Translations from "../../../UI/i18n/Translations";
|
||||
|
||||
|
||||
export default class ShopPump extends TagRenderingOptions {
|
||||
constructor() {
|
||||
const to = Translations.t.cylofix.shop.qName
|
||||
super({
|
||||
priority: 5,
|
||||
question: to.question.Render(),
|
||||
freeform: {
|
||||
key: "name",
|
||||
renderTemplate: to.render.txt,
|
||||
template: to.template.txt
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
|
@ -12,6 +12,8 @@ export default class ShopRepair extends TagRenderingOptions {
|
|||
question: to.question.Render(),
|
||||
mappings: [
|
||||
{k: new Tag(key, "yes"), txt: to.yes.Render()},
|
||||
{k: new Tag(key, "only_sold"), txt: to.sold.Render()},
|
||||
{k: new Tag(key, "brand"), txt: to.brand.Render()},
|
||||
{k: new Tag(key, "no"), txt: to.no.Render()},
|
||||
]
|
||||
});
|
||||
|
|
20
Customizations/Questions/bike/ShopSecondHand.ts
Normal file
20
Customizations/Questions/bike/ShopSecondHand.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
import {TagRenderingOptions} from "../../TagRendering";
|
||||
import {Tag} from "../../../Logic/TagsFilter";
|
||||
import Translations from "../../../UI/i18n/Translations";
|
||||
|
||||
|
||||
export default class ShopPump extends TagRenderingOptions {
|
||||
constructor() {
|
||||
const key = 'service:bicycle:second_hand'
|
||||
const to = Translations.t.cylofix.shop.secondHand
|
||||
super({
|
||||
priority: 5,
|
||||
question: to.question.Render(),
|
||||
mappings: [
|
||||
{k: new Tag(key, "yes"), txt: to.yes.Render()},
|
||||
{k: new Tag(key, "no"), txt: to.no.Render()},
|
||||
{k: new Tag(key, "only"), txt: to.only.Render()},
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue