Add more quests for bike shop
This commit is contained in:
parent
81a80ef95c
commit
96c03dc8e3
1 changed files with 28 additions and 10 deletions
|
@ -8,8 +8,8 @@ import {NameQuestion} from "../Questions/NameQuestion";
|
||||||
export class BikeShop extends LayerDefinition {
|
export class BikeShop extends LayerDefinition {
|
||||||
|
|
||||||
|
|
||||||
const
|
private readonly sellsBikes = new Tag("service:bicycle:retail", "yes");
|
||||||
sellsBikes = new Tag("service:bicycle:retail", "yes");
|
private readonly repairsBikes = new Tag("service:bicycle:repair", "yes");
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super(
|
super(
|
||||||
|
@ -35,31 +35,49 @@ export class BikeShop extends LayerDefinition {
|
||||||
new ImageCarouselWithUploadConstructor(),
|
new ImageCarouselWithUploadConstructor(),
|
||||||
new TagRenderingOptions({
|
new TagRenderingOptions({
|
||||||
question: "What is the name of this bicycle shop?",
|
question: "What is the name of this bicycle shop?",
|
||||||
freeform:{
|
freeform: {
|
||||||
key:"name",
|
key: "name",
|
||||||
renderTemplate: "The name of this bicycle shop is {name}",
|
renderTemplate: "The name of this bicycle shop is {name}",
|
||||||
template: "The name of this bicycle shop is $$$"
|
template: "The name of this bicycle shop is $$$"
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
new TagRenderingOptions({
|
new TagRenderingOptions({
|
||||||
question: "Can one buy a new bike here?",
|
question: "Can one buy a bike here?",
|
||||||
mappings: [
|
mappings: [
|
||||||
{k: this.sellsBikes, txt: "Bikes are sold here"},
|
{k: this.sellsBikes, txt: "Bikes are sold here"},
|
||||||
{k: new Tag("service:bicycle:retail", "no"), txt: "No bikes can be bought here"},
|
{k: new Tag("service:bicycle:retail", "no"), txt: "No bikes are sold here"},
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
new TagRenderingOptions({
|
||||||
|
question: "Can one buy a new bike here?",
|
||||||
|
mappings: [
|
||||||
|
{k: new Tag("service:bicycle:second_hand", "yes"), txt: "Second-hand bikes are sold here"},
|
||||||
|
{k: new Tag("service:bicycle:second_hand", "only"), txt: "All bicycles sold here are second-hand"},
|
||||||
|
{k: new Tag("service:bicycle:second_hand", "no"), txt: "Only brand new bikes are sold here"},
|
||||||
|
]
|
||||||
|
}).OnlyShowIf(this.sellsBikes),
|
||||||
|
|
||||||
|
|
||||||
new TagRenderingOptions({
|
new TagRenderingOptions({
|
||||||
question: "Does this shop repair bicycles?",
|
question: "Does this shop repair bicycles?",
|
||||||
mappings: [
|
mappings: [
|
||||||
{k: new Tag("service:bicycle:repair", "yes"), txt: "Bikes are repaired here, by the shop owner (for a fee)"},
|
{k: this.repairsBikes, txt: "Bikes are repaired here, by the shop owner (for a fee)"},
|
||||||
|
{k: new Tag("service:bicycle:repair", "only_sold"), txt: "Only bikes that were bought here, are repaired"},
|
||||||
|
{k: new Tag("service:bicycle:repair", "brand"), txt: "Only bikes of a fixed brand are repaired here"},
|
||||||
{k: new Tag("service:bicycle:repair", "no"), txt: "Bikes are not repaired here"},
|
{k: new Tag("service:bicycle:repair", "no"), txt: "Bikes are not repaired here"},
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
new TagRenderingOptions({
|
||||||
|
question: "Can one hire a new bike here?",
|
||||||
|
mappings: [
|
||||||
|
{k: new Tag("service:bicycle:rental", "yes"), txt: "Bikes can be rented here"},
|
||||||
|
{k: new Tag("service:bicycle:rental", "no"), txt: "Bikes cannot be rented here"},
|
||||||
|
]
|
||||||
|
}).OnlyShowIf(this.sellsBikes),
|
||||||
|
|
||||||
new TagRenderingOptions({
|
new TagRenderingOptions({
|
||||||
question: "Are there tools here so that one can repair their own bike?",
|
question: "Are there tools here so that one can repair their own bike?",
|
||||||
mappings: [
|
mappings: [
|
||||||
|
|
Loading…
Reference in a new issue