-
Notifications
You must be signed in to change notification settings - Fork 1
[Feature/#50] 워크스페이스 생성/수정 UI 구현 #54
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
ef5df9b
feat: 워크스페이스 UI 구현
jjjsun 06b1981
feat: 워크스페이스 생성 모달 UI 구현
jjjsun 5bbf869
Merge remote-tracking branch 'origin/develop' into feature/#50
jjjsun 84dd193
chore: 버튼 최신화진행, 버튼관련 스타일 재조정
jjjsun 0a7e81a
fix: workspaceSetting 라우팅 경로 수정
jjjsun 8933449
fix: 미사용 setting 라우팅 삭제
jjjsun afbb49a
fix: 코드래빗 수정사항 반영
jjjsun 2276339
fix: 잘못사용한 괄호 수정
jjjsun dc78595
fix: 워크스페이스 생성할때 url 삭제
jjjsun 02e63ff
chore: dropdownMenu에 아이콘 추가
jjjsun 6d4d764
feat: textarea 컴포넌트로 수정
jjjsun 12f4ba3
fix: 워크스페이스 생성 드롭존을 선택했을시에도 업로드되도록 수정
jjjsun 131ae55
fix: 워크스페이스 생성 모달 타이틀 중복 제거
jjjsun b67589f
chore: 로고이미지 없을경우 기본 비즈니스빌딩이미지 추가
jjjsun c019783
fix: 반응형 적용
jjjsun 97e4c35
fix: 코드래빗 수정사항 반영
jjjsun 894b348
fix: build 오류사항 수정
jjjsun a3bb044
fix: 코드래빗 수정사항반영
jjjsun 0c2b005
fix: 드랍다운 메뉴 cursor-pointer 추가,아이콘 hover 색상 및 기본 컬러 수정
jjjsun 4c69cbf
style: 조직 검색 input 기본 ring 스타일 및 hover/focus 상태 개선
jjjsun 9433b52
fix: 코드래빗 수정사항 반영
jjjsun 09fff8c
fix: build 에러 처리(logoFile 아직 사용전이라 난 에러, 실제사용으로 일단 처리해둠)
jjjsun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,7 +70,7 @@ export default function Button({ | |
| {leftIcon} | ||
| </span> | ||
| )} | ||
| <span>{children}</span> | ||
| {children} | ||
| </button> | ||
| ); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| import type React from "react"; | ||
| import { useLayoutEffect, useRef } from "react"; | ||
| import { twMerge } from "tailwind-merge"; | ||
|
|
||
| type TProps = { | ||
| id: string; | ||
| label: string; | ||
| value: string; | ||
| placeholder?: string; | ||
| onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void; | ||
| className?: string; | ||
| minRows?: number; | ||
| }; | ||
|
|
||
| export default function TextareaField({ | ||
| id, | ||
| label, | ||
| value, | ||
| placeholder, | ||
| onChange, | ||
| className, | ||
| minRows = 4, | ||
| }: TProps) { | ||
| const ref = useRef<HTMLTextAreaElement | null>(null); | ||
| const resize = () => { | ||
| const el = ref.current; | ||
| if (!el) return; | ||
| el.style.height = "auto"; | ||
| el.style.height = `${el.scrollHeight}px`; | ||
| }; | ||
| useLayoutEffect(() => { | ||
| resize(); | ||
| }, [value]); | ||
|
|
||
| return ( | ||
| <div className="flex flex-col"> | ||
| <label className="text-text-main select-none ml-1" htmlFor={id}> | ||
| {label} | ||
| </label> | ||
| <textarea | ||
| ref={ref} | ||
| id={id} | ||
| rows={minRows} | ||
| value={value} | ||
| className={twMerge( | ||
| "w-full resize-none overflow-hidden rounded-component-md bg-gray-50 px-5 py-4 outline-none transition-smooth hover:bg-gray-100 focus:bg-white focus:ring-2 focus:ring-logo-1/30 text-body1 text-text-main placeholder:text-text-placeholder", | ||
| className, | ||
| )} | ||
| placeholder={placeholder} | ||
| onChange={onChange} | ||
| onInput={resize} | ||
| /> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| import type { TWorkspace } from "@/types/workspace/workspace"; | ||
|
|
||
| import { | ||
| DropdownMenu, | ||
| type TMenuItem, | ||
| } from "@/components/common/dropdownmenu/DropdownMenu"; | ||
|
|
||
| import BuildingIcon from "@/assets/icon/workspace/building.svg?react"; | ||
| import VectorIcon from "@/assets/icon/workspace/Vector.svg?react"; | ||
|
|
||
| type TProps = { | ||
| workspace: TWorkspace; | ||
| menuItems: TMenuItem[]; | ||
| }; | ||
|
|
||
| export default function WorkspaceCard({ workspace: w, menuItems }: TProps) { | ||
| return ( | ||
| <li className="flex items-center justify-between rounded-component-md bg-white px-6 py-5 shadow-sm border border-gray-100"> | ||
| <div className="flex items-center gap-5 min-w-0"> | ||
| <div className="w-20 h-20 bg-gray-100 shrink-0 rounded-component-sm"> | ||
| {/* TODO: 스타일 확인을 위해 bg-gray-100넣어둠. API연동할때 삭제예정 */} | ||
| {w.logoUrl ? ( | ||
| <img | ||
| src={w.logoUrl} | ||
| alt={`${w.name} 로고`} | ||
| className="w-full h-full object-cover rounded-component-sm" | ||
| /> | ||
| ) : ( | ||
| <div className="w-full h-full flex items-center justify-center"> | ||
| <BuildingIcon className="w-12 h-12" /> | ||
| </div> | ||
| )} | ||
| </div> | ||
|
|
||
| <div className="min-w-0"> | ||
| <div className="font-heading3 text-text-main truncate">{w.name}</div> | ||
| <div className="font-body1 text-text-main mt-1 truncate"> | ||
| {w.description ?? ""} | ||
| </div> | ||
| <div className="font-body1 text-text-sub mt-2"> | ||
| {w.myRole ?? "내 직책 및 역할"} | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div className="flex items-center gap-4 shrink-0"> | ||
| <DropdownMenu | ||
| trigger={<VectorIcon aria-hidden="true" />} | ||
| aria-label={`${w.name} 워크스페이스 메뉴`} | ||
| className="h-10 w-10 cursor-pointer rounded-xl hover:bg-gray-100 transition-colors flex items-center justify-center" | ||
| items={menuItems} | ||
| /> | ||
jjjsun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </div> | ||
jjjsun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </li> | ||
| ); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.