-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcalendar.js
More file actions
30 lines (25 loc) · 1001 Bytes
/
calendar.js
File metadata and controls
30 lines (25 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function getRoundInfo(scheduleId) {
fetch("https://qquickqqueue.store/api/musicals/round/" + scheduleId)
.then(Response => {
return Response.json();
})
.then(Data => {
const info = Data.data;
let actorNames = "";
info.actors.forEach(e => {
actorNames += e.actorName + ", ";
});
actorNames = actorNames.slice(0, -2);
document.querySelector('.cal-info').innerHTML = `
<div>
<p>남은 좌석</p>
<p>VIP : ${info.sumVIP}, R : ${info.sumR}, S : ${info.sumS}, A : ${info.sumA}</p>
<p>배우 : ${actorNames}</p>
<button onclick="openWindow(${scheduleId})">좌석 선택</button>
</div>`
})
}
function openWindow(scheduleId) {
const options = 'width=1200, height=900, top=50, left=50, scrollbars=yes'
window.open(`seat.html?scheduleId=${scheduleId}`, '_blank', options)
}