|
|
@@ -131,7 +131,7 @@
|
|
|
</table>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <button type="button" class="btn btn_primary"><span>출석 체크</span></button>
|
|
|
+ <button type="button" class="btn btn_primary" onclick="fnAttendEntry()"><span>출석 체크</span></button>
|
|
|
</div>
|
|
|
<div class="event_benefit">
|
|
|
<p class="title">출석 일수에 따라 달라지는 혜택</p>
|
|
|
@@ -170,23 +170,24 @@
|
|
|
<div class="cont_head">
|
|
|
<div>
|
|
|
<h4>다른 이벤트 보기</h4>
|
|
|
- <a href="">전체보기</a>
|
|
|
+ <a href="javascript:void(0);" th:if="${planInfo.planGb == 'E'}" onclick="cfnGoToPage(_PAGE_EVENT_MAIN);">전체보기</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="cont_body">
|
|
|
<div class="swiper-container">
|
|
|
<div class="swiper-wrapper">
|
|
|
+ <th:block th:each="PlanData, PlanStat : ${planList}">
|
|
|
<div class="swiper-slide">
|
|
|
- <a href="">
|
|
|
+ <a th:onclick="cfnGoToPlanDetail([[${PlanData.planSq}]])">
|
|
|
<div class="thumb">
|
|
|
- <img src="/images/pc/thumb/ev_list_img06.jpg" alt="스타일24만의 스타일로, tbj 하이 스타일링">
|
|
|
+ <img th:src="${@environment.getProperty('upload.image.view')+PlanData.mainImg}" alt="${PlanData.planNm}">
|
|
|
</div>
|
|
|
<div class="txt">
|
|
|
- <span class="brand">BUCKAROO</span>
|
|
|
- <p class="tit">스타일24만의 스타일로, TBJ 하이 스타일링</p>
|
|
|
+ <p class="tit" th:text="${PlanData.planNm}"></p>
|
|
|
</div>
|
|
|
</a>
|
|
|
</div>
|
|
|
+ </th:block>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="swiper-button-prev"></div>
|
|
|
@@ -199,85 +200,134 @@
|
|
|
</div>
|
|
|
<script th:inline="javascript">
|
|
|
let today = new Date();
|
|
|
+let year = today.getFullYear();
|
|
|
let date = today.getDate();
|
|
|
-let month = [[${month}]];
|
|
|
-
|
|
|
+let month =today.getMonth()+1;
|
|
|
+let calendar = [[${month}]];
|
|
|
+let planInfo = [[${planInfo}]];
|
|
|
+var custAttendList = [[${custAttendList}]];
|
|
|
var appendHtml = function () {
|
|
|
- $.each(month, function(idx, item) {
|
|
|
- html = '';
|
|
|
- html += '<tr>';
|
|
|
+ $("#monthTbody").html('');
|
|
|
+ $.each(calendar, function(idx, item) {
|
|
|
+
|
|
|
+ html = '<tr>\n';
|
|
|
|
|
|
if (item.sun!=null && item.sun!='') {
|
|
|
- html += ' <td>';
|
|
|
- html += ' <div class="date">'+item.sun+'</div>';
|
|
|
- html += ' </td> ';
|
|
|
+ html += ' <td id="td_'+item.sun+'">\n';
|
|
|
+ html += ' <div class="date" id="'+item.sun+'">'+item.sun+'</div>\n';
|
|
|
+ html += ' </td>\n ';
|
|
|
}else{
|
|
|
- html += ' <td>';
|
|
|
- html += ' <div class="date"></div>';
|
|
|
- html += ' </td> ';
|
|
|
+ html += ' <td>\n';
|
|
|
+ html += ' <div class="date"></div>\n';
|
|
|
+ html += ' </td>\n ';
|
|
|
}
|
|
|
+
|
|
|
if (item.mon!=null && item.mon!='') {
|
|
|
- html += ' <td>';
|
|
|
- html += ' <div class="date">'+item.mon+'</div>';
|
|
|
- html += ' </td> ';
|
|
|
+ html += ' <td id="td_'+item.mon+'">\n';
|
|
|
+ html += ' <div class="date" id="'+item.mon+'">'+item.mon+'</div>\n';
|
|
|
+ html += ' </td>\n ';
|
|
|
}else{
|
|
|
- html += ' <td>';
|
|
|
- html += ' <div class="date"></div>';
|
|
|
- html += ' </td> ';
|
|
|
+ html += ' <td>\n';
|
|
|
+ html += ' <div class="date"></div>\n';
|
|
|
+ html += ' </td>\n ';
|
|
|
}
|
|
|
if (item.tue!=null && item.tue!='') {
|
|
|
- html += ' <td>';
|
|
|
- html += ' <div class="date">'+item.tue+'</div>';
|
|
|
- html += ' </td> ';
|
|
|
+ html += ' <td id="td_'+item.tue+'">\n';
|
|
|
+ html += ' <div class="date" id="'+item.tue+'">'+item.tue+'</div>\n';
|
|
|
+ html += ' </td>\n ';
|
|
|
}else{
|
|
|
- html += ' <td>';
|
|
|
- html += ' <div class="date"></div>';
|
|
|
- html += ' </td> ';
|
|
|
+ html += ' <td>\n';
|
|
|
+ html += ' <div class="date"></div>\n';
|
|
|
+ html += ' </td>\n ';
|
|
|
}
|
|
|
if (item.wed!=null && item.wed!='') {
|
|
|
- html += ' <td>';
|
|
|
- html += ' <div class="date">'+item.wed+'</div>';
|
|
|
- html += ' </td> ';
|
|
|
+ html += ' <td id="td_'+item.wed+'">\n';
|
|
|
+ html += ' <div class="date" id="'+item.wed+'">'+item.wed+'</div>\n';
|
|
|
+ html += ' </td>\n ';
|
|
|
}else{
|
|
|
- html += ' <td>';
|
|
|
- html += ' <div class="date"></div>';
|
|
|
- html += ' </td> ';
|
|
|
+ html += ' <td>\n';
|
|
|
+ html += ' <div class="date"></div>\n';
|
|
|
+ html += ' </td>\n ';
|
|
|
}
|
|
|
if (item.thu!=null && item.thu!='') {
|
|
|
- html += ' <td>';
|
|
|
- html += ' <div class="date">'+item.thu+'</div>';
|
|
|
- html += ' </td> ';
|
|
|
+ if (item.thu == item1.entryDt) {
|
|
|
+ html += ' <td id="td_'+item.thu+'">\n';
|
|
|
+ html += ' <div class="date" id="'+item.thu+'">'+item.thu+'</div>\n';
|
|
|
+ html += ' </td>\n ';
|
|
|
}else{
|
|
|
- html += ' <td>';
|
|
|
- html += ' <div class="date"></div>';
|
|
|
- html += ' </td> ';
|
|
|
+ html += ' <td>\n';
|
|
|
+ html += ' <div class="date"></div>\n';
|
|
|
+ html += ' </td>\n ';
|
|
|
}
|
|
|
if (item.fri!=null && item.fri!='') {
|
|
|
- html += ' <td>';
|
|
|
- html += ' <div class="date">'+item.fri+'</div>';
|
|
|
- html += ' </td> ';
|
|
|
+ html += ' <td id="td_'+item.fri+'">\n';
|
|
|
+ html += ' <div class="date" id="'+item.fri+'">'+item.fri+'</div>\n';
|
|
|
+ html += ' </td>\n ';
|
|
|
}else{
|
|
|
- html += ' <td>';
|
|
|
- html += ' <div class="date"></div>';
|
|
|
- html += ' </td> ';
|
|
|
+ html += ' <td>\n';
|
|
|
+ html += ' <div class="date" ></div>\n';
|
|
|
+ html += ' </td>\n ';
|
|
|
}
|
|
|
if (item.sat!=null && item.sat!='') {
|
|
|
- html += ' <td>';
|
|
|
- html += ' <div class="date">'+item.sat+'</div>';
|
|
|
- html += ' </td> ';
|
|
|
+ html += ' <td id="td_'+item.sat+'">\n';
|
|
|
+ html += ' <div class="date" id="'+item.sat+'">'+item.sat+'</div>\n';
|
|
|
+ html += ' </td>\n ';
|
|
|
}else{
|
|
|
- html += ' <td>';
|
|
|
- html += ' <div class="date"></div>';
|
|
|
- html += ' </td> ';
|
|
|
+ html += ' <td>\n';
|
|
|
+ html += ' <div class="date"></div>\n';
|
|
|
+ html += ' </td>\n ';
|
|
|
}
|
|
|
|
|
|
- html += '</tr>'
|
|
|
+ html += '</tr>\n'
|
|
|
$("#monthTbody").append(html);
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+var fnAttendEntry = function () {
|
|
|
+ if (!cfCheckLogin()) {
|
|
|
+ mcxDialog.alert("로그인 후 참여 가능합니다.");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ let data = {planSq : planInfo.planSq};
|
|
|
+ let jsonData = JSON.stringify(data);
|
|
|
+ gagajf.ajaxJsonSubmit('/planning/event/attend/entry', jsonData, fnInfoConfirmCallBack);
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+var fnInfoConfirmCallBack = function(result) {
|
|
|
+ mcxDialog.alert(result.msg);
|
|
|
+ custAttendList = result.custAttendList;
|
|
|
+
|
|
|
+ $.each(custAttendList, function(idx, item) {
|
|
|
+ if(item.entryDt == date){
|
|
|
+ $("#td_"+date).attr("class","complete");
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ appendHtml();
|
|
|
+};
|
|
|
+
|
|
|
$(document).ready(function() {
|
|
|
+ if (!cfCheckLogin()) {
|
|
|
+ $(".day").html("<span>0</span>일");
|
|
|
+ }
|
|
|
|
|
|
appendHtml();
|
|
|
+ $("#td_"+date).attr("class","today");
|
|
|
+ $.each(custAttendList, function(idx, item) {
|
|
|
+ if(item.entryDt == date){
|
|
|
+ $("#td_"+date).attr("class","complete");
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ $(".title").html("<strong>"+month+"월</strong> 출석체크");
|
|
|
|
|
|
//공유 버튼 토글
|
|
|
$("button[data-name=openShare]").on("click", function(){
|