initial: bootstrap from BukidBountyApp base
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
@php
|
||||
|
||||
$photourl = $currentUser->photourl[0] ?? '/resource-photos/No_image_available.svg.png';
|
||||
$name = $currentUser->name ?? $currentUser->nickname ?? $currentUser->fullname ?? $currentUser->username ?? '';
|
||||
$fullname = $currentUser->fullname ?? $currentUser->name ?? '';
|
||||
$mobile = $currentUser->mobile_number;
|
||||
$landline = $currentUser?->landline ?? '';
|
||||
$email = $currentUser->email;
|
||||
|
||||
|
||||
$script_asset = App\Http\Controllers\PageMemoryController::readPublicAssetInMemory('account_settings.js');
|
||||
if (!$script_asset) {
|
||||
echo 'empty asset';
|
||||
}
|
||||
|
||||
$account_settings_loaded_text = 'let account_settings_loaded = true;';
|
||||
|
||||
@endphp
|
||||
<script>
|
||||
{!! $account_settings_loaded_text !!}
|
||||
</script>
|
||||
|
||||
<br><br><br>
|
||||
<div class="mt-1">
|
||||
<div class="tf-container">
|
||||
<div class="box-user">
|
||||
<div class="inner d-flex flex-column align-items-center justify-content-center">
|
||||
<div class="box-avatar">
|
||||
<img src="{{ $photourl }}" id="account_settings_profile_picture" alt="image">
|
||||
<span class="icon-camera-to-take-photos"></span>
|
||||
</div>
|
||||
<div class="info">
|
||||
<h2 class="fw_8 mt-3 text-center" id="account_settings_fullname_profile">
|
||||
{{ $name }}
|
||||
</h2>
|
||||
<p id="">
|
||||
<h6 id="account_settings_credit_card_profile_pic"></h6> <i class="icon-copy1"></i></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<ul class="mt-7">
|
||||
<li class="list-user-info"><span class="icon-user"></span>
|
||||
<h5 id="account_settings_fullname_main"> {{ $fullname }}</h5>
|
||||
</li>
|
||||
<li class="list-user-info"><span class="icon-credit-card2"></span>
|
||||
<h4 id="account_settings_credit_card_main">{{ $mobile }}</h4>
|
||||
</li>
|
||||
<li class="list-user-info"><span class="icon-phone"></span>
|
||||
<h4 id="account_settings_mobile_number">{{ $landline }}</h4>
|
||||
</li>
|
||||
<li class="list-user-info"><span class="icon-email"></span>
|
||||
<h4 id="account_settings_email">{{ $email }}</h4>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="card-section" id="main-card-section">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
if (typeof window.account_settings_loaded === 'undefined') {
|
||||
let account_settings_loaded = false;
|
||||
}
|
||||
|
||||
account_settings_loaded = {{ $account_settings_loaded ?? false ? 'true' : 'false' }};
|
||||
|
||||
{!! App\Http\Controllers\PageMemoryController::readAssetInMemory('account_settings.js') !!}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
if (typeof window.account_settings_loaded === 'undefined') {
|
||||
window.account_settings_loaded = false;
|
||||
}
|
||||
|
||||
if (!account_settings_loaded) {
|
||||
account_details_load_data();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,130 @@
|
||||
<div class="card-body card-info" id="main-card-body" style="">
|
||||
<div class="row">
|
||||
<div class="col-md-18">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="card" id="secondary-card">
|
||||
<div class="card-header ui-sortable-handle" style="cursor: move;">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h4 class="card-title">Transfer My Credit</h4>
|
||||
</div>
|
||||
<div class="col">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body " id="credit-amount-request-form">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<input class="form-control" type="number" id="transfer-credit-amount-field"
|
||||
placeholder="Amount to Transfer">
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<button value="Transfer" id="Transfer-credit-initial-button" class=" form-control btn btn-primary"
|
||||
onclick="CreateAndShowModalTransferMyCreditConfirmation()">Transfer Credit</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function CreateAndShowModalTransferMyCreditConfirmation() {
|
||||
if (!$('#transfer-credit-amount-field').val()) { return false; }
|
||||
|
||||
const modalid = "modal-credit-transfer-confirmation";
|
||||
const modaltitle = "Continue?";
|
||||
const modalbody = `
|
||||
<p>You are sending credit from your account to the target User?</p>
|
||||
|
||||
`;
|
||||
const modalfooter = `<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" onclick="TransferMyCreditNow();" id="transfer-credit-now">Continue</button>`;
|
||||
|
||||
|
||||
CreateAndShowModal(modalid, modaltitle, modalbody, modalfooter, modalfooterclose = false, topclosebutton = true, modalbodyclass = 'modal-body', modalheaderclass = 'modal-header');
|
||||
|
||||
|
||||
}
|
||||
|
||||
function SuccessCreditTransferResponse() {
|
||||
|
||||
const modalid = "modal-credit-transfer-success";
|
||||
const modaltitle = "Success";
|
||||
const modalbody = `
|
||||
<p>Transfer has been sucessful.</p>
|
||||
|
||||
`;
|
||||
const modalfooter = `<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>`;
|
||||
|
||||
|
||||
CreateAndShowModal(modalid, modaltitle, modalbody, modalfooter, modalfooterclose = false, topclosebutton = true, modalbodyclass = 'modal-body', modalheaderclass = 'modal-header');
|
||||
$("#modal-credit-transfer-confirmation").modal('hide');
|
||||
Backkey();
|
||||
}
|
||||
|
||||
function ErrorCreditTransferResponse() {
|
||||
|
||||
const modalid = "modal-credit-transfer-failed";
|
||||
const modaltitle = "Failed";
|
||||
const modalbody = `
|
||||
<p>Failed to transfer credit. Try Again Later.</p>
|
||||
|
||||
`;
|
||||
const modalfooter = `<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>`;
|
||||
|
||||
|
||||
CreateAndShowModal(modalid, modaltitle, modalbody, modalfooter, modalfooterclose = false, topclosebutton = true, modalbodyclass = 'modal-body ', modalheaderclass = 'modal-header bg-danger');
|
||||
$("#modal-credit-transfer-confirmation").modal('hide');
|
||||
|
||||
}
|
||||
|
||||
|
||||
function TransferMyCreditNow() {
|
||||
|
||||
|
||||
function TransferCreditToUserNow(response) {
|
||||
if (response === true) {
|
||||
SuccessCreditTransferResponse();
|
||||
|
||||
}
|
||||
else if (response === false) {
|
||||
ErrorCreditTransferResponse();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
AjaxDo('/user/sendmycredit', { amount: $("#transfer-credit-amount-field").val().trim(), target_user: currenttarget }, TransferCreditToUserNow, null, reqtype = 'POST');
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user