Skip to content

Org settings

The following items can be set in the org settings configuration.

  1. Profile popup
  2. Card settings
  3. Roster
  4. General global configuration
  5. Settings

Items 1 through 4 can be set by group with a default provided as a fallback. The mechanism is via nested keys:

{
    "profile": {
        "default": {
            // fallback settings
        },
        [group handle]: {
            // settings for specific groups
        }
    }
}
  • saveLocation: on | off - geocode dispatch data
  • userDisplay: template, general user display
  • userSearch: search template
  • query: query to use to search for user
  • groupBy: user property to use to group user
  • week: monday | sunday - first day of the week
  • relationDisplay
  • profile: configuration details for edit profile
    • gender
      • message: edit gender header
    • mobile
      • message: edit mobile header
    • timezone
      • message: edit timezone header
    • username
      • message: edit username header
    • name
      • message: edit display/first/last name header
      • edit: list of editable fields name, first, last, default to all
      • readonly: list of readonly fields name, first, last, default to none
    • paymentMethod
      • message: edit payment method header
      • providers: (list) payment provider
        • providerName: name of provider, e.g. Stripe
        • key: provider key, e.g. pk_test.....
        • handle: handle of paymment provider, e.g. stripe-test
      • paymentAddress:
        • title: heading for address
        • addAddressTitle: title fo add address
        • chooseAddressTitle: title for choose addreess
    • shippingAddress
      • message: edit shipping address header
      • providers: (list) payment provider
        • providerName: name of provider, e.g. Stripe
        • key: provider key, e.g. pk_test.....
        • handle: handle of paymment provider, e.g. stripe-test
      • paymentAddress:
        • title: heading for address
        • addAddressTitle: title fo add address
        • chooseAddressTitle: title for choose addreess
    • dispatchActions: (list) additional edit profile tracker actions
      • labelExists: label for edit
      • labelNew: label for create
      • query: query to retrieve existing data
      • icon: icon
      • dispatch:
        • tracker: tracker handle
      • variant
  • wizard: [Object]
    • version: 1 OR 2.If version is not provided then default it take version 1
    • start: [Object] If version 2 then provide trackers otherwise just provide the single tracker id.
      • trackers: [Array of strings]
    • intake: [Object] If version 2 then provide trackers otherwise just provide the single tracker id.
      • trackers: [Array of strings]
    • edit:[Object] If version 2 then provide trackers otherwise just provide the single tracker id.
      • trackers: [Array of strings]
  • dispatch: list of dispatches
  • content: display the content based on configuration
  • moderation: configure the information for moderation dialog
  • termsAndConditionsWikiId: id of the terms and conditions wiki
  • navigation: configured the navigation bar
  • bottomNavigation: configure the bottom navigation bar
    • default|groups: styles object
      • backgroundColor: optional background color
      • navColor: optional nav icon color
      • navActiveColor: optional nav active color
      • border: optional color style map
        • topLeft: optional pixel
        • topRight: optional pixel
  • profileColors: configured colors for profile to choose from
  • default|groups: list of colors to use as user avatars that don't have photos
  • profileEdit: styles for edit profile
  • dispatchEdit: styles for edit dispatch
  • messaging
    • manageChannel: styles for manage channel
    • managedChannel: config "managed channels"
      • groups: An array of groups that can see managed channels
    • channels: turn others channels on/off, valid values are otherOrg, inbox, discussion, managed, notification
  • styles:
  • default|groups: style objects for UX areas
    • layoutPopup
    • profileEdit
    • dispatchEdit

Wizard properties configuration:-

Version 1

"settings": {
    "wizard": {
      "intake": "<tracker id>",
      "edit": "<tracker id>"
    }
}  

Version 2

To incorporate more settings

Version 2 (Obsolete.. do not use)

"settings": {
    "wizard": {
      "version": 2,
      "intake": {
        "trackers": ["<tracker id>", "<tracker id>"]
      },
      "edit": {
        "trackers":["<tracker id>", "<tracker id>"]
      },
      "start": {
        "trackers":["<tracker id>", "<tracker id>"]
      }
    }
}  

Example

```json
{
  "settings": {
      "week": "monday",
      "userDisplay": ":last, :first",
      "relationDisplay": "",
      "wizard": {
        "start": "072a4c8d-839b-460f-ac6c-d704d2d4226e",
        "intake": "4fe25dc0-8e91-45e2-b6dd-0f3284094df8",
        "edit": "0b512742-8b79-480e-9c65-bc51cb5568bb"
      },
      "dispatch": {
        "save": [
          "programStatus"
        ],
        "display": [
          "programStatus",
          "orgTitle"
        ],
        "displayConnect": "or"
      },
      "content": [
        {
          "match": "^maintenance",
          "rule": "true",
          "action": "enable"
        },
       ...
      ],
      "moderation": {
        "title": "Flag content as inappropriate",
        "description": "Help us understand what's happening",
        "wiki": {
          "title": "Learn more about our community standards",
          "id": ""
        },
      },
      "termsAndConditionsWikiId": "7d8acbd7-3856-4587-8ff5-b38e4589f3fe",
      "navigation": {
        "default": {
          "backgroundColor": "#ffffff",
          "extendBodyBehindAppBar": true,
          "paddingLeft": "10px",
          "paddingRight": "10px",
          "sideNavigation": false,
          "border": {
            "bottomLeft": "25px",
            "bottomRight": "25px"
          },
          "header": [
           {
             "target": "search",
             "icon": "far fa-magnifying-glass",
             "color": "#ffffff"
           },
           {
             "target": "notification",
             "icon": "far fa-bell"
           },
           {
             "target": "shopping-cart",
             "icon": "far fa-bag-shopping",
             "options": {
               "pageId": "2a8a3b51-1159-4836-956d-abd50fc03b56",
               "title": "Shopping cart",
               "bucketHandle": "shopping-cart"
             }
           }
          ]
        }
      },
      "bottomNavigation": {
        "default": {
          "backgroundColor": "#ffffff",
          "navColor": "#000",
          "navActiveColor": "#cccc",
          "border": {
            "topLeft": "25px",
            "topRight": "25px"
          }
        }
      },
      "profileColors": {
        "default":[
          "#cecece",
          "#fecece"
        ]
      }
  },
"styles": {
  "default": {
    "text": {
      "default": "",
      "danger": "",
      "muted": "",
      "action": ""
    },
    "layoutPopup": {
      "background": "#F9E2D2"
    },
    "profileEdit": {
      "background": "#D7C2E5",
      "iconColor": "#FFFFFF",
      "iconFill": "#9468BC",
      "highlight": "#9468BC",
      "text": "#212721"
    },
    "dispatchEdit": {
      "background": "#F9E2D2",
      "header": "#F9E2D2",
      "text": "#30261c",
      "danger": "#f55275",
      "muted": "#7f7a75",
      "action": "#9469bf",
      "title": "#F34904"
    },
    "messaging": {
      "manageChannel": {
        "background": "#D7C2E5",
        "iconColor": "#FFFFFF",
        "iconFill": "#9468BC",
        "highlight": "#9468BC",
        "text": "#212721"
      },
      "channels": [
        "otherOrg",
        "inbox",
        "notification",
        "discussion",
        "managed"
      ]
    }
  }
}
```
  • header: string array
  • headerByGroup: group handle to string array
  • actionConfig:
    • action: follow | email | mobile | chat
    • condition
    • icon
  • tabs
    • title
    • display: values are dispatches, users, layout
    • show:
    • options: based on display
    • if display is layout, then need layout id

Supported header options: - :first, :last, :lastInitial, :adminName - :email - :createdAt - :gender - :mobile - :external - :status - :timezone

Example

```
{
    "profile": {
        "default": { 
            "styles": {
              "header": {
                "backgroundColor": "#D1EDFA"
              },
              "tabs": {
                "backgroundColor": "#2784BD",
                "indicatorColor": "#ffffff",
                "header": "#D1EDFA",
                "iconColor": "#ffffff"
              },
              "body": {
                "backgroundColor": "#fff"
              },
              "profile": {
                "backgroundColor": "#D1EDFA"
              }
            },
            "header": [
            ":first :lastInitial",
            ":title, training since :createdAt",
            "{about.location}"
            ],
            "card": {
            "title": ":first :lastInitial",
            "description": ":timezone"
            },
          "tabs": [
              {
              "title": "Details",
              "display": "admin",
              "show": "admin",
              "condition": "user is admin",
              "icon": "fal fa-address-card",
              "color": "text-danger"
              },
              ...
          ],
          "actionConfig": [
              {
                "action": "follow",
                "tableData": {
                  "id": 0
                }
              },
              ...
          ]
        },
        "disabled": {used same configuration as default section but it disbled the thing in profile}
        [group handle]: {.. }
    }
}
```
{
  "card": {
    "default": {
      "title": ":first :lastInitial :adminName",
      "description": ":title, joined :createdAt",
      "attributes": [
        {
          "key": "location",
          "source": "about.country"
        }
      ]
    },
   [group handle]: {.. }
  }
}
{
  "roster": {
    "default": {
      "query": [
        {
          "query": "given labels [coach] sort by last",
          "title": "Coaches"
        },
        ...
      ]
    }
  }
}
  • dispatchActions:

    • action: like | comment | bookmark | task-global | task-local
    • condition
    • id
    • icon
    • label
  • theme:

    • titleColor: color to be used for the org title and other places
    • bodyColor: body text color (default to black)
    • iconColor: dispatch action icons color
    • actionColor: link/action color
    • sendButtonColor: chat/dispatch comment send button color
    • logoColor: Org logo color (white, dark, color, or null)
    {
      "general": {
        "default": {
          "dispatchActions": [
            {
              "action": "task-global",
              "condition": "user is admin",
              "tableData": {
                "id": 0
              }
            },
            ...
          ],
          "theme": {
              "titleColor": "#7e86e3",
              "bodyColor": "#000000",
              "iconColor": "#38096a",
              "actionColor": "#3f6fb7",
              "sendButtonColor": "#2fa4e7"
          }
        }
      }
    }
    

Example for navigations bar configuration

The configuration for top navigation bar

image

Name Description
titleColor color of the title (optional), default to branding titleColor or black, branding color will have higher precedence than this config value (AppConfig.instance.titleColor in theme.dart)
titleSpacing optional (default to 0.0), spacing between top left (org logo) icon and title
backgroundColor background color of the navigation bar
logoColor Org logo color (white, dark, color, or null)
logoSize optional (default to 48px), size of logo (top left icon)
extendBodyBehindAppBar whether to push content into the navigation bar
paddingLeft left padding (left of org icon)
paddingRight right padding (right of hamburgar)
sideNavigation navigation for tablet view, default to true, if false, use same layout as phone
borderRadius border radius of navigation bar
header list of right navigations (fig. 3 above), see below for config
{
  "settings": {
    "navigation": {
        "default": {
            "backgroundColor": "#ffffff",
            "extendBodyBehindAppBar": true,
            "paddingLeft": "10px",
            "paddingRight": "10px",
            "sideNavigation": false,
            "borderRadius": {
              "bottomLeft": 25.0,
              "bottomRight: 25.0
            },
            "header": [
              {
                  "target": "search",
                  "icon": "far fa-magnifying-glass",
                  "color": "#ffffff"
              },
              {
                  "target": "notification",
                  "icon": "far fa-bell"
              },
              {
                  "target": "shopping-cart",
                  "icon": "far fa-bag-shopping",
                  "options": {
                  "pageId": "2a8a3b51-1159-4836-956d-abd50fc03b56",
                  "title": "Shopping cart",
                  "bucketHandle": "shopping-cart"
                  }
              },
              {
                "target": "side-menu",
                "icon": "far fa-bars",
                "color: "#fff"
              }
            ]
        }
    }
  }
}

Managed channels group

{
  "settings": {
    "messaging": {
      "default": {
        "managedChannels": {
          "groups": [
            "captains",
            "two_phong"
          ]
        }
      }
    }
  }
}

Edit profile settings

"settings": {
    "profile": {
      "default": {
        "gender": {
          "message": "Let us know your gender"
        },
        "mobile": {
          "message": "We use this to secure your account"
        },
        "timezone": {
          "message": "Your timezone and languages"
        },
        "username": {
          "message": "Must be longer than 5 characters and contain just letters and numbers"
        },
        "name": {
          "message": "Display name is what other users will see. First and last is for billing and should be your legal name",
          "edit": [
            "name"
          ],
          "readonly": [
            "first",
            "last"
          ]
        },
        "paymentMethod": {
          "message": "Provide payment method so that payment can be processed",
          "provider": [{
            "providerName": "Stripe",
            "key": "pk_test_CyocRGjl6i8mTTpydniZVujq",
            "handle": "stripe-test"
          }],
          "paymentAddress": {
            "title": "Shipping address",
            "addAddressTitle": "+ Add shipping address",
            "chooseAddressTitle": "Choose shipping address"
          }
        },
        "shippingAddress": {
          "message": "Provide shipping address so that product can be shipped to you",
          "provider": [{
            "providerName": "Stripe",
            "key": "pk_test_CyocRGjl6i8mTTpydniZVujq",
            "handle": "stripe-test"
          }],
          "paymentAddress": {
            "title": "Shipping address",
            "addAddressTitle": "+ Add shipping address",
            "chooseAddressTitle": "Choose shipping address"
          }        
        },
        "dispatchActions": [
          {
            "labelExists": "Update your profile",
            "labelNew": "Create your profile",
            "template": "",
            "query": "given user [$user], given tracker [user-profile] limit 1",
            "icon": "far fa-clipboard-list",
            "action": "edit",
            "dispatch": {
              "tracker": "user-profile"
            },
            "variant": "block"
          }
        ]
      }
    }
}