Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/be accessible nz #30

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6424a58
add media type in-room-compendium
bjoernuhlig May 14, 2020
3e5985a
add media.test.ts test for in-room-compendium type of media
bjoernuhlig May 14, 2020
046bec4
add to room property: hasWheelchairAccessiblePathFromOutside add test…
bjoernuhlig May 14, 2020
12b5948
add property: providesMobilityEquipment to Accessiblity.ts add test f…
bjoernuhlig May 14, 2020
9b164cf
add properties hasAccessibilityAwarenessTraining and hasAccessibility…
bjoernuhlig May 14, 2020
b8c6849
add properties to staff add test
bjoernuhlig May 14, 2020
cbd6e8a
add pickUpOrDropOffZone?: Ground property to accessibility add tests
bjoernuhlig May 14, 2020
d96682b
add pickUpOrDropOffZone?: Ground property to accessibility add tests
bjoernuhlig May 14, 2020
5ef7a84
temp changes
bjoernuhlig May 19, 2020
40c96e8
add bed, roomAccessiblity, level, emergencyDevice object. add media t…
bjoernuhlig May 19, 2020
2137f69
add & check for tests: EmergencyDevice && Level && RoomAccessibility …
bjoernuhlig May 25, 2020
4419f1b
Update src/Bed.ts
May 27, 2020
e2a466d
Update src/Accessibility.ts
May 27, 2020
89f0e7e
Update src/Accessibility.ts
May 27, 2020
7a02c78
Update src/Accessibility.ts
May 27, 2020
440c8e2
Update src/Room.ts
May 27, 2020
e0e7925
Update src/Room.ts
May 27, 2020
20dcb61
Update src/Room.ts
May 27, 2020
657db89
Update src/Room.ts
May 27, 2020
9a1298f
Update src/Bed.ts
May 27, 2020
6d730b9
Update src/Accessibility.ts
May 27, 2020
395af02
Update src/EmergencyDevice.ts
May 27, 2020
c17a964
Update src/EmergencyDevice.ts
May 27, 2020
333d270
Update src/EmergencyDevice.ts
May 27, 2020
26ec30b
Update src/EmergencyDevice.ts
May 27, 2020
65ab5c8
Update src/EmergencyDevice.ts
May 27, 2020
284e909
Update src/EmergencyDevice.ts
May 27, 2020
ce90f86
Update src/EmergencyDevice.ts
May 27, 2020
15e92e8
Update src/EmergencyDevice.ts
May 27, 2020
87f3c6d
Update src/EmergencyDevice.ts
May 27, 2020
b2d2b38
Update src/Level.ts
May 27, 2020
f30b8eb
Update src/Level.ts
May 27, 2020
7eee2a8
Update src/PlaceProperties.ts
May 27, 2020
e341ff6
Update src/Room.ts
May 28, 2020
8cbfbb4
Update src/Room.ts
May 28, 2020
d6b56a1
cleanup for pullreq and add test
bjoernuhlig May 28, 2020
020471f
Update src/Room.ts
May 28, 2020
6857246
change hasAccessibleChairs -> hasOneOrMoreAccessibleChairs
bjoernuhlig May 28, 2020
f2364cc
Merge branch 'feature/be-accessible-nz' of github.com:sozialhelden/a1…
bjoernuhlig May 28, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 78 additions & 10 deletions src/Accessibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import { LocalizedString, LocalizedStringSchema } from './LocalizedString';
import { AnimalPolicySchema, AnimalPolicy } from './AnimalPolicy';
import { SmokingPolicy, smokingPolicies } from './SmokingPolicy';
import { quantityDefinition, Volume, LengthSchema } from './Units';
import { Door, DoorSchema } from './Door';
import { EmergencyDevice, EmergencyDeviceSchema } from './EmergencyDevice';

/**
* Describes the physical (and sometimes human rated) accessibility of a place.
Expand Down Expand Up @@ -68,7 +70,7 @@ export interface Accessibility {
/**
* `true` if the venue has induction loops installed in its functional units where this is relevant.
*/
hasInductionLoop?: boolean,
hasInductionLoop?: boolean;
/**
* Object describing the place's ground condition. If there are very different ground conditions, you can create multiple places and nest them.
*/
Expand Down Expand Up @@ -108,6 +110,32 @@ export interface Accessibility {
* `null` indicates there is no media, `undefined` or missing property indicates unknown.
*/
media?: ArrayLike<Media> | null;
/**
* `true` if the facility provides mobility equipment e.g. foldable wheelchairs or crutches
*/
providesMobilityEquipment?: boolean;
/**
* Describes the pick up or drop off zone
*/
groundConditionsAtPickupOrDropoffZone?: Ground | null;
/**
* `true if the room is on an accessible path or on the accessible route`
* `false` if not, `undefined` if the condition is unknown or difficult to assess.
*/
hasWheelchairAccessiblePathFromOutside?: boolean;
/**
* Describes the place’s doors.
*/
doors?: Door;
/**
* `true if the place provides dedicated signage for way finding`
* `false` if not, `undefined` if the condition is unknown or difficult to assess.
*/
hasDedicatedAccessibilitySignage?: boolean;
/**
* Describes emergency-related devices inside or around the place.
*/
emergencyDevices?: ArrayLike<EmergencyDevice> | null;
/**
* TODO
*/
Expand All @@ -124,10 +152,6 @@ export interface Accessibility {
* TODO
*/
powerOutlets?: [any]; // TODO define type
/**
* TODO
*/
beds?: [any]; // TODO define type
/**
* TODO
*/
Expand Down Expand Up @@ -210,6 +234,19 @@ export const AccessibilitySchema = new SimpleSchema({
'media.$': {
type: MediaSchema
},

emergencyDevices: {
type: Array,
optional: true,
accessibility: {
question: t`Are there any emergency devices?`,
questionMore: t`Are there more emergency devices?`,
description: t`e.g. escape chairs, fire alarms, audible alarms`
}
},
'emergencyDevices.$': {
type: EmergencyDeviceSchema
},
payment: {
type: PaymentSchema,
optional: true,
Expand All @@ -231,6 +268,27 @@ export const AccessibilitySchema = new SimpleSchema({
question: t`In which condition is the ground you have to traverse to get here?`
}
},
groundConditionsAtPickupOrDropoffZone: {
type: GroundSchema,
optional: true,
accessibility: {
question: t`In which condition is the ground around the pick or drop off zone?`
}
},
hasWheelchairAccessiblePathFromOutside: {
type: Boolean,
optional: true,
accessibility: {
question: t`Is the described place on a wheelchair accessible path?`
}
},
hasDedicatedAccessibilitySignage: {
type: Boolean,
optional: true,
accessibility: {
question: t`Is there dedicated signage for way finding?`
}
},
ratingSpacious: {
type: Number,
optional: true,
Expand Down Expand Up @@ -326,6 +384,21 @@ export const AccessibilitySchema = new SimpleSchema({
]
}
},
providesMobilityEquipment: {
type: Boolean,
optional: true,
accessibility: {
question: t`Does the place provide mobility equipment, e.g. foldable wheelchairs or crutches?`
}
},
doors: {
type: DoorSchema,
optional: true,
label: t`Door`,
accessibility: {
questionBlockBegin: t`Would you like soem general information about the doors in the place?`
}
},
sitemap: {
type: Object, // TODO define type
optional: true
Expand All @@ -350,11 +423,6 @@ export const AccessibilitySchema = new SimpleSchema({
optional: true
},
'powerOutlets.$': Object, // TODO define type
beds: {
type: Array,
optional: true
},
'beds.$': Object, // TODO define type
wardrobe: {
type: Object, // TODO define type
optional: true
Expand Down
40 changes: 40 additions & 0 deletions src/Bed.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { t } from 'ttag';
import SimpleSchema from 'simpl-schema';

import { createSchemaInstance } from './SimpleSchemaExtensions';
import { Length, LengthSchema } from './Units';
import { LocalizedStringSchema } from './LocalizedString';

export interface Bed {
/**
* `true` if the bed is completely accessible while using a wheelchair,
* `false` if not, `undefined` if the condition is unknown or difficult to assess.
*/
isWheelchairAccessible?: boolean;
hasEasyAccessFromBothSides?: boolean;
hasAccessibleLightSwitch?: boolean;
}

export const BedSchema = createSchemaInstance('Bed', {
isWheelchairAccessible: {
type: Boolean,
optional: true,
accessibility: {
question: t`Is the bed wheelchair accessible?`
}
},
hasAccessibleLightSwitch: {
type: Boolean,
optional: true,
accessibility: {
question: t`Is the light switch accessible from the bed?`
}
},
hasEasyAccessFromBothSides: {
type: Boolean,
optional: true,
accessibility: {
question: t`Does the bed have enough space to easily access it from both sides?`
}
}
});
58 changes: 58 additions & 0 deletions src/EmergencyDevice.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { t } from 'ttag';
import SimpleSchema from 'simpl-schema';
import './SimpleSchemaExtensions';
import { Length, LengthSchema, quantityDefinition } from './Units';
import { LocalizedStringSchema, LocalizedString } from './LocalizedString';

/**
* Describes a EmergencyDevice unit provided at this place, for example an audibleFireAlarm
*/
export interface EmergencyDevice {
/**
* Type of the EmergencyDevice unit
*/
type: 'escapeChair' | 'alarm' | 'visualFireAlarm' | 'audibleFireAlarm';

/**
* Does the emergency device emit an audible signal?
*/
isAudio?: boolean;

/**
* Does the emergency device emit a visual signal?
*/
isVisual?: boolean;
}

export const EmergencyDeviceSchema = new SimpleSchema({
type: {
type: String,
label: t`Kind of emergency device`,
allowedValues: ['escapeChair', 'visualFireAlarm', 'audibleFireAlarm', 'alarm'],
accessibility: {
question: t`What kind of emergency device is described?`,
options: [
{ value: 'escapeChair', label: t`Escape Chair` },
{ value: 'visualFireAlarm', label: t`visualFireAlarm` },
{ value: 'audibleFireAlarm', label: t`audibleFireAlarm` },
{ value: 'alarm', label: t`alarm` }
]
}
},
isAudio: {
type: Boolean,
label: t`Audio`,
optional: true,
accessibility: {
question: t`Does the emergency device emit an audible signal?`
}
},
isVisual: {
type: Boolean,
label: t`Visual`,
optional: true,
accessibility: {
question: t`Does the emergency device emit a visual signal?`
}
}
});
12 changes: 12 additions & 0 deletions src/Entrance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ export interface Entrance {
* 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({
Expand Down Expand Up @@ -117,6 +122,13 @@ export const EntranceSchema = new SimpleSchema({
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,
Expand Down
37 changes: 37 additions & 0 deletions src/Level.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { t } from 'ttag';
import SimpleSchema from 'simpl-schema';

import './SimpleSchemaExtensions';

import { LocalizedStringSchema, LocalizedString } from './LocalizedString';

export interface Level {
/**
* Name of the level
*/
name?: LocalizedString;
/**
* Index of the level
*/
index?: Number;
}

export const LevelSchema = new SimpleSchema({
name: {
type: LocalizedStringSchema,
label: t`Level Name`,
optional: true,
accessibility: {
question: t`Optional name of the level (matching level lettering/numbering used inside the structure). Is useful for elevator routing (e.g. “take the elevator to level ‘Rooftop terrace’ or ‘Platforms’ or ‘-1’”).`
}
},
index: {
type: Number,
optional: true,
accessibility: {
question: t`Numeric index of the level that indicates relative position of this level in relation to other levels (levels with higher indices are assumed to be located above levels with lower indices).

Ground level should have index 0, with levels above ground indicated by positive indices and levels below ground by negative indices.`
}
}
});
8 changes: 5 additions & 3 deletions src/Media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface Media {
/**
* Type of the media unit
*/
type: 'document' | 'menu' | 'guide' | 'presentation' | 'exhibit' | 'movie' | 'play' | 'screen';
type: 'document' | 'menu' | 'guide' | 'presentation' | 'exhibit' | 'movie' | 'play' | 'screen' | 'in-room-compendium';

/**
* Name of the media unit (relevant if there are multiple units of the same kind)
Expand Down Expand Up @@ -93,7 +93,8 @@ export const MediaSchema = new SimpleSchema({
'exhibit',
'movie',
'play',
'screen'
'screen',
'in-room-compendium'
],
accessibility: {
question: t`What kind of media is described?`,
Expand All @@ -104,7 +105,8 @@ export const MediaSchema = new SimpleSchema({
{ value: 'presentation', label: t`presentation` },
{ value: 'exhibit', label: t`exhibit` },
{ value: 'movie', label: t`movie` },
{ value: 'screen', label: t`screen` }
{ value: 'screen', label: t`screen` },
{ value: 'in-room-compendium', label: t`in-room-compendium` }
]
}
},
Expand Down
Loading