Cotton code
172 lines · 3.9 KB · JSONRaw
{  "views": [    {      "id": "wishes",      "label": "Birthday wishes",      "visibility": "owner",      "is_default": true,      "read": {        "table": "person",        "where": {          "own_birthdays__wish": true        }      },      "sort": {        "column": "birthday",        "next": true      },      "slip": {        "title": "full_name",        "subtitle": null,        "trailing": null,        "photo": "avatar_key",        "toggle": "own_birthdays__wish",        "toggle_style": "switch",        "caption": {          "dates": [            "birthday"          ],          "near": 30,          "date_form": "turns"        }      },      "tile": {        "face": "slip-list"      },      "face": "cards",      "card": {        "face": "birthday",        "fields": [          {            "slot": "title",            "column": "full_name"          },          {            "slot": "subtitle",            "column": "city"          },          {            "slot": "date",            "column": "birthday"          },          {            "slot": "turns",            "column": "birthday"          },          {            "slot": "photo",            "column": "avatar_key"          },          {            "slot": "wishes",            "column": "own_birthdays__wish"          },          {            "slot": "last_wished",            "column": "own_birthdays__last_wished"          }        ]      }    },    {      "id": "everyone",      "label": "Everyone",      "visibility": "owner",      "is_default": false,      "read": {        "table": "person",        "where": {          "birthday": {            "present": true          }        }      },      "sort": {        "column": "birthday",        "next": true      },      "slip": {        "title": "full_name",        "subtitle": null,        "trailing": null,        "photo": "avatar_key",        "toggle": "own_birthdays__wish",        "toggle_style": "switch",        "caption": {          "dates": [            "birthday"          ],          "near": 30,          "date_form": "turns"        }      },      "tile": {        "face": "slip-list"      },      "face": "cards",      "card": {        "face": "birthday",        "fields": [          {            "slot": "title",            "column": "full_name"          },          {            "slot": "subtitle",            "column": "city"          },          {            "slot": "date",            "column": "birthday"          },          {            "slot": "turns",            "column": "birthday"          },          {            "slot": "photo",            "column": "avatar_key"          },          {            "slot": "wishes",            "column": "own_birthdays__wish"          },          {            "slot": "last_wished",            "column": "own_birthdays__last_wished"          }        ]      }    }  ],  "id": "birthdays",  "name": "Birthdays",  "purpose": "Whose birthday is coming up, and how old they turn.",  "card_stock": "rose",  "tables": [],  "contributes": [    {      "table": "person",      "column": {        "key": "wish",        "name": "Send wishes",        "type": "bool"      }    },    {      "table": "person",      "column": {        "key": "last_wished",        "name": "Last wished",        "type": "date"      }    }  ],  "instructions": "Birthdays reads people and their birthdays (the birthday on each person record: day and month, the year when known; set it with update_person). Birthday wishes is the people the owner sends wishes to: the 'Send wishes' switch on a person (own_birthdays__wish). Everyone is every person with a birthday. Both views run soonest birthday first. Never guess which person a birthday belongs to: ask the owner when a name could be more than one person.",  "automations": [],  "author": {    "device": "cotton",    "name": "Cotton"  },  "signature": null}