diff --git a/src/web/module/maestro_upgrade.html b/src/web/module/maestro_upgrade.html
index a0465b2..8d71026 100644
--- a/src/web/module/maestro_upgrade.html
+++ b/src/web/module/maestro_upgrade.html
@@ -15,6 +15,8 @@ function loadMaestroInfo(maestroID) {
(function(jsonData) {
// console.log(jsonData);
registeredAccountType = jsonData.accountType;
+ showEndDate(jsonData.availableActivateDateTime);
+ showPlayerCount(jsonData.accountType, jsonData.playerCount);
updateCards(registeredAccountType);
}),
@@ -25,6 +27,26 @@ function loadMaestroInfo(maestroID) {
);
}
+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 + "
유효 기간 : " + 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 showPlayerCount(accountType, playerCount) {
+ $("#maestro_info_player_count").val("학생수 : " + playerCount + " / " + accountTypePlayerCount(accountType));
+}
var CARD_TYPE_EXPERIENCE = "experience";
var CARD_TYPE_LOWER_PRICE = "lower_price";
@@ -32,7 +54,7 @@ var CARD_TYPE_PRESENT_PRICE = "present_price";
var CARD_TYPE_UPPER_PRICE = "upper_price";
function updateCards(accountType) {
- console.log(accountType);
+ // console.log(accountType);
switch(accountType) {
case 100:
case 101:
@@ -149,7 +171,26 @@ function upgradeMaestroInfo(accountType) {
-
+
+
+
@@ -227,7 +268,7 @@ function upgradeMaestroInfo(accountType) {
-