Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/Identified vote final #480

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5ab3463
fix: wrong environt variable in schema db
rjsdn0 Feb 1, 2024
cf09b49
feat: identified vote schema
rjsdn0 Feb 1, 2024
412a83f
feat: prisma migration
rjsdn0 Feb 3, 2024
7edce79
feat: merge identified vote back
rjsdn0 Feb 8, 2024
d93af0a
refactor: updated votedetail
rjsdn0 Feb 14, 2024
18b8f69
feat: connected identified vote front with back
rjsdn0 Feb 15, 2024
8cdf3ea
feat: connect agenda tags with back
rjsdn0 Feb 15, 2024
b776556
feat: add toggle buttons to change vote types
rjsdn0 Mar 3, 2024
56aec1a
feat: updated adminagendatags
rjsdn0 Mar 4, 2024
d9a3b46
fix: identified vote logic and ui
rjsdn0 Mar 22, 2024
51b8888
Merge branch 'main' of https://github.com/sparcs-kaist/biseo
rjsdn0 Mar 22, 2024
4edd70d
fix: fix conflict
rjsdn0 Mar 22, 2024
1a25bb3
feat: automatically reveal choice when identified vote
rjsdn0 Mar 22, 2024
6ba99fb
feat: private vote UI
rjsdn0 Mar 22, 2024
f76c9b3
feat: distinguish clicking and dragging on terminated agenda card
rjsdn0 Mar 22, 2024
f3c3ae9
fix: adminagendatagsselect error
rjsdn0 Mar 22, 2024
9e1280e
fix: optionvoteresult error
rjsdn0 Mar 22, 2024
6eac878
Merge branch 'main' of https://github.com/sparcs-kaist/biseo into test
rjsdn0 Mar 27, 2024
73c4905
fix: prreview
rjsdn0 Mar 27, 2024
f45e0bc
Merge branch 'main' into identified-vote-final
rjsdn0 Mar 29, 2024
60398f1
Merge branch 'main' of github.com:sparcs-kaist/biseo into test
rjsdn0 Mar 29, 2024
d8ede40
fix: prreview2-design
rjsdn0 Apr 24, 2024
7e206ea
fix: prreview3-toggle button design
rjsdn0 Apr 29, 2024
ecb67df
Merge branch 'identified-vote-final' of github.com:sparcs-kaist/biseo…
rjsdn0 Apr 29, 2024
8901431
fix: drag bug
rjsdn0 May 8, 2024
fe9fa41
fix: resolve conflict
rjsdn0 May 8, 2024
213b40c
fix: resolve conflict
rjsdn0 May 23, 2024
a21e32b
fix: text color
rjsdn0 Sep 24, 2024
6498012
fix: test for typecheck
rjsdn0 Sep 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: updated adminagendatags
  • Loading branch information
rjsdn0 committed Mar 4, 2024
commit 56aec1a9120b89b72dca7a2a41bf5630ea2a5294
2 changes: 1 addition & 1 deletion packages/web/src/components/atoms/Toggle.tsx
Original file line number Diff line number Diff line change
@@ -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;
75 changes: 37 additions & 38 deletions packages/web/src/components/molecules/AdminAgendaTags.tsx
Original file line number Diff line number Diff line change
@@ -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<TagProps> = ({
ispublic = true,
isnamed = false,
}) => (
<Box w={270} h={28} gap={16} dir="row" justify="center">
<Box dir="row" w={122} h={28} gap={10} align="center">
<Box dir="row" w={130} h={28} gap={8} align="center">
<Text variant="body" color="black">
투표 결과
</Text>
<BorderedBox
borderColor="gray200"
bg="white"
w={65}
h={28}
justify="center"
borderSize={1}
padHorizontal={15}
round={5}
borderStyle="solid"
gap={99}
>
<Text color="gray600" variant="option1">
비공개
</Text>
</BorderedBox>
<ToggleContainor h={25}>
<ToggleButton isLeft selected={ispublic}>
<Text variant="option1" color={ispublic ? "blue500" : "gray400"}>
공개
</Text>
</ToggleButton>
<ToggleButton isLeft={false} selected={!ispublic}>
<Text variant="option1" color={!ispublic ? "blue500" : "gray400"}>
비공개
</Text>
</ToggleButton>
</ToggleContainor>
</Box>
<Box dir="row" w={122} h={28} gap={10} align="center">
<Box dir="row" w={130} h={28} gap={8} align="center">
<Text variant="body" color="black">
투표 상세
</Text>
<BorderedBox
borderColor="gray200"
bg="white"
w={65}
h={28}
justify="center"
borderSize={1}
padHorizontal={15}
round={5}
gap={99}
borderStyle="solid"
>
<Text color="gray600" variant="option1">
무기명
</Text>
</BorderedBox>
<ToggleContainor h={25}>
<ToggleButton isLeft selected={isnamed}>
<Text variant="option1" color={isnamed ? "blue500" : "gray400"}>
기명
</Text>
</ToggleButton>
<ToggleButton isLeft={false} selected={!isnamed}>
<Text variant="option1" color={!isnamed ? "blue500" : "gray400"}>
무기명
</Text>
</ToggleButton>
</ToggleContainor>
</Box>
</Box>
);

export const AdminAgendaTagsSelect: React.FC<Props> = ({
export const AdminAgendaTagsSelect: React.FC<SelectProps> = ({
switchPublic,
switchNamed,
ispublic,
7 changes: 6 additions & 1 deletion packages/web/src/components/organisms/OngoingAgendaModal.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<Modal title="진행 중인 투표">
<Box w={630} justify="space-between" padVertical={15} dir="row">
@@ -77,7 +82,7 @@ export const OngoingAgendaModal: React.FC = () => {
padHorizontal={15}
round={5}
>
<AdminAgendaTags />
<AdminAgendaTags ispublic={isPublic} isnamed={isNamed} />
<Box dir="row" w={270} gap={10} justify="space-between">
<Button w={130} h={38} onClick={remind}>
<Text variant="boldtitle3" color="blue600">
Original file line number Diff line number Diff line change
@@ -36,6 +36,10 @@ export const TerminatedAgendaModal: React.FC = () => {
targetAgenda?.voters.total.length === undefined
? 0
: targetAgenda?.voters.total.length;
const isPublic =
targetAgenda?.type.public === undefined ? false : targetAgenda?.type.public;
const isNamed =
targetAgenda?.type.named === undefined ? false : targetAgenda?.type.named;

return (
<Modal title="종료된 투표">
@@ -102,7 +106,7 @@ export const TerminatedAgendaModal: React.FC = () => {
bg="blue100"
round={5}
>
<AdminAgendaTags />
<AdminAgendaTags ispublic={isPublic} isnamed={isNamed} />
</Box>
</Box>
</Box>