-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathEntrance.ts
150 lines (146 loc) · 4.18 KB
/
Entrance.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
import { t } from 'ttag';
import SimpleSchema from 'simpl-schema';
import './SimpleSchemaExtensions';
import { Door, DoorSchema } from './Door';
import { Stairs, StairsSchema } from './Stairs';
import { LocalizedStringSchema, LocalizedString } from './LocalizedString';
/**
* Describes an entrance to a place.
*/
export interface Entrance {
/**
* Name of the entrance (helpful if there are multiple entrances).
*/
name?: LocalizedString;
/**
* `true` if this is the main entrance, `false` if not, `undefined` if unknown. If there is only one entrance, this attribute SHOULD be `undefined`.
*/
isMainEntrance?: boolean;
// QUESTION merge with slope/stairs in some way
/**
* `true` if this entrance has no steps and needs no ramp, `false` if there are steps or a ramp, `undefined` if unknown.
*/
isLevel?: boolean;
/**
* `true` if this entrance has a fixed ramp, `false` if not, `undefined` if unknown.
*/
hasFixedRamp?: boolean;
// TODO create unit for this for eg. >10
/**
* grade in percent as calculated by `100 * rise / run` or the tangent of the angle of inclination times 100, or `undefined` if there is no slope.
*/
slopeAngle?: number;
/**
* `true` if there is a removable ramp, `false` if not, `undefined` if unknown. If there is a fixed ramp, this property MUST be `undefined`.
*/
hasRemovableRamp?: boolean;
// QUESTION duplicated from area
/**
* Object that describes stairs that you have to take to use the entrance.
*/
stairs?: Stairs;
/**
* Object that describes the entrance’s door. `null` if there is no doof, `undefined` if it is unknown.
*/
door?: Door | null;
/**
* reference to the equipment id if this entrance is an elevator (on accessibility.cloud)
*/
elevatorEquipmentId?: string;
/**
* reference to the equipment id of the intercom of this entrance (on accessibility.cloud)
*/
intercomEquipmentId?: string;
/**
* `true` if the entrance is on a wheelchair accessible path
* `false` if not, `undefined` if unknown. Of interest if, for example, the main entrance is not wheelchair accessible.
*/
isOnWheelchairAccessiblePath?: boolean;
}
export const EntranceSchema = new SimpleSchema({
name: {
type: LocalizedStringSchema,
optional: true,
accessibility: {
question: t`What is the name of this entrance?`,
example: t`e.g. main entrance`
}
},
isMainEntrance: {
type: Boolean,
optional: true,
accessibility: {
question: t`Is this the main entrance?`
}
},
isLevel: {
type: Boolean,
optional: true,
accessibility: {
question: t`Is the entrance stepless?`
}
},
slopeAngle: {
type: Number,
optional: true,
accessibility: {
description: t`Grade in percent as calculated by \`100 * rise / run\` or the tangent of the angle of inclination times 100`,
question: t`What is the angle of the slope?`
}
},
hasFixedRamp: {
type: Boolean,
optional: true,
accessibility: {
question: t`Is there a fixed ramp to enter the place?`
}
},
hasRemovableRamp: {
type: Boolean,
optional: true,
accessibility: {
question: t`Is a portable ramp available? Please check with the staff on-site.`
}
},
stairs: {
type: StairsSchema,
optional: true,
label: t`Stairs`,
accessibility: {
question: t`Are there steps at the entrance?`
}
},
door: {
type: DoorSchema,
optional: true,
label: t`Door`,
accessibility: {
questionBlockBegin: t`Would you like to add information about the door at the entrance?`
}
},
isOnWheelchairAccessiblePath: {
type: Boolean,
optional: true,
accessibility: {
question: t`Is the entrance along a path which fully accessible via wheelchair.`
}
},
elevatorEquipmentId: {
type: String,
optional: true,
accessibility: {
question: t`Is there a lift at this entrance?`,
machineData: true
// TODO foreign object flow equipment
}
},
intercomEquipmentId: {
type: String,
optional: true,
accessibility: {
question: t`Is there an intercom at this entrance?`,
machineData: true
// TODO foreign object flow equipment
}
}
});