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 11 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.

79 changes: 78 additions & 1 deletion 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
*/
pickUpOrDropOffZone?: Ground | null;
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
/**
* `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 doors of the place
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
*/
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 the emergency devices in the place
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
*/
emergencyDevices?: ArrayLike<EmergencyDevice> | null;
/**
* TODO
*/
Expand Down Expand Up @@ -210,6 +238,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. evacuation chairs, fire alarms, audible alarms`
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
}
},
'emergencyDevices.$': {
type: EmergencyDeviceSchema
},
payment: {
type: PaymentSchema,
optional: true,
Expand All @@ -231,6 +272,27 @@ export const AccessibilitySchema = new SimpleSchema({
question: t`In which condition is the ground you have to traverse to get here?`
}
},
pickUpOrDropOffZone: {
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 place on a wheeclchair accessible path?`
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
}
},
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 +388,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 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.
*/
isAccessibleWithWheelchair?: boolean;
hasEasyAccessFromBothSides?: boolean;
hasAccessibleLightSwitch?: boolean;
}

export const BedSchema = createSchemaInstance('Bed', {
isAccessibleWithWheelchair: {
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
type: Boolean,
optional: true,
accessibility: {
question: t`Is the bed accessible with wheelchair?`
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
}
},
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?`
}
}
});
71 changes: 71 additions & 0 deletions src/EmergencyDevice.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
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: 'evacChair' | 'alarm' | 'visualFireAlarm' | 'audibleFireAlarm';
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved

/**
* Is the emergency device in audio
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
*/
isAudio?: boolean;

/**
* Is the emergency device visual
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
*/
isVisual?: boolean;

/**
* Is the emergency device visual
*/
isAvailable?: boolean;
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
}

export const EmergencyDeviceSchema = new SimpleSchema({
type: {
type: String,
label: t`EmergencyDevice Type`,
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
allowedValues: ['evacChair', 'visualFireAlarm', 'audibleFireAlarm', 'alarm'],
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
accessibility: {
question: t`What kind of EmergencyDevice is described?`,
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
options: [
{ value: 'evacChair', label: t`evacChair` },
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
{ 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`Is there an audio alarm present?`
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
}
},
isVisual: {
type: Boolean,
label: t`Visual`,
optional: true,
accessibility: {
question: t`Is there an visual alarm present?`
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
}
},
isAvailable: {
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
type: Boolean,
label: t`Available`,
optional: true,
accessibility: {
question: t`Is the emergency device available?`
}
}
});
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
35 changes: 35 additions & 0 deletions src/Level.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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`What the name of the Level`
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
}
},
index: {
type: Number,
optional: true,
accessibility: {
question: t`Index of the level in question`
bjoernuhlig marked this conversation as resolved.
Show resolved Hide resolved
}
}
});
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