-
Notifications
You must be signed in to change notification settings - Fork 0
[Feature/#106] Voting, Confirm page #107
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import { style } from '@vanilla-extract/css'; | ||
|
|
||
| export const confirmedWrapper = style({ | ||
| position: 'relative', | ||
| display: 'flex', | ||
| flexDirection: 'column', | ||
| alignItems: 'center', | ||
| paddingTop: '9.8rem', | ||
| height: '100vh', | ||
| }); | ||
|
|
||
| export const containerStyle = style({ | ||
| width: '100%', | ||
| display: 'flex', | ||
| flexDirection: 'column', | ||
| alignItems: 'flex-start', | ||
| gap: '40px', | ||
| }); | ||
|
|
||
| export const confirmedText = style({ | ||
| display: 'flex', | ||
| flexDirection: 'column', | ||
| alignItems: 'flex-start', | ||
| gap: '1rem', | ||
| }); | ||
|
|
||
| export const promiseDetailWrapper = style({ | ||
| width: '100%', | ||
| display: 'flex', | ||
| alignItems: 'center', | ||
| justifyContent: 'center', | ||
| }); | ||
|
|
||
| export const confirmedButton = style({ | ||
| position: 'fixed', | ||
| bottom: '0', | ||
| width: '100%', | ||
| padding: '1.5rem', | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,76 @@ | ||
| import { useNavigate } from 'react-router-dom'; | ||
| import Container from '@shared/components/container/Container'; | ||
| import Text from '@shared/components/text/Text'; | ||
| import { mockUpConfirmed } from '../mockUp'; | ||
| import KakaoMap from '@shared/components/kakaoMap/KakaoMap'; | ||
| import usePlaceSearch from '@shared/components/kakaoMap/hooks/usePlaceSearch'; | ||
| import { useState, useEffect } from 'react'; | ||
| import { MAP_SIZE } from '@shared/components/kakaoMap/constant/mapSize'; | ||
| import PromiseDetail from '@shared/components/promiseDetail/PromiseDetail'; | ||
| import { PROMISE_STATUS, PROMISE_STATUS_CONFIG } from '@shared/constant/promiseStatus'; | ||
| import Button from '@shared/components/button/Button'; | ||
| import { BUTTON_VARIANTS } from '@shared/components/button/constant/button'; | ||
| import * as styles from '@/pages/promiseStatus/components/Confirmed.css'; | ||
|
|
||
| interface ConfirmedProps { | ||
| promiseId: string; | ||
| isHost: boolean; | ||
| } | ||
| export default function Confirmed({ promiseId, isHost }: ConfirmedProps) { | ||
| console.log(promiseId, isHost); | ||
| return <div></div>; | ||
| export default function Confirmed({ promiseId }: ConfirmedProps) { | ||
| const navigate = useNavigate(); | ||
| const { promiseName, promisePlace, promiseAvailableTimes, promiseMembersNames } = mockUpConfirmed; | ||
| const { searchPlace } = usePlaceSearch(); | ||
| const [place, setPlace] = useState<{ lat: number; lng: number } | null>(null); | ||
|
|
||
| useEffect(() => { | ||
| searchPlace(promisePlace.placeAddress) | ||
| .then(res => res[0]) | ||
| .then(placeData => { | ||
| if (placeData) { | ||
| setPlace({ lat: placeData.lat, lng: placeData.lng }); | ||
| } | ||
| }) | ||
| .catch(error => { | ||
| console.error('Failed to search place:', error); | ||
| }); | ||
| }, [searchPlace, promisePlace.placeAddress]); | ||
|
|
||
| const handleClose = () => { | ||
| console.log(promiseId); | ||
| navigate(`/`); | ||
| }; | ||
|
|
||
| return ( | ||
| <div className={styles.confirmedWrapper}> | ||
| <Container className={styles.containerStyle}> | ||
| <div className={styles.confirmedText}> | ||
| <Text tag="head_bold_24" color="black"> | ||
| {promiseName} | ||
| </Text> | ||
| <Text tag="body_bold_16" color="black"> | ||
| μ½μμ΄ νμ λμμ΄μ | ||
| </Text> | ||
| </div> | ||
| <KakaoMap center={place || undefined} size={MAP_SIZE.SMALL} /> | ||
| <div className={styles.promiseDetailWrapper}> | ||
| <PromiseDetail | ||
| status={PROMISE_STATUS.CONFIRMED} | ||
| promiseId={parseInt(promiseId)} | ||
| promiseName={promiseName} | ||
| fixedDate={promiseAvailableTimes.date} | ||
| placeName={promisePlace.placeName} | ||
| promiseMembersNames={promiseMembersNames} | ||
| /> | ||
| </div> | ||
| </Container> | ||
| <div className={styles.confirmedButton}> | ||
| <Button | ||
| text="νμΈ" | ||
| size="long" | ||
| variant={BUTTON_VARIANTS.ENABLED} | ||
| onClick={handleClose} | ||
| backgroundColor={PROMISE_STATUS_CONFIG.CONFIRMED.color} | ||
| /> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| import { vars } from '@shared/styles/theme.css'; | ||
| import { style } from '@vanilla-extract/css'; | ||
|
|
||
| export const votingWrapper = style({ | ||
| position: 'relative', | ||
| display: 'flex', | ||
| flexDirection: 'column', | ||
| alignItems: 'center', | ||
| background: vars.color.blue0, | ||
| }); | ||
|
|
||
| export const containerStyle = style({ | ||
| width: '100%', | ||
| display: 'flex', | ||
| flexDirection: 'column', | ||
| alignItems: 'center', | ||
| gap: '40px', | ||
| minHeight: 'calc(100vh - 9.8rem - 8rem)', | ||
| background: vars.color.blue0, | ||
| }); | ||
|
|
||
| export const votingText = style({ | ||
| display: 'flex', | ||
| flexDirection: 'column', | ||
| alignItems: 'flex-start', | ||
| gap: '1rem', | ||
| }); | ||
|
|
||
| export const votingPlaceWrapper = style({ | ||
| width: '100%', | ||
| display: 'flex', | ||
| flexDirection: 'column', | ||
| alignItems: 'flex-start', | ||
| gap: '2rem', | ||
| }); | ||
|
|
||
| export const votingButtonWrapper = style({ | ||
| display: 'flex', | ||
| flexDirection: 'column', | ||
| alignItems: 'center', | ||
| gap: '1rem', | ||
| width: '100%', | ||
| }); | ||
|
|
||
| export const votingButton = style({ | ||
| position: 'sticky', | ||
| bottom: '0', | ||
| left: '0', | ||
| right: '0', | ||
| width: '100%', | ||
| padding: '1.5rem', | ||
| }); |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,8 +1,134 @@ | ||||||||||||||||||||||||||||||||||||||||
| import Header from '@shared/components/header/Header'; | ||||||||||||||||||||||||||||||||||||||||
| import { IcNavX } from '@svg/index'; | ||||||||||||||||||||||||||||||||||||||||
| import { useNavigate } from 'react-router-dom'; | ||||||||||||||||||||||||||||||||||||||||
| import * as styles from '@/pages/promiseStatus/components/Voting.css'; | ||||||||||||||||||||||||||||||||||||||||
| import Container from '@shared/components/container/Container'; | ||||||||||||||||||||||||||||||||||||||||
| import Text from '@shared/components/text/Text'; | ||||||||||||||||||||||||||||||||||||||||
| import { mockUpVoting } from '@/pages/promiseStatus/mockUp'; | ||||||||||||||||||||||||||||||||||||||||
| import Button from '@shared/components/button/Button'; | ||||||||||||||||||||||||||||||||||||||||
| import { PROMISE_STATUS_CONFIG } from '@shared/constant/promiseStatus'; | ||||||||||||||||||||||||||||||||||||||||
| import { BUTTON_VARIANTS } from '@shared/components/button/constant/button'; | ||||||||||||||||||||||||||||||||||||||||
| import { useState } from 'react'; | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| interface VotingProps { | ||||||||||||||||||||||||||||||||||||||||
| promiseId: string; | ||||||||||||||||||||||||||||||||||||||||
| isHost: boolean; | ||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||
| export default function Voting({ promiseId, isHost }: VotingProps) { | ||||||||||||||||||||||||||||||||||||||||
| console.log(promiseId, isHost); | ||||||||||||||||||||||||||||||||||||||||
| return <div></div>; | ||||||||||||||||||||||||||||||||||||||||
| const navigate = useNavigate(); | ||||||||||||||||||||||||||||||||||||||||
| const handleClose = () => { | ||||||||||||||||||||||||||||||||||||||||
| console.log(promiseId); | ||||||||||||||||||||||||||||||||||||||||
| navigate(`/`); | ||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||
| const { promiseName, promisePlace, promiseAvailableTimes } = mockUpVoting; | ||||||||||||||||||||||||||||||||||||||||
| const [selectedPlace, setSelectedPlace] = useState< | ||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||
| placeName: string; | ||||||||||||||||||||||||||||||||||||||||
| placeAddress: string; | ||||||||||||||||||||||||||||||||||||||||
| }[] | ||||||||||||||||||||||||||||||||||||||||
| >([]); | ||||||||||||||||||||||||||||||||||||||||
| const [selectedTime, setSelectedTime] = useState< | ||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||
| date: string; | ||||||||||||||||||||||||||||||||||||||||
| startTime: string; | ||||||||||||||||||||||||||||||||||||||||
| endTime: string; | ||||||||||||||||||||||||||||||||||||||||
| }[] | ||||||||||||||||||||||||||||||||||||||||
| >([]); | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| const handlePlaceClick = (place: { placeName: string; placeAddress: string }) => { | ||||||||||||||||||||||||||||||||||||||||
| if (selectedPlace.includes(place)) { | ||||||||||||||||||||||||||||||||||||||||
| setSelectedPlace(prev => prev.filter(p => p !== place)); | ||||||||||||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||||||||||||
| setSelectedPlace(prev => [...prev, place]); | ||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| const handleTimeClick = (time: { date: string; startTime: string; endTime: string }) => { | ||||||||||||||||||||||||||||||||||||||||
| if (selectedTime.includes(time)) { | ||||||||||||||||||||||||||||||||||||||||
| setSelectedTime(prev => | ||||||||||||||||||||||||||||||||||||||||
| prev.filter( | ||||||||||||||||||||||||||||||||||||||||
| t => t.date !== time.date && t.startTime !== time.startTime && t.endTime !== time.endTime | ||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||||||||||||
| setSelectedTime(prev => [...prev, time]); | ||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+46
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. μ ν ν΄μ λ‘μ§ λ²κ·Έ: λμΌ λ μ§/μκ°μ΄ ν νλλ§ κ°μλ μ λΆ μ κ±°λ©λλ€ μκ° μ ν ν κΈ ν΄μ μ νν° μ‘°κ±΄μ΄ λ€μκ³Ό κ°μ΄ μ°Έμ‘° λΉκ΅λ‘ κ°λ¨ν μμ νλ κ²μ κΆμ₯ν©λλ€(μλ¨μ includes λ‘μ§κ³Όλ μΌκ΄μ ): const handleTimeClick = (time: { date: string; startTime: string; endTime: string }) => {
if (selectedTime.includes(time)) {
- setSelectedTime(prev =>
- prev.filter(
- t => t.date !== time.date && t.startTime !== time.startTime && t.endTime !== time.endTime
- )
- );
+ setSelectedTime(prev => prev.filter(t => t !== time));
} else {
setSelectedTime(prev => [...prev, time]);
}
};π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| const handleVote = () => { | ||||||||||||||||||||||||||||||||||||||||
| console.log(selectedPlace, selectedTime); | ||||||||||||||||||||||||||||||||||||||||
| handleClose(); | ||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| const isFormValid = !isHost && selectedPlace.length > 0 && selectedTime.length > 0; | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||
| <div className={styles.votingWrapper}> | ||||||||||||||||||||||||||||||||||||||||
| <Header rightIcon={IcNavX} onClickRightIcon={handleClose} background="blue0" /> | ||||||||||||||||||||||||||||||||||||||||
| <Container className={styles.containerStyle}> | ||||||||||||||||||||||||||||||||||||||||
| <div className={styles.votingText}> | ||||||||||||||||||||||||||||||||||||||||
| <Text tag="head_bold_24" color="black"> | ||||||||||||||||||||||||||||||||||||||||
| {promiseName}μ μ΅μ’ ν¬νλ₯Ό μ§νν΄μ£ΌμΈμ | ||||||||||||||||||||||||||||||||||||||||
| </Text> | ||||||||||||||||||||||||||||||||||||||||
| <Text tag="body_bold_16" color="gray4"> | ||||||||||||||||||||||||||||||||||||||||
| μ΅μ μ μκ°κ³Ό μ₯μμ λλ€ | ||||||||||||||||||||||||||||||||||||||||
| </Text> | ||||||||||||||||||||||||||||||||||||||||
| {isHost && ( | ||||||||||||||||||||||||||||||||||||||||
| <Text tag="body_bold_16" color="red1"> | ||||||||||||||||||||||||||||||||||||||||
| μ½μ μμ±μλ ν¬ν ν μ μμ΅λλ€. | ||||||||||||||||||||||||||||||||||||||||
| </Text> | ||||||||||||||||||||||||||||||||||||||||
| )} | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+76
to
+80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. μ¬μ©μ λ ΈμΆ λ¬Έκ΅¬ μ€νμ: βν¬ν ν β β βν¬νν β μ¬μ©μμκ² μ§μ λ ΈμΆλλ 문ꡬμ λμ΄μ°κΈ°λ₯Ό μμ νμΈμ. - <Text tag="body_bold_16" color="red1">
- μ½μ μμ±μλ ν¬ν ν μ μμ΅λλ€.
- </Text>
+ <Text tag="body_bold_16" color="red1">
+ μ½μ μμ±μλ ν¬νν μ μμ΅λλ€.
+ </Text>π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| <div className={styles.votingPlaceWrapper}> | ||||||||||||||||||||||||||||||||||||||||
| <Text tag="head_bold_18" color="black"> | ||||||||||||||||||||||||||||||||||||||||
| μ½μ μ₯μλ₯Ό μ νν΄μ£ΌμΈμ | ||||||||||||||||||||||||||||||||||||||||
| </Text> | ||||||||||||||||||||||||||||||||||||||||
| <div className={styles.votingButtonWrapper}> | ||||||||||||||||||||||||||||||||||||||||
| {promisePlace.map(place => { | ||||||||||||||||||||||||||||||||||||||||
| const isSelected = selectedPlace.includes(place); | ||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||
| <Button | ||||||||||||||||||||||||||||||||||||||||
| key={place.placeName} | ||||||||||||||||||||||||||||||||||||||||
| onClick={() => handlePlaceClick(place)} | ||||||||||||||||||||||||||||||||||||||||
| variant={isSelected ? BUTTON_VARIANTS.ENABLED : BUTTON_VARIANTS.WHITE} | ||||||||||||||||||||||||||||||||||||||||
| size="long" | ||||||||||||||||||||||||||||||||||||||||
| text={place.placeName} | ||||||||||||||||||||||||||||||||||||||||
| backgroundColor={isSelected ? PROMISE_STATUS_CONFIG.VOTING.color : 'white'} | ||||||||||||||||||||||||||||||||||||||||
| /> | ||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||
| })} | ||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||
| <div className={styles.votingPlaceWrapper}> | ||||||||||||||||||||||||||||||||||||||||
| <Text tag="head_bold_18" color="black"> | ||||||||||||||||||||||||||||||||||||||||
| μ½μ μκ°μ μ νν΄μ£ΌμΈμ | ||||||||||||||||||||||||||||||||||||||||
| </Text> | ||||||||||||||||||||||||||||||||||||||||
| <div className={styles.votingButtonWrapper}> | ||||||||||||||||||||||||||||||||||||||||
| {promiseAvailableTimes.map(time => { | ||||||||||||||||||||||||||||||||||||||||
| const isSelected = selectedTime.includes(time); | ||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||
| <Button | ||||||||||||||||||||||||||||||||||||||||
| key={`${time.date}-${time.startTime}-${time.endTime}`} | ||||||||||||||||||||||||||||||||||||||||
| onClick={() => handleTimeClick(time)} | ||||||||||||||||||||||||||||||||||||||||
| variant={isSelected ? BUTTON_VARIANTS.ENABLED : BUTTON_VARIANTS.WHITE} | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+108
to
+114
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. React key μ€λ³΅ κ°λ₯μ±: λμΌ κ°μ μκ° λ°μ΄ν°κ° μ¬λ¬ κ°λ©΄ ν€ μΆ©λ λ°μ mockUpVotingμ - {promiseAvailableTimes.map(time => {
+ {promiseAvailableTimes.map((time, idx) => {
const isSelected = selectedTime.includes(time);
return (
<Button
- key={`${time.date}-${time.startTime}-${time.endTime}`}
+ key={`${time.date}-${time.startTime}-${time.endTime}-${idx}`}
onClick={() => handleTimeClick(time)}
variant={isSelected ? BUTTON_VARIANTS.ENABLED : BUTTON_VARIANTS.WHITE}π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||
| size="long" | ||||||||||||||||||||||||||||||||||||||||
| text={`${time.date} ${time.startTime.slice(0, 5)}-${time.endTime.slice(0, 5)}`} | ||||||||||||||||||||||||||||||||||||||||
| backgroundColor={isSelected ? PROMISE_STATUS_CONFIG.VOTING.color : 'white'} | ||||||||||||||||||||||||||||||||||||||||
| /> | ||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||
| })} | ||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||
| </Container> | ||||||||||||||||||||||||||||||||||||||||
| <div className={styles.votingButton}> | ||||||||||||||||||||||||||||||||||||||||
| <Button | ||||||||||||||||||||||||||||||||||||||||
| text="ν¬ννκΈ°" | ||||||||||||||||||||||||||||||||||||||||
| size="long" | ||||||||||||||||||||||||||||||||||||||||
| variant={isFormValid ? BUTTON_VARIANTS.ENABLED : BUTTON_VARIANTS.DISABLED} | ||||||||||||||||||||||||||||||||||||||||
| onClick={handleVote} | ||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. μ½μμ₯μ, μκ° μ ν μ νμλ (ν¬ννκΈ°κ° νμμΌλ)μλ λ²νΌμ λλ₯΄λ©΄ |
||||||||||||||||||||||||||||||||||||||||
| /> | ||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,3 +76,63 @@ export const mockUpPlace = { | |
| }, | ||
| ], | ||
| }; | ||
|
|
||
| export const mockUpVoting = { | ||
| promiseName: 'KUIT BARO 2μ°¨ νμ', | ||
| promisePlace: [ | ||
| { | ||
| placeName: 'κ°λ¨μ μ€νλ² μ€', | ||
| placeAddress: 'μμΈνΉλ³μ κ°λ¨κ΅¬ μμΌλ 123-123', | ||
| }, | ||
| { | ||
| placeName: '건κ΅λνκ΅ μ€μλμκ΄', | ||
| placeAddress: 'μμΈνΉλ³μ κ°λ¨κ΅¬ μμΌλ 123-123', | ||
| }, | ||
|
|
||
| { | ||
| placeName: 'κ°λ¨μ ν¬μΈνλ μ΄μ€', | ||
| placeAddress: 'μμΈνΉλ³μ κ°λ¨κ΅¬ μμΌλ 123-123', | ||
| }, | ||
| { | ||
| placeName: '건κ΅λνκ΅ μ 곡νκ΄', | ||
| placeAddress: 'μμΈνΉλ³μ κ°λ¨κ΅¬ μμΌλ 123-123', | ||
| }, | ||
| ], | ||
| promiseAvailableTimes: [ | ||
| { | ||
| date: '2025-04-03', | ||
| startTime: '12:00:00', | ||
| endTime: '12:30:00', | ||
| }, | ||
| { | ||
| date: '2025-04-03', | ||
| startTime: '12:00:00', | ||
| endTime: '12:30:00', | ||
| }, | ||
| { | ||
| date: '2025-04-03', | ||
| startTime: '12:00:00', | ||
| endTime: '12:30:00', | ||
| }, | ||
| { | ||
| date: '2025-04-03', | ||
| startTime: '12:00:00', | ||
| endTime: '12:30:00', | ||
| }, | ||
| ], | ||
| }; | ||
|
|
||
| export const mockUpConfirmed = { | ||
| promiseName: 'KUIT BARO 2μ°¨ νμ', | ||
| promisePlace: { | ||
| placeName: 'κ°λ¨μ μ€νλ² μ€', | ||
| placeAddress: 'μμΈνΉλ³μ κ°λ¨κ΅¬ μμΌλ 123-123', | ||
| }, | ||
|
|
||
| promiseAvailableTimes: { | ||
| date: '2025-04-03', | ||
| startTime: '12:00:00', | ||
| endTime: '12:30:00', | ||
| }, | ||
| promiseMembersNames: ['John Doe', 'Jane Doe', 'John Smith', 'Jane Smith'], | ||
| }; | ||
|
Comment on lines
+125
to
+138
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π‘ Verification agent π§© Analysis chainAPI DTOμ λͺ©μ κ΅¬μ‘°κ° μμ΄ν©λλ€ β μΆν μ€μ μ°λ μ μ΄λν°/νμ μ ν©μ± νμΈ νμ νμ¬ Confirmed λͺ©μ μ placeμ timeμ μ€μ²© κ°μ²΄λ‘ λκ³ μμΌλ, 곡κ°λ DTO(ConfirmedPromiseResponseDTO)λ fixedDateμ placeNameμ μ΅μμ νλλ‘ κ°μ§λλ€. μ€μ API μ°λ μ μ΄λν° λλ μ»΄ν¬λνΈ prop ꡬ쑰 μ ν©μ± μ κ²μ΄ νμν©λλ€. μ°λ μν₯λ νμΈ μ€ν¬λ¦½νΈμ λλ€(Confirmed DTO/νμ μ¬μ©μ² μ κ²): π Script executed: #!/bin/bash
# Confirmed κ΄λ ¨ DTO/νμ
μ¬μ© μ§μ νμΈ
set -euo pipefail
echo "== ConfirmedPromiseResponseDTO μ¬μ©μ² =="
rg -n -C2 '\bConfirmedPromiseResponseDTO\b' api src
echo
echo "== PromiseStatus Confirmed νλ¦ λ΄ fixedDate/placeName μ κ·Ό μ¬λΆ =="
rg -n -C3 '\bfixedDate\b|\bplaceName\b' src | sed -n '1,200p'Length of output: 15465 MockUpConfirmed κ΅¬μ‘°κ° ConfirmedPromiseResponseDTOμ λΆμΌμΉν©λλ€ β λͺ©μ κ°μ²΄ μμ λλ μ΄λν° μ μ© νμ λͺ©μ μμ promisePlace: { placeName, placeAddress }
promiseAvailableTimes: { date, startTime, endTime }λ₯Ό μ€μ²© κ°μ²΄λ‘ λκ³ μμΌλ, μ€μ ConfirmedPromiseResponseDTOλ λ€μκ³Ό κ°μ΄ μ΅μμ νλλ‘ μ μλμ΄ μμ΅λλ€: interface ConfirmedPromiseResponseDTO {
id: number;
promiseName: string;
fixedDate: string; // YYYY-MM-DD
placeName: string;
placeAddress: string;
startTime: string; // HH:MM:SS
endTime: string; // HH:MM:SS
promiseMembersNames: string[];
}μ€μ API μ°λ μ , μλ λ μ€ νλλ₯Ό μ νν΄ μΌμΉμμΌμΌ ν©λλ€:
μμ μμ (src/pages/promiseStatus/mockUp.ts): -import { mockUpConfirmed } from './mockUp';
+import type { ConfirmedPromiseResponseDTO } from 'api/data-contracts';
-export const mockUpConfirmed = {
- promiseName: 'KUIT BARO 2μ°¨ νμ',
- promisePlace: {
- placeName: 'κ°λ¨μ μ€νλ²
μ€',
- placeAddress: 'μμΈνΉλ³μ κ°λ¨κ΅¬ μμΌλ 123-123',
- },
-
- promiseAvailableTimes: {
- date: '2025-04-03',
- startTime: '12:00:00',
- endTime: '12:30:00',
- },
- promiseMembersNames: ['John Doe', 'Jane Doe', 'John Smith', 'Jane Smith'],
-};
+export const mockUpConfirmed: ConfirmedPromiseResponseDTO = {
+ id: 1,
+ promiseName: 'KUIT BARO 2μ°¨ νμ',
+ fixedDate: '2025-04-03',
+ placeName: 'κ°λ¨μ μ€νλ²
μ€',
+ placeAddress: 'μμΈνΉλ³μ κ°λ¨κ΅¬ μμΌλ 123-123',
+ startTime: '12:00:00',
+ endTime: '12:30:00',
+ promiseMembersNames: ['John Doe', 'Jane Doe', 'John Smith', 'Jane Smith'],
+};
π€ Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
λΆνμν console.log μ κ±° (λΉλ μ²΄ν¬ κ²½κ³ ν΄κ²°)
μ²΄ν¬ λκ΅¬κ° logλ₯Ό κΈμ§ν©λλ€. νμ μλ€λ©΄ μ κ±°νκ±°λ infoλ‘ κ΅μ²΄νμΈμ.
const handleClose = () => { - console.log(promiseId); navigate(`/`); };π Committable suggestion
π§° Tools
πͺ GitHub Check: build
[warning] 38-38:
Unexpected console statement. Only these console methods are allowed: warn, error, info
π€ Prompt for AI Agents