Skip to content

Commit

Permalink
Fix: 멘토링 피드백 반영 (DUT-596 / #66)
Browse files Browse the repository at this point in the history
* Feat: 멘토링 피드백 반영

* Feat: UI 설정 편집 기능 개발

* Fix: 멘토링 피드백 반영
  • Loading branch information
sjsjsj1246 authored Oct 20, 2023
1 parent 801ac13 commit 9499e99
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 33 deletions.
Binary file modified src/assets/fonts/LINESeedKR-Bd.ttf
Binary file not shown.
Binary file added src/assets/fonts/LINESeedKR-Rg.ttf
Binary file not shown.
Binary file added src/assets/fonts/LINESeedKR-Th.ttf
Binary file not shown.
5 changes: 3 additions & 2 deletions src/components/Layouts/AuthzLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ function AuthzLayout() {
} = useAuth();

useEffect(() => {
console.log(isAuth, accountMe);
if (!isAuth) {
location.replace(ROUTE.LOGIN);
}
if (accountMe && accountMe.status !== 'LINKED' && accountMe.status !== 'DEMO') {
location.replace(ROUTE.REGISTER);
if (location.pathname !== ROUTE.REGISTER) location.replace(ROUTE.REGISTER);
}
}, [isAuth]);
}, [isAuth, accountMe]);

useInterval(
() => {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/auth/useAuth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const useAuth = () => {
setState('accessToken', accessToken);
initEditShiftStore();
axiosInstance.defaults.headers.common['Authorization'] = `Bearer ${accessToken}`;
location.replace(nextPageUrl || '/');
location.replace(nextPageUrl || '/make');
};

const { mutate: demoTry } = useMutation(demoStart(), {
Expand Down
20 changes: 10 additions & 10 deletions src/hooks/shift/useEditShift/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,19 +167,19 @@ export const checkShift = (
const division = shift.divisionShiftNurses[i];
for (let j = 0; j < division.length; j++) {
const row = division[j];
let str = row.wardShiftList
.map((x, index) =>
x === null
? '-'
: x === row.wardReqShiftList[index]
? wardShiftTypeMap.get(x)?.shortName.toUpperCase()
: wardShiftTypeMap.get(x)?.shortName.toLowerCase()
)
.join('');
str = '-' + str + '-'; // 단일 나이트 검사를 위한 처리
for (const key of Object.keys(checkFaultOptions) as FaultType[]) {
const option = checkFaultOptions[key];
if (option.isActive === false) continue;
let str = row.wardShiftList
.map((x, index) =>
x === null
? '-'
: x === row.wardReqShiftList[index]
? wardShiftTypeMap.get(x)?.shortName.toUpperCase()
: wardShiftTypeMap.get(x)?.shortName.toLowerCase()
)
.join('');
str = '-' + str + '-'; // 단일 나이트 검사를 위한 처리
// eslint-disable-next-line no-constant-condition
while (true) {
const match = option.regExp.exec(str);
Expand Down
6 changes: 1 addition & 5 deletions src/hooks/shift/useEditShift/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,17 +299,13 @@ const useEditShift = (activeEffect = false) => {
} else {
setState('month', month - 1);
}
if (month === 7) return;
else setState('month', month - 1);
} else if (type === 'next') {
if (month === 12) {
setState('month', 1);
setState('year', year + 1);
} else {
setState('month', month + 1);
}
if (month === 8) return;
else setState('month', month + 1);
}
sendEvent(event.change_month);
},
Expand Down Expand Up @@ -504,7 +500,7 @@ const useEditShift = (activeEffect = false) => {
useEffect(() => {
if (activeEffect && shift && checkFaultOptions && wardShiftTypeMap)
setState('faults', checkShift(shift, checkFaultOptions, wardShiftTypeMap));
}, [activeEffect, shift, checkFaultOptions]);
}, [activeEffect, shift, checkFaultOptions, wardShiftTypeMap, readonly]);

useEffect(() => {
if (activeEffect) document.addEventListener('keydown', handleKeyDown);
Expand Down
25 changes: 20 additions & 5 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,30 @@ body::-webkit-scrollbar {

@font-face {
font-family: 'LINESeedKR';
font-style: bold;
font-style: normal;
src: url('./assets/fonts/LINESeedKR-Th.ttf');
font-weight: 100;
}

@font-face {
font-family: 'LINESeedKR';
font-style: normal;
src: url('./assets/fonts/LINESeedKR-Rg.ttf');
font-weight: 400;
}

@font-face {
font-family: 'LINESeedKR';
font-style: normal;
src: url('./assets/fonts/LINESeedKR-Bd.ttf');
font-weight: 700;
}

/* 100 Thin */
@font-face {
font-family: 'Poppins';
font-style: normal;
src: url('./assets/fonts/Poppins-Bold.ttf');
src: url('./assets/fonts/Poppins-Thin.ttf');
font-weight: 100;
}
/* 200 Ulta Light */
Expand Down Expand Up @@ -193,7 +208,7 @@ body::-webkit-scrollbar {
@font-face {
font-family: 'Poppins';
font-style: normal;
src: url('./assets/fonts/Poppins-Bold.ttf');
src: url('./assets/fonts/Poppins-SemiBold.ttf');
font-weight: 600;
}
/* 700 Bold */
Expand All @@ -207,13 +222,13 @@ body::-webkit-scrollbar {
@font-face {
font-family: 'Poppins';
font-style: normal;
src: url('./assets/fonts/Poppins-Bold.ttf');
src: url('./assets/fonts/Poppins-ExtraBold.ttf');
font-weight: 800;
}
/* 900 Heavy */
@font-face {
font-family: 'Poppins';
font-style: normal;
src: url('./assets/fonts/Poppins-Bold.ttf');
src: url('./assets/fonts/Poppins-Black.ttf');
font-weight: 900;
}
2 changes: 0 additions & 2 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import './index.css';
const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
refetchOnMount: 'always',
staleTime: 1000 * 10,
},
},
Expand Down
3 changes: 1 addition & 2 deletions src/pages/LandingPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
Logo,
LogoGray,
LogoWithSymbol,
MenuIcon,
PlaystoreGrayIcon,
PlaystoreIcon,
} from '@assets/svg';
Expand Down Expand Up @@ -59,7 +58,7 @@ function LandingPage() {
>
다운로드
</a>
<MenuIcon className="ml-[20px] h-[24px] w-[24px]" />
{/* <MenuIcon className="ml-[20px] h-[24px] w-[24px]" /> */}
</div>
<div className="hidden w-full items-center xl:flex">
<div className="ml-auto mr-[3.75rem] flex h-[2.5rem] items-center gap-[2.8125rem] border-r-[.0625rem] border-sub-4 pr-[3.75rem]">
Expand Down
4 changes: 0 additions & 4 deletions src/pages/MakeShiftPage/components/ShiftCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ export default function ShiftCalendar() {
}
}, [focus]);

useEffect(() => {
console.log(shift, foldedLevels, wardShiftTypeMap, currentShiftTeam);
}, [shift, foldedLevels, wardShiftTypeMap, currentShiftTeam]);

return shift && foldedLevels && wardShiftTypeMap && currentShiftTeam ? (
<div ref={clickAwayRef} className="flex w-full flex-col">
<div className="z-20 my-[.75rem] flex h-[1.875rem] items-center gap-[1.25rem] bg-[#FDFCFE]">
Expand Down
4 changes: 2 additions & 2 deletions src/pages/RegisterPage/components/RegisterNurse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const schema = yup
phoneNum: yup
.string()
.required()
.matches(/^01([0|1|6|7|8|9])-?([0-9]{3,4})-?([0-9]{4})$/),
.matches(/^01([0|1|6|7|8|9])([0-9]{3,4})([0-9]{4})$/),
gender: yup.string().required(),
isWorker: yup.boolean().required(),
})
Expand Down Expand Up @@ -106,7 +106,7 @@ function RegisterNurse() {
.with('matches', () => '전화번호 형식을 지켜주세요.')
.otherwise(() => undefined)}
{...register('phoneNum')}
placeholder="010-1234-1234"
placeholder="01012341234"
/>
</div>
<div className="flex-auto"></div>
Expand Down

0 comments on commit 9499e99

Please sign in to comment.