Skip to content

DispatchActions

Description

Create or edit a singleton dispatch.

Attributes

  • tile: dispatch-actions
  • actions: [Array of item] labelExists: if item include title then display title labelNew: if item include a template then display a template string
    query: query for finding the dispatch; should return just one dispatch: options passed to new dispatches action: edit | open variant: button | text *icon: Icon if variant is text

Example

 {
    "tile": "dispatch-actions",
    "title": "Settings",
    "actions": [
        {
            "labelExists": "シート編集",
            "labelNew": "シート登録",
            "query": "given user [$user], given tracker [action-sheet] limit 1",
            "icon": "far fa-clipboard-list",
            "action": "edit",
            "dispatch": {
                "tracker": "action-sheet"
            },
            "variant":"text"
        },
        {
            "labelExists": "身長編集",
            "labelNew": "身長登録",
            "query": "given user [$user], given tracker [height] limit 1",
            "icon": "far fa-clipboard-list",
            "action": "edit",
            "dispatch": {
            "tracker": "height"
            },
            "variant":"text"
        }
    ]
}