Fix: trial maestro account

This commit is contained in:
jisangs committed 2022-07-03 01:06:12 +09:00
1 parent 9eec33cc49
commit 3d474b266c
22 files changed
+637 -101

No files matched your search

+47 -18
View File
@@ -67,27 +67,45 @@
}
for(var i = 0; i < jsonList.length; i++) {
if(jsonList[i].status == 1) {
$("#maestro_list_result_contents").append(
"<div class='form-group player-list row mx-2 mb-1'>"
+ " <input type='text' class='maestro_upgrade_id d-none' disabled value='" + jsonList[i].maestroUpgradeID + "'>"
+ " <input type='text' class='maestro_id d-none' disabled value='" + jsonList[i].maestroID + "'>"
+ " <input type='text' class='col-sm' disabled value='" + jsonList[i].maestroName + "'>"
+ " <input type='text' class='registered_account_type col-sm text-right' disabled value='" + accountType(jsonList[i].registeredAccountType) + "'>"
+ " <input type='text' class='col-sm text-right' disabled value='" + jsonList[i].availableActivateDateTime.substring(0, 10) + "'>"
+ " <input type='text' class='new_account_type col-sm text-right' disabled value='" + accountType(jsonList[i].requestedAccountType) + "'>"
+ " <input type='text' class='col-sm text-right' disabled value='" + jsonList[i].requestedDateTime.substring(0, 10) + "'>"
+ " <input type='text' class='col-sm text-right' disabled value='" + NumberUtil.numberWithCommas(price(jsonList[i].requestedAccountType, jsonList[i].registeredAccountType)) + "'>"
+ " <input type='text' class='col-sm' disabled value='" + status(jsonList[i].status) + "'>"
+ " <input type='button' class='col-sm-1' value='↑' onClick='upgrade(this)'>"
+ "</div>"
);
} else {
if(jsonList[i].status == 1) { // 요청
var tableRowString =
"<div class='form-group player-list row mx-2 mb-1'>"
+ " <input type='text' class='maestro_upgrade_id d-none' disabled value='" + jsonList[i].maestroUpgradeID + "'>"
+ " <input type='text' class='maestro_id d-none' disabled value='" + jsonList[i].maestroID + "'>"
+ " <input type='text' class='col-sm' disabled value='" + jsonList[i].maestroName + "'>"
+ " <input type='text' class='registered_activate_status col-sm text-right' disabled value='" + activateStatus(jsonList[i].registeredActivateStatus) + "'>";
if(jsonList[i].registeredActivateStatus == 1) { // 체험
tableRowString +=
" <input type='text' class='registered_account_type col-sm text-right' disabled value='" + trialAccountType(jsonList[i].registeredAccountType) + "'>";
} else { // 0: 미승인, 2: 활성화, 100: 환불
tableRowString +=
" <input type='text' class='registered_account_type col-sm text-right' disabled value='" + accountType(jsonList[i].registeredAccountType) + "'>"
}
tableRowString +=
" <input type='text' class='col-sm text-right' disabled value='" + jsonList[i].availableActivateDateTime.substring(0, 10) + "'>"
+ " <input type='text' class='new_account_type col-sm text-right' disabled value='" + accountType(jsonList[i].requestedAccountType) + "'>"
+ " <input type='text' class='col-sm text-right' disabled value='" + jsonList[i].requestedDateTime.substring(0, 10) + "'>";
if(jsonList[i].registeredActivateStatus == 1) { // 체험
tableRowString +=
" <input type='text' class='col-sm text-right' disabled value='" + NumberUtil.numberWithCommas(accountTypePrice(jsonList[i].requestedAccountType)) + "'>";
} else { // 0: 미승인, 2: 활성화, 100: 환불
tableRowString +=
" <input type='text' class='col-sm text-right' disabled value='" + NumberUtil.numberWithCommas(price(jsonList[i].requestedAccountType, jsonList[i].registeredAccountType)) + "'>";
}
tableRowString +=
" <input type='text' class='col-sm' disabled value='" + status(jsonList[i].status) + "'>"
+ " <input type='button' class='col-sm-1' value='↑' onClick='upgrade(this)'>"
+ "</div>";
$("#maestro_list_result_contents").append(tableRowString);
}
/*
else { // status == 2: 취소, 3: 업그레이드 적용
$("#maestro_list_result_contents").append(
"<div class='form-group player-list row mx-2 mb-1'>"
+ " <input type='text' class='maestro_upgrade_id d-none' disabled value='" + jsonList[i].maestroUpgradeID + "'>"
+ " <input type='text' class='maestro_id d-none' disabled value='" + jsonList[i].maestroID + "'>"
+ " <input type='text' class='col-sm text-success' disabled value='" + jsonList[i].maestroName + "'>"
+ " <input type='text' class='registered_account_type col-sm text-right text-success' disabled value='" + activateStatus(jsonList[i].registeredActivateStatus) + "'>"
+ " <input type='text' class='registered_account_type col-sm text-right text-success' disabled value='" + accountType(jsonList[i].registeredAccountType) + "'>"
+ " <input type='text' class='col-sm text-right' disabled value='" + jsonList[i].availableActivateDateTime.substring(0, 10) + "'>"
+ " <input type='text' class='new_account_type col-sm text-right text-success' disabled value='" + accountType(jsonList[i].requestedAccountType) + "'>"
@@ -98,6 +116,7 @@
+ "</div>"
);
}
*/
}
}
@@ -123,6 +142,7 @@
var children = inputButton.parentElement.childNodes;
var maestroUpgradeID;
var maestroID;
var registeredActiveStatus;
var registeredAccountType;
var upgradeAccountType;
for (var i=0; i < children.length; i++) {
@@ -133,6 +153,10 @@
} else if (children[i].className == "maestro_id d-none") {
maestroID = children[i].value;
continue;
} else if (children[i].className == "registered_activate_status col-sm text-right") {
// upgradeAccountType = children[i].value;
registeredActiveStatus = activateStatusValue(children[i].value);
continue;
} else if (children[i].className == "registered_account_type col-sm text-right") {
// upgradeAccountType = children[i].value;
registeredAccountType = accountTypeValue(children[i].value);
@@ -151,11 +175,15 @@
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
"./../server/admin/upgrade_maestro.php",
"maestro_upgrade_id=" + maestroUpgradeID + "&maestro_id=" + maestroID + "&registered_account_type=" + registeredAccountType+ "&upgrade_account_type=" + upgradeAccountType,
"maestro_upgrade_id=" + maestroUpgradeID
+ "&maestro_id=" + maestroID
+ "&registered_activate_status=" + registeredActiveStatus
+ "&registered_account_type=" + registeredAccountType
+ "&upgrade_account_type=" + upgradeAccountType,
function(jsonData) {
loadMaestroUpgradeList("");
$("#error_message").text("마에스트로 계정이 정상적으로 등록되었습니다.");
$("#error_message").text("마에스트로 계정이 정상적으로 업그레이드되었습니다.");
},
function(errorMessage, errorCode) {
@@ -206,6 +234,7 @@
<div class="form-group row mx-2 mb-0 font-weight-bold">
<label class="col-form-label d-none">Upgrade ID</label>
<label class="col-form-label col-sm text-left">아이디</label>
<label class="col-form-label col-sm text-right">현 활성화 상태</label>
<label class="col-form-label col-sm text-right">현 요금제</label>
<label class="col-form-label col-sm text-right">유효기간</label>
<label class="col-form-label col-sm text-right">Upg 요금제</label>