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 {
|
||||
|
||||
|
||||
const
|
||||
sellsBikes = new Tag("service:bicycle:retail", "yes");
|
||||
private readonly sellsBikes = new Tag("service:bicycle:retail", "yes");
|
||||
private readonly repairsBikes = new Tag("service:bicycle:repair", "yes");
|
||||
|
||||
constructor() {
|
||||
super(
|
||||
|
@ -35,31 +35,49 @@ export class BikeShop extends LayerDefinition {
|
|||
new ImageCarouselWithUploadConstructor(),
|
||||
new TagRenderingOptions({
|
||||
question: "What is the name of this bicycle shop?",
|
||||
freeform:{
|
||||
key:"name",
|
||||
freeform: {
|
||||
key: "name",
|
||||
renderTemplate: "The name of this bicycle shop is {name}",
|
||||
template: "The name of this bicycle shop is $$$"
|
||||
}
|
||||
}),
|
||||
|
||||
new TagRenderingOptions({
|
||||
question: "Can one buy a new bike here?",
|
||||
question: "Can one buy a bike here?",
|
||||
mappings: [
|
||||
{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({
|
||||
question: "Does this shop repair bicycles?",
|
||||
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"},
|
||||
]
|
||||
}),
|
||||
|
||||
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({
|
||||
question: "Are there tools here so that one can repair their own bike?",
|
||||
mappings: [
|
||||
|
|
Loading…
Reference in a new issue