Skip to content

Commit

Permalink
feat: summary가 존재할 때만 AI 요약 버튼 보이게 하기
Browse files Browse the repository at this point in the history
  • Loading branch information
simeunseo committed Dec 5, 2024
1 parent 4b2da46 commit 1829eab
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 3 additions & 1 deletion apps/web/src/components/dashboard/apply/TicleInfoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface TicleInfoCardProps {
startTime: string;
endTime: string;
status: 'closed' | 'open' | 'inProgress';
isSummaryExist: boolean;
}

function TicleInfoCard({
Expand All @@ -24,6 +25,7 @@ function TicleInfoCard({
startTime,
endTime,
status,
isSummaryExist,
}: TicleInfoCardProps) {
const { isOpen, onOpen, onClose } = useModal();
const { dateStr, timeRangeStr } = formatDateTimeRange(startTime, endTime);
Expand Down Expand Up @@ -59,7 +61,7 @@ function TicleInfoCard({
</div>
</div>
<div className="flex gap-9">
{status === 'closed' && (
{status === 'closed' && isSummaryExist && (
<button
className="flex items-center gap-2 rounded-md p-2.5 hover:bg-teritary"
onClick={handleAiSummaryDialogOpen}
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/components/dashboard/apply/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ function Apply() {
startTime={ticle.startTime}
endTime={ticle.endTime}
status={ticle.ticleStatus}
isSummaryExist={ticle.summary}
/>
))}
</Fragment>
Expand Down
12 changes: 10 additions & 2 deletions apps/web/src/components/dashboard/open/TicleInfoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@ interface TicleInfoCardProps {
startTime: string;
endTime: string;
status: 'closed' | 'open' | 'inProgress';
isSummaryExist: boolean;
}

function TicleInfoCard({ ticleId, ticleTitle, startTime, endTime, status }: TicleInfoCardProps) {
function TicleInfoCard({
ticleId,
ticleTitle,
startTime,
endTime,
status,
isSummaryExist,
}: TicleInfoCardProps) {
const {
isOpen: isApplicantsDialogOpen,
onOpen: onApplicantsDialogOpen,
Expand Down Expand Up @@ -72,7 +80,7 @@ function TicleInfoCard({ ticleId, ticleTitle, startTime, endTime, status }: Ticl
</div>
</div>
<div className="flex gap-9">
{status === 'closed' && (
{status === 'closed' && isSummaryExist && (
<button
className="flex items-center gap-2 rounded-md p-2.5 hover:bg-teritary"
onClick={handleAiSummaryDialogOpen}
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/components/dashboard/open/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function Open() {
startTime={ticle.startTime}
endTime={ticle.endTime}
status={ticle.ticleStatus}
isSummaryExist={ticle.summary}
/>
))}
</Fragment>
Expand Down

0 comments on commit 1829eab

Please sign in to comment.