From 5ab346379a4c6ce9f6c3025b3120677cff8583ae Mon Sep 17 00:00:00 2001 From: rjsdn0 Date: Thu, 1 Feb 2024 21:14:26 +0900 Subject: [PATCH 01/21] fix: wrong environt variable in schema db --- packages/api/prisma/schema.prisma | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api/prisma/schema.prisma b/packages/api/prisma/schema.prisma index d48e49df..df9cec09 100644 --- a/packages/api/prisma/schema.prisma +++ b/packages/api/prisma/schema.prisma @@ -5,7 +5,7 @@ generator client { datasource db { provider = "mysql" - url = env("DB_URL") + url = env("DATABASE_URL") } model Agenda { From cf09b49e2006ac7c2e950a03c77be1053d4fea34 Mon Sep 17 00:00:00 2001 From: rjsdn0 Date: Thu, 1 Feb 2024 21:13:00 +0900 Subject: [PATCH 02/21] feat: identified vote schema --- packages/api/prisma/schema.prisma | 10 +- pnpm-lock.yaml | 309 +++++++++++++++--------------- 2 files changed, 159 insertions(+), 160 deletions(-) diff --git a/packages/api/prisma/schema.prisma b/packages/api/prisma/schema.prisma index df9cec09..05b01381 100644 --- a/packages/api/prisma/schema.prisma +++ b/packages/api/prisma/schema.prisma @@ -13,6 +13,9 @@ model Agenda { title String resolution String content String + // type AgendaType + isNamed Boolean @default(false) + isPublic Boolean @default(true) startAt DateTime? @map("start_at") endAt DateTime? @map("end_at") createdAt DateTime @default(now()) @map("created_at") @@ -24,6 +27,11 @@ model Agenda { @@map("agenda") } +// type AgendaType { +// named Boolean @default(false) +// private Boolean @default(false) +// } + model User { id Int @id @default(autoincrement()) username String @unique @@ -122,4 +130,4 @@ enum ChatType { notice @@map("chat_type") -} +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e63dabb6..7a3436ae 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -136,15 +136,6 @@ importers: specifier: ^3.21.4 version: 3.22.2 - packages/rpc: - dependencies: - socket.io-client: - specifier: ^4.5.4 - version: 4.5.4 - zod: - specifier: ^3.21.4 - version: 3.22.2 - packages/web: dependencies: '@emotion/react': @@ -232,8 +223,8 @@ packages: chalk: 2.4.2 /@babel/code-frame@7.23.5: - resolution: { integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} + engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.23.4 chalk: 2.4.2 @@ -245,8 +236,8 @@ packages: dev: true /@babel/compat-data@7.23.5: - resolution: { integrity: sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==} + engines: {node: '>=6.9.0'} dev: true /@babel/core@7.22.11: @@ -273,8 +264,8 @@ packages: dev: true /@babel/core@7.23.7: - resolution: { integrity: sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==} + engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 '@babel/code-frame': 7.23.5 @@ -306,8 +297,8 @@ packages: dev: true /@babel/generator@7.23.6: - resolution: { integrity: sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==} + engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.23.6 '@jridgewell/gen-mapping': 0.3.3 @@ -327,8 +318,8 @@ packages: dev: true /@babel/helper-compilation-targets@7.23.6: - resolution: { integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} + engines: {node: '>=6.9.0'} dependencies: '@babel/compat-data': 7.23.5 '@babel/helper-validator-option': 7.23.5 @@ -338,8 +329,8 @@ packages: dev: true /@babel/helper-environment-visitor@7.22.20: - resolution: { integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} + engines: {node: '>=6.9.0'} dev: true /@babel/helper-environment-visitor@7.22.5: @@ -356,8 +347,8 @@ packages: dev: true /@babel/helper-function-name@7.23.0: - resolution: { integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} + engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.15 '@babel/types': 7.23.6 @@ -371,8 +362,8 @@ packages: dev: true /@babel/helper-module-imports@7.22.15: - resolution: { integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} + engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.23.6 dev: true @@ -398,8 +389,8 @@ packages: dev: true /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.7): - resolution: { integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: @@ -435,13 +426,13 @@ packages: engines: {node: '>=6.9.0'} /@babel/helper-string-parser@7.23.4: - resolution: { integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==} + engines: {node: '>=6.9.0'} dev: true /@babel/helper-validator-identifier@7.22.20: - resolution: { integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} + engines: {node: '>=6.9.0'} dev: true /@babel/helper-validator-identifier@7.22.5: @@ -454,8 +445,8 @@ packages: dev: true /@babel/helper-validator-option@7.23.5: - resolution: { integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} + engines: {node: '>=6.9.0'} dev: true /@babel/helpers@7.22.11: @@ -470,8 +461,8 @@ packages: dev: true /@babel/helpers@7.23.8: - resolution: { integrity: sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ==} + engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.15 '@babel/traverse': 7.23.7 @@ -489,8 +480,8 @@ packages: js-tokens: 4.0.0 /@babel/highlight@7.23.4: - resolution: { integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} + engines: {node: '>=6.9.0'} dependencies: '@babel/helper-validator-identifier': 7.22.20 chalk: 2.4.2 @@ -506,15 +497,15 @@ packages: dev: true /@babel/parser@7.23.6: - resolution: { integrity: sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ== } - engines: { node: '>=6.0.0' } + resolution: {integrity: sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==} + engines: {node: '>=6.0.0'} hasBin: true dependencies: '@babel/types': 7.23.6 dev: true /@babel/plugin-transform-react-jsx-self@7.23.3(@babel/core@7.23.7): - resolution: { integrity: sha512-qXRvbeKDSfwnlJnanVRp0SfuWE5DQhwQr5xtLBzp56Wabyo+4CMosF6Kfp+eOD/4FYpql64XVJ2W0pVLlJZxOQ== } + resolution: {integrity: sha512-qXRvbeKDSfwnlJnanVRp0SfuWE5DQhwQr5xtLBzp56Wabyo+4CMosF6Kfp+eOD/4FYpql64XVJ2W0pVLlJZxOQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -524,7 +515,7 @@ packages: dev: true /@babel/plugin-transform-react-jsx-source@7.23.3(@babel/core@7.23.7): - resolution: { integrity: sha512-91RS0MDnAWDNvGC6Wio5XYkyWI39FMFO+JK9+4AlgaTH+yWwVTsw7/sn6LK0lH7c5F+TFkpv/3LfCJ1Ydwof/g== } + resolution: {integrity: sha512-91RS0MDnAWDNvGC6Wio5XYkyWI39FMFO+JK9+4AlgaTH+yWwVTsw7/sn6LK0lH7c5F+TFkpv/3LfCJ1Ydwof/g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -540,8 +531,8 @@ packages: regenerator-runtime: 0.14.0 /@babel/template@7.22.15: - resolution: { integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} + engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.23.5 '@babel/parser': 7.23.6 @@ -576,8 +567,8 @@ packages: dev: true /@babel/traverse@7.23.7: - resolution: { integrity: sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==} + engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.23.5 '@babel/generator': 7.23.6 @@ -602,8 +593,8 @@ packages: to-fast-properties: 2.0.0 /@babel/types@7.23.6: - resolution: { integrity: sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg== } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==} + engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.23.4 '@babel/helper-validator-identifier': 7.22.20 @@ -929,16 +920,16 @@ packages: dev: false /@esbuild/aix-ppc64@0.19.11: - resolution: { integrity: sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g== } - engines: { node: '>=12' } - cpu: [ ppc64 ] - os: [ aix ] + resolution: {integrity: sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] requiresBuild: true dev: true optional: true /@esbuild/android-arm64@0.19.11: - resolution: { integrity: sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q== } + resolution: {integrity: sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -947,7 +938,7 @@ packages: optional: true /@esbuild/android-arm@0.19.11: - resolution: { integrity: sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw== } + resolution: {integrity: sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -956,7 +947,7 @@ packages: optional: true /@esbuild/android-x64@0.19.11: - resolution: { integrity: sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg== } + resolution: {integrity: sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -965,7 +956,7 @@ packages: optional: true /@esbuild/darwin-arm64@0.19.11: - resolution: { integrity: sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ== } + resolution: {integrity: sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -974,7 +965,7 @@ packages: optional: true /@esbuild/darwin-x64@0.19.11: - resolution: { integrity: sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g== } + resolution: {integrity: sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -983,7 +974,7 @@ packages: optional: true /@esbuild/freebsd-arm64@0.19.11: - resolution: { integrity: sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA== } + resolution: {integrity: sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -992,7 +983,7 @@ packages: optional: true /@esbuild/freebsd-x64@0.19.11: - resolution: { integrity: sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw== } + resolution: {integrity: sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -1001,7 +992,7 @@ packages: optional: true /@esbuild/linux-arm64@0.19.11: - resolution: { integrity: sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg== } + resolution: {integrity: sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -1010,7 +1001,7 @@ packages: optional: true /@esbuild/linux-arm@0.19.11: - resolution: { integrity: sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q== } + resolution: {integrity: sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -1019,7 +1010,7 @@ packages: optional: true /@esbuild/linux-ia32@0.19.11: - resolution: { integrity: sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA== } + resolution: {integrity: sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -1028,7 +1019,7 @@ packages: optional: true /@esbuild/linux-loong64@0.19.11: - resolution: { integrity: sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg== } + resolution: {integrity: sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -1037,7 +1028,7 @@ packages: optional: true /@esbuild/linux-mips64el@0.19.11: - resolution: { integrity: sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg== } + resolution: {integrity: sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -1046,7 +1037,7 @@ packages: optional: true /@esbuild/linux-ppc64@0.19.11: - resolution: { integrity: sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA== } + resolution: {integrity: sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -1055,7 +1046,7 @@ packages: optional: true /@esbuild/linux-riscv64@0.19.11: - resolution: { integrity: sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ== } + resolution: {integrity: sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -1064,7 +1055,7 @@ packages: optional: true /@esbuild/linux-s390x@0.19.11: - resolution: { integrity: sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q== } + resolution: {integrity: sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -1073,7 +1064,7 @@ packages: optional: true /@esbuild/linux-x64@0.19.11: - resolution: { integrity: sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA== } + resolution: {integrity: sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -1082,7 +1073,7 @@ packages: optional: true /@esbuild/netbsd-x64@0.19.11: - resolution: { integrity: sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ== } + resolution: {integrity: sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -1091,7 +1082,7 @@ packages: optional: true /@esbuild/openbsd-x64@0.19.11: - resolution: { integrity: sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw== } + resolution: {integrity: sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -1100,7 +1091,7 @@ packages: optional: true /@esbuild/sunos-x64@0.19.11: - resolution: { integrity: sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ== } + resolution: {integrity: sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -1109,7 +1100,7 @@ packages: optional: true /@esbuild/win32-arm64@0.19.11: - resolution: { integrity: sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ== } + resolution: {integrity: sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -1118,7 +1109,7 @@ packages: optional: true /@esbuild/win32-ia32@0.19.11: - resolution: { integrity: sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg== } + resolution: {integrity: sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -1127,7 +1118,7 @@ packages: optional: true /@esbuild/win32-x64@0.19.11: - resolution: { integrity: sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw== } + resolution: {integrity: sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -1296,7 +1287,7 @@ packages: dev: false /@rollup/pluginutils@5.1.0: - resolution: { integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g== } + resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 @@ -1310,105 +1301,105 @@ packages: dev: true /@rollup/rollup-android-arm-eabi@4.9.5: - resolution: { integrity: sha512-idWaG8xeSRCfRq9KpRysDHJ/rEHBEXcHuJ82XY0yYFIWnLMjZv9vF/7DOq8djQ2n3Lk6+3qfSH8AqlmHlmi1MA== } - cpu: [ arm ] - os: [ android ] + resolution: {integrity: sha512-idWaG8xeSRCfRq9KpRysDHJ/rEHBEXcHuJ82XY0yYFIWnLMjZv9vF/7DOq8djQ2n3Lk6+3qfSH8AqlmHlmi1MA==} + cpu: [arm] + os: [android] requiresBuild: true dev: true optional: true /@rollup/rollup-android-arm64@4.9.5: - resolution: { integrity: sha512-f14d7uhAMtsCGjAYwZGv6TwuS3IFaM4ZnGMUn3aCBgkcHAYErhV1Ad97WzBvS2o0aaDv4mVz+syiN0ElMyfBPg== } - cpu: [ arm64 ] - os: [ android ] + resolution: {integrity: sha512-f14d7uhAMtsCGjAYwZGv6TwuS3IFaM4ZnGMUn3aCBgkcHAYErhV1Ad97WzBvS2o0aaDv4mVz+syiN0ElMyfBPg==} + cpu: [arm64] + os: [android] requiresBuild: true dev: true optional: true /@rollup/rollup-darwin-arm64@4.9.5: - resolution: { integrity: sha512-ndoXeLx455FffL68OIUrVr89Xu1WLzAG4n65R8roDlCoYiQcGGg6MALvs2Ap9zs7AHg8mpHtMpwC8jBBjZrT/w== } - cpu: [ arm64 ] - os: [ darwin ] + resolution: {integrity: sha512-ndoXeLx455FffL68OIUrVr89Xu1WLzAG4n65R8roDlCoYiQcGGg6MALvs2Ap9zs7AHg8mpHtMpwC8jBBjZrT/w==} + cpu: [arm64] + os: [darwin] requiresBuild: true dev: true optional: true /@rollup/rollup-darwin-x64@4.9.5: - resolution: { integrity: sha512-UmElV1OY2m/1KEEqTlIjieKfVwRg0Zwg4PLgNf0s3glAHXBN99KLpw5A5lrSYCa1Kp63czTpVll2MAqbZYIHoA== } - cpu: [ x64 ] - os: [ darwin ] + resolution: {integrity: sha512-UmElV1OY2m/1KEEqTlIjieKfVwRg0Zwg4PLgNf0s3glAHXBN99KLpw5A5lrSYCa1Kp63czTpVll2MAqbZYIHoA==} + cpu: [x64] + os: [darwin] requiresBuild: true dev: true optional: true /@rollup/rollup-linux-arm-gnueabihf@4.9.5: - resolution: { integrity: sha512-Q0LcU61v92tQB6ae+udZvOyZ0wfpGojtAKrrpAaIqmJ7+psq4cMIhT/9lfV6UQIpeItnq/2QDROhNLo00lOD1g== } - cpu: [ arm ] - os: [ linux ] + resolution: {integrity: sha512-Q0LcU61v92tQB6ae+udZvOyZ0wfpGojtAKrrpAaIqmJ7+psq4cMIhT/9lfV6UQIpeItnq/2QDROhNLo00lOD1g==} + cpu: [arm] + os: [linux] requiresBuild: true dev: true optional: true /@rollup/rollup-linux-arm64-gnu@4.9.5: - resolution: { integrity: sha512-dkRscpM+RrR2Ee3eOQmRWFjmV/payHEOrjyq1VZegRUa5OrZJ2MAxBNs05bZuY0YCtpqETDy1Ix4i/hRqX98cA== } - cpu: [ arm64 ] - os: [ linux ] + resolution: {integrity: sha512-dkRscpM+RrR2Ee3eOQmRWFjmV/payHEOrjyq1VZegRUa5OrZJ2MAxBNs05bZuY0YCtpqETDy1Ix4i/hRqX98cA==} + cpu: [arm64] + os: [linux] requiresBuild: true dev: true optional: true /@rollup/rollup-linux-arm64-musl@4.9.5: - resolution: { integrity: sha512-QaKFVOzzST2xzY4MAmiDmURagWLFh+zZtttuEnuNn19AiZ0T3fhPyjPPGwLNdiDT82ZE91hnfJsUiDwF9DClIQ== } - cpu: [ arm64 ] - os: [ linux ] + resolution: {integrity: sha512-QaKFVOzzST2xzY4MAmiDmURagWLFh+zZtttuEnuNn19AiZ0T3fhPyjPPGwLNdiDT82ZE91hnfJsUiDwF9DClIQ==} + cpu: [arm64] + os: [linux] requiresBuild: true dev: true optional: true /@rollup/rollup-linux-riscv64-gnu@4.9.5: - resolution: { integrity: sha512-HeGqmRJuyVg6/X6MpE2ur7GbymBPS8Np0S/vQFHDmocfORT+Zt76qu+69NUoxXzGqVP1pzaY6QIi0FJWLC3OPA== } - cpu: [ riscv64 ] - os: [ linux ] + resolution: {integrity: sha512-HeGqmRJuyVg6/X6MpE2ur7GbymBPS8Np0S/vQFHDmocfORT+Zt76qu+69NUoxXzGqVP1pzaY6QIi0FJWLC3OPA==} + cpu: [riscv64] + os: [linux] requiresBuild: true dev: true optional: true /@rollup/rollup-linux-x64-gnu@4.9.5: - resolution: { integrity: sha512-Dq1bqBdLaZ1Gb/l2e5/+o3B18+8TI9ANlA1SkejZqDgdU/jK/ThYaMPMJpVMMXy2uRHvGKbkz9vheVGdq3cJfA== } - cpu: [ x64 ] - os: [ linux ] + resolution: {integrity: sha512-Dq1bqBdLaZ1Gb/l2e5/+o3B18+8TI9ANlA1SkejZqDgdU/jK/ThYaMPMJpVMMXy2uRHvGKbkz9vheVGdq3cJfA==} + cpu: [x64] + os: [linux] requiresBuild: true dev: true optional: true /@rollup/rollup-linux-x64-musl@4.9.5: - resolution: { integrity: sha512-ezyFUOwldYpj7AbkwyW9AJ203peub81CaAIVvckdkyH8EvhEIoKzaMFJj0G4qYJ5sw3BpqhFrsCc30t54HV8vg== } - cpu: [ x64 ] - os: [ linux ] + resolution: {integrity: sha512-ezyFUOwldYpj7AbkwyW9AJ203peub81CaAIVvckdkyH8EvhEIoKzaMFJj0G4qYJ5sw3BpqhFrsCc30t54HV8vg==} + cpu: [x64] + os: [linux] requiresBuild: true dev: true optional: true /@rollup/rollup-win32-arm64-msvc@4.9.5: - resolution: { integrity: sha512-aHSsMnUw+0UETB0Hlv7B/ZHOGY5bQdwMKJSzGfDfvyhnpmVxLMGnQPGNE9wgqkLUs3+gbG1Qx02S2LLfJ5GaRQ== } - cpu: [ arm64 ] - os: [ win32 ] + resolution: {integrity: sha512-aHSsMnUw+0UETB0Hlv7B/ZHOGY5bQdwMKJSzGfDfvyhnpmVxLMGnQPGNE9wgqkLUs3+gbG1Qx02S2LLfJ5GaRQ==} + cpu: [arm64] + os: [win32] requiresBuild: true dev: true optional: true /@rollup/rollup-win32-ia32-msvc@4.9.5: - resolution: { integrity: sha512-AiqiLkb9KSf7Lj/o1U3SEP9Zn+5NuVKgFdRIZkvd4N0+bYrTOovVd0+LmYCPQGbocT4kvFyK+LXCDiXPBF3fyA== } - cpu: [ ia32 ] - os: [ win32 ] + resolution: {integrity: sha512-AiqiLkb9KSf7Lj/o1U3SEP9Zn+5NuVKgFdRIZkvd4N0+bYrTOovVd0+LmYCPQGbocT4kvFyK+LXCDiXPBF3fyA==} + cpu: [ia32] + os: [win32] requiresBuild: true dev: true optional: true /@rollup/rollup-win32-x64-msvc@4.9.5: - resolution: { integrity: sha512-1q+mykKE3Vot1kaFJIDoUFv5TuW+QQVaf2FmTT9krg86pQrGStOSJJ0Zil7CFagyxDuouTepzt5Y5TVzyajOdQ== } - cpu: [ x64 ] - os: [ win32 ] + resolution: {integrity: sha512-1q+mykKE3Vot1kaFJIDoUFv5TuW+QQVaf2FmTT9krg86pQrGStOSJJ0Zil7CFagyxDuouTepzt5Y5TVzyajOdQ==} + cpu: [x64] + os: [win32] requiresBuild: true dev: true optional: true @@ -1418,7 +1409,7 @@ packages: dev: false /@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.22.11): - resolution: { integrity: sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g== } + resolution: {integrity: sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==} engines: {node: '>=14'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1427,7 +1418,7 @@ packages: dev: true /@svgr/babel-plugin-remove-jsx-attribute@8.0.0(@babel/core@7.22.11): - resolution: { integrity: sha512-BcCkm/STipKvbCl6b7QFrMh/vx00vIP63k2eM66MfHJzPr6O2U0jYEViXkHJWqXqQYjdeA9cuCl5KWmlwjDvbA== } + resolution: {integrity: sha512-BcCkm/STipKvbCl6b7QFrMh/vx00vIP63k2eM66MfHJzPr6O2U0jYEViXkHJWqXqQYjdeA9cuCl5KWmlwjDvbA==} engines: {node: '>=14'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1436,7 +1427,7 @@ packages: dev: true /@svgr/babel-plugin-remove-jsx-empty-expression@8.0.0(@babel/core@7.22.11): - resolution: { integrity: sha512-5BcGCBfBxB5+XSDSWnhTThfI9jcO5f0Ai2V24gZpG+wXF14BzwxxdDb4g6trdOux0rhibGs385BeFMSmxtS3uA== } + resolution: {integrity: sha512-5BcGCBfBxB5+XSDSWnhTThfI9jcO5f0Ai2V24gZpG+wXF14BzwxxdDb4g6trdOux0rhibGs385BeFMSmxtS3uA==} engines: {node: '>=14'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1445,7 +1436,7 @@ packages: dev: true /@svgr/babel-plugin-replace-jsx-attribute-value@8.0.0(@babel/core@7.22.11): - resolution: { integrity: sha512-KVQ+PtIjb1BuYT3ht8M5KbzWBhdAjjUPdlMtpuw/VjT8coTrItWX6Qafl9+ji831JaJcu6PJNKCV0bp01lBNzQ== } + resolution: {integrity: sha512-KVQ+PtIjb1BuYT3ht8M5KbzWBhdAjjUPdlMtpuw/VjT8coTrItWX6Qafl9+ji831JaJcu6PJNKCV0bp01lBNzQ==} engines: {node: '>=14'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1454,7 +1445,7 @@ packages: dev: true /@svgr/babel-plugin-svg-dynamic-title@8.0.0(@babel/core@7.22.11): - resolution: { integrity: sha512-omNiKqwjNmOQJ2v6ge4SErBbkooV2aAWwaPFs2vUY7p7GhVkzRkJ00kILXQvRhA6miHnNpXv7MRnnSjdRjK8og== } + resolution: {integrity: sha512-omNiKqwjNmOQJ2v6ge4SErBbkooV2aAWwaPFs2vUY7p7GhVkzRkJ00kILXQvRhA6miHnNpXv7MRnnSjdRjK8og==} engines: {node: '>=14'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1463,7 +1454,7 @@ packages: dev: true /@svgr/babel-plugin-svg-em-dimensions@8.0.0(@babel/core@7.22.11): - resolution: { integrity: sha512-mURHYnu6Iw3UBTbhGwE/vsngtCIbHE43xCRK7kCw4t01xyGqb2Pd+WXekRRoFOBIY29ZoOhUCTEweDMdrjfi9g== } + resolution: {integrity: sha512-mURHYnu6Iw3UBTbhGwE/vsngtCIbHE43xCRK7kCw4t01xyGqb2Pd+WXekRRoFOBIY29ZoOhUCTEweDMdrjfi9g==} engines: {node: '>=14'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1472,7 +1463,7 @@ packages: dev: true /@svgr/babel-plugin-transform-react-native-svg@8.1.0(@babel/core@7.22.11): - resolution: { integrity: sha512-Tx8T58CHo+7nwJ+EhUwx3LfdNSG9R2OKfaIXXs5soiy5HtgoAEkDay9LIimLOcG8dJQH1wPZp/cnAv6S9CrR1Q== } + resolution: {integrity: sha512-Tx8T58CHo+7nwJ+EhUwx3LfdNSG9R2OKfaIXXs5soiy5HtgoAEkDay9LIimLOcG8dJQH1wPZp/cnAv6S9CrR1Q==} engines: {node: '>=14'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1481,7 +1472,7 @@ packages: dev: true /@svgr/babel-plugin-transform-svg-component@8.0.0(@babel/core@7.22.11): - resolution: { integrity: sha512-DFx8xa3cZXTdb/k3kfPeaixecQLgKh5NVBMwD0AQxOzcZawK4oo1Jh9LbrcACUivsCA7TLG8eeWgrDXjTMhRmw== } + resolution: {integrity: sha512-DFx8xa3cZXTdb/k3kfPeaixecQLgKh5NVBMwD0AQxOzcZawK4oo1Jh9LbrcACUivsCA7TLG8eeWgrDXjTMhRmw==} engines: {node: '>=12'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1490,7 +1481,7 @@ packages: dev: true /@svgr/babel-preset@8.1.0(@babel/core@7.22.11): - resolution: { integrity: sha512-7EYDbHE7MxHpv4sxvnVPngw5fuR6pw79SkcrILHJ/iMpuKySNCl5W1qcwPEpU+LgyRXOaAFgH0KhwD18wwg6ug== } + resolution: {integrity: sha512-7EYDbHE7MxHpv4sxvnVPngw5fuR6pw79SkcrILHJ/iMpuKySNCl5W1qcwPEpU+LgyRXOaAFgH0KhwD18wwg6ug==} engines: {node: '>=14'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1507,7 +1498,7 @@ packages: dev: true /@svgr/core@8.1.0: - resolution: { integrity: sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA== } + resolution: {integrity: sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==} engines: {node: '>=14'} dependencies: '@babel/core': 7.22.11 @@ -1520,7 +1511,7 @@ packages: dev: true /@svgr/hast-util-to-babel-ast@8.0.0: - resolution: { integrity: sha512-EbDKwO9GpfWP4jN9sGdYwPBU0kdomaPIL2Eu4YwmgP+sJeXT+L7bMwJUBnhzfH8Q2qMBqZ4fJwpCyYsAN3mt2Q== } + resolution: {integrity: sha512-EbDKwO9GpfWP4jN9sGdYwPBU0kdomaPIL2Eu4YwmgP+sJeXT+L7bMwJUBnhzfH8Q2qMBqZ4fJwpCyYsAN3mt2Q==} engines: {node: '>=14'} dependencies: '@babel/types': 7.22.11 @@ -1528,7 +1519,7 @@ packages: dev: true /@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0): - resolution: { integrity: sha512-0xiIyBsLlr8quN+WyuxooNW9RJ0Dpr8uOnH/xrCVO8GLUcwHISwj1AG0k+LFzteTkAA0GbX0kj9q6Dk70PTiPA== } + resolution: {integrity: sha512-0xiIyBsLlr8quN+WyuxooNW9RJ0Dpr8uOnH/xrCVO8GLUcwHISwj1AG0k+LFzteTkAA0GbX0kj9q6Dk70PTiPA==} engines: {node: '>=14'} peerDependencies: '@svgr/core': '*' @@ -1565,7 +1556,7 @@ packages: dev: false /@types/babel__core@7.20.5: - resolution: { integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== } + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} dependencies: '@babel/parser': 7.22.11 '@babel/types': 7.22.11 @@ -1575,20 +1566,20 @@ packages: dev: true /@types/babel__generator@7.6.8: - resolution: { integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw== } + resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} dependencies: '@babel/types': 7.22.11 dev: true /@types/babel__template@7.4.4: - resolution: { integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== } + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} dependencies: '@babel/parser': 7.22.11 '@babel/types': 7.22.11 dev: true /@types/babel__traverse@7.20.5: - resolution: { integrity: sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ== } + resolution: {integrity: sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==} dependencies: '@babel/types': 7.22.11 dev: true @@ -1616,7 +1607,7 @@ packages: '@types/node': 18.17.8 /@types/estree@1.0.5: - resolution: { integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== } + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} dev: true /@types/express-serve-static-core@4.17.36: @@ -1917,7 +1908,7 @@ packages: dev: true /@vitejs/plugin-react@4.2.1(vite@5.0.11): - resolution: { integrity: sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ== } + resolution: {integrity: sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^4.2.0 || ^5.0.0 @@ -2283,8 +2274,8 @@ packages: dev: true /browserslist@4.22.2: - resolution: { integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A== } - engines: { node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7 } + resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: caniuse-lite: 1.0.30001576 @@ -2336,7 +2327,7 @@ packages: dev: true /caniuse-lite@1.0.30001576: - resolution: { integrity: sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg== } + resolution: {integrity: sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg==} dev: true /chalk@2.4.2: @@ -2484,8 +2475,8 @@ packages: dev: true /concurrently@8.2.2: - resolution: { integrity: sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg== } - engines: { node: ^14.13.0 || >=16.0.0 } + resolution: {integrity: sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==} + engines: {node: ^14.13.0 || >=16.0.0} hasBin: true dependencies: chalk: 4.1.2 @@ -2544,7 +2535,7 @@ packages: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} /convert-source-map@2.0.0: - resolution: { integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== } + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: true /cookie-signature@1.0.6: @@ -2631,8 +2622,8 @@ packages: dev: true /date-fns@2.30.0: - resolution: { integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== } - engines: { node: '>=0.11' } + resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} + engines: {node: '>=0.11'} dependencies: '@babel/runtime': 7.22.11 dev: true @@ -2750,7 +2741,7 @@ packages: dev: false /dot-case@3.0.4: - resolution: { integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== } + resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} dependencies: no-case: 3.0.4 tslib: 2.6.2 @@ -2802,7 +2793,7 @@ packages: dev: true /electron-to-chromium@1.4.629: - resolution: { integrity: sha512-5UUkr3k3CZ/k+9Sw7vaaIMyOzMC0XbPyprKI3n0tbKDqkzTDOjK4izm7DxlkueRMim6ZZQ1ja9F7hoFVplHihA== } + resolution: {integrity: sha512-5UUkr3k3CZ/k+9Sw7vaaIMyOzMC0XbPyprKI3n0tbKDqkzTDOjK4izm7DxlkueRMim6ZZQ1ja9F7hoFVplHihA==} dev: true /emoji-regex@8.0.0: @@ -2973,7 +2964,7 @@ packages: dev: true /esbuild@0.19.11: - resolution: { integrity: sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA== } + resolution: {integrity: sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==} engines: {node: '>=12'} hasBin: true requiresBuild: true @@ -4385,7 +4376,7 @@ packages: js-tokens: 4.0.0 /lower-case@2.0.2: - resolution: { integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== } + resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} dependencies: tslib: 2.6.2 dev: true @@ -4540,7 +4531,7 @@ packages: dev: true /nanoid@3.3.7: - resolution: { integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== } + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true dev: true @@ -4559,7 +4550,7 @@ packages: dev: false /no-case@3.0.4: - resolution: { integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== } + resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} dependencies: lower-case: 2.0.2 tslib: 2.6.2 @@ -4570,7 +4561,7 @@ packages: dev: true /node-releases@2.0.14: - resolution: { integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== } + resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true /nodemon@2.0.22: @@ -4872,7 +4863,7 @@ packages: dev: true /postcss@8.4.33: - resolution: { integrity: sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg== } + resolution: {integrity: sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.7 @@ -5206,8 +5197,8 @@ packages: dev: true /rollup@4.9.5: - resolution: { integrity: sha512-E4vQW0H/mbNMw2yLSqJyjtkHY9dslf/p0zuT1xehNRqUTBOFMqEjguDvqhXr7N7r/4ttb2jr4T41d3dncmIgbQ== } - engines: { node: '>=18.0.0', npm: '>=8.0.0' } + resolution: {integrity: sha512-E4vQW0H/mbNMw2yLSqJyjtkHY9dslf/p0zuT1xehNRqUTBOFMqEjguDvqhXr7N7r/4ttb2jr4T41d3dncmIgbQ==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.5 @@ -5348,7 +5339,7 @@ packages: dev: true /shell-quote@1.8.1: - resolution: { integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== } + resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} dev: true /side-channel@1.0.4: @@ -5407,7 +5398,7 @@ packages: dev: true /snake-case@3.0.4: - resolution: { integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== } + resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} dependencies: dot-case: 3.0.4 tslib: 2.6.2 @@ -5474,7 +5465,7 @@ packages: dev: false /spawn-command@0.0.2: - resolution: { integrity: sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ== } + resolution: {integrity: sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==} dev: true /spdx-correct@3.2.0: @@ -5643,8 +5634,8 @@ packages: dev: true /supports-color@8.1.1: - resolution: { integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== } - engines: { node: '>=10' } + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} dependencies: has-flag: 4.0.0 dev: true @@ -5709,7 +5700,7 @@ packages: dev: true /tree-kill@1.2.2: - resolution: { integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== } + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true dev: true @@ -5952,7 +5943,7 @@ packages: dev: true /update-browserslist-db@1.0.13(browserslist@4.22.2): - resolution: { integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== } + resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -6041,7 +6032,7 @@ packages: dev: false /vite-plugin-svgr@4.2.0(vite@5.0.11): - resolution: { integrity: sha512-SC7+FfVtNQk7So0XMjrrtLAbEC8qjFPifyD7+fs/E6aaNdVde6umlVVh0QuwDLdOMu7vp5RiGFsB70nj5yo0XA== } + resolution: {integrity: sha512-SC7+FfVtNQk7So0XMjrrtLAbEC8qjFPifyD7+fs/E6aaNdVde6umlVVh0QuwDLdOMu7vp5RiGFsB70nj5yo0XA==} peerDependencies: vite: ^2.6.0 || 3 || 4 || 5 dependencies: @@ -6055,8 +6046,8 @@ packages: dev: true /vite@5.0.11(@types/node@20.4.7): - resolution: { integrity: sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA== } - engines: { node: ^18.0.0 || >=20.0.0 } + resolution: {integrity: sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@types/node': ^18.0.0 || >=20.0.0 From 412a83f96bdd358715ce41494247573d1cda5e8c Mon Sep 17 00:00:00 2001 From: rjsdn0 Date: Sat, 3 Feb 2024 16:36:42 +0900 Subject: [PATCH 03/21] feat: prisma migration --- .../api/prisma/migrations/20240202093215_api/migration.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 packages/api/prisma/migrations/20240202093215_api/migration.sql diff --git a/packages/api/prisma/migrations/20240202093215_api/migration.sql b/packages/api/prisma/migrations/20240202093215_api/migration.sql new file mode 100644 index 00000000..44e4178d --- /dev/null +++ b/packages/api/prisma/migrations/20240202093215_api/migration.sql @@ -0,0 +1,3 @@ +-- AlterTable +ALTER TABLE `agenda` ADD COLUMN `isNamed` BOOLEAN NOT NULL DEFAULT false, + ADD COLUMN `isPublic` BOOLEAN NOT NULL DEFAULT true; From 7edce79e6eca33afcadb9244754f5bde2d201b9c Mon Sep 17 00:00:00 2001 From: rjsdn0 Date: Thu, 8 Feb 2024 13:40:37 +0900 Subject: [PATCH 04/21] feat: merge identified vote back --- packages/api/src/service/admin.agenda.ts | 40 +++++++++++++++++++ packages/api/src/service/agenda.ts | 32 ++++++++++++--- packages/interface/src/admin/agenda/common.ts | 13 +++--- packages/interface/src/agenda/common.ts | 15 ++++++- .../AgendaCard/OngoingAgendaCard.tsx | 14 +++---- .../AgendaCard/TerminatedAgendaCard.tsx | 3 +- .../components/molecules/VoteParticipate.tsx | 15 +++++-- .../components/organisms/EditAgendaModal.tsx | 8 ++-- 8 files changed, 111 insertions(+), 29 deletions(-) diff --git a/packages/api/src/service/admin.agenda.ts b/packages/api/src/service/admin.agenda.ts index ce18062a..243fee56 100644 --- a/packages/api/src/service/admin.agenda.ts +++ b/packages/api/src/service/admin.agenda.ts @@ -31,10 +31,18 @@ const selectAgendaDefaultFields = { }, }; +const selectAgendaTypeFields = { + select: { + isNamed: true, + isPublic: true, + }, +}; + export const createAgenda = async ({ title, resolution, content, + type, choices, voters, }: schema.AdminAgendaCreate) => { @@ -42,6 +50,8 @@ export const createAgenda = async ({ title, resolution, content, + isNamed: type.named, + isPublic: type.public, choices: { create: choices.map(name => ({ name })), }, @@ -58,6 +68,7 @@ export const createAgenda = async ({ data: createAgendaQuery, select: { ...selectAgendaDefaultFields.select, + ...selectAgendaTypeFields.select, choices: true, voters: selectOnlyUser, }, @@ -65,6 +76,10 @@ export const createAgenda = async ({ const agendaVotable: PreparingAgenda = { ...createdAgenda, + type: { + named: createdAgenda.isNamed, + public: createdAgenda.isPublic, + }, status: "preparing", choices: createdChoices, voters: { @@ -117,6 +132,7 @@ export const startAgenda = async (agendaId: number, user: User) => { }, select: { ...selectAgendaDefaultFields.select, + ...selectAgendaTypeFields.select, choices: { include: { users: true, @@ -131,6 +147,10 @@ export const startAgenda = async (agendaId: number, user: User) => { const ongoingAgenda: OngoingAgenda = { ...updatedAgenda, status: "ongoing", + type: { + named: updatedAgenda.isNamed, + public: updatedAgenda.isPublic, + }, voters: { voted: 0, total: updatedVoters.length, @@ -163,6 +183,7 @@ export const terminateAgenda = async (agendaId: number, user: User) => { }, select: { ...selectAgendaDefaultFields.select, + ...selectAgendaTypeFields.select, choices: { include: { users: true, @@ -192,6 +213,10 @@ export const terminateAgenda = async (agendaId: number, user: User) => { // eslint-disable-next-line no-underscore-dangle count: choice._count.users, })), + type: { + named: updatedAgenda.isNamed, + public: updatedAgenda.isPublic, + }, voters: { voted: updatedChoices.reduce( (acc, choice) => acc + choice.users.length, @@ -254,6 +279,7 @@ export const updateAgenda = async (agendaUpdate: schema.AdminAgendaUpdate) => { }, select: { ...selectAgendaDefaultFields.select, + ...selectAgendaTypeFields.select, choices: true, voters: selectOnlyUser, }, @@ -274,6 +300,10 @@ export const updateAgenda = async (agendaUpdate: schema.AdminAgendaUpdate) => { id: choice.id, name: choice.name, })), + type: { + named: updatedAgenda.isNamed, + public: updatedAgenda.isPublic, + }, voters: { voted: 0, total: voters.length, @@ -298,6 +328,10 @@ export const updateAgenda = async (agendaUpdate: schema.AdminAgendaUpdate) => { name: choice.name, count: 0, })), + type: { + named: updatedAgenda.isNamed, + public: updatedAgenda.isPublic, + }, voters: { voted: [], total: voters.map(voter => voter.user), @@ -344,6 +378,7 @@ export const retrieveAll = async (): Promise => { where: { deletedAt: null }, select: { ...selectAgendaDefaultFields.select, + ...selectAgendaTypeFields.select, startAt: true, endAt: true, deletedAt: true, @@ -372,6 +407,11 @@ export const retrieveAll = async (): Promise => { content: agenda.content, resolution: agenda.resolution, status, + // TODO: remove workaround + type: { + named: agenda.isNamed, + public: agenda.isPublic, + }, choices: agenda.choices.map(choice => ({ id: choice.id, name: choice.name, diff --git a/packages/api/src/service/agenda.ts b/packages/api/src/service/agenda.ts index b56086af..f0ef8037 100644 --- a/packages/api/src/service/agenda.ts +++ b/packages/api/src/service/agenda.ts @@ -15,7 +15,17 @@ export const retrieveAll = async ( select: { id: true, name: true, - users: true, + users: { + select: { + userId: true, + choiceId: true, + user: { + select: { + displayName: true, + }, + }, + }, + }, }, }, }, @@ -32,11 +42,23 @@ export const retrieveAll = async ( title: agenda.title, content: agenda.content, resolution: agenda.resolution, + type: { named: agenda.isNamed, public: agenda.isPublic }, voters: { - voted: agenda.choices.reduce( - (acc, choice) => acc + choice.users.length, - 0, - ), + voted: agenda.isNamed + ? agenda.choices.reduce( + (acc, choice) => [ + ...acc, + ...choice.users.map(u => ({ + displayName: u.user.displayName, + choiceId: u.choiceId, + })), + ], + [] as { displayName: string; choiceId: number }[], + ) + : agenda.choices.reduce( + (acc, choice) => acc + choice.users.length, + 0, + ), total: agenda.voters.length, }, }; diff --git a/packages/interface/src/admin/agenda/common.ts b/packages/interface/src/admin/agenda/common.ts index fdb68d28..b5efa84d 100644 --- a/packages/interface/src/admin/agenda/common.ts +++ b/packages/interface/src/admin/agenda/common.ts @@ -7,22 +7,19 @@ import { User } from "@/user"; * AdminAgendaStatus * some description about admin agenda status type goes here */ -export const AdminAgendaStatus = z.enum([...AgendaStatus.options, "preparing"]); +export const AdminAgendaStatus = z.enum([...AgendaStatus.options]); export type AdminAgendaStatus = z.infer; /** * AdminAgenda * some description about admin agenda schema goes here */ -export const AdminAgenda = AgendaBase.omit({ - voters: true, - status: true, -}).extend({ +export const AdminAgenda = AgendaBase.extend({ + status: AdminAgendaStatus, voters: z.object({ voted: z.array(User), total: z.array(User), }), - status: AdminAgendaStatus, choices: z.array(ChoiceWithResult), }); export type AdminAgenda = z.infer; @@ -35,6 +32,10 @@ export const AdminAgendaCreate = z.object({ title: z.string().min(1).max(255), content: z.string().min(1).max(255), resolution: z.string().min(1).max(255), + type: z.object({ + named: z.boolean(), + public: z.boolean(), + }), choices: z.array(z.string().min(1).max(255)).min(1), voters: z.object({ total: z.array(z.number()), diff --git a/packages/interface/src/agenda/common.ts b/packages/interface/src/agenda/common.ts index bc1e50a6..66d79772 100644 --- a/packages/interface/src/agenda/common.ts +++ b/packages/interface/src/agenda/common.ts @@ -29,9 +29,22 @@ export const AgendaBase = z.object({ title: z.string(), content: z.string(), resolution: z.string(), + type: z.object({ + named: z.boolean(), + public: z.boolean(), + }), status: z.never(), // Must be overridden voters: z.object({ - voted: z.number(), + voted: z.union([ + z.number(), + z.array( + z.object({ + // userId: z.number(), + displayName: z.string(), + choiceId: z.number(), + }), + ), + ]), total: z.number(), }), }); diff --git a/packages/web/src/components/molecules/AgendaCard/OngoingAgendaCard.tsx b/packages/web/src/components/molecules/AgendaCard/OngoingAgendaCard.tsx index db257052..daf92592 100644 --- a/packages/web/src/components/molecules/AgendaCard/OngoingAgendaCard.tsx +++ b/packages/web/src/components/molecules/AgendaCard/OngoingAgendaCard.tsx @@ -18,11 +18,11 @@ interface OngoingAgendaProps { agenda: OngoingAgenda; } -const agendaTags = { - public: true, - identified: false, - votable: true, -}; +// const agendaTags = { +// public: true, +// identified: false, +// votable: true, +// }; export const OngoingAgendaCard: React.FC = ({ agenda }) => { const [chosenChoiceId, setChosenChoiceId] = useState(0); @@ -75,8 +75,8 @@ export const OngoingAgendaCard: React.FC = ({ agenda }) => {
diff --git a/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx b/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx index c3593c24..668e6172 100644 --- a/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx +++ b/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx @@ -51,6 +51,7 @@ export const TerminatedAgendaCard: React.FC = ({ agenda }) => {
@@ -60,7 +61,7 @@ export const TerminatedAgendaCard: React.FC = ({ agenda }) => { revealChoice={revealChoice} voted={agenda.user.voted != null} /> -
+
{agenda.choices.map(choice => ( = ({ voted, total }) => { +export const VoteParticipate: React.FC = ({ named, voted, total }) => { + const votedLength = named ? (voted as Array).length : voted; const [hover, setHover] = useState(false); const participantInfo = useMemo( () => hover - ? `투표 참여자 ${voted}명 / 투표 대상자 ${total}명` - : `${voted}/${total}`, + ? `투표 참여자 ${voted}명 /투표 대상자 ${total}명` + : `${votedLength}/${total}`, [hover], ); diff --git a/packages/web/src/components/organisms/EditAgendaModal.tsx b/packages/web/src/components/organisms/EditAgendaModal.tsx index 40005d63..cca946d1 100644 --- a/packages/web/src/components/organisms/EditAgendaModal.tsx +++ b/packages/web/src/components/organisms/EditAgendaModal.tsx @@ -53,7 +53,7 @@ export const EditAgendaModal: React.FC = () => { const onChangeTitle = (e: React.ChangeEvent) => { setTitle(e.target.value); }; - const onChangeContent = (e: React.ChangeEvent) => { + const onChangeContent = (e: React.ChangeEvent) => { setContent(e.target.value); }; const onChangeResolution = (e: React.ChangeEvent) => { @@ -119,6 +119,7 @@ export const EditAgendaModal: React.FC = () => { title, content, resolution, + type: targetAgenda?.type || { named: false, public: true }, voters: { total: voters, }, @@ -150,10 +151,7 @@ export const EditAgendaModal: React.FC = () => { - + Date: Thu, 15 Feb 2024 00:23:16 +0900 Subject: [PATCH 05/21] refactor: updated votedetail --- .../AgendaCard/TerminatedAgendaCard.tsx | 2 +- .../src/components/molecules/VoteDetail.tsx | 22 +++++++------------ 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx b/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx index 668e6172..dff1d3af 100644 --- a/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx +++ b/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx @@ -72,7 +72,7 @@ export const TerminatedAgendaCard: React.FC = ({ agenda }) => { ))}
- +
) : (
diff --git a/packages/web/src/components/molecules/VoteDetail.tsx b/packages/web/src/components/molecules/VoteDetail.tsx index 4d6e6f27..e490ae14 100644 --- a/packages/web/src/components/molecules/VoteDetail.tsx +++ b/packages/web/src/components/molecules/VoteDetail.tsx @@ -2,20 +2,14 @@ import React from "react"; import { Box, Text, Tag } from "@biseo/web/components/atoms"; interface Props { - type: boolean; + named: boolean; } -export const VoteDetail: React.FC = ({ type }) => ( - <> - {type ? ( - <>TODO - ) : ( - - - 투표 상세 - - - - )} - +export const VoteDetail: React.FC = ({ named }) => ( + + + 투표 상세 + + + ); From 18b8f694b2911b4948c40271721d926461ba7f07 Mon Sep 17 00:00:00 2001 From: rjsdn0 Date: Thu, 15 Feb 2024 20:42:58 +0900 Subject: [PATCH 06/21] feat: connected identified vote front with back --- .../AgendaCard/TerminatedAgendaCard.tsx | 19 +++++++++ .../components/molecules/VoteParticipate.tsx | 2 +- .../src/components/molecules/VotedMembers.tsx | 42 +++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 packages/web/src/components/molecules/VotedMembers.tsx diff --git a/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx b/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx index dff1d3af..b142449b 100644 --- a/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx +++ b/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx @@ -7,6 +7,10 @@ import { AgendaTag } from "@biseo/web/components/molecules/AgendaTag"; import { OptionVoteResult } from "@biseo/web/components/molecules/OptionVoteResult"; import { VoteResult } from "@biseo/web/components/molecules/VoteResult"; import { VoteDetail } from "@biseo/web/components/molecules/VoteDetail"; +import { + VotedMembers, + type Voter, +} from "@biseo/web/components/molecules/VotedMembers"; import { VoteParticipate } from "@biseo/web/components/molecules/VoteParticipate"; import { column, gap, text, w } from "@biseo/web/styles"; @@ -73,6 +77,21 @@ export const TerminatedAgendaCard: React.FC = ({ agenda }) => {
+ {agenda.type.named ? ( +
+ {agenda.choices.map(choice => ( + ).map(voter => { + if (choice.id === voter.choiceId) { + return voter; + } + return null; + })} + name={choice.name} + /> + ))} +
+ ) : null} ) : (
diff --git a/packages/web/src/components/molecules/VoteParticipate.tsx b/packages/web/src/components/molecules/VoteParticipate.tsx index 073a0104..94b731b3 100644 --- a/packages/web/src/components/molecules/VoteParticipate.tsx +++ b/packages/web/src/components/molecules/VoteParticipate.tsx @@ -18,7 +18,7 @@ export const VoteParticipate: React.FC = ({ named, voted, total }) => { const participantInfo = useMemo( () => hover - ? `투표 참여자 ${voted}명 /투표 대상자 ${total}명` + ? `투표 참여자 ${votedLength}명 /투표 대상자 ${total}명` : `${votedLength}/${total}`, [hover], ); diff --git a/packages/web/src/components/molecules/VotedMembers.tsx b/packages/web/src/components/molecules/VotedMembers.tsx new file mode 100644 index 00000000..25e051ec --- /dev/null +++ b/packages/web/src/components/molecules/VotedMembers.tsx @@ -0,0 +1,42 @@ +import React, { useCallback } from "react"; +import { Box, Text } from "@biseo/web/components/atoms"; +import { border, h, w, round } from "@biseo/web/styles"; + +export type Voter = { + displayName: string; + choiceId: number; +}; + +interface Props { + name: string; + userList: (Voter | null)[]; +} + +export const VotedMembers: React.FC = ({ name, userList }) => { + const getVoters = useCallback( + () => + userList.map(user => ( + {user ? user.displayName : "-"} + )), + [userList], + ); + + return ( + +
+ + {name} + {getVoters()} + +
+
+ ); +}; From 8cdf3eafd5f0b191f7819ec3fc7bb8a36abf4c32 Mon Sep 17 00:00:00 2001 From: rjsdn0 Date: Thu, 15 Feb 2024 21:24:24 +0900 Subject: [PATCH 07/21] feat: connect agenda tags with back --- .../AgendaCard/AdminOngoingAgendaCard.tsx | 15 ++++++++------- .../AgendaCard/AdminPreparingAgendaCard.tsx | 17 +++++++++-------- .../AgendaCard/AdminTerminatedAgendaCard.tsx | 12 +++--------- .../molecules/AgendaCard/OngoingAgendaCard.tsx | 6 ------ .../AgendaCard/PreparingAgendaCard.tsx | 10 ++-------- .../AgendaCard/TerminatedAgendaCard.tsx | 4 ++-- .../components/organisms/CreateAgendaModal.tsx | 6 ++++++ 7 files changed, 30 insertions(+), 40 deletions(-) diff --git a/packages/web/src/components/molecules/AgendaCard/AdminOngoingAgendaCard.tsx b/packages/web/src/components/molecules/AgendaCard/AdminOngoingAgendaCard.tsx index 8c6d2f45..f50d39da 100644 --- a/packages/web/src/components/molecules/AgendaCard/AdminOngoingAgendaCard.tsx +++ b/packages/web/src/components/molecules/AgendaCard/AdminOngoingAgendaCard.tsx @@ -15,12 +15,6 @@ import { useAdminAgenda } from "@biseo/web/services/admin-agenda"; import { row, center, justify, gap, text, w, column } from "@biseo/web/styles"; -const agendaTags = { - public: true, - identified: false, - votable: true, -}; - interface Props { agenda: AdminAgenda; } @@ -45,7 +39,14 @@ export const AdminOngoingAgendaCard: React.FC = ({ agenda }) => { return (
- +

{agenda.title}

{agenda.content}

diff --git a/packages/web/src/components/molecules/AgendaCard/AdminPreparingAgendaCard.tsx b/packages/web/src/components/molecules/AgendaCard/AdminPreparingAgendaCard.tsx index bac77a76..dff506fe 100644 --- a/packages/web/src/components/molecules/AgendaCard/AdminPreparingAgendaCard.tsx +++ b/packages/web/src/components/molecules/AgendaCard/AdminPreparingAgendaCard.tsx @@ -10,12 +10,6 @@ import { useAdminAgenda } from "@biseo/web/services/admin-agenda"; import { column, gap, text, w } from "@biseo/web/styles"; -const agendaTags = { - public: true, - identified: false, - votable: true, -}; - interface Props { agenda: AdminAgenda; } @@ -44,7 +38,7 @@ export const AdminPreparingAgendaCard: React.FC = ({ agenda }) => { const startVote = (e: React.MouseEvent) => { if (!validated) { - alert("투표 대상을 설정해주세요"); + alert("투표 대상을 설정해주세요"); // eslint-disable-line no-alert // TODO: button 아래 card click으로 간주되어 edit modal로의 redirection 때문에 alert가 뜨지 않음 return; } @@ -55,7 +49,14 @@ export const AdminPreparingAgendaCard: React.FC = ({ agenda }) => { return (
- +

{agenda.title}

{agenda.content}

diff --git a/packages/web/src/components/molecules/AgendaCard/AdminTerminatedAgendaCard.tsx b/packages/web/src/components/molecules/AgendaCard/AdminTerminatedAgendaCard.tsx index 846b9a58..3fe9f0ea 100644 --- a/packages/web/src/components/molecules/AgendaCard/AdminTerminatedAgendaCard.tsx +++ b/packages/web/src/components/molecules/AgendaCard/AdminTerminatedAgendaCard.tsx @@ -8,12 +8,6 @@ import { AgendaTag } from "@biseo/web/components/molecules/AgendaTag"; import { column, gap, text } from "@biseo/web/styles"; -const agendaTags = { - public: true, - identified: false, - votable: false, -}; - interface Props { agenda: AdminAgenda; } @@ -27,9 +21,9 @@ export const AdminTerminatedAgendaCard: React.FC = ({ agenda }) => {
diff --git a/packages/web/src/components/molecules/AgendaCard/OngoingAgendaCard.tsx b/packages/web/src/components/molecules/AgendaCard/OngoingAgendaCard.tsx index daf92592..53432bb3 100644 --- a/packages/web/src/components/molecules/AgendaCard/OngoingAgendaCard.tsx +++ b/packages/web/src/components/molecules/AgendaCard/OngoingAgendaCard.tsx @@ -18,12 +18,6 @@ interface OngoingAgendaProps { agenda: OngoingAgenda; } -// const agendaTags = { -// public: true, -// identified: false, -// votable: true, -// }; - export const OngoingAgendaCard: React.FC = ({ agenda }) => { const [chosenChoiceId, setChosenChoiceId] = useState(0); const { voteAgenda } = useAgenda(state => ({ diff --git a/packages/web/src/components/molecules/AgendaCard/PreparingAgendaCard.tsx b/packages/web/src/components/molecules/AgendaCard/PreparingAgendaCard.tsx index 2f7616f7..924e1c95 100644 --- a/packages/web/src/components/molecules/AgendaCard/PreparingAgendaCard.tsx +++ b/packages/web/src/components/molecules/AgendaCard/PreparingAgendaCard.tsx @@ -7,12 +7,6 @@ import { AgendaTag } from "@biseo/web/components/molecules/AgendaTag"; import { column, gap, text } from "@biseo/web/styles"; -const agendaTags = { - public: true, - identified: false, - votable: true, -}; - interface Props { agenda: PreparingAgenda; } @@ -22,8 +16,8 @@ export const PreparingAgendaCard: React.FC = ({ agenda }) => (
diff --git a/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx b/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx index b142449b..2c4b38ae 100644 --- a/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx +++ b/packages/web/src/components/molecules/AgendaCard/TerminatedAgendaCard.tsx @@ -97,8 +97,8 @@ export const TerminatedAgendaCard: React.FC = ({ agenda }) => {
diff --git a/packages/web/src/components/organisms/CreateAgendaModal.tsx b/packages/web/src/components/organisms/CreateAgendaModal.tsx index daedf644..1b8b4788 100644 --- a/packages/web/src/components/organisms/CreateAgendaModal.tsx +++ b/packages/web/src/components/organisms/CreateAgendaModal.tsx @@ -32,6 +32,8 @@ export const CreateAgendaModal: React.FC = () => { const [title, setTitle] = useState(""); const [content, setContent] = useState(""); + const [isnamd, setIsnamed] = useState(false); // eslint-disable-line + const [ispuclic, setIspublic] = useState(true); // eslint-disable-line const [resolution, setResolution] = useState(""); const [choices, setChoices] = useState([]); const [voters, setVoters] = useState([]); @@ -100,6 +102,10 @@ export const CreateAgendaModal: React.FC = () => { const onSubmit = () => { if (!validated) return; createAgenda({ + type: { + named: isnamd, + public: ispuclic, + }, title, content, resolution, From b776556659c29af53e549a50bbb6698342af1509 Mon Sep 17 00:00:00 2001 From: rjsdn0 Date: Mon, 4 Mar 2024 00:13:04 +0900 Subject: [PATCH 08/21] feat: add toggle buttons to change vote types --- packages/web/src/components/atoms/Toggle.tsx | 53 ++++++++ packages/web/src/components/atoms/index.ts | 1 + .../components/molecules/AdminAgendaTags.tsx | 114 +++++++++++------- .../organisms/CreateAgendaModal.tsx | 19 ++- 4 files changed, 138 insertions(+), 49 deletions(-) create mode 100644 packages/web/src/components/atoms/Toggle.tsx diff --git a/packages/web/src/components/atoms/Toggle.tsx b/packages/web/src/components/atoms/Toggle.tsx new file mode 100644 index 00000000..0135d557 --- /dev/null +++ b/packages/web/src/components/atoms/Toggle.tsx @@ -0,0 +1,53 @@ +import styled from "@emotion/styled"; +import { css } from "@emotion/react"; + +type Size = number | "hug" | "fill"; + +const calcSize = (size: Size) => { + if (size === "fill") return "fill"; + if (size === "hug") return "fit-content"; + return `${size}px`; +}; + +export const ToggleContainor = styled.div<{ + w?: Size; + h?: Size; +}>( + ({ w = "fill", h = 20 }) => css` + display: flex; + width: ${calcSize(w)}; + height: ${calcSize(h)}; + border-radius: 5px; + border: none; + justify-content: center; + align-items: center; + overflow: hidden; + `, +); + +export const ToggleButton = styled.div<{ + selected: boolean; + isLeft: boolean; +}>( + ({ selected, isLeft = true, theme }) => css` + display: flex; + width: fill; + height: 100%; + padding: 0px; + border-style: solid; + border-width: 1px; + border-radius: ${isLeft ? "5px 0px 0px 5px" : "0px 5px 5px 0px"}; + border-color: ${selected ? theme.colors.blue300 : theme.colors.gray400}; + justify-content: center; + align-items: center; + line-height: 28px; + padding: 4px 6px 4px 6px; + background-color: ${selected ? theme.colors.blue200 : theme.colors.white}; + transition-duration: 0.25s; + transition-property: background-color; + + &:hover { + background-color: ${theme.colors.blue200}; + } + `, +); diff --git a/packages/web/src/components/atoms/index.ts b/packages/web/src/components/atoms/index.ts index a4ac980c..e75cfdec 100644 --- a/packages/web/src/components/atoms/index.ts +++ b/packages/web/src/components/atoms/index.ts @@ -21,3 +21,4 @@ export * from "./TaggersBox"; export * from "./HyperText"; export * from "./PresetOption"; export * from "./TagSelect"; +export * from "./Toggle"; diff --git a/packages/web/src/components/molecules/AdminAgendaTags.tsx b/packages/web/src/components/molecules/AdminAgendaTags.tsx index a13cb4b8..527dde10 100644 --- a/packages/web/src/components/molecules/AdminAgendaTags.tsx +++ b/packages/web/src/components/molecules/AdminAgendaTags.tsx @@ -1,5 +1,18 @@ -import { DownArrowIcon } from "@biseo/web/assets"; -import { BorderedBox, Box, Text } from "@biseo/web/components/atoms"; +import React from "react"; +import { + BorderedBox, + Box, + Text, + ToggleContainor, + ToggleButton, +} from "@biseo/web/components/atoms"; + +interface Props { + switchPublic: (prev: boolean) => void; + switchNamed: (prev: boolean) => void; + ispublic: boolean; + isnamed: boolean; +} export const AdminAgendaTags: React.FC = () => ( @@ -48,59 +61,70 @@ export const AdminAgendaTags: React.FC = () => ( ); -export const AdminAgendaTagsSelect: React.FC = () => ( +export const AdminAgendaTagsSelect: React.FC = ({ + switchPublic, + switchNamed, + ispublic, + isnamed, +}) => ( 투표 결과 - - - 비공개 - - - - - - + + { + switchPublic(true); + }} + > + + 공개 + + + { + switchPublic(false); + }} + > + + 비공개 + + + 투표 상세 - - - 무기명 - - - - - - + + { + switchNamed(true); + }} + > + + 기명 + + + { + switchNamed(false); + }} + > + + 무기명 + + + ); diff --git a/packages/web/src/components/organisms/CreateAgendaModal.tsx b/packages/web/src/components/organisms/CreateAgendaModal.tsx index 1b8b4788..8dd76550 100644 --- a/packages/web/src/components/organisms/CreateAgendaModal.tsx +++ b/packages/web/src/components/organisms/CreateAgendaModal.tsx @@ -32,8 +32,8 @@ export const CreateAgendaModal: React.FC = () => { const [title, setTitle] = useState(""); const [content, setContent] = useState(""); - const [isnamd, setIsnamed] = useState(false); // eslint-disable-line - const [ispuclic, setIspublic] = useState(true); // eslint-disable-line + const [isnamd, setIsnamed] = useState(false); + const [ispublic, setIspublic] = useState(true); const [resolution, setResolution] = useState(""); const [choices, setChoices] = useState([]); const [voters, setVoters] = useState([]); @@ -46,6 +46,12 @@ export const CreateAgendaModal: React.FC = () => { const onChangeResolution = (e: React.ChangeEvent) => { setResolution(e.target.value); }; + const onChangeIspublic = (e: boolean) => { + setIspublic(e); + }; + const onChangeIsnamed = (e: boolean) => { + setIsnamed(e); + }; const [template, setTemplate] = useState(0); const applyTemplate = (templateId: number) => { @@ -104,7 +110,7 @@ export const CreateAgendaModal: React.FC = () => { createAgenda({ type: { named: isnamd, - public: ispuclic, + public: ispublic, }, title, content, @@ -196,7 +202,12 @@ export const CreateAgendaModal: React.FC = () => { bg="blue100" > - + Date: Mon, 4 Mar 2024 09:00:45 +0900 Subject: [PATCH 09/21] feat: updated adminagendatags --- packages/web/src/components/atoms/Toggle.tsx | 2 +- .../components/molecules/AdminAgendaTags.tsx | 75 +++++++++---------- .../organisms/OngoingAgendaModal.tsx | 7 +- .../organisms/TerminatedAgendaModal.tsx | 6 +- 4 files changed, 49 insertions(+), 41 deletions(-) diff --git a/packages/web/src/components/atoms/Toggle.tsx b/packages/web/src/components/atoms/Toggle.tsx index 0135d557..c04c5339 100644 --- a/packages/web/src/components/atoms/Toggle.tsx +++ b/packages/web/src/components/atoms/Toggle.tsx @@ -41,7 +41,7 @@ export const ToggleButton = styled.div<{ justify-content: center; align-items: center; line-height: 28px; - padding: 4px 6px 4px 6px; + padding: 4px 5px 4px 5px; background-color: ${selected ? theme.colors.blue200 : theme.colors.white}; transition-duration: 0.25s; transition-property: background-color; diff --git a/packages/web/src/components/molecules/AdminAgendaTags.tsx b/packages/web/src/components/molecules/AdminAgendaTags.tsx index 527dde10..57410946 100644 --- a/packages/web/src/components/molecules/AdminAgendaTags.tsx +++ b/packages/web/src/components/molecules/AdminAgendaTags.tsx @@ -1,67 +1,66 @@ import React from "react"; import { - BorderedBox, Box, Text, ToggleContainor, ToggleButton, } from "@biseo/web/components/atoms"; -interface Props { +interface SelectProps { switchPublic: (prev: boolean) => void; switchNamed: (prev: boolean) => void; ispublic: boolean; isnamed: boolean; } -export const AdminAgendaTags: React.FC = () => ( +interface TagProps { + ispublic: boolean; + isnamed: boolean; +} + +export const AdminAgendaTags: React.FC = ({ + ispublic = true, + isnamed = false, +}) => ( - + 투표 결과 - - - 비공개 - - + + + + 공개 + + + + + 비공개 + + + - + 투표 상세 - - - 무기명 - - + + + + 기명 + + + + + 무기명 + + + ); -export const AdminAgendaTagsSelect: React.FC = ({ +export const AdminAgendaTagsSelect: React.FC = ({ switchPublic, switchNamed, ispublic, diff --git a/packages/web/src/components/organisms/OngoingAgendaModal.tsx b/packages/web/src/components/organisms/OngoingAgendaModal.tsx index 611d8662..d91aeff5 100644 --- a/packages/web/src/components/organisms/OngoingAgendaModal.tsx +++ b/packages/web/src/components/organisms/OngoingAgendaModal.tsx @@ -37,6 +37,11 @@ export const OngoingAgendaModal: React.FC = () => { } }; + const isPublic = + targetAgenda?.type.public === undefined ? false : targetAgenda?.type.public; + const isNamed = + targetAgenda?.type.named === undefined ? false : targetAgenda?.type.named; + return ( @@ -77,7 +82,7 @@ export const OngoingAgendaModal: React.FC = () => { padHorizontal={15} round={5} > - +