Skip to content

Instantly share code, notes, and snippets.

@nikdo
Last active January 29, 2021 17:12
Show Gist options
  • Save nikdo/6670b7ebd33137f650f5863a5682cfea to your computer and use it in GitHub Desktop.
Save nikdo/6670b7ebd33137f650f5863a5682cfea to your computer and use it in GitHub Desktop.
OfficeRnD entities validations for denizen app.

🚧 Deprecated. Validations moved to the Wiki.

🏒 Location

β†’Β Space / Locations

  • Name
    • is present πŸ›‘
    • is title-cased
    • is not longer than 30 characters πŸ›‘
  • Description
    • is present πŸ›‘
    • is longer than 100 characters πŸ›‘
    • is no longer than 1000 characters πŸ›‘
    • is grammatically correct
  • Business hours
    • are set
    • Opening hour and Closing hour (custom properties) are set πŸ›‘
    • Opening hour and Closing hour (custom properties) match business hours
  • Timezone
    • is not set πŸ›‘
  • Images
    • at least one is set πŸ›‘
    • ratio is correct close to 4:3
    • orientation is landscape
    • resolution is at least 1200x900
    • size is less than 300kB
  • Coordinates
    • are present πŸ›‘
    • are valid πŸ›‘
    • points to the location address
  • Address
    • is present πŸ›‘
    • has street name
    • has street number
    • City is "Berlin" πŸ›‘
    • ZIP is preset πŸ›‘
    • ZIP is valid
      • contains 5 digits πŸ›‘
    • State is empty πŸ›‘
    • Country is "Germany" πŸ›‘
  • Resources
    • has at least one valid supported resource

πŸ’° Resource Rate

β†’Β Billing / Resource Rates

  • Name
    • is present πŸ›‘
    • is sentence-cased πŸ›‘
  • Rate
    • is present πŸ›‘
    • only one is present πŸ›‘
    • interval is set to "day" πŸ›‘
  • Locations
    • has no location selected πŸ›‘
  • Amenities
    • has no amenities πŸ›‘
  • Cancellation Policy
    • is set to "4PM Day Before Policy" πŸ›‘

πŸͺ‘ Resource

β†’Β Space / Meeting Rooms, Desks, Unstructured spaces

  • Name
    • is present πŸ›‘
    • is title-cased
    • is not longer than 30 characters πŸ›‘
  • Type
    • is one of: Hotdesk, Meeting room, Unstructured space
  • Location
    • is present πŸ›‘
  • Size (Meeting room, Unstructured space)
    • number of people is present πŸ›‘
    • number of people is bigger than 1 πŸ›‘
    • number of people is lower than 1000 πŸ›‘
  • Parents (Meeting room)
    • is not set
  • Amenities
    • has the same list as other desks in the group (Desk) πŸ›‘
  • Images
    • at least one is set πŸ›‘
    • ratio is correct close to 4:3
    • orientation is landscape
    • resolution is at least 1200x900
    • size is less than 300kB
    • has the same images as other desks in the group (Desk)
      • has the same count of images as other desks in the group πŸ›‘
  • Rate
    • is present πŸ›‘
    • has the same value as other desks in the group (Desk) πŸ›‘
  • Description
    • is present πŸ›‘
    • is longer than 100 characters πŸ›‘
    • is no longer than 1000 characters πŸ›‘
    • is grammatically correct
    • has the same value as other desks in the group (Desk) πŸ›‘
  • Privacy
    • is set to "Full Access / Public"

πŸ‘©β€πŸ’» User

β†’ Community / Users

  • Name
    • is present
  • Email
    • is present
    • is valid email address
  • Phone
    • is valid phone number
  • Start date
    • is in the past
  • Location
    • is set to "Denizen Hub"
  • Status
    • is set to "Auto"
  • Address or Billing address
    • has all of those present or nothing: Address, City, ZIP, Country
    • ZIP is valid
  • Member portal access
    • is enabled (is Member)
  • Business name
    • is not set
  • Billing address is different
    • is not checked

πŸ‘―β€β™€οΈ Company

β†’ Community / Users

  • Name
    • is present
  • Email
    • is present
    • is valid email address
  • Start date
    • is in the past
  • Location
    • is set to "Denizen Hub"
  • Address
    • is present
    • has street name
    • has street number
    • City is present
    • ZIP is preset
    • ZIP is valid
      • contains only digits
    • State is empty
    • Country is present
  • Billing address is different
    • is not checked
  • Business name
    • is not set
  • VAT
    • is present
    • is valid
  • Reg Number
    • is present
    • is valid

πŸ”€ Resource Type

β†’Β Settings / Resource Types

  • Name
    • is present
    • is one of: Hotdesk, Meeting room, Unstructured space
  • Type
    • is present
    • is one of: hotdesk, meeting_room, unstructured
  • Can book
    • is checked
  • Booking mode
    • is "Date"

πŸ”§ Custom Properties

β†’Β Settings / Custom Properties

Following custom properties are specified:

  • Amenities
    • Name: Amenities
    • Unique Identifier: amenities
    • Type: Multi-select
    • Values: match keys in amenities.json dictionary
    • Applies to: Hotdesk, Meeting room, Unstructured space
  • Coordinates
    • Name: Coordinates
    • Unique Identifier: coordinates
    • Type: String
    • Applies to: Locations
    • Placeholder: 27.380527179754747, 33.63219585889712
  • Opening hour
    • Name: Opening hour
    • Unique Identifier: openingHour
    • Type: String
    • Applies to: Locations
  • Closing hour
    • Name: Closing hour
    • Unique Identifier: closingHour
    • Type: String
    • Applies to: Locations
  • Images
    • Name: Image
    • Unique Identifier: image
    • Type: File
    • Applies to: Locations, Hotdesk, Meeting room, Unstructured space
    • Placeholder: No image

πŸ—‘ Cancellation Policy

β†’Β Settings / Platform / Calendar & Bookings

  • Name
    • is "4PM Day Before Policy" πŸ›‘
  • has 2 active member conditions set exactly like this:
    • When member cancels booking 8 hours in advance, apply 0% cancellation fee. πŸ›‘
    • Less than 8 hours in advance, apply 10% cancellation fee. πŸ›‘

πŸ›‘ = safeguarded by validation script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment