diff --git a/docs/HITL_Docs/PROMPTS_JAZ.md b/docs/HITL_Docs/PROMPTS_JAZ.md new file mode 100644 index 0000000..c1b1260 --- /dev/null +++ b/docs/HITL_Docs/PROMPTS_JAZ.md @@ -0,0 +1,11 @@ +Read through the ARCHITECTURE.md and FUNCTIONAL.md files get to grips with the project +My task is to create a component that displays: + +- A section header +- A question +- an input for the user to answer the question +- an additional input for the user to declare 'actions' +- a skip button +- a submit button + Don't do any styling, I will handle that later. I just want a template component that I can edit. + Do you have any questions for me regarding the task? If not, please suggest some code for me diff --git a/package-lock.json b/package-lock.json index 512a5fa..f6cf519 100644 --- a/package-lock.json +++ b/package-lock.json @@ -105,9 +105,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.4.tgz", - "integrity": "sha512-t3yaEOuGu9NlIZ+hIeGbBjFtZT7j2cb2tg0fuaJKeGotchRjjLfrBA9Kwf8quhpP1EUuxModQg04q/mBwyg8uA==", + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.6.tgz", + "integrity": "sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==", "dev": true, "license": "MIT", "engines": { @@ -1087,9 +1087,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.1.tgz", - "integrity": "sha512-NELNvyEWZ6R9QMkiytB4/L4zSEaBC03KIXEghptLGLZWJ6VPrL63ooZQCOnlx36aQPGhzuOMwDerC1Eb2VmrLw==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.42.0.tgz", + "integrity": "sha512-gldmAyS9hpj+H6LpRNlcjQWbuKUtb94lodB9uCz71Jm+7BxK1VIOo7y62tZZwxhA7j1ylv/yQz080L5WkS+LoQ==", "cpu": [ "arm" ], @@ -1101,9 +1101,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.1.tgz", - "integrity": "sha512-DXdQe1BJ6TK47ukAoZLehRHhfKnKg9BjnQYUu9gzhI8Mwa1d2fzxA1aw2JixHVl403bwp1+/o/NhhHtxWJBgEA==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.42.0.tgz", + "integrity": "sha512-bpRipfTgmGFdCZDFLRvIkSNO1/3RGS74aWkJJTFJBH7h3MRV4UijkaEUeOMbi9wxtxYmtAbVcnMtHTPBhLEkaw==", "cpu": [ "arm64" ], @@ -1115,9 +1115,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.1.tgz", - "integrity": "sha512-5afxvwszzdulsU2w8JKWwY8/sJOLPzf0e1bFuvcW5h9zsEg+RQAojdW0ux2zyYAz7R8HvvzKCjLNJhVq965U7w==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.42.0.tgz", + "integrity": "sha512-JxHtA081izPBVCHLKnl6GEA0w3920mlJPLh89NojpU2GsBSB6ypu4erFg/Wx1qbpUbepn0jY4dVWMGZM8gplgA==", "cpu": [ "arm64" ], @@ -1129,9 +1129,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.1.tgz", - "integrity": "sha512-egpJACny8QOdHNNMZKf8xY0Is6gIMz+tuqXlusxquWu3F833DcMwmGM7WlvCO9sB3OsPjdC4U0wHw5FabzCGZg==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.42.0.tgz", + "integrity": "sha512-rv5UZaWVIJTDMyQ3dCEK+m0SAn6G7H3PRc2AZmExvbDvtaDc+qXkei0knQWcI3+c9tEs7iL/4I4pTQoPbNL2SA==", "cpu": [ "x64" ], @@ -1143,9 +1143,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.1.tgz", - "integrity": "sha512-DBVMZH5vbjgRk3r0OzgjS38z+atlupJ7xfKIDJdZZL6sM6wjfDNo64aowcLPKIx7LMQi8vybB56uh1Ftck/Atg==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.42.0.tgz", + "integrity": "sha512-fJcN4uSGPWdpVmvLuMtALUFwCHgb2XiQjuECkHT3lWLZhSQ3MBQ9pq+WoWeJq2PrNxr9rPM1Qx+IjyGj8/c6zQ==", "cpu": [ "arm64" ], @@ -1157,9 +1157,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.1.tgz", - "integrity": "sha512-3FkydeohozEskBxNWEIbPfOE0aqQgB6ttTkJ159uWOFn42VLyfAiyD9UK5mhu+ItWzft60DycIN1Xdgiy8o/SA==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.42.0.tgz", + "integrity": "sha512-CziHfyzpp8hJpCVE/ZdTizw58gr+m7Y2Xq5VOuCSrZR++th2xWAz4Nqk52MoIIrV3JHtVBhbBsJcAxs6NammOQ==", "cpu": [ "x64" ], @@ -1171,9 +1171,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.1.tgz", - "integrity": "sha512-wC53ZNDgt0pqx5xCAgNunkTzFE8GTgdZ9EwYGVcg+jEjJdZGtq9xPjDnFgfFozQI/Xm1mh+D9YlYtl+ueswNEg==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.42.0.tgz", + "integrity": "sha512-UsQD5fyLWm2Fe5CDM7VPYAo+UC7+2Px4Y+N3AcPh/LdZu23YcuGPegQly++XEVaC8XUTFVPscl5y5Cl1twEI4A==", "cpu": [ "arm" ], @@ -1185,9 +1185,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.1.tgz", - "integrity": "sha512-jwKCca1gbZkZLhLRtsrka5N8sFAaxrGz/7wRJ8Wwvq3jug7toO21vWlViihG85ei7uJTpzbXZRcORotE+xyrLA==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.42.0.tgz", + "integrity": "sha512-/i8NIrlgc/+4n1lnoWl1zgH7Uo0XK5xK3EDqVTf38KvyYgCU/Rm04+o1VvvzJZnVS5/cWSd07owkzcVasgfIkQ==", "cpu": [ "arm" ], @@ -1199,9 +1199,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.1.tgz", - "integrity": "sha512-g0UBcNknsmmNQ8V2d/zD2P7WWfJKU0F1nu0k5pW4rvdb+BIqMm8ToluW/eeRmxCared5dD76lS04uL4UaNgpNA==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.42.0.tgz", + "integrity": "sha512-eoujJFOvoIBjZEi9hJnXAbWg+Vo1Ov8n/0IKZZcPZ7JhBzxh2A+2NFyeMZIRkY9iwBvSjloKgcvnjTbGKHE44Q==", "cpu": [ "arm64" ], @@ -1213,9 +1213,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.1.tgz", - "integrity": "sha512-XZpeGB5TKEZWzIrj7sXr+BEaSgo/ma/kCgrZgL0oo5qdB1JlTzIYQKel/RmhT6vMAvOdM2teYlAaOGJpJ9lahg==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.42.0.tgz", + "integrity": "sha512-/3NrcOWFSR7RQUQIuZQChLND36aTU9IYE4j+TB40VU78S+RA0IiqHR30oSh6P1S9f9/wVOenHQnacs/Byb824g==", "cpu": [ "arm64" ], @@ -1227,9 +1227,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.1.tgz", - "integrity": "sha512-bkCfDJ4qzWfFRCNt5RVV4DOw6KEgFTUZi2r2RuYhGWC8WhCA8lCAJhDeAmrM/fdiAH54m0mA0Vk2FGRPyzI+tw==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.42.0.tgz", + "integrity": "sha512-O8AplvIeavK5ABmZlKBq9/STdZlnQo7Sle0LLhVA7QT+CiGpNVe197/t8Aph9bhJqbDVGCHpY2i7QyfEDDStDg==", "cpu": [ "loong64" ], @@ -1241,9 +1241,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.1.tgz", - "integrity": "sha512-3mr3Xm+gvMX+/8EKogIZSIEF0WUu0HL9di+YWlJpO8CQBnoLAEL/roTCxuLncEdgcfJcvA4UMOf+2dnjl4Ut1A==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.42.0.tgz", + "integrity": "sha512-6Qb66tbKVN7VyQrekhEzbHRxXXFFD8QKiFAwX5v9Xt6FiJ3BnCVBuyBxa2fkFGqxOCSGGYNejxd8ht+q5SnmtA==", "cpu": [ "ppc64" ], @@ -1255,9 +1255,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.1.tgz", - "integrity": "sha512-3rwCIh6MQ1LGrvKJitQjZFuQnT2wxfU+ivhNBzmxXTXPllewOF7JR1s2vMX/tWtUYFgphygxjqMl76q4aMotGw==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.42.0.tgz", + "integrity": "sha512-KQETDSEBamQFvg/d8jajtRwLNBlGc3aKpaGiP/LvEbnmVUKlFta1vqJqTrvPtsYsfbE/DLg5CC9zyXRX3fnBiA==", "cpu": [ "riscv64" ], @@ -1269,9 +1269,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.1.tgz", - "integrity": "sha512-LdIUOb3gvfmpkgFZuccNa2uYiqtgZAz3PTzjuM5bH3nvuy9ty6RGc/Q0+HDFrHrizJGVpjnTZ1yS5TNNjFlklw==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.42.0.tgz", + "integrity": "sha512-qMvnyjcU37sCo/tuC+JqeDKSuukGAd+pVlRl/oyDbkvPJ3awk6G6ua7tyum02O3lI+fio+eM5wsVd66X0jQtxw==", "cpu": [ "riscv64" ], @@ -1283,9 +1283,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.1.tgz", - "integrity": "sha512-oIE6M8WC9ma6xYqjvPhzZYk6NbobIURvP/lEbh7FWplcMO6gn7MM2yHKA1eC/GvYwzNKK/1LYgqzdkZ8YFxR8g==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.42.0.tgz", + "integrity": "sha512-I2Y1ZUgTgU2RLddUHXTIgyrdOwljjkmcZ/VilvaEumtS3Fkuhbw4p4hgHc39Ypwvo2o7sBFNl2MquNvGCa55Iw==", "cpu": [ "s390x" ], @@ -1297,9 +1297,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.1.tgz", - "integrity": "sha512-cWBOvayNvA+SyeQMp79BHPK8ws6sHSsYnK5zDcsC3Hsxr1dgTABKjMnMslPq1DvZIp6uO7kIWhiGwaTdR4Og9A==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.42.0.tgz", + "integrity": "sha512-Gfm6cV6mj3hCUY8TqWa63DB8Mx3NADoFwiJrMpoZ1uESbK8FQV3LXkhfry+8bOniq9pqY1OdsjFWNsSbfjPugw==", "cpu": [ "x64" ], @@ -1311,9 +1311,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.1.tgz", - "integrity": "sha512-y5CbN44M+pUCdGDlZFzGGBSKCA4A/J2ZH4edTYSSxFg7ce1Xt3GtydbVKWLlzL+INfFIZAEg1ZV6hh9+QQf9YQ==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.42.0.tgz", + "integrity": "sha512-g86PF8YZ9GRqkdi0VoGlcDUb4rYtQKyTD1IVtxxN4Hpe7YqLBShA7oHMKU6oKTCi3uxwW4VkIGnOaH/El8de3w==", "cpu": [ "x64" ], @@ -1325,9 +1325,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.1.tgz", - "integrity": "sha512-lZkCxIrjlJlMt1dLO/FbpZbzt6J/A8p4DnqzSa4PWqPEUUUnzXLeki/iyPLfV0BmHItlYgHUqJe+3KiyydmiNQ==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.42.0.tgz", + "integrity": "sha512-+axkdyDGSp6hjyzQ5m1pgcvQScfHnMCcsXkx8pTgy/6qBmWVhtRVlgxjWwDp67wEXXUr0x+vD6tp5W4x6V7u1A==", "cpu": [ "arm64" ], @@ -1339,9 +1339,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.1.tgz", - "integrity": "sha512-+psFT9+pIh2iuGsxFYYa/LhS5MFKmuivRsx9iPJWNSGbh2XVEjk90fmpUEjCnILPEPJnikAU6SFDiEUyOv90Pg==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.42.0.tgz", + "integrity": "sha512-F+5J9pelstXKwRSDq92J0TEBXn2nfUrQGg+HK1+Tk7VOL09e0gBqUHugZv7SW4MGrYj41oNCUe3IKCDGVlis2g==", "cpu": [ "ia32" ], @@ -1353,9 +1353,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.1.tgz", - "integrity": "sha512-Wq2zpapRYLfi4aKxf2Xff0tN+7slj2d4R87WEzqw7ZLsVvO5zwYCIuEGSZYiK41+GlwUo1HiR+GdkLEJnCKTCw==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.42.0.tgz", + "integrity": "sha512-LpHiJRwkaVz/LqjHjK8LCi8osq7elmpwujwbXKNW88bM8eeGxavJIKKjkjpMHAh/2xfnrt1ZSnhTv41WYUHYmA==", "cpu": [ "x64" ], @@ -1367,9 +1367,9 @@ ] }, "node_modules/@supabase/auth-js": { - "version": "2.69.1", - "resolved": "https://registry.npmjs.org/@supabase/auth-js/-/auth-js-2.69.1.tgz", - "integrity": "sha512-FILtt5WjCNzmReeRLq5wRs3iShwmnWgBvxHfqapC/VoljJl+W8hDAyFmf1NVw3zH+ZjZ05AKxiKxVeb0HNWRMQ==", + "version": "2.70.0", + "resolved": "https://registry.npmjs.org/@supabase/auth-js/-/auth-js-2.70.0.tgz", + "integrity": "sha512-BaAK/tOAZFJtzF1sE3gJ2FwTjLf4ky3PSvcvLGEgEmO4BSBkwWKu8l67rLLIBZPDnCyV7Owk2uPyKHa0kj5QGg==", "license": "MIT", "dependencies": { "@supabase/node-fetch": "^2.6.14" @@ -1406,9 +1406,9 @@ } }, "node_modules/@supabase/realtime-js": { - "version": "2.11.9", - "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-2.11.9.tgz", - "integrity": "sha512-fLseWq8tEPCO85x3TrV9Hqvk7H4SGOqnFQ223NPJSsxjSYn0EmzU1lvYO6wbA0fc8DE94beCAiiWvGvo4g33lQ==", + "version": "2.11.10", + "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-2.11.10.tgz", + "integrity": "sha512-SJKVa7EejnuyfImrbzx+HaD9i6T784khuw1zP+MBD7BmJYChegGxYigPzkKX8CK8nGuDntmeSD3fvriaH0EGZA==", "license": "MIT", "dependencies": { "@supabase/node-fetch": "^2.6.13", @@ -1427,16 +1427,16 @@ } }, "node_modules/@supabase/supabase-js": { - "version": "2.49.9", - "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.49.9.tgz", - "integrity": "sha512-lB2A2X8k1aWAqvlpO4uZOdfvSuZ2s0fCMwJ1Vq6tjWsi3F+au5lMbVVn92G0pG8gfmis33d64Plkm6eSDs6jRA==", + "version": "2.50.0", + "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.50.0.tgz", + "integrity": "sha512-M1Gd5tPaaghYZ9OjeO1iORRqbTWFEz/cF3pPubRnMPzA+A8SiUsXXWDP+DWsASZcjEcVEcVQIAF38i5wrijYOg==", "license": "MIT", "dependencies": { - "@supabase/auth-js": "2.69.1", + "@supabase/auth-js": "2.70.0", "@supabase/functions-js": "2.4.4", "@supabase/node-fetch": "2.6.15", "@supabase/postgrest-js": "1.19.4", - "@supabase/realtime-js": "2.11.9", + "@supabase/realtime-js": "2.11.10", "@supabase/storage-js": "2.7.1" } }, @@ -1975,9 +1975,9 @@ "license": "MIT" }, "node_modules/@types/estree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", - "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, "license": "MIT" }, @@ -1989,9 +1989,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.15.29", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.29.tgz", - "integrity": "sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==", + "version": "22.15.30", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.30.tgz", + "integrity": "sha512-6Q7lr06bEHdlfplU6YRbgG1SFBdlsfNC4/lX+SkhiTs0cpJkOElmWls8PxDFv4yY/xKb8Y6SO0OmSX4wgqTZbA==", "license": "MIT", "dependencies": { "undici-types": "~6.21.0" @@ -2297,15 +2297,15 @@ } }, "node_modules/@vitest/expect": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.1.tgz", - "integrity": "sha512-FqS/BnDOzV6+IpxrTg5GQRyLOCtcJqkwMwcS8qGCI2IyRVDwPAtutztaf1CjtPHlZlWtl1yUPCd7HM0cNiDOYw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.2.tgz", + "integrity": "sha512-ipHw0z669vEMjzz3xQE8nJX1s0rQIb7oEl4jjl35qWTwm/KIHERIg/p/zORrjAaZKXfsv7IybcNGHwhOOAPMwQ==", "dev": true, "license": "MIT", "dependencies": { "@types/chai": "^5.2.2", - "@vitest/spy": "3.2.1", - "@vitest/utils": "3.2.1", + "@vitest/spy": "3.2.2", + "@vitest/utils": "3.2.2", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" }, @@ -2314,13 +2314,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.1.tgz", - "integrity": "sha512-OXxMJnx1lkB+Vl65Re5BrsZEHc90s5NMjD23ZQ9NlU7f7nZiETGoX4NeKZSmsKjseuMq2uOYXdLOeoM0pJU+qw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.2.tgz", + "integrity": "sha512-jKojcaRyIYpDEf+s7/dD3LJt53c0dPfp5zCPXz9H/kcGrSlovU/t1yEaNzM9oFME3dcd4ULwRI/x0Po1Zf+LTw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.2.1", + "@vitest/spy": "3.2.2", "estree-walker": "^3.0.3", "magic-string": "^0.30.17" }, @@ -2351,9 +2351,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.1.tgz", - "integrity": "sha512-xBh1X2GPlOGBupp6E1RcUQWIxw0w/hRLd3XyBS6H+dMdKTAqHDNsIR2AnJwPA3yYe9DFy3VUKTe3VRTrAiQ01g==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.2.tgz", + "integrity": "sha512-FY4o4U1UDhO9KMd2Wee5vumwcaHw7Vg4V7yR4Oq6uK34nhEJOmdRYrk3ClburPRUA09lXD/oXWZ8y/Sdma0aUQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2364,13 +2364,13 @@ } }, "node_modules/@vitest/runner": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.1.tgz", - "integrity": "sha512-kygXhNTu/wkMYbwYpS3z/9tBe0O8qpdBuC3dD/AW9sWa0LE/DAZEjnHtWA9sIad7lpD4nFW1yQ+zN7mEKNH3yA==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.2.tgz", + "integrity": "sha512-GYcHcaS3ejGRZYed2GAkvsjBeXIEerDKdX3orQrBJqLRiea4NSS9qvn9Nxmuy1IwIB+EjFOaxXnX79l8HFaBwg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "3.2.1", + "@vitest/utils": "3.2.2", "pathe": "^2.0.3" }, "funding": { @@ -2378,13 +2378,13 @@ } }, "node_modules/@vitest/snapshot": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.1.tgz", - "integrity": "sha512-5xko/ZpW2Yc65NVK9Gpfg2y4BFvcF+At7yRT5AHUpTg9JvZ4xZoyuRY4ASlmNcBZjMslV08VRLDrBOmUe2YX3g==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.2.tgz", + "integrity": "sha512-aMEI2XFlR1aNECbBs5C5IZopfi5Lb8QJZGGpzS8ZUHML5La5wCbrbhLOVSME68qwpT05ROEEOAZPRXFpxZV2wA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.2.1", + "@vitest/pretty-format": "3.2.2", "magic-string": "^0.30.17", "pathe": "^2.0.3" }, @@ -2393,9 +2393,9 @@ } }, "node_modules/@vitest/spy": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.1.tgz", - "integrity": "sha512-Nbfib34Z2rfcJGSetMxjDCznn4pCYPZOtQYox2kzebIJcgH75yheIKd5QYSFmR8DIZf2M8fwOm66qSDIfRFFfQ==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.2.tgz", + "integrity": "sha512-6Utxlx3o7pcTxvp0u8kUiXtRFScMrUg28KjB3R2hon7w4YqOFAEA9QwzPVVS1QNL3smo4xRNOpNZClRVfpMcYg==", "dev": true, "license": "MIT", "dependencies": { @@ -2406,13 +2406,13 @@ } }, "node_modules/@vitest/utils": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.1.tgz", - "integrity": "sha512-KkHlGhePEKZSub5ViknBcN5KEF+u7dSUr9NW8QsVICusUojrgrOnnY3DEWWO877ax2Pyopuk2qHmt+gkNKnBVw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.2.tgz", + "integrity": "sha512-qJYMllrWpF/OYfWHP32T31QCaLa3BAzT/n/8mNGhPdVcjY+JYazQFO1nsJvXU12Kp1xMpNY4AGuljPTNjQve6A==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.2.1", + "@vitest/pretty-format": "3.2.2", "loupe": "^3.1.3", "tinyrainbow": "^2.0.0" }, @@ -3378,9 +3378,9 @@ } }, "node_modules/esrap": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/esrap/-/esrap-1.4.6.tgz", - "integrity": "sha512-F/D2mADJ9SHY3IwksD4DAXjTt7qt7GWUf3/8RhCNWmC/67tyb55dpimHmy7EplakFaflV0R/PC+fdSPqrRHAQw==", + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/esrap/-/esrap-1.4.7.tgz", + "integrity": "sha512-0ZxW6guTF/AeKeKi7he93lmgv7Hx7giD1tBrOeVqkqsZGQJd2/kfnL7LdIsr9FT/AtkBK9XeDTov+gxprBqdEg==", "dev": true, "license": "MIT", "dependencies": { @@ -5270,9 +5270,9 @@ } }, "node_modules/rollup": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.1.tgz", - "integrity": "sha512-cPmwD3FnFv8rKMBc1MxWCwVQFxwf1JEmSX3iQXrRVVG15zerAIXRjMFVWnd5Q5QvgKF7Aj+5ykXFhUl+QGnyOw==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.42.0.tgz", + "integrity": "sha512-LW+Vse3BJPyGJGAJt1j8pWDKPd73QM8cRXYK1IxOBgL2AGLu7Xd2YOW0M2sLUBCkF5MshXXtMApyEAEzMVMsnw==", "dev": true, "license": "MIT", "dependencies": { @@ -5286,29 +5286,36 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.41.1", - "@rollup/rollup-android-arm64": "4.41.1", - "@rollup/rollup-darwin-arm64": "4.41.1", - "@rollup/rollup-darwin-x64": "4.41.1", - "@rollup/rollup-freebsd-arm64": "4.41.1", - "@rollup/rollup-freebsd-x64": "4.41.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.41.1", - "@rollup/rollup-linux-arm-musleabihf": "4.41.1", - "@rollup/rollup-linux-arm64-gnu": "4.41.1", - "@rollup/rollup-linux-arm64-musl": "4.41.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.41.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.41.1", - "@rollup/rollup-linux-riscv64-gnu": "4.41.1", - "@rollup/rollup-linux-riscv64-musl": "4.41.1", - "@rollup/rollup-linux-s390x-gnu": "4.41.1", - "@rollup/rollup-linux-x64-gnu": "4.41.1", - "@rollup/rollup-linux-x64-musl": "4.41.1", - "@rollup/rollup-win32-arm64-msvc": "4.41.1", - "@rollup/rollup-win32-ia32-msvc": "4.41.1", - "@rollup/rollup-win32-x64-msvc": "4.41.1", + "@rollup/rollup-android-arm-eabi": "4.42.0", + "@rollup/rollup-android-arm64": "4.42.0", + "@rollup/rollup-darwin-arm64": "4.42.0", + "@rollup/rollup-darwin-x64": "4.42.0", + "@rollup/rollup-freebsd-arm64": "4.42.0", + "@rollup/rollup-freebsd-x64": "4.42.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.42.0", + "@rollup/rollup-linux-arm-musleabihf": "4.42.0", + "@rollup/rollup-linux-arm64-gnu": "4.42.0", + "@rollup/rollup-linux-arm64-musl": "4.42.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.42.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.42.0", + "@rollup/rollup-linux-riscv64-gnu": "4.42.0", + "@rollup/rollup-linux-riscv64-musl": "4.42.0", + "@rollup/rollup-linux-s390x-gnu": "4.42.0", + "@rollup/rollup-linux-x64-gnu": "4.42.0", + "@rollup/rollup-linux-x64-musl": "4.42.0", + "@rollup/rollup-win32-arm64-msvc": "4.42.0", + "@rollup/rollup-win32-ia32-msvc": "4.42.0", + "@rollup/rollup-win32-x64-msvc": "4.42.0", "fsevents": "~2.3.2" } }, + "node_modules/rollup/node_modules/@types/estree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "dev": true, + "license": "MIT" + }, "node_modules/rrweb-cssom": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.8.0.tgz", @@ -5651,9 +5658,9 @@ } }, "node_modules/svelte": { - "version": "5.33.14", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.33.14.tgz", - "integrity": "sha512-kRlbhIlMTijbFmVDQFDeKXPLlX1/ovXwV0I162wRqQhRcygaqDIcu1d/Ese3H2uI+yt3uT8E7ndgDthQv5v5BA==", + "version": "5.33.16", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.33.16.tgz", + "integrity": "sha512-bZZtbOXghLrLtOFRfVB1tYzM7Q9Ir3vKBWDKSq0onw3SR3W9LltqNIAP6smWipWTGl2cosjNzYcTxdhb9KV4Ug==", "dev": true, "license": "MIT", "dependencies": { @@ -6101,9 +6108,9 @@ } }, "node_modules/vite-node": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.1.tgz", - "integrity": "sha512-V4EyKQPxquurNJPtQJRZo8hKOoKNBRIhxcDbQFPFig0JdoWcUhwRgK8yoCXXrfYVPKS6XwirGHPszLnR8FbjCA==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.2.tgz", + "integrity": "sha512-Xj/jovjZvDXOq2FgLXu8NsY4uHUMWtzVmMC2LkCu9HWdr9Qu1Is5sanX3Z4jOFKdohfaWDnEJWp9pRP0vVpAcA==", "dev": true, "license": "MIT", "dependencies": { @@ -6143,20 +6150,20 @@ } }, "node_modules/vitest": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.1.tgz", - "integrity": "sha512-VZ40MBnlE1/V5uTgdqY3DmjUgZtIzsYq758JGlyQrv5syIsaYcabkfPkEuWML49Ph0D/SoqpVFd0dyVTr551oA==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.2.tgz", + "integrity": "sha512-fyNn/Rp016Bt5qvY0OQvIUCwW2vnaEBLxP42PmKbNIoasSYjML+8xyeADOPvBe+Xfl/ubIw4og7Lt9jflRsCNw==", "dev": true, "license": "MIT", "dependencies": { "@types/chai": "^5.2.2", - "@vitest/expect": "3.2.1", - "@vitest/mocker": "3.2.1", - "@vitest/pretty-format": "^3.2.1", - "@vitest/runner": "3.2.1", - "@vitest/snapshot": "3.2.1", - "@vitest/spy": "3.2.1", - "@vitest/utils": "3.2.1", + "@vitest/expect": "3.2.2", + "@vitest/mocker": "3.2.2", + "@vitest/pretty-format": "^3.2.2", + "@vitest/runner": "3.2.2", + "@vitest/snapshot": "3.2.2", + "@vitest/spy": "3.2.2", + "@vitest/utils": "3.2.2", "chai": "^5.2.0", "debug": "^4.4.1", "expect-type": "^1.2.1", @@ -6170,7 +6177,7 @@ "tinypool": "^1.1.0", "tinyrainbow": "^2.0.0", "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", - "vite-node": "3.2.1", + "vite-node": "3.2.2", "why-is-node-running": "^2.3.0" }, "bin": { @@ -6186,8 +6193,8 @@ "@edge-runtime/vm": "*", "@types/debug": "^4.1.12", "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.2.1", - "@vitest/ui": "3.2.1", + "@vitest/browser": "3.2.2", + "@vitest/ui": "3.2.2", "happy-dom": "*", "jsdom": "*" }, @@ -6513,9 +6520,9 @@ "license": "MIT" }, "node_modules/zod": { - "version": "3.25.51", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.51.tgz", - "integrity": "sha512-TQSnBldh+XSGL+opiSIq0575wvDPqu09AqWe1F7JhUMKY+M91/aGlK4MhpVNO7MgYfHcVCB1ffwAUTJzllKJqg==", + "version": "3.25.56", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.56.tgz", + "integrity": "sha512-rd6eEF3BTNvQnR2e2wwolfTmUTnp70aUTqr0oaGbHifzC3BKJsoV+Gat8vxUMR1hwOKBs6El+qWehrHbCpW6SQ==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" diff --git a/package.json b/package.json index d29de1c..bc2063f 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "format:check": "prettier . --check", "format": "prettier . --write", "test:unit": "vitest", - "test": "npm run test:unit -- --run" + "test": "npm run test:unit -- --run", + "db:reset": "supabase db reset && ./scripts/seed-test-data.sh" }, "devDependencies": { "@eslint/compat": "^1.2.5", diff --git a/src/app.css b/src/app.css index 34a745b..fb09b38 100644 --- a/src/app.css +++ b/src/app.css @@ -24,7 +24,7 @@ body { .dev { margin: 1rem; - outline: 2px dashed var(--color-teal); + outline: 2px solid var(--color-teal); padding: 1rem; } diff --git a/src/lib/components/cards/QuestionCard.svelte b/src/lib/components/cards/QuestionCard.svelte new file mode 100644 index 0000000..c07fae0 --- /dev/null +++ b/src/lib/components/cards/QuestionCard.svelte @@ -0,0 +1,153 @@ + + +{#await getData() then response} + {#if response.question && response.question.data} +
+
+

{response.question.data.category}

+
+ + + +
+ + +
+ +
+

A description of what actions are for

+ + + +
+ + +
+
+ +
+ + +
+
+ {:else} +
+ Sorry! We can't load you're questions right now. Please try again later. +
+ {/if} +{/await} + + diff --git a/src/lib/components/footer.svelte b/src/lib/components/footer.svelte deleted file mode 100644 index f7f4f2f..0000000 --- a/src/lib/components/footer.svelte +++ /dev/null @@ -1,17 +0,0 @@ - - - \ No newline at end of file diff --git a/src/lib/components/layouts/Footer.svelte b/src/lib/components/layouts/Footer.svelte new file mode 100644 index 0000000..af55b6a --- /dev/null +++ b/src/lib/components/layouts/Footer.svelte @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/src/lib/components/header.svelte b/src/lib/components/layouts/Header.svelte similarity index 73% rename from src/lib/components/header.svelte rename to src/lib/components/layouts/Header.svelte index 043d822..c6cd317 100644 --- a/src/lib/components/header.svelte +++ b/src/lib/components/layouts/Header.svelte @@ -1,11 +1,9 @@
@@ -25,7 +23,7 @@ diff --git a/src/lib/components/ui/ToggleStatus.svelte b/src/lib/components/ui/ToggleStatus.svelte new file mode 100644 index 0000000..2c3725a --- /dev/null +++ b/src/lib/components/ui/ToggleStatus.svelte @@ -0,0 +1,21 @@ + + +
+
+ + +
+ {isPublic} +
diff --git a/src/lib/components/view/list.svelte b/src/lib/components/view/list.svelte deleted file mode 100644 index 95e84b9..0000000 --- a/src/lib/components/view/list.svelte +++ /dev/null @@ -1,30 +0,0 @@ - - -
-
-

List View

- - -
- -
- {#each [...Array(entries)] as _, i} - - {/each} -
-
\ No newline at end of file diff --git a/src/lib/components/view/dash.svelte b/src/lib/components/views/Dash.svelte similarity index 64% rename from src/lib/components/view/dash.svelte rename to src/lib/components/views/Dash.svelte index 2773642..1a27703 100644 --- a/src/lib/components/view/dash.svelte +++ b/src/lib/components/views/Dash.svelte @@ -1,43 +1,43 @@ @@ -52,7 +52,7 @@

Loading...

{:then result} {#if result && result.data} - {:else} @@ -69,8 +69,8 @@ {:then result} {#if result.data} {#each getCategories(result.data) as category} - {/each} {:else} diff --git a/src/lib/components/view/detail.svelte b/src/lib/components/views/Detail.svelte similarity index 100% rename from src/lib/components/view/detail.svelte rename to src/lib/components/views/Detail.svelte diff --git a/src/lib/components/views/List.svelte b/src/lib/components/views/List.svelte new file mode 100644 index 0000000..c62bd92 --- /dev/null +++ b/src/lib/components/views/List.svelte @@ -0,0 +1,70 @@ + + +
+
+

List View

+ + +
+ +
+ {#if list.raw == "actions"} + {#await queryActions} +

Loading...

+ {:then result} + {#if result.data} + {#each result.data as action} + + {/each} + {/if} + {:catch error} +

Error: {error.message}

+ {/await} + {:else if list.raw} + {#await queryQuestions} +

Loading...

+ {:then result} + {#if result.data} + {#each result.data as question} + + {/each} + {/if} + {:catch error} +

Error: {error.message}

+ {/await} + {:else} +
+

No list selected

+
+ {/if} +
+
\ No newline at end of file diff --git a/src/lib/types/main.ts b/src/lib/types/main.ts index ace2b5e..e1e3615 100644 --- a/src/lib/types/main.ts +++ b/src/lib/types/main.ts @@ -1,63 +1,64 @@ -import type { User, Employer, Pronouns } from "./sub"; +import type { User, Employer, Pronouns } from './sub'; export type Input = Profile | Question | Response | Action | Share; export interface Profile { - id?: string; - name: string; - user: User; - pronouns?: Pronouns; - jobTitle?: string; - employer: Employer + id?: string; + name: string; + user: User; + pronouns?: Pronouns; + jobTitle?: string; + employer: Employer; } export interface Question { - id?: string, - category: string, - question_text: string, - order: number + id?: string; + category: string; + question_text: string; + order: number; + preview: string; } export interface Response { - id?: string, - user_id: string, - question_id: string, - response_text: string, - status?: "answered" | "skipped", - visibility: "public" | "private", - version: number, - is_latest: boolean, - created_at?: string, // TODO: Temporal() - updated_at?: string, // TODO: Temporal() - shares?: Share[] // sharing_event_responses + id?: string; + user_id: string; + question_id: string; + response_text: string; + status?: 'answered' | 'skipped'; + visibility: 'public' | 'private'; + version: number; + is_latest: boolean; + created_at?: string; // TODO: Temporal() + updated_at?: string; // TODO: Temporal() + shares?: Share[]; // sharing_event_responses } export interface Action { - id?: string, - user_id: string, - response_id?: string, - type: string, - description?: string, - version: number, - is_latest: boolean, - status: "draft" | "active" | "archived", - created_at?: string, // TODO: Temporal() - updated_at?: string // TODO: Temporal(), - shares?: Share[] // sharing_event_actions + id?: string; + user_id: string; + response_id?: string; + type: string; + description?: string; + version: number; + is_latest: boolean; + status: 'draft' | 'active' | 'archived'; + created_at?: string; // TODO: Temporal() + updated_at?: string; // TODO: Temporal(), + shares?: Share[]; // sharing_event_actions } export interface Share { - id?: string, - user_id: string, - recipient_email?: string, - /* note: Recipient Email + id?: string; + user_id: string; + recipient_email?: string; + /* note: Recipient Email This makes sense for now, as the manager email is just a prop on the Profile However, there's a line manager id prop earmarked for later use If a table is implemented for Line Managers, this prop should be replaced by a foreign key to it */ - message?: string, - responses?: Response[], // sharing_event_responses - actions?: Action[], // sharing_event_actions - shared_at?: string // TODO: Temporal() -} \ No newline at end of file + message?: string; + responses?: Response[]; // sharing_event_responses + actions?: Action[]; // sharing_event_actions + shared_at?: string; // TODO: Temporal() +} diff --git a/src/lib/types/supabase.ts b/src/lib/types/supabase.ts index d924dc5..fc2c430 100644 --- a/src/lib/types/supabase.ts +++ b/src/lib/types/supabase.ts @@ -132,18 +132,21 @@ export type Database = { id: string order: number question_text: string + preview: string } Insert: { category: string id?: string order: number question_text: string + preview: string } - Update: { + Update: { category?: string id?: string order?: number question_text?: string + preview?: string } Relationships: [] } diff --git a/src/lib/types/ui.ts b/src/lib/types/ui.ts index ab50f4f..08e18c2 100644 --- a/src/lib/types/ui.ts +++ b/src/lib/types/ui.ts @@ -4,4 +4,9 @@ export interface ActionCheck { count: number; } +export type ListCategory = { + raw: string; + format: string; +}; + export type View = "dash" | "list" | "detail"; \ No newline at end of file diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index d84e25e..9cbc43b 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,25 +1,34 @@
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 599b500..8249e81 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,19 +1,31 @@
- {#if getView() === "dash"} + {#if view === "dash"} - {:else if getView() === "list"} + {:else if view === "list"} - {:else if getView() === "detail"} + {:else if view === "detail"} + {:else} +
No view selected
{/if} -
\ No newline at end of file + + + \ No newline at end of file diff --git a/supabase/migrations/20250528170555_schema_tweaks.sql b/supabase/migrations/20250528170555_schema_tweaks.sql index 80b18e8..aa53292 100644 --- a/supabase/migrations/20250528170555_schema_tweaks.sql +++ b/supabase/migrations/20250528170555_schema_tweaks.sql @@ -1,14 +1,10 @@ -- 1. Auth: No Changes -- 2. Profiles: Pronoun Arrays - -- Pronouns - -- Change pronouns to text array with exactly 3 elements - -- This means we can assign pronouns intelligently - -- ["he", "him", "his"] - -- ["they", "them", "theirs"] - alter table profiles - alter column pronouns type text[] using array[pronouns, '', ''], - add constraint pronouns_length_check check (array_length(pronouns, 1) = 3); + -- Change pronouns to text array with exactly 3 elements + alter table profiles + alter column pronouns type text[] using array[pronouns, '', ''], + add constraint pronouns_length_check check (array_length(pronouns, 1) = 3); -- 3. Questions: Unique Order Numbers -- Order diff --git a/supabase/migrations/20250609170556_item_previews.sql b/supabase/migrations/20250609170556_item_previews.sql new file mode 100644 index 0000000..dff131f --- /dev/null +++ b/supabase/migrations/20250609170556_item_previews.sql @@ -0,0 +1,2 @@ +-- Add a new column to the questions table called "preview" + alter table questions add column preview text; \ No newline at end of file diff --git a/supabase/seed.sql b/supabase/seed.sql index d37e5b2..8867ce2 100644 --- a/supabase/seed.sql +++ b/supabase/seed.sql @@ -1,18 +1,18 @@ -- Seed data for questions table -- This file populates the questions table with initial data -INSERT INTO questions (category, question_text, "order") VALUES - ('wellbeing', 'Is there anything either inside or outside of work that may affect your wellbeing, that you think we should know about?', 1), - ('wellbeing', 'Please describe how you are when you are having a good day.', 2), - ('wellbeing', 'Please describe how you are when you are having a bad, or not-so-good day. Sometimes people mask what''s really going on for them, so this may be things not visible to others.', 3), - ('wellbeing', 'If things are not going so well, are you aware of any early warning signs that would be useful for us to learn? What action can we take when we recognise your early warning signs? Please include how you would like us to approach and raise this with you, along with what we can and cannot do to help or support you.', 4), - ('wellbeing', 'The following symptoms are indications that I am not well enough to be at work', 5), - ('parental', 'Do you have any parental or caring responsibilities that you think it would be helpful for us to know about?', 6), - ('parental', 'What arrangements or support do you need from us to fulfil your role as parent or carer? This may include looking after your own wellbeing as well as that of the person you are a parent or carer for.', 7), - ('religious', 'Are there any arrangements or support you need from us which will enable you to take part in any religious practices? This may include space to pray or holidays you observe.', 8), - ('religious', 'Is there anything else you think would be helpful for us to know about your religion or belief? This may include dietary needs for work events.', 9), - ('disability', 'Use this space to give a brief description of the impact your disability or long-term condition may have at work. You may need to split this up if you have multiple conditions.', 10), - ('disability', 'Are there any barriers which are impacting on your ability to perform in your job?', 11), - ('What support or understanding do you need from us?', 'Share the information about your work needs that would be helpful for your colleagues.', 12), - ('employer_Support', 'What do you need to thrive in your role here at Islington? There is space in the next section to outline specific workplace adjustments.', 13), - ('personal_Introduction', 'Is there anything you think would be helpful for your colleagues to know? How should this be shared?', 14); \ No newline at end of file +INSERT INTO questions (category, question_text, "order", preview) VALUES + ('my_wellbeing', 'Is there anything either inside or outside of work that may affect your wellbeing, that you think we should know about?', 1, 'External Wellbeing Factors'), + ('my_wellbeing', 'Please describe how you are when you are having a good day.', 2, 'On a Good Day'), + ('my_wellbeing', 'Please describe how you are when you are having a bad, or not-so-good day. Sometimes people mask what''s really going on for them, so this may be things not visible to others.', 3, 'On a Bad Day'), + ('my_wellbeing', 'If things are not going so well, are you aware of any early warning signs that would be useful for us to learn? What action can we take when we recognise your early warning signs? Please include how you would like us to approach and raise this with you, along with what we can and cannot do to help or support you.', 4, 'Early Warning Signals'), + ('my_wellbeing', 'The following symptoms are indications that I am not well enough to be at work', 5, 'Symptoms I Experience'), + ('my_responsibilities', 'Do you have any parental or caring responsibilities that you think it would be helpful for us to know about?', 6, 'My Parental & Caring Responsibilities'), + ('my_responsibilities', 'What arrangements or support do you need from us to fulfil your role as parent or carer? This may include looking after your own wellbeing as well as that of the person you are a parent or carer for.', 7, 'Supporting My Parental & Caring Responsibilities'), + ('my_religion', 'Are there any arrangements or support you need from us which will enable you to take part in any religious practices? This may include space to pray or holidays you observe.', 8, 'My Religious Practices'), + ('my_religion', 'Is there anything else you think would be helpful for us to know about your religion or belief? This may include dietary needs for work events.', 9, 'Other Religious Requirements'), + ('my_conditions', 'Use this space to give a brief description of the impact your disability or long-term condition may have at work. You may need to split this up if you have multiple conditions.', 10, 'My Disability or Long-Term Condition'), + ('my_conditions', 'Are there any barriers which are impacting on your ability to perform in your job?', 11, 'Current Barriers'), + ('my_support_needs', 'Share the information about your work needs that would be helpful for your colleagues.', 12, 'What I Need'), + ('my_support_needs', 'What do you need to thrive in your role here at Islington? There is space in the next section to outline specific workplace adjustments.', 13, 'My Workplace Adjustments'), + ('about_me', 'Is there anything you think would be helpful for your colleagues to know? How should this be shared?', 14, 'Things to Know About Me'); \ No newline at end of file diff --git a/supabase/test_data_seed.sql b/supabase/test_data_seed.sql index 5b8b200..9ded36c 100644 --- a/supabase/test_data_seed.sql +++ b/supabase/test_data_seed.sql @@ -116,7 +116,7 @@ SELECT 1, false, NOW() - INTERVAL '2 months' -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 1; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 1; -- Updated version of the same question INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest, created_at) @@ -130,7 +130,7 @@ SELECT 2, true, NOW() - INTERVAL '2 weeks' -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 1; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 1; INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) SELECT @@ -142,7 +142,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 2; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 2; INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) SELECT @@ -154,7 +154,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 3; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 3; INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) SELECT @@ -166,7 +166,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 4; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 4; -- Parental responsibilities INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) @@ -179,7 +179,7 @@ SELECT 'private', 1, true -FROM questions q WHERE q.category = 'parental' AND q."order" = 6; +FROM questions q WHERE q.category = 'my_responsibilities' AND q."order" = 6; -- Support needs INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) @@ -192,7 +192,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'employer_Support' AND q."order" = 13; +FROM questions q WHERE q.category = 'my_support_needs' AND q."order" = 13; -- =========================================== -- JORDAN MARTINEZ - UX Designer (Anxiety + Chronic Fatigue) @@ -208,7 +208,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 1; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 1; INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) SELECT @@ -220,7 +220,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 2; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 2; INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) SELECT @@ -232,7 +232,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 3; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 3; INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) SELECT @@ -244,7 +244,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 4; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 4; -- Disability details INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) @@ -257,7 +257,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'disability' AND q."order" = 10; +FROM questions q WHERE q.category = 'my_conditions' AND q."order" = 10; -- Religious needs INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) @@ -270,7 +270,7 @@ SELECT 'private', 1, true -FROM questions q WHERE q.category = 'religious' AND q."order" = 8; +FROM questions q WHERE q.category = 'my_religion' AND q."order" = 8; -- =========================================== -- SAM CHEN - Data Analyst (Autism) @@ -286,7 +286,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 1; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 1; INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) SELECT @@ -298,7 +298,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 2; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 2; INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) SELECT @@ -310,7 +310,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 3; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 3; -- Parental responsibilities INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) @@ -323,7 +323,7 @@ SELECT 'private', 1, true -FROM questions q WHERE q.category = 'parental' AND q."order" = 6; +FROM questions q WHERE q.category = 'my_responsibilities' AND q."order" = 6; -- Personal introduction INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) @@ -336,7 +336,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'personal_Introduction' AND q."order" = 14; +FROM questions q WHERE q.category = 'about_me' AND q."order" = 14; -- =========================================== -- PRIYA PATEL - Product Manager (Depression + Diabetes) @@ -352,7 +352,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 1; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 1; INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) SELECT @@ -364,7 +364,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 2; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 2; -- Updated version of good days response INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest, created_at) @@ -378,7 +378,7 @@ SELECT 2, false, NOW() - INTERVAL '1 week' -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 2; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 2; -- Latest version INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) @@ -391,7 +391,7 @@ SELECT 'public', 3, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 2; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 2; INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) SELECT @@ -403,7 +403,7 @@ SELECT 'private', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 3; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 3; -- Disability barriers INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) @@ -416,7 +416,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'disability' AND q."order" = 11; +FROM questions q WHERE q.category = 'my_conditions' AND q."order" = 11; -- =========================================== -- TAYLOR ADAMS - Marketing Specialist (Dyslexia) @@ -432,7 +432,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 1; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 1; INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) SELECT @@ -444,7 +444,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 2; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 2; INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) SELECT @@ -456,7 +456,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 3; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 3; INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) SELECT @@ -468,7 +468,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'wellbeing' AND q."order" = 4; +FROM questions q WHERE q.category = 'my_wellbeing' AND q."order" = 4; -- Support needs INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) @@ -481,7 +481,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'employer_Support' AND q."order" = 13; +FROM questions q WHERE q.category = 'my_support_needs' AND q."order" = 13; -- Colleague information INSERT INTO responses (id, user_id, question_id, response_text, status, visibility, version, is_latest) @@ -494,7 +494,7 @@ SELECT 'public', 1, true -FROM questions q WHERE q.category = 'personal_Introduction' AND q."order" = 14; +FROM questions q WHERE q.category = 'about_me' AND q."order" = 14; -- Insert comprehensive fake actions linked to responses