-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feat: 오버레이 가이드 기능 개발 * HOTFIX: FaultLayer z-index 수정 * Feat: 튜토리얼 개발
- Loading branch information
1 parent
f98897a
commit 5127981
Showing
36 changed files
with
1,012 additions
and
74 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,24 @@ | ||
import type { SVGProps } from 'react'; | ||
const SvgHelpIcon = (props: SVGProps<SVGSVGElement>) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
xmlnsXlink="http://www.w3.org/1999/xlink" | ||
fill="none" | ||
viewBox="0 0 45 45" | ||
{...props} | ||
> | ||
<path fill="url(#help_icon_svg__a)" d="M0 0h45v45H0z" /> | ||
<defs> | ||
<pattern id="help_icon_svg__a" width={1} height={1} patternContentUnits="objectBoundingBox"> | ||
<use xlinkHref="#help_icon_svg__b" transform="scale(.01)" /> | ||
</pattern> | ||
<image | ||
xlinkHref="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKh0lEQVR4nO1da4wlRRUuwHcCCPrL+FoUE43iG3zviq8gEoOy62NZlYTV6OKTICri+EIxiET4IROBAcbh4jl959Hn3Osmqw6J4EpcAy7hseKCsGEhoKOLsrv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v7cQ4oQUpjdQjFoWc3FvXJ304qjEEa2RamxBwMdI6Y+IiyzX5qPld9FxdrQmzumTexrJam7WS2Qal3bUSkMcNb6gnxMNMP/rPpGlzPUlM7bnjRMjUrK5Clw+V7uvq2Q0+cLI9A4AcFh8XPa5ALxFUr+yUkDsu7ZJYk+0He1/HRfv0GyTK9r7DmuF+RI75BvlpJwonNGOCojdX5R/y++iv0kBhPbEQO45Tdqo5ExphBFGGGGEEVSE/wG5vwQDa3lcDQAAAABJRU5ErkJggg==" | ||
id="help_icon_svg__b" | ||
width={100} | ||
height={100} | ||
/> | ||
</defs> | ||
</svg> | ||
); | ||
export default SvgHelpIcon; |
This file contains 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 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 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 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 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,87 @@ | ||
/* eslint-disable @typescript-eslint/no-non-null-assertion */ | ||
import useTutorial from '@hooks/ui/useTutorial'; | ||
import { createPortal } from 'react-dom'; | ||
import { StepConfig, StepsConfig, TutorialOverlay } from './TutorialOverlay'; | ||
import useEditShiftStore from '@hooks/shift/useEditShift/store'; | ||
import { useEffect } from 'react'; | ||
import useEditShift from '@hooks/shift/useEditShift'; | ||
|
||
const MakeTutorial = () => { | ||
const { | ||
state: { showMakeTutorial }, | ||
actions: { setMakeTutorial }, | ||
} = useTutorial(); | ||
const { | ||
actions: { toggleEditMode }, | ||
} = useEditShift(); | ||
const { setState } = useEditShiftStore(); | ||
|
||
const config: StepsConfig = { | ||
steps: new Map<number, StepConfig>(), | ||
infoBoxHeight: 150, | ||
infoBoxMargin: 20, | ||
scrollLock: true, | ||
}; | ||
|
||
config.steps.set(1, { | ||
highlightIds: ['toolbar'], | ||
title: '근무표 만들기', | ||
info: '이곳은 툴바입니다. 근무표 작성에 도움이 되는 여러 설정을 변경할 수 있어요', | ||
infoBoxAlignment: 'left', | ||
}); | ||
|
||
config.steps.set(2, { | ||
highlightIds: ['calendar'], | ||
title: '근무표 만들기', | ||
info: '이곳은 근무표입니다. 툴바의 "수정하기" 버튼을 누른 후 셀을 클릭하여 근무를 작성할 수 있어요', | ||
infoBoxAlignment: 'left', | ||
}); | ||
|
||
config.steps.set(3, { | ||
highlightIds: ['count_by_day'], | ||
title: '근무표 만들기', | ||
info: '이곳은 날짜별 근무 수입니다. 날짜별로 각 근무가 얼마나 채워져있는지 볼 수 있어요', | ||
infoBoxAlignment: 'left', | ||
}); | ||
|
||
config.steps.set(4, { | ||
highlightIds: ['count_by_nurse'], | ||
title: '근무표 만들기', | ||
info: '이곳은 간호사별 근무 수입니다. 간호사별로 근무가 얼마나 채워져있는지 볼 수 있어요. WO는 주말 OFF를 의미합니다.', | ||
infoBoxAlignment: 'center', | ||
}); | ||
|
||
config.steps.set(5, { | ||
highlightIds: ['editButton'], | ||
title: '근무표 만들기', | ||
info: '수정하기 버튼을 눌러서 근무표를 만들 수 있어요', | ||
infoBoxAlignment: 'center', | ||
onNextStep: toggleEditMode, | ||
}); | ||
|
||
config.steps.set(6, { | ||
highlightIds: ['cell_sample'], | ||
title: '근무표 만들기', | ||
info: '셀을 클릭하시고 D E N O를 입력하시면 근무를 작성하실 수 있어요! \n더 자세한 가이드는 메뉴얼 문서를 참고해주세요!', | ||
infoBoxAlignment: 'center', | ||
onPrevStep: toggleEditMode, | ||
ctaText: '메뉴얼 보러가기', | ||
ctaUrl: 'https://gom3.notion.site/68d3ad01e68d4d6a8b4cb8c2409353a3?pvs=4', | ||
}); | ||
|
||
useEffect(() => { | ||
if (showMakeTutorial) { | ||
setState('readonly', true); | ||
} | ||
}, [showMakeTutorial]); | ||
|
||
return ( | ||
showMakeTutorial && | ||
createPortal( | ||
<TutorialOverlay config={config} closeCallback={() => setMakeTutorial(false)} />, | ||
document.getElementById('tutorial')! | ||
) | ||
); | ||
}; | ||
|
||
export default MakeTutorial; |
This file contains 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,80 @@ | ||
/* eslint-disable @typescript-eslint/no-non-null-assertion */ | ||
import useTutorial from '@hooks/ui/useTutorial'; | ||
import { createPortal } from 'react-dom'; | ||
import { StepConfig, StepsConfig, TutorialOverlay } from './TutorialOverlay'; | ||
import { useEffect } from 'react'; | ||
import useEditShiftTeam from '@hooks/ward/useEditShiftTeam'; | ||
|
||
const MemberTutorial = () => { | ||
const { | ||
state: { showMemberTutorial }, | ||
actions: { setMemberTutorial }, | ||
} = useTutorial(); | ||
const { | ||
state: { shiftTeams }, | ||
actions: { selectNurse }, | ||
} = useEditShiftTeam(); | ||
|
||
const config: StepsConfig = { | ||
steps: new Map<number, StepConfig>(), | ||
infoBoxHeight: 150, | ||
infoBoxMargin: 20, | ||
scrollLock: true, | ||
}; | ||
|
||
config.steps.set(1, { | ||
highlightIds: ['ward_info'], | ||
title: '간호사 관리하기', | ||
info: '이곳에서 병동의 정보를 확인할 수 있어요', | ||
infoBoxAlignment: 'left', | ||
}); | ||
|
||
config.steps.set(2, { | ||
highlightIds: ['shift_team_list'], | ||
title: '간호사 관리하기', | ||
info: '이곳에서 근무팀에 속한 간호사의 정보를 확인할 수 있어요.', | ||
infoBoxAlignment: 'left', | ||
onNextStep: () => { | ||
shiftTeams && selectNurse(shiftTeams[0].nurses[0].nurseId); | ||
}, | ||
}); | ||
|
||
config.steps.set(3, { | ||
highlightIds: ['nurse_sample'], | ||
title: '간호사 관리하기', | ||
info: '간호사 이름을 눌러 편집해보세요!', | ||
infoBoxAlignment: 'center', | ||
onPrevStep: () => { | ||
selectNurse(null); | ||
}, | ||
}); | ||
|
||
config.steps.set(4, { | ||
highlightIds: ['nurse_edit_drawer'], | ||
title: '간호사 관리하기', | ||
info: '편집을 완료하고 하단에 저장을 눌러주세요! \n더 자세한 가이드는 메뉴얼 문서를 참고해주세요!', | ||
ctaText: '메뉴얼 보러가기', | ||
ctaUrl: 'https://gom3.notion.site/befb4602f83241ed896a1700eb592b35?pvs=4', | ||
|
||
infoBoxAlignment: 'right', | ||
onNextStep: () => { | ||
selectNurse(null); | ||
}, | ||
}); | ||
|
||
useEffect(() => { | ||
if (showMemberTutorial) { | ||
selectNurse(null); | ||
} | ||
}, [showMemberTutorial]); | ||
|
||
return ( | ||
showMemberTutorial && | ||
createPortal( | ||
<TutorialOverlay config={config} closeCallback={() => setMemberTutorial(false)} />, | ||
document.getElementById('tutorial')! | ||
) | ||
); | ||
}; | ||
|
||
export default MemberTutorial; |
This file contains 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,80 @@ | ||
/* eslint-disable @typescript-eslint/no-non-null-assertion */ | ||
import useTutorial from '@hooks/ui/useTutorial'; | ||
import { createPortal } from 'react-dom'; | ||
import { StepConfig, StepsConfig, TutorialOverlay } from './TutorialOverlay'; | ||
import { useEffect } from 'react'; | ||
import { useRequestShiftStore } from '@hooks/shift/useRequestShift/store'; | ||
import useRequestShift from '@hooks/shift/useRequestShift'; | ||
|
||
const RequestTutorial = () => { | ||
const { | ||
state: { showRequestTutorial }, | ||
actions: { setRequestTutorial }, | ||
} = useTutorial(); | ||
const { | ||
actions: { toggleEditMode }, | ||
} = useRequestShift(); | ||
const { setState } = useRequestShiftStore(); | ||
|
||
const config: StepsConfig = { | ||
steps: new Map<number, StepConfig>(), | ||
infoBoxHeight: 150, | ||
infoBoxMargin: 20, | ||
scrollLock: true, | ||
}; | ||
|
||
config.steps.set(1, { | ||
highlightIds: ['toolbar'], | ||
title: '신청근무 작성하기', | ||
info: '이곳은 툴바입니다. 신청근무 작성에 도움이 되는 여러 설정을 변경할 수 있어요', | ||
infoBoxAlignment: 'left', | ||
}); | ||
|
||
config.steps.set(2, { | ||
highlightIds: ['calendar'], | ||
title: '신청근무 작성하기', | ||
info: '이곳은 신청 근무표입니다. 툴바의 "수정하기" 버튼을 누른 후 셀을 클릭하여 신청 근무를 작성할 수 있어요', | ||
infoBoxAlignment: 'left', | ||
}); | ||
|
||
config.steps.set(3, { | ||
highlightIds: ['nurse_request_list'], | ||
title: '신청근무 작성하기', | ||
info: '이곳에서는 연동된 간호사의 신청 근무를 볼 수 있어요', | ||
infoBoxAlignment: 'right', | ||
}); | ||
|
||
config.steps.set(4, { | ||
highlightIds: ['editButton'], | ||
title: '신청근무 작성하기', | ||
info: '수정하기 버튼을 눌러서 신청 근무표를 만들 수 있어요', | ||
infoBoxAlignment: 'right', | ||
onNextStep: toggleEditMode, | ||
}); | ||
|
||
config.steps.set(5, { | ||
highlightIds: ['cell_sample'], | ||
title: '신청근무 작성하기', | ||
info: '셀을 클릭하시고 D E N O를 입력하시면 신청근무를 작성하실 수 있어요! \n더 자세한 가이드는 메뉴얼 문서를 참고해주세요!', | ||
infoBoxAlignment: 'center', | ||
onPrevStep: toggleEditMode, | ||
ctaText: '메뉴얼 보러가기', | ||
ctaUrl: 'https://gom3.notion.site/befb4602f83241ed896a1700eb592b35?pvs=4', | ||
}); | ||
|
||
useEffect(() => { | ||
if (showRequestTutorial) { | ||
setState('readonly', true); | ||
} | ||
}, [showRequestTutorial]); | ||
|
||
return ( | ||
showRequestTutorial && | ||
createPortal( | ||
<TutorialOverlay config={config} closeCallback={() => setRequestTutorial(false)} />, | ||
document.getElementById('tutorial')! | ||
) | ||
); | ||
}; | ||
|
||
export default RequestTutorial; |
Oops, something went wrong.