Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WhenMeet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
websystem2023-2
WhenMeet
Commits
9dfb4fb3
Commit
9dfb4fb3
authored
1 year ago
by
이권민
Browse files
Options
Downloads
Patches
Plain Diff
[EDIT] usertimeinfo 수정
parent
4b45dad7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
react-whenMeet/src/components/CalendarWeek2.jsx
+24
-33
24 additions, 33 deletions
react-whenMeet/src/components/CalendarWeek2.jsx
react-whenMeet/src/routes/UserTimeInfo.js
+2
-1
2 additions, 1 deletion
react-whenMeet/src/routes/UserTimeInfo.js
with
26 additions
and
34 deletions
react-whenMeet/src/components/CalendarWeek2.jsx
+
24
−
33
View file @
9dfb4fb3
...
@@ -57,16 +57,7 @@ function CaculateWeek({
...
@@ -57,16 +57,7 @@ function CaculateWeek({
};
};
const
handleClick
=
(
newDate
,
idx
,
comp
)
=>
{
const
handleClick
=
(
newDate
,
idx
,
comp
)
=>
{
// for(let day = fDay; day <= eDay; day+=(60*60*24*1000)){
// for(let indx = startTime; indx <= endTime; indx++){
// const elm = document.getElementById(day + indx);
// elm.classList.remove("dragging")
// }
// }
// setAvailableTimes([])
const
elm2
=
document
.
getElementById
(
comp
);
const
elm2
=
document
.
getElementById
(
comp
);
// console.log(comp, elm2);
if
(
isContain
(
newDate
-
0
+
idx
)
||
elm2
.
classList
.
contains
(
"
dragging
"
))
{
if
(
isContain
(
newDate
-
0
+
idx
)
||
elm2
.
classList
.
contains
(
"
dragging
"
))
{
const
elm
=
document
.
getElementById
(
newDate
-
0
+
idx
);
const
elm
=
document
.
getElementById
(
newDate
-
0
+
idx
);
elm
.
classList
.
remove
(
"
dragging
"
);
elm
.
classList
.
remove
(
"
dragging
"
);
...
@@ -84,8 +75,6 @@ function CaculateWeek({
...
@@ -84,8 +75,6 @@ function CaculateWeek({
const
selectArr
=
[];
const
selectArr
=
[];
weekArr
.
push
(<
td
></
td
>);
weekArr
.
push
(<
td
></
td
>);
// 시작 끝 값을 수정해서 일정 변경
// console.log(startTime, endTime);
for
(
let
i
=
startTime
;
i
<
endTime
;
i
++
)
{
for
(
let
i
=
startTime
;
i
<
endTime
;
i
++
)
{
const
forSelect
=
[];
const
forSelect
=
[];
const
minute
=
i
*
30
;
const
minute
=
i
*
30
;
...
@@ -146,7 +135,8 @@ function CaculateWeek({
...
@@ -146,7 +135,8 @@ function CaculateWeek({
selectArr
.
push
(
selectArr
.
push
(
<
tr
key
=
{
i
}
>
<
tr
key
=
{
i
}
>
{
time
}
{
forSelect
}
<
td
>
{
time
}
</
td
>
{
forSelect
}
</
tr
>
</
tr
>
);
);
}
}
...
@@ -215,7 +205,6 @@ function CalendarWeek2({
...
@@ -215,7 +205,6 @@ function CalendarWeek2({
setNowWeek
(
newWeek
);
setNowWeek
(
newWeek
);
setNowMonth
(
newMonth
);
setNowMonth
(
newMonth
);
setNowYear
(
newYear
);
setNowYear
(
newYear
);
// setCurrentDay(new Date(nowYear, nowMonth - 1, 1*(nowWeek-1) + nowDay));
};
};
const
nextWeek
=
()
=>
{
const
nextWeek
=
()
=>
{
let
newWeek
=
nowWeek
+
1
;
let
newWeek
=
nowWeek
+
1
;
...
@@ -238,29 +227,31 @@ function CalendarWeek2({
...
@@ -238,29 +227,31 @@ function CalendarWeek2({
return
(
return
(
<
div
className
=
"calendar"
>
<
div
className
=
"calendar"
>
<
div
className
=
"header"
>
<
div
className
=
"header"
>
<
button
onClick
=
{
prevWeek
}
>
prev
</
button
>
<
h2
>
<
h4
>
<
button
onClick
=
{
prevWeek
}
>
prev
</
button
>
{
nowYear
}
년
{
nowMonth
}
월
{
nowWeek
}
주차
{
nowYear
}
년
{
nowMonth
}
월
{
nowWeek
}
주차
</
h4
>
<
button
onClick
=
{
nextWeek
}
>
next
</
button
>
<
button
onClick
=
{
nextWeek
}
>
next
</
button
>
<
/
h2
>
</
div
>
</
div
>
{
state
?
<
p
>
가능한 시간
</
p
>
:
<
p
>
불가능한 시간
</
p
>
}
{
state
?
<
p
>
가능한 시간
</
p
>
:
<
p
>
불가능한 시간
</
p
>
}
<
table
className
=
"calendarTable"
>
<
div
className
=
"calendarTable"
>
<
MakeDay2
/>
<
table
>
<
CaculateWeek
<
MakeDay2
/>
week
=
{
nowWeek
}
<
CaculateWeek
nowYear
=
{
nowYear
}
week
=
{
nowWeek
}
nowMonth
=
{
nowMonth
}
nowYear
=
{
nowYear
}
startDate
=
{
startDate
}
nowMonth
=
{
nowMonth
}
endDate
=
{
endDate
}
startDate
=
{
startDate
}
startTime
=
{
startTime
}
endDate
=
{
endDate
}
endTime
=
{
endTime
}
startTime
=
{
startTime
}
availableSchedules
=
{
availableSchedules
}
endTime
=
{
endTime
}
availableTimes
=
{
availableTimes
}
availableSchedules
=
{
availableSchedules
}
setAvailableTimes
=
{
setAvailableTimes
}
availableTimes
=
{
availableTimes
}
isContain
=
{
isContain
}
setAvailableTimes
=
{
setAvailableTimes
}
/>
isContain
=
{
isContain
}
</
table
>
/>
</
table
>
</
div
>
</
div
>
</
div
>
);
);
}
}
...
...
This diff is collapsed.
Click to expand it.
react-whenMeet/src/routes/UserTimeInfo.js
+
2
−
1
View file @
9dfb4fb3
...
@@ -4,6 +4,8 @@ import CalendarWeek2 from "../components/CalendarWeek2";
...
@@ -4,6 +4,8 @@ import CalendarWeek2 from "../components/CalendarWeek2";
import
axios
from
"
axios
"
;
import
axios
from
"
axios
"
;
import
{
useLocation
,
useNavigate
,
useParams
}
from
"
react-router-dom
"
;
import
{
useLocation
,
useNavigate
,
useParams
}
from
"
react-router-dom
"
;
import
"
../styles/UserTimeInfo.css
"
;
function
UserTimeInfo
()
{
function
UserTimeInfo
()
{
const
location
=
useLocation
();
const
location
=
useLocation
();
const
navigate
=
useNavigate
();
const
navigate
=
useNavigate
();
...
@@ -26,7 +28,6 @@ function UserTimeInfo() {
...
@@ -26,7 +28,6 @@ function UserTimeInfo() {
let
st
=
0
;
let
st
=
0
;
let
et
=
48
;
let
et
=
48
;
console
.
log
(
location
.
state
.
startTime
,
location
.
state
.
endTime
);
if
(
if
(
!
(
!
(
location
.
state
.
startTime
===
location
.
state
.
endTime
&&
location
.
state
.
startTime
===
location
.
state
.
endTime
&&
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment