Toggle navigation
Toggle navigation
This project
Loading...
Sign in
HyeonJun Jeon
/
Extended-Calendar
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
HyeonJun Jeon
2022-06-06 05:24:36 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e2407127cd0dd1ddae73b85f6fa7b014d8f4c84b
e2407127
1 parent
4b6fb2a4
[Del] Test code
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
71 deletions
src/pages/Debug.js
src/utils/Test.js
src/pages/Debug.js
View file @
e240712
...
...
@@ -4,7 +4,6 @@ import { useNavigate } from "react-router-dom";
//import { login } from "../libs/E_Campus";
import
"../styles/Debug.css"
;
import
{
initTempSubjects
}
from
"../utils/Test"
;
const
Debug
=
()
=>
{
console
.
log
(
"visit Debug"
);
...
...
@@ -26,10 +25,6 @@ const Debug = () => {
const
handleSubmit
=
async
(
e
)
=>
{
let
result
;
switch
(
state
.
type
)
{
case
"initSubjects"
:
await
initTempSubjects
();
result
=
"inited"
;
break
;
case
"login"
:
//result = login(state.input1, state.input2);
break
;
...
...
@@ -66,7 +61,6 @@ const Debug = () => {
<
div
>
<
span
>
type
:
<
/span
>
<
select
name
=
"type"
value
=
{
state
.
type
}
onChange
=
{
handleChangeState
}
>
<
option
value
=
{
"initSubjects"
}
>
initSubjects
<
/option
>
<
option
value
=
{
"login"
}
>
login
<
/option
>
<
option
value
=
{
"server"
}
>
server
<
/option
>
<
/select
>
...
...
src/utils/Test.js
deleted
100644 → 0
View file @
4b6fb2a
import
{
subForage
,
scheForage
,
dataForage
}
from
"./LocalForage"
;
import
{
toYMDStr
}
from
"./Dates"
;
async
function
initTempSubjects
()
{
const
tempsch
=
[
{
subCode
:
"1"
,
type
:
"zoom"
,
category
:
"과목A"
,
label
:
""
,
start
:
[
9
,
30
],
},
{
subCode
:
"2"
,
type
:
"ecampus"
,
category
:
"과목B"
,
label
:
"과제"
,
end
:
[
23
,
59
],
},
];
await
scheForage
.
setItem
(
toYMDStr
(
new
Date
(
"2022-5-20"
),
"/"
),
tempsch
);
await
scheForage
.
setItem
(
toYMDStr
(
new
Date
(
"2022-5-27"
),
"/"
),
tempsch
);
await
scheForage
.
setItem
(
toYMDStr
(
new
Date
(
"2022-6-3"
),
"/"
),
tempsch
);
let
tcolors
=
[
"red"
,
"green"
,
"blue"
,
"orange"
,
"gold"
,
"aqua"
,
"chartreuse"
,
];
const
subCodeLst
=
[
"1"
,
"2"
];
const
subObj
=
{
1
:
{
name
:
"과목A"
,
color
:
tcolors
[
0
],
selected
:
true
,
},
2
:
{
name
:
"과목B"
,
color
:
tcolors
[
1
],
selected
:
true
,
},
};
await
subForage
.
setItem
(
"1"
,
subObj
[
"1"
]);
await
subForage
.
setItem
(
"2"
,
subObj
[
"2"
]);
for
(
let
i
=
2
;
i
<
7
;
i
++
)
{
let
code
=
(
i
+
1
).
toString
();
let
tsub
=
{
name
:
"과목"
+
code
,
color
:
tcolors
[
i
],
selected
:
true
,
};
subCodeLst
.
push
(
code
);
await
subForage
.
setItem
(
code
,
tsub
);
}
dataForage
.
setItem
(
"Subjects"
,
subCodeLst
);
}
export
{
initTempSubjects
};
Please
register
or
login
to post a comment