Skip to content

Commit

Permalink
붙이면서 깨진 부분 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
seroak committed Nov 19, 2024
1 parent 356cfc5 commit 9a522c1
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 148 deletions.
87 changes: 26 additions & 61 deletions src/pages/Classroom/Classroom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ const Classroom = () => {
<h2 className="group-title">{classroomData?.result.className}</h2>
</div>
</div>

<div className="s__container">
<div className="s__row">
<div className="progress-info">
Expand Down Expand Up @@ -216,73 +217,37 @@ const Classroom = () => {
</li>
</ul>
</div>
</div>
<div className="s__container">
<div className="s__row">
<div className="progress-info">
<ul className="progress-data">
<li>
<img src="/image/progress01.svg" alt="전체" />
<div>
<p>전체</p>
<p>{actionInfo && actionInfo?.ing + actionInfo?.complete + actionInfo?.help}</p>
</div>
</li>
<li>
<img src="/image/progress02.svg" alt="미제출" />
<div>
<p>미제출</p>
<p>{actionInfo?.ing}</p>
</div>
</li>
<li>
<img src="/image/progress03.svg" alt="성공" />
<div>
<p>제출 완료</p>
<p>{actionInfo?.complete}</p>
</div>
</li>
<li>
<img src="/image/progress04.svg" alt="실패" />
<div>
<p>도움 요청</p>
<p>{actionInfo?.help}</p>
</div>
</li>
</ul>
<div className="section-title">
<div className="title-left">
<h3>제출현황</h3>
</div>
<div className="section-title">
<div className="title-left">
<h3>제출현황</h3>
</div>

<div className="classroom-right">
<div className="right-btns" style={{ marginRight: "15px" }}>
<button className="red" onClick={handleClassOver}>
<img src="/image/icon_on_off.svg" alt="그룹삭제" />
수업 종료
</button>
</div>
<select name="" id="" className="s__select">
<option value="1">이름순</option>
<option value="2">제출순</option>
<option value="3">학번순</option>
</select>
<div className="classroom-right">
<div className="right-btns" style={{ marginRight: "15px" }}>
<button className="red" onClick={handleClassOver}>
<img src="/image/icon_on_off.svg" alt="그룹삭제" />
수업 종료
</button>
</div>
<select name="" id="" className="s__select">
<option value="1">이름순</option>
<option value="2">제출순</option>
<option value="3">학번순</option>
</select>
</div>
</div>
{guests && guests.length > 0 ? (
<ul className="section-data section-data01">
{guests.map((guest) => (
<Guest key={guest.id} guest={guest} onClick={() => openConsentInformationModal(guest)} />
))}
</ul>
) : (
<div className="section-empty-progress">
<img src="/image/img_empty_progress.png" alt="empty guests" />
</div>
)}
</div>
{guests && guests.length > 0 ? (
<ul className="section-data section-data01">
{guests.map((guest) => (
<Guest key={guest.id} guest={guest} onClick={() => openConsentInformationModal(guest)} />
))}
</ul>
) : (
<div className="section-empty-progress">
<img src="/image/img_empty_progress.png" alt="empty guests" />
</div>
)}
</div>
</div>
</>
Expand Down
145 changes: 58 additions & 87 deletions src/pages/ClassroomDashboard/ClassroomDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ const ClassroomDashboard = () => {
</div>
<img src="/image/img_copywriting.png" alt="클래스룸 이미지" />
</div>

<div className="group-data-wrap">
<div className="group-data-left">
<div className="user-info">
Expand Down Expand Up @@ -124,104 +125,74 @@ const ClassroomDashboard = () => {
<button onClick={submitCreateClassName}>생성</button>
</div>
</div>
<img src="/image/img_copywriting.png" alt="클래스룸 이미지" />
</div>
<div className="group-data-wrap">
<div className="group-data-left">
<div className="user-info">
<p>{userData?.result?.name}</p>
<span>{userData?.result?.email}</span>
<ul className="user-group-data">
<li>
<p>강의방 수</p>
<p>{hostClassRooms.length}</p>
</li>
<li>
<p>학습방 수</p>
<p>{guestClassRooms.length}</p>
</li>
</ul>
<label htmlFor="addgroup">클래스룸 생성</label>
<div>
<div className="group-right">
<div className="section-title">
<div className="title-left">
<h3>강의방</h3>
</div>
<div className="title-right">
<div className="search-wrap">
<input
type="text"
id="addgroup"
placeholder="클래스룸 이름"
value={createClassName}
onChange={changeCreateClassName} // 입력값 변경시 상태 업데이트
placeholder="클래스룸 검색"
value={searchHostTerm}
onChange={(e) => setHostSearchTerm(e.target.value)} // 검색어 업데이트
/>
<button onClick={submitCreateClassName}>생성</button>
<button>
<img src="/image/icon_search.svg" alt="검색" />
</button>
</div>
</div>
</div>
<div className="group-right">
<div className="section-title">
<div className="title-left">
<h3>강의방</h3>
</div>
<div className="title-right">
<div className="search-wrap">
<input
type="text"
placeholder="클래스룸 검색"
value={searchHostTerm}
onChange={(e) => setHostSearchTerm(e.target.value)} // 검색어 업데이트
/>
<button>
<img src="/image/icon_search.svg" alt="검색" />
</button>
</div>
</div>
{filteredHostClassRooms && filteredHostClassRooms.length > 0 ? (
<ul className="section-data section-data04">
{filteredHostClassRooms.map((item) => (
<HostRoom key={item.id} classData={item} />
))}
</ul>
) : searchHostTerm !== "" ? (
<div className="section-empty-search-classrooom">
<img src="/image/img_empty_search_class.png" alt="empty host classroom" />
</div>
{filteredHostClassRooms && filteredHostClassRooms.length > 0 ? (
<ul className="section-data section-data04">
{filteredHostClassRooms.map((item) => (
<HostRoom key={item.id} classData={item} />
))}
</ul>
) : searchHostTerm !== "" ? (
<div className="section-empty-search-classrooom">
<img src="/image/img_empty_search_class.png" alt="empty host classroom" />
</div>
) : (
<div className="section-empty-classroom">
<img src="/image/img_none_host_classroom.png" alt="empty search host classroom" />
</div>
)}
<div className="section-title">
<div className="title-left">
<h3>학습방</h3>
</div>
<div className="title-right">
<div className="search-wrap">
<input
type="text"
placeholder="클래스룸 검색"
value={searchGuestTerm}
onChange={(e) => setGuestSearchTerm(e.target.value)} // 검색어 업데이트
/>
<button>
<img src="/image/icon_search.svg" alt="검색" />
</button>
</div>
</div>
) : (
<div className="section-empty-classroom">
<img src="/image/img_none_host_classroom.png" alt="empty search host classroom" />
</div>
{filteredGuestClassRooms && filteredGuestClassRooms.length > 0 ? (
<ul className="section-data section-data04">
{filteredGuestClassRooms.map((item) => (
<GuestRoom key={item.id} classData={item} />
))}
</ul>
) : searchHostTerm !== "" ? (
<div className="section-empty-search-classrooom">
<img src="/image/img_empty_search_class.png" alt="empty host classroom" />
</div>
) : (
<div className="section-empty-classroom">
<img src="/image/img_none_host_classroom.png" alt="empty search host classroom" />
)}
<div className="section-title">
<div className="title-left">
<h3>학습방</h3>
</div>
<div className="title-right">
<div className="search-wrap">
<input
type="text"
placeholder="클래스룸 검색"
value={searchGuestTerm}
onChange={(e) => setGuestSearchTerm(e.target.value)} // 검색어 업데이트
/>
<button>
<img src="/image/icon_search.svg" alt="검색" />
</button>
</div>
)}
</div>
</div>
{filteredGuestClassRooms && filteredGuestClassRooms.length > 0 ? (
<ul className="section-data section-data04">
{filteredGuestClassRooms.map((item) => (
<GuestRoom key={item.id} classData={item} />
))}
</ul>
) : searchHostTerm !== "" ? (
<div className="section-empty-search-classrooom">
<img src="/image/img_empty_search_class.png" alt="empty host classroom" />
</div>
) : (
<div className="section-empty-classroom">
<img src="/image/img_none_host_classroom.png" alt="empty search host classroom" />
</div>
)}
</div>
</div>
</div>
Expand Down

0 comments on commit 9a522c1

Please sign in to comment.