Add: show availableActivateDateTime of maestro
This commit is contained in:
@@ -22,9 +22,26 @@ function isExperienceMaestroAccount() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function showEndDate(date) {
|
||||
var endDateArray = date.split(" ");
|
||||
var endDate = endDateArray[0]; // "YY-MM_DD"
|
||||
|
||||
var today = new Date();
|
||||
var endDay = new Date(endDate);
|
||||
var diffDay = (endDay.getTime() - today.getTime()) / (1000 * 60 * 60 * 24);
|
||||
|
||||
$("#maestro_count_down_date").html("~ " + endDate + "<br/>유효 기간 : " + Math.ceil(diffDay) + "일");
|
||||
if(diffDay < 30)
|
||||
$("#maestro_count_down_date").addClass("text-danger");
|
||||
else if(diffDay < 10)
|
||||
$("#maestro_count_down_date").addClass("bg-danger text-light");
|
||||
else if(diffDay < 0)
|
||||
$("#maestro_count_down_date").addClass("bg-secondary text-light");
|
||||
}
|
||||
|
||||
function onLoadSuccessMaestroInfo() {
|
||||
$("#maestro_info_id").text(maestroInfo.maestroName + "님, 환영합니다.");
|
||||
$("#maestro_info_id").text("[ " + maestroInfo.maestroName + " ] 님, 환영합니다.");
|
||||
showEndDate(maestroInfo.availableActivateDateTime);
|
||||
$("#maestro_info_player_count").val("학생수 : " + maestroInfo.getRegisteredPlayerCount() + " / " + maestroInfo.getMaxPlayerCount());
|
||||
|
||||
if(maestroInfo.getRegisteredPlayerCount() === maestroInfo.getMaxPlayerCount()) {
|
||||
@@ -120,8 +137,9 @@ function deactivateApp(appID) {
|
||||
|
||||
<div class="container">
|
||||
<div class="row border border-primary rounded py-2 mx-1 my-2">
|
||||
<div id="maestro_info_id" class="col my-auto"></div>
|
||||
<div id="maestro_url" class="col my-auto"></div>
|
||||
<div id="maestro_info_id" class="col-sm my-auto"></div>
|
||||
<!-- <div id="maestro_url" class="col my-auto"></div> -->
|
||||
<div id="maestro_count_down_date" class="col-sm-2 my-auto mx-1 text-center"></div>
|
||||
|
||||
<div class="eyebrow ml-auto mt-0 d-md-flex align-items-center">
|
||||
<div class="input-group my-auto">
|
||||
|
||||
Reference in New Issue
Block a user