Skip to content

Commit

Permalink
[FE] FEAT: 지나간 일정도 일정관리 모달 열리도록 수정 #1691
Browse files Browse the repository at this point in the history
  • Loading branch information
wet6123 committed Oct 29, 2024
1 parent f391c74 commit 45ab06d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ const DetailTableBodyItem = ({
const handleItemClick = (item: IPresentationScheduleDetailInfo) => {
if (
isAdmin &&
itemInfo.itemStatus !== itemType.NO_EVENT_PAST &&
itemInfo.item.presentationStatus !== PresentationStatusType.CANCEL
) {
setCurrentPresentation({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ const DetailTableBodyItemTopTr = ({
tableHeadEntriesWithoutDate: [string, string][];
tableHeadEntriesWithoutDateAndSubject: [string, string][];
}) => {
const isClickable = (function checkClickable() {
if (itemInfo.item.presentationStatus !== PresentationStatusType.CANCEL) {
if (isAdmin) {
return true;
} else {
return !itemInfo.itemStatus;
}
}
})();

return (
<>
<TopTrStyled
Expand All @@ -85,11 +95,7 @@ const DetailTableBodyItemTopTr = ({
id={isItemOpen ? "selected" : ""}
presentationStatus={itemInfo.item.presentationStatus}
onClick={() => {
((isAdmin && itemInfo.itemStatus !== itemType.NO_EVENT_PAST) ||
(!isAdmin && !itemInfo.itemStatus)) &&
itemInfo.item.presentationStatus !==
PresentationStatusType.CANCEL &&
handleItemClick(itemInfo.item);
isClickable && handleItemClick(itemInfo.item);
}}
open={isItemOpen}
>
Expand Down Expand Up @@ -215,15 +221,13 @@ const TopTrStyled = styled.tr<{
cursor: ${(props) => {
if (props.presentationStatus === PresentationStatusType.CANCEL)
return "";
else if (props.isAdmin)
return props.itemStatus === itemType.NO_EVENT_PAST ? "" : "pointer";
else if (props.isAdmin) return "pointer";
else return props.itemStatus ? "" : "pointer";
}};
background-color: ${(props) => {
if (props.presentationStatus === PresentationStatusType.CANCEL)
return "";
else if (props.isAdmin)
return props.itemStatus === itemType.NO_EVENT_PAST ? "" : "#91B5FB";
else if (props.isAdmin) return "#91B5FB";
else return props.itemStatus ? "" : "#91B5FB";
}};
}
Expand Down

0 comments on commit 45ab06d

Please sign in to comment.