Cotton code
89 lines · 1.6 KB · JSONRaw
{  "format_version": 1,  "id": "kitchen_ingredient",  "name": "Ingredient",  "plural": "Ingredients",  "picture": null,  "builtin": false,  "engine": null,  "visibility": "staff",  "columns": [    {      "key": "name",      "name": "Ingredient",      "type": "text",      "required": true    },    {      "key": "unit",      "name": "Unit",      "type": "text",      "placeholder": "kg"    },    {      "key": "in_stock",      "name": "In stock",      "type": "number",      "computed": {        "rollup": {          "table": "kitchen_stock",          "link": "ingredient",          "op": "sum",          "column": "quantity"        }      },      "reading": "{value} in stock"    }  ],  "title": "name",  "date": null,  "project": null,  "order": null,  "slip": {    "title": "name",    "photo": null,    "toggle": null,    "subtitle": [      "unit"    ],    "trailing": "in_stock"  },  "tile": {    "face": "slip-list"  },  "page": [    {      "heading": null,      "columns": [        "name",        "unit",        "in_stock"      ]    }  ],  "sort": {    "column": "name",    "descending": false  },  "empty": {    "title": "No ingredients",    "message": "Add what the kitchen keeps in stock."  },  "instructions": "One row per ingredient. In stock is the sum of its stock rows.",  "card": {    "face": "plain",    "fields": [      {        "slot": "title",        "column": "name"      },      {        "slot": "facts",        "column": "in_stock",        "also": [          "unit"        ]      }    ]  }}