Skip to content

Commit

Permalink
users module description
Browse files Browse the repository at this point in the history
  • Loading branch information
piggydoughnut committed May 30, 2024
1 parent f53f117 commit 59688b9
Show file tree
Hide file tree
Showing 16 changed files with 254 additions and 130 deletions.
2 changes: 1 addition & 1 deletion documentation/pages/framework/configuration/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Authentication providers are also defined here under `auth.providers`. The defau

### Application configuration sample

```
```json
{
"name": <Your-app-name>,
"auth": {
Expand Down
101 changes: 51 additions & 50 deletions documentation/pages/framework/configuration/company.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 6 additions & 6 deletions documentation/pages/framework/configuration/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
124 changes: 62 additions & 62 deletions documentation/pages/framework/configuration/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
]
}
```
34 changes: 34 additions & 0 deletions documentation/pages/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<MODULE-NAME>/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
Expand Down
32 changes: 23 additions & 9 deletions documentation/pages/modules/about.md
Original file line number Diff line number Diff line change
@@ -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]`

<Image
src="/about1.png"
src="/modules/about.png"
alt="about widget"
width={150}
height={200}
style="margin-top: 10px;"
width="350"
height="200"
style="border: 1px solid lightGray; border-radius: 10px; margin-top: 10px"
/>

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

<Image src="/aboutpage1.png" alt="About page 1" width={600} height={800} />
<Image src="/aboutpage2.png" alt="About page 2" width={600} height={800} />
<Image
src="/modules/aboutpage1.png"
alt="About page 1"
/>
<Image
src="/modules/aboutpage2.png"
alt="About page 2"
/>
Loading

0 comments on commit 59688b9

Please sign in to comment.