diff --git a/client/public/images/moon.svg b/client/public/images/moon.svg
new file mode 100644
index 0000000000000000000000000000000000000000..ba1f37995425b6c4470059707ca8164a9b21c909
--- /dev/null
+++ b/client/public/images/moon.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/client/public/images/sun.svg b/client/public/images/sun.svg
new file mode 100644
index 0000000000000000000000000000000000000000..d08f5e1033fd446dfc1f28cb1e2a506a640e15e1
--- /dev/null
+++ b/client/public/images/sun.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/client/src/components/Admin/TimeTable.js b/client/src/components/Admin/TimeTable.js
index 277d39083663c92ab187a988c867cfe2fcafc9a1..893e32cfb42bd3dafdde65f34c1b39edf855dd7e 100644
--- a/client/src/components/Admin/TimeTable.js
+++ b/client/src/components/Admin/TimeTable.js
@@ -51,7 +51,10 @@ const TimeTable = ({ ticketInfo = { movieId: 0 }, setTicketInfo }) => {
...ticketInfo,
timetableId: time.id,
time: time.date.split('T')[0] + " " + hours + ":" + mins,
- selectedTheater: time.theater.theaterName
+ selectedTheater: time.theater.theaterName,
+ theaterId:time.theaterId,
+ partTime: time.partTime,
+ week: time.week
})
}
@@ -62,7 +65,7 @@ const TimeTable = ({ ticketInfo = { movieId: 0 }, setTicketInfo }) => {
timeList.map(el =>
{el.theaterName} 관 /
{el.theaterTypeName}
{el.timetable.map(time => {
- console.log("timetable==",time)
+ console.log("timetable==", time)
if (ticketInfo)
return
handleClick(time)}>
@@ -81,7 +84,9 @@ const TimeTable = ({ ticketInfo = { movieId: 0 }, setTicketInfo }) => {
})}
)
- :
서버에 저장되어 있는 상영시간표가 존재하지 않습니다.
아래의 양식을 작성해 새로운 상영시간표를 등록해주세요.
}
+ :
서버에 저장되어 있는 상영시간표가 존재하지 않습니다.
+ {/*
아래의 양식을 작성해 새로운 상영시간표를 등록해주세요. */}
+
}
>
)
}
diff --git a/client/src/components/TheaterInfo.js b/client/src/components/TheaterInfo.js
index a30ad61f9702403e43388b944ef60c93e28fa139..bc33b490d900ba6afc8d43cb750533e0179f8295 100644
--- a/client/src/components/TheaterInfo.js
+++ b/client/src/components/TheaterInfo.js
@@ -53,15 +53,16 @@ const TheaterInfo = () => {
try {
const response = await cinemaApi.getCinemaInfo()
const response2 = await theaterApi.getAll()
- setCinemaInfo({ ...response, theaterNum: response2.length })
- setCurrentInfo({
- name: "대중교통 안내",
- title: "transportation",
- information: response.transportation
- })
+ if (response && response2) {
+ setCinemaInfo({ ...response, theaterNum: response2.length })
+ setCurrentInfo({
+ name: "대중교통 안내",
+ title: "transportation",
+ information: response.transportation
+ })
+ }
} catch (error) {
- // catchErrors(error, setError)
- console.log(error)
+ catchErrors(error, setError)
}
}
@@ -76,7 +77,7 @@ const TheaterInfo = () => {
return (
<>
{cinemaInfo ?
-
+
{cinemaInfo.cinemaName}

@@ -112,7 +113,7 @@ const TheaterInfo = () => {
:
-
+
극장정보를 불러올 수 없습니다.
}
>
diff --git a/client/src/pages/MoviePage.js b/client/src/pages/MoviePage.js
index 2367888f75d4eff0b527d08d4fdf643bd69957c9..94bd0fbed08dafba38411b81bdd5b5b7132995fd 100644
--- a/client/src/pages/MoviePage.js
+++ b/client/src/pages/MoviePage.js
@@ -66,7 +66,7 @@ const MoviePage = ({ location }) => {
{movieInfo.title}
-
예매율: {Math.round((movieInfo.ticket_sales / (movieInfo.totalReservationRate.totalReservationRate || 1)) * 100)}% 누적관객수: {movieInfo.ticket_sales}명
+
예매율: {Math.round((movieInfo.ticket_sales / (movieInfo.totalReservationRate.totalReservationRate || 1)) * 100)}%
{movieInfo.director || movieInfo.cast
?
<>
@@ -101,9 +101,9 @@ const MoviePage = ({ location }) => {
-
+ {/*
-
+ */}
@@ -113,9 +113,9 @@ const MoviePage = ({ location }) => {
-
*/}
diff --git a/client/src/pages/PaymentPage/PaymentPage.js b/client/src/pages/PaymentPage/PaymentPage.js
index 49c481e840cbaebaa0fba01a592cc69b12232f10..aa965bb7c9b89ae87ba4012db95723df3e219d5e 100644
--- a/client/src/pages/PaymentPage/PaymentPage.js
+++ b/client/src/pages/PaymentPage/PaymentPage.js
@@ -211,7 +211,7 @@ const Payment = ({ location }) => {
{ticketInfo.title}
{ticketInfo.cinema}
{ticketInfo.time}
-
{ticketInfo.selectedTheater}관 {ticketInfo.selectedSeats.map(el => String.fromCharCode(parseInt(el.split('-')[0]) + 65) + el.split('-')[1]) + ' '}
+
{ticketInfo.selectedTheater}관 {ticketInfo.selectedSeats.map(el => String.fromCharCode(parseInt(el.split('-')[0]) + 64) + el.split('-')[1]) + ' '}
성인: {ticketInfo.adult}명
청소년: {ticketInfo.youth}명
diff --git a/client/src/pages/TicketingPage.js b/client/src/pages/TicketingPage.js
index 356b1f211c7e0d86381c02278062e0a0f81aa7a9..26af9a513689bf26610c4f022955fc3fcd0a707b 100644
--- a/client/src/pages/TicketingPage.js
+++ b/client/src/pages/TicketingPage.js
@@ -57,7 +57,7 @@ const TicketingPage = ({ location }) => {
}
}
return (
-
+
영화
@@ -73,12 +73,12 @@ const TicketingPage = ({ location }) => {
-
+
{movieInfo
?

:
영화선택
}
-
+
극장선택
{movieInfo && ticketInfo.cinema
?
@@ -90,16 +90,16 @@ const TicketingPage = ({ location }) => {
: }
-
좌석선택
+
좌석선택
{movieInfo && ticketInfo.cinema && ticketInfo.timetableId
?
-

+

- :

+ :

}
diff --git a/client/src/pages/TicketingSeatPage.js b/client/src/pages/TicketingSeatPage.js
index c9c58555d4950361734a89b7cf4df204ccb4a849..db5fb136025f168ca50a9656f6b3aa8105e02933 100644
--- a/client/src/pages/TicketingSeatPage.js
+++ b/client/src/pages/TicketingSeatPage.js
@@ -63,7 +63,9 @@ const TicketingSeatPage = ({ location }) => {
theaterTypeId: theaterInfo.theatertypeId
}
})
- const basicFee = response3.data[0].day + response3.data[0].defaultPrice + response3.data[0].weekdays
+ const week = ticketInfo.week
+ const partTime = ticketInfo.partTime
+ const basicFee = response3.data[0][partTime] + response3.data[0].defaultPrice + response3.data[0][week]
setTicketFee({
adult: basicFee + response3.data[0].adult,
youth: basicFee + response3.data[0].youth,
diff --git a/server/controllers/movie.controller.js b/server/controllers/movie.controller.js
index 785c6eeb5b4e18a416835458cd05db25cdb7e4d7..e725be81ad55436610332801638f323c9c1fc555 100644
--- a/server/controllers/movie.controller.js
+++ b/server/controllers/movie.controller.js
@@ -137,7 +137,7 @@ const getMovieList = async (req, res) => {
}
}
elements.sort(function (a, b) {
- return a.release_date - b.release_date
+ return b.release_date - a.release_date
})
res.json(elements)
} else {