diff --git a/documentation/pages/framework/configuration/application.md b/documentation/pages/framework/configuration/application.md index 79eced86..ab99d9d1 100644 --- a/documentation/pages/framework/configuration/application.md +++ b/documentation/pages/framework/configuration/application.md @@ -7,7 +7,7 @@ Authentication providers are also defined here under `auth.providers`. The defau ### Application configuration sample -``` +```json { "name": , "auth": { diff --git a/documentation/pages/framework/configuration/company.md b/documentation/pages/framework/configuration/company.md index 14f3d40b..b572a90c 100644 --- a/documentation/pages/framework/configuration/company.md +++ b/documentation/pages/framework/configuration/company.md @@ -1,57 +1,58 @@ # Company.json -``` +```json +{ + "id": "berlin", + "name": "BerlinHub", + "city": "Berlin", + "country": "GE", + "icon": "🇩🇪", + "address": "Main street 10", + "coordinates": [0.34324324, 0.234234234], + "directions": "Entrance through the courtyard", + "workingHours": ["09:00", "18:00"], + "workingDays": "Mon - Fri", + "timezone": "Europe/Berlin", + "allowGuestInvitation": true, + "allowDeskReservation": true, + "allowRoomReservation": true, + "areas": [ { - "id": "berlin", - "name": "BerlinHub", - "city": "Berlin", - "country": "GE", - "icon": "🇩🇪", - "address": "Main street 10", - "coordinates": [0.34324324, 0.234234234], - "directions": "Entrance through the courtyard", - "workingHours": ["09:00", "18:00"], - "workingDays": "Mon - Fri", - "timezone": "Europe/Berlin", - "allowGuestInvitation": true, - "allowDeskReservation": true, - "allowRoomReservation": true, - "areas": [{ - "id": "first_floor", - "name": "First Floor", - "available": true, - "bookable": true, - "map": "/path/to/map.png", - "meetingRooms": [ - { - "id": "hibiscus", - "name": "Hibiscus", - "description": "1st floor", - "capacity": 5, - "equipment": "whiteboard", - "photo":"/path/to/photo.png", - "workingHours": ["08:00", "19:00"], - "autoConfirm": true, - "position": { - "x":0, - "y":0 - } - } - ], - "desks": [ - { - "id": "a", - "name": "A", - "type": "flexible", - "position": { - "x":0, - "y":0 - } - } - ] - }] + "id": "first_floor", + "name": "First Floor", + "available": true, + "bookable": true, + "map": "/path/to/map.png", + "meetingRooms": [ + { + "id": "hibiscus", + "name": "Hibiscus", + "description": "1st floor", + "capacity": 5, + "equipment": "whiteboard", + "photo": "/path/to/photo.png", + "workingHours": ["08:00", "19:00"], + "autoConfirm": true, + "position": { + "x": 0, + "y": 0 + } + } + ], + "desks": [ + { + "id": "a", + "name": "A", + "type": "flexible", + "position": { + "x": 0, + "y": 0 + } + } + ] } - + ] +} ``` ## Configurable fields diff --git a/documentation/pages/framework/configuration/modules.md b/documentation/pages/framework/configuration/modules.md index 38a118df..d192993c 100644 --- a/documentation/pages/framework/configuration/modules.md +++ b/documentation/pages/framework/configuration/modules.md @@ -2,12 +2,12 @@ This is where you turn on/off app modules, set their integrations, metadata and other configuration. -``` - { - "id": "announcements", - "enabled": true, - "enabledIntegrations": [], - } +```json +{ + "id": "announcements", + "enabled": true, + "enabledIntegrations": [] +} ``` To enable a module it has to have `enabled` set to `true`. diff --git a/documentation/pages/framework/configuration/permissions.md b/documentation/pages/framework/configuration/permissions.md index 32c5d619..c9ce0acd 100644 --- a/documentation/pages/framework/configuration/permissions.md +++ b/documentation/pages/framework/configuration/permissions.md @@ -8,70 +8,70 @@ You can define custom access permissions and custom roles here. Permissions for E.g. -``` +```json { - "roleGroups": [ + "roleGroups": [ + { + "id": "base", + "name": "Base user roles", + "roles": [ { - "id": "base", - "name": "Base user roles", - "roles": [ - { - "id": "regular", - "name": "HubMember", - "permissions": [ - "users.list_profiles", - "users.manage_profile", - "users.use_map", - "users.use_onboarding", - "visits.list_visitors", - "visits.create", - "guest-invites.create", - "room-reservation.create", - "search.use", - "events.list_global_events", - "events.list_participants", - "quick-navigation.use", - "profile-questions.use", - "help-center.get_content", - "checklists.use", - "announcements.use" - ], - "accessByDefault": true - } - ] - }, + "id": "regular", + "name": "HubMember", + "permissions": [ + "users.list_profiles", + "users.manage_profile", + "users.use_map", + "users.use_onboarding", + "visits.list_visitors", + "visits.create", + "guest-invites.create", + "room-reservation.create", + "search.use", + "events.list_global_events", + "events.list_participants", + "quick-navigation.use", + "profile-questions.use", + "help-center.get_content", + "checklists.use", + "announcements.use" + ], + "accessByDefault": true + } + ] + }, + { + "id": "admins", + "name": "Admins 🔥", + "roles": [ { - "id": "admins", - "name": "Admins 🔥", - "roles": [ - { - "id": "admin", - "name": "Admin", - "permissions": [ - "users.__admin", - "users.admin.list", - "users.admin.manage", - "users.admin.assign_roles", - "users.list_profiles", - "users.manage_profile", - "users.use_map", - "users.use_onboarding", - "visits.__admin", - "events.admin.manage", - "events.list_global_events - "checklists.admin.manage", - "announcements.__admin", - "announcements.use", - "working-hours.__admin", - "working-hours.admin.list", - "working-hours.admin.manage", - "admin-dashboard.__admin", - "memberships.__admin" - ], - "accessByDefault": true - } - ] - } - ] + "id": "admin", + "name": "Admin", + "permissions": [ + "users.__admin", + "users.admin.list", + "users.admin.manage", + "users.admin.assign_roles", + "users.list_profiles", + "users.manage_profile", + "users.use_map", + "users.use_onboarding", + "visits.__admin", + "events.admin.manage", + "events.list_global_events", + "checklists.admin.manage", + "announcements.__admin", + "announcements.use", + "working-hours.__admin", + "working-hours.admin.list", + "working-hours.admin.manage", + "admin-dashboard.__admin", + "memberships.__admin" + ], + "accessByDefault": true + } + ] + } + ] } ``` diff --git a/documentation/pages/modules.md b/documentation/pages/modules.md index 63ebaacc..3d600c27 100644 --- a/documentation/pages/modules.md +++ b/documentation/pages/modules.md @@ -4,6 +4,40 @@ All user-facing widgets of the application are (and should be) located in its ow [Module structure](https://github.com/paritytech/polkadot-hub-app/tree/master/src/modules/_template) +## Manifest.json + +Each module has manifest.json file which defines its configurations. You can find it under `src//manifest.json` + +E.g. partial sample of users module manifest.json + +```json +{ + "id": "users", + "name": "Users", + "dependencies": [], + "requiredIntegrations": [], + "recommendedIntegrations": ["matrix", "mapbox"], + "availableCronJobs": ["users-delete-users-data"], + "models": ["User", "Session", "City", "Tag", "UserTag"], + "clientRouter": { + "public": {}, + "user": { + "profile": { + "path": "/me", + "componentId": "Profile", + "availablePortals": ["profile_form_extra_fields"] + } + }, + "admin": { + "adminUsers": { + "path": "/admin/users", + "componentId": "AdminUsers" + } + } + } +} +``` + ## Available modules: [About](./modules/about.md) - shows location and other information about the Hub diff --git a/documentation/pages/modules/about.md b/documentation/pages/modules/about.md index 15385bee..71c325a4 100644 --- a/documentation/pages/modules/about.md +++ b/documentation/pages/modules/about.md @@ -1,22 +1,36 @@ -import Image from 'next/image' - # About module ## About widget -The widget shows information that is configured in [`company.json` file](../how-to/configuraiton.md): address, location directions and hub opening hours and days. The image on the widget can be replaced in the public folder in the configuration of the project. Simply add a file to `/config/public/maps/[hubID.png]` +The widget shows information that is configured in [`company.json file`](../framework/configuration/company.md): + +- address + +- location directions + +- hub opening hours + +- hub opening days + +The image on the widget can be replaced in the public folder in the configuration of the project. Simply add a file to `/config/public/maps/[hubID.png]` about widget ## About page The about page shows more information than the widget, including an interactive map, floor plans and whether desk reservations or room reservations are enabled, floor maps. -About page 1 -About page 2 +About page 1 +About page 2 diff --git a/documentation/pages/modules/users.md b/documentation/pages/modules/users.md index 80048eef..cc01e59c 100644 --- a/documentation/pages/modules/users.md +++ b/documentation/pages/modules/users.md @@ -1,8 +1,49 @@ # Users module -### Configuring profile fields +This is the core module of the framework. It has to be enabled for everything else to work as everything depends on it. -Contact fields are displayed when users are onboarding. Users can modify contact fields in their profile after the onboarding as well. +To enable make sure `enabled: true` is set under `users` module in [modules.json](../framework/configuration/modules.md) + +Functionality: + +- Everything about user profile + +- Map of all users widget and page + +- User onboarding + +## Available Widgets + +### Onboarding for new joiners + +If new joiner is detected then the onboarding is shown. If you want new joiner detection to be enabled add `["users", "NewjoinerDetector"]` in the [application.json](../framework/configuration/application.md) configuration. + +There are 3 steps in the onboarding. You can configure all the fields that shown in the onboarding. Removing certain fields will remove steps too. + +Onboarding page 1 + +Onboarding page 2 + +Onboarding page 3 + +#### Configuring profile/onboarding fields + +Configure which contact fields to show for users to fill out in their profiles and during onboarding. You can configure which contact fields are required for your instance by setting `required` to true or false. @@ -70,3 +111,37 @@ e.g } ``` + +### User Profile Card + +To enable - add `["users", "ProfileCard"]` in the [application.json](../framework/configuration/application.md) configuration. + +Profile card widget + +### Users Map Widget + +To enable - add `["users", "UsersMapWidget", { "offices": ["global"] }]` in the [application.json](../framework/configuration/application.md) configuration. You can specify which office/hub you want to show it in. + +**Stealth mode** - if a user does not want to be shown on the map they can toggle stealth mode. Stealth mode option is also availble in user profile form. + +Users map + +This widget has its own full page as well. + +Users map page diff --git a/documentation/public/modules/about.png b/documentation/public/modules/about.png new file mode 100644 index 00000000..e7ca20b6 Binary files /dev/null and b/documentation/public/modules/about.png differ diff --git a/documentation/public/modules/aboutpage1.png b/documentation/public/modules/aboutpage1.png new file mode 100644 index 00000000..d8b1b833 Binary files /dev/null and b/documentation/public/modules/aboutpage1.png differ diff --git a/documentation/public/modules/aboutpage2.png b/documentation/public/modules/aboutpage2.png new file mode 100644 index 00000000..d02c1bc5 Binary files /dev/null and b/documentation/public/modules/aboutpage2.png differ diff --git a/documentation/public/modules/usersMap.png b/documentation/public/modules/usersMap.png new file mode 100644 index 00000000..2ee08ed3 Binary files /dev/null and b/documentation/public/modules/usersMap.png differ diff --git a/documentation/public/modules/usersMapPage.png b/documentation/public/modules/usersMapPage.png new file mode 100644 index 00000000..a54cd6bd Binary files /dev/null and b/documentation/public/modules/usersMapPage.png differ diff --git a/documentation/public/modules/usersOnboarding1.png b/documentation/public/modules/usersOnboarding1.png new file mode 100644 index 00000000..aeaa3cc2 Binary files /dev/null and b/documentation/public/modules/usersOnboarding1.png differ diff --git a/documentation/public/modules/usersOnboarding2.png b/documentation/public/modules/usersOnboarding2.png new file mode 100644 index 00000000..15f57ffa Binary files /dev/null and b/documentation/public/modules/usersOnboarding2.png differ diff --git a/documentation/public/modules/usersOnboarding3.png b/documentation/public/modules/usersOnboarding3.png new file mode 100644 index 00000000..c1d3c3df Binary files /dev/null and b/documentation/public/modules/usersOnboarding3.png differ diff --git a/documentation/public/modules/usersProfileCard.png b/documentation/public/modules/usersProfileCard.png new file mode 100644 index 00000000..26de24ea Binary files /dev/null and b/documentation/public/modules/usersProfileCard.png differ