Cotton code
114 lines · 2.1 KB · JSONRaw
{  "format_version": 1,  "id": "kitchen_stock",  "name": "Stock",  "plural": "Stock",  "picture": {    "photo": "photo:072fe138acfaba464f7566b2b41423b63097301abb4a5683db1b57f32c8fef28"  },  "builtin": false,  "engine": null,  "visibility": "staff",  "columns": [    {      "key": "name",      "name": "Stock",      "type": "text",      "required": true    },    {      "key": "ingredient",      "name": "Ingredient",      "type": "link",      "link_to": "kitchen_ingredient",      "required": true,      "contributes": {        "label": "Stock"      }    },    {      "key": "quantity",      "name": "Quantity",      "type": "number",      "required": true    },    {      "key": "on",      "name": "On",      "type": "date",      "required": true    },    {      "key": "reason",      "name": "Why",      "type": "choice",      "choices": [        "bought",        "used",        "spoilt",        "counted"      ],      "format": "words"    }  ],  "title": "name",  "date": "on",  "project": null,  "order": null,  "slip": {    "title": "name",    "photo": null,    "toggle": null,    "subtitle": [      "ingredient",      "reason"    ],    "trailing": "quantity"  },  "tile": {    "face": "slip-list"  },  "page": [    {      "heading": null,      "columns": [        "name",        "ingredient",        "quantity",        "on",        "reason"      ]    }  ],  "sort": {    "column": "on",    "descending": true,    "tie": "name"  },  "empty": {    "title": "No stock rows",    "message": "Each time stock comes in or goes out, add a row."  },  "instructions": "One row per movement of stock: a positive quantity came in, a negative one was used or thrown away. What is in stock is the sum of rows, never a number kept.",  "card": {    "face": "plain",    "fields": [      {        "slot": "title",        "column": "name"      },      {        "slot": "subtitle",        "column": "reason"      },      {        "slot": "date",        "column": "on"      },      {        "slot": "facts",        "column": "quantity"      }    ]  }}