+
{label}
@@ -48,6 +52,7 @@ const InputBox = (props: PropsWithChildren) => {
DateWorkDetail[];
};
-const CalendarDataContext = createContext([]);
+const CalendarDataContext = createContext({
+ calendarData: [],
+ getFilteredData: (date: Date) => [],
+});
export const CalendarDataProvider = ({ children }: PropsWithChildren) => {
const [calendarData, setCalendarData] = useState(mockData);
diff --git a/src/types/calendar.d.ts b/src/types/calendar.d.ts
index 0bdf2fa..3064c64 100644
--- a/src/types/calendar.d.ts
+++ b/src/types/calendar.d.ts
@@ -6,6 +6,7 @@ export type CalendarDayType = {
payPerHour: number;
startTime: Date;
endTime: Date;
+ restMinutes: number;
};
export type CalendarSalaryType = {
@@ -25,6 +26,7 @@ export type DateWorkDetail = {
payPerHour: number;
startTime: Date;
endTime: Date;
+ restMinutes: number;
};
export type Attendance = {
@@ -33,6 +35,5 @@ export type Attendance = {
payPerHour: number; // 시급
startTime: Date; // 시작 시간
endTime: Date; // 끝 시간
- restStartTime: Date;
- restEndTime: Date;
+ restMinutes: number;
};
diff --git a/src/utils/const-value.ts b/src/utils/const-value.ts
new file mode 100644
index 0000000..d9c7a7e
--- /dev/null
+++ b/src/utils/const-value.ts
@@ -0,0 +1 @@
+export const MINIMUM_PAY_PER_HOUR = 9860;
diff --git a/yarn.lock b/yarn.lock
index 82aea05..dde75e3 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -450,6 +450,13 @@
dependencies:
"@types/react" "*"
+"@types/react-portal@^4.0.4":
+ version "4.0.7"
+ resolved "https://registry.yarnpkg.com/@types/react-portal/-/react-portal-4.0.7.tgz#c7436c5039e74ec80d488fbe5c98dbcc6469bf44"
+ integrity sha512-3zQJL6Pqcq7d73+cakVkZDqAYGFBo37XXPfahjhdScr9EdYPlf9evYilL38Fpzs1YGWz7F2SkPtN6+ygTO7ymg==
+ dependencies:
+ "@types/react" "*"
+
"@types/react-router-dom@^5.3.3":
version "5.3.3"
resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.3.3.tgz#e9d6b4a66fcdbd651a5f106c2656a30088cc1e83"
@@ -568,7 +575,7 @@
dependencies:
"@swc/core" "^1.5.7"
-"@wojtekmaj/date-utils@^1.1.3":
+"@wojtekmaj/date-utils@^1.1.3", "@wojtekmaj/date-utils@^1.5.0":
version "1.5.1"
resolved "https://registry.yarnpkg.com/@wojtekmaj/date-utils/-/date-utils-1.5.1.tgz#c3cd67177ac781cfa5736219d702a55a2aea5f2b"
integrity sha512-+i7+JmNiE/3c9FKxzWFi2IjRJ+KzZl1QPu6QNrsgaa2MuBgXvUy4gA1TVzf/JMdIIloB76xSKikTWuyYAIVLww==
@@ -1027,6 +1034,11 @@ delayed-stream@~1.0.0:
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==
+detect-element-overflow@^1.4.0:
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/detect-element-overflow/-/detect-element-overflow-1.4.2.tgz#2e48509e5aa07647f4335b5f4f52c146b92f99c5"
+ integrity sha512-4m6cVOtvm/GJLjo7WFkPfwXoEIIbM7GQwIh4WEa4g7IsNi1YzwUsGL5ApNLrrHL29bHeNeQ+/iZhw+YHqgE2Fw==
+
didyoumean@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037"
@@ -2063,6 +2075,11 @@ lru-cache@^10.2.0:
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.2.tgz#48206bc114c1252940c41b25b41af5b545aca878"
integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==
+make-event-props@^1.6.0:
+ version "1.6.2"
+ resolved "https://registry.yarnpkg.com/make-event-props/-/make-event-props-1.6.2.tgz#c8e0e48eb28b9b808730de38359f6341de7ec5a2"
+ integrity sha512-iDwf7mA03WPiR8QxvcVHmVWEPfMY1RZXerDVNCRYW7dUr2ppH3J58Rwb39/WG39yTZdRSxr3x+2v22tvI0VEvA==
+
map-age-cleaner@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a"
@@ -2419,7 +2436,7 @@ prettier@^3.3.2:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a"
integrity sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==
-prop-types@^15.8.1:
+prop-types@^15.5.8, prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
@@ -2453,6 +2470,15 @@ react-calendar@*, react-calendar@^5.0.0:
get-user-locale "^2.2.1"
warning "^4.0.0"
+react-clock@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/react-clock/-/react-clock-5.0.0.tgz#369b1c258b304a538a4de7d8cae18c7be77e51d5"
+ integrity sha512-Cj3XqwLB1svtGWiw/A6vmLIPb9OhA/BsWUpS46lXTNTilK7zmP2zmtFgQEAfWUssc3nERXkMXzI0YrkzDpc0gQ==
+ dependencies:
+ "@wojtekmaj/date-utils" "^1.5.0"
+ clsx "^2.0.0"
+ get-user-locale "^2.2.1"
+
react-dom@^18.3.1:
version "18.3.1"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4"
@@ -2461,6 +2487,14 @@ react-dom@^18.3.1:
loose-envify "^1.1.0"
scheduler "^0.23.2"
+react-fit@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/react-fit/-/react-fit-2.0.1.tgz#4bcb4de7aa94c9fdf452b0c63de0889496f50244"
+ integrity sha512-Eip6ALs/+6Jv82Si0I9UnfysdwVlAhkkZRycgmMdnj7jwUg69SVFp84ICxwB8zszkfvJJ2MGAAo9KAYM8ZUykQ==
+ dependencies:
+ detect-element-overflow "^1.4.0"
+ warning "^4.0.0"
+
react-icons@^5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-5.2.1.tgz#28c2040917b2a2eda639b0f797bff1888e018e4a"
@@ -2479,6 +2513,13 @@ react-kakao-maps-sdk@^1.1.27:
"@babel/runtime" "^7.22.15"
kakao.maps.d.ts "^0.1.39"
+react-portal@^4.2.2:
+ version "4.2.2"
+ resolved "https://registry.yarnpkg.com/react-portal/-/react-portal-4.2.2.tgz#bff1e024147d6041ba8c530ffc99d4c8248f49fa"
+ integrity sha512-vS18idTmevQxyQpnde0Td6ZcUlv+pD8GTyR42n3CHUQq9OHi1C4jDE4ZWEbEsrbrLRhSECYiao58cvocwMtP7Q==
+ dependencies:
+ prop-types "^15.5.8"
+
react-router-dom@^6.24.0:
version "6.24.0"
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.24.0.tgz#ec49dc38c49bb9bd25b310a8ae849268d3085e1d"
@@ -2494,6 +2535,28 @@ react-router@6.24.0:
dependencies:
"@remix-run/router" "1.17.0"
+react-time-picker-typescript@^1.2.3:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/react-time-picker-typescript/-/react-time-picker-typescript-1.2.3.tgz#5e2074318c38174d0af217859b0cb69188bc0daa"
+ integrity sha512-sENSnh2JG2PyTYSiVCCvawVJVwchwwjt05mkEj1XoPUIWEg2saMgBYRG5duRUh5LqlHLY7gqGOMlLlWPgEGTNQ==
+ dependencies:
+ "@types/react-portal" "^4.0.4"
+ react-portal "^4.2.2"
+ tiny-warning "^1.0.3"
+
+react-time-picker@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/react-time-picker/-/react-time-picker-7.0.0.tgz#3f9d80d2de8a8ffc57c41dd71095477f6a7ffc03"
+ integrity sha512-k6mUjkI+OsY73mg0yjMxqkLXv/UXR1LN7AARNqfyGZOwqHqo1JrjL3lLHTHWQ86HmPTBL/dZACbIX/fV1NLmWg==
+ dependencies:
+ "@wojtekmaj/date-utils" "^1.1.3"
+ clsx "^2.0.0"
+ get-user-locale "^2.2.1"
+ make-event-props "^1.6.0"
+ react-clock "^5.0.0"
+ react-fit "^2.0.0"
+ update-input-width "^1.4.0"
+
react@^18.3.1:
version "18.3.1"
resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891"
@@ -2889,6 +2952,11 @@ thenify-all@^1.0.0:
dependencies:
any-promise "^1.0.0"
+tiny-warning@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754"
+ integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==
+
to-regex-range@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
@@ -2990,6 +3058,11 @@ update-browserslist-db@^1.0.16:
escalade "^3.1.2"
picocolors "^1.0.1"
+update-input-width@^1.4.0:
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/update-input-width/-/update-input-width-1.4.2.tgz#49d327a39395185b0fd440b9c3b1d6f81173655c"
+ integrity sha512-/p0XLhrQQQ4bMWD7bL9duYObwYCO1qGr8R19xcMmoMSmXuQ7/1//veUnCObQ7/iW6E2pGS6rFkS4TfH4ur7e/g==
+
uri-js@^4.2.2:
version "4.4.1"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"