added new stuff
This commit is contained in:
parent
7105062073
commit
46005c648b
714
package-lock.json
generated
714
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -22,7 +22,7 @@ function defaultDataResponseProcessor(data) {
|
|||||||
export const API_PATH_MAIN = "https://hostapay.trade/api/v1/";
|
export const API_PATH_MAIN = "https://hostapay.trade/api/v1/";
|
||||||
export const API_PATH_TEST = "https://test.0x000f.ru/api/v1/";
|
export const API_PATH_TEST = "https://test.0x000f.ru/api/v1/";
|
||||||
|
|
||||||
export const API_PATH_VALUE = API_PATH_MAIN;
|
export const API_PATH_VALUE = API_PATH_TEST;
|
||||||
|
|
||||||
async function makePost(
|
async function makePost(
|
||||||
url,
|
url,
|
||||||
@ -30,7 +30,7 @@ async function makePost(
|
|||||||
options = undefined,
|
options = undefined,
|
||||||
responseProcessor = defaultResponseProcessor,
|
responseProcessor = defaultResponseProcessor,
|
||||||
dataResponseProcessor = defaultDataResponseProcessor,
|
dataResponseProcessor = defaultDataResponseProcessor,
|
||||||
errorProcessor = defaultErrorProcessor
|
errorProcessor = defaultErrorProcessor,
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
const res = await axios.post(API_PATH_VALUE + url, data, options);
|
const res = await axios.post(API_PATH_VALUE + url, data, options);
|
||||||
@ -45,7 +45,7 @@ async function makeGet(
|
|||||||
options = undefined,
|
options = undefined,
|
||||||
responseProcessor = defaultResponseProcessor,
|
responseProcessor = defaultResponseProcessor,
|
||||||
dataResponseProcessor = defaultDataResponseProcessor,
|
dataResponseProcessor = defaultDataResponseProcessor,
|
||||||
errorProcessor = defaultErrorProcessor
|
errorProcessor = defaultErrorProcessor,
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
const res = await axios.get(API_PATH_VALUE + url, options);
|
const res = await axios.get(API_PATH_VALUE + url, options);
|
||||||
|
|||||||
@ -61,8 +61,11 @@
|
|||||||
<li><a href="/admin/currencies">Валюты</a></li>
|
<li><a href="/admin/currencies">Валюты</a></li>
|
||||||
<li><a href="/admin/sms">СМС</a></li>
|
<li><a href="/admin/sms">СМС</a></li>
|
||||||
<li><a href="/admin/withdrawals">Вывод средств</a></li>
|
<li><a href="/admin/withdrawals">Вывод средств</a></li>
|
||||||
<li><a href="/admin/change-balance/0">Управление балансом</a></li>
|
<li>
|
||||||
|
<a href="/admin/change-balance/0">Управление балансом</a>
|
||||||
|
</li>
|
||||||
<li><a href="/admin/refs">Рефералы</a></li>
|
<li><a href="/admin/refs">Рефералы</a></li>
|
||||||
|
<li><a href="/admin/finance">Финансовые события</a></li>
|
||||||
{/if}
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -268,6 +271,21 @@
|
|||||||
<ChevronRightIcon />
|
<ChevronRightIcon />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<div
|
||||||
|
class="h-[1px] w-full bg-neutral flex-shrink-0 opacity-50 my-[5px]"
|
||||||
|
></div>
|
||||||
|
<li class="relative">
|
||||||
|
<a
|
||||||
|
class="text-lg"
|
||||||
|
on:click={() => {
|
||||||
|
showMenu = false;
|
||||||
|
}}
|
||||||
|
href="/admin/finance">Финансовые события</a
|
||||||
|
>
|
||||||
|
<div class="absolute right-0 top-[2px] pointer-events-none">
|
||||||
|
<ChevronRightIcon />
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
<div class="join">
|
<div class="join">
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
if (currentPage === 1) return;
|
if (currentPage <= 1) return;
|
||||||
currentPage -= 1;
|
currentPage -= 1;
|
||||||
pageChangedCallback(currentPage);
|
pageChangedCallback(currentPage);
|
||||||
}}
|
}}
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<button class={"join-item btn " + css}>Страница №{currentPage}</button>
|
<button class={"join-item btn " + css}>Страница №{currentPage}</button>
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
if (currentPage === totalPages) return;
|
if (currentPage >= totalPages) return;
|
||||||
currentPage += 1;
|
currentPage += 1;
|
||||||
pageChangedCallback(currentPage);
|
pageChangedCallback(currentPage);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
export const prerender = true;
|
export const prerender = true;
|
||||||
export const ssr = false;
|
export const ssr = false;
|
||||||
|
|
||||||
console.log = () => {};
|
// console.log = () => {};
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
const res = await makePost(
|
const res = await makePost(
|
||||||
"admin/deposit/search",
|
"admin/deposit/search",
|
||||||
sData,
|
sData,
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
@ -75,7 +75,7 @@
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
summa: selectedDispute["summa"],
|
summa: selectedDispute["summa"],
|
||||||
},
|
},
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
);
|
);
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
@ -106,7 +106,7 @@
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
summa: newSum.toString(),
|
summa: newSum.toString(),
|
||||||
},
|
},
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
);
|
);
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
if (res.status == 401) {
|
if (res.status == 401) {
|
||||||
@ -130,7 +130,7 @@
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
summa: newSum.toString(),
|
summa: newSum.toString(),
|
||||||
},
|
},
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
);
|
);
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
if (res.status == 401) {
|
if (res.status == 401) {
|
||||||
@ -156,7 +156,7 @@
|
|||||||
{
|
{
|
||||||
uuid,
|
uuid,
|
||||||
},
|
},
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
);
|
);
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
if (res.status == 401) {
|
if (res.status == 401) {
|
||||||
@ -183,7 +183,7 @@
|
|||||||
deposit_id: uuid,
|
deposit_id: uuid,
|
||||||
token: newValue,
|
token: newValue,
|
||||||
},
|
},
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
);
|
);
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
sayError("Не удалось сменить команду");
|
sayError("Не удалось сменить команду");
|
||||||
@ -224,7 +224,7 @@
|
|||||||
<div class="w-full flex flex-col p-4 rounded-box bg-base-300">
|
<div class="w-full flex flex-col p-4 rounded-box bg-base-300">
|
||||||
<input
|
<input
|
||||||
bind:value={searchValue}
|
bind:value={searchValue}
|
||||||
placeholder="UUID, External UUID, Токен или External User ID"
|
placeholder="UUID, External UUID, Токен, Имя мерчанта или External User ID"
|
||||||
type="text"
|
type="text"
|
||||||
class="input input-bordered"
|
class="input input-bordered"
|
||||||
/>
|
/>
|
||||||
@ -244,7 +244,9 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-full flex flex-col p-4 rounded-box bg-base-300 overflow-x-auto">
|
<div
|
||||||
|
class="w-full flex flex-col p-4 rounded-box bg-base-300 overflow-x-auto"
|
||||||
|
>
|
||||||
<div class="flex w-full justify-center items-center">
|
<div class="flex w-full justify-center items-center">
|
||||||
<button
|
<button
|
||||||
class="btn"
|
class="btn"
|
||||||
@ -263,7 +265,8 @@
|
|||||||
<button
|
<button
|
||||||
class="btn"
|
class="btn"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
if (currentDepositSearchPage >= maxDepositSearchPages) return;
|
if (currentDepositSearchPage >= maxDepositSearchPages)
|
||||||
|
return;
|
||||||
currentDepositSearchPage += 1;
|
currentDepositSearchPage += 1;
|
||||||
findDeposit();
|
findDeposit();
|
||||||
}}
|
}}
|
||||||
@ -307,12 +310,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</button></td
|
</button></td
|
||||||
>
|
>
|
||||||
<td class="px-4 py-2">{orderStatusMap[dep["status"]]}</td>
|
<td class="px-4 py-2"
|
||||||
<td class="px-4">{Number(dep["summa"])} {dep["currency_code"]}</td
|
>{orderStatusMap[dep["status"]]}</td
|
||||||
|
>
|
||||||
|
<td class="px-4"
|
||||||
|
>{Number(dep["summa"])}
|
||||||
|
{dep["currency_code"]}</td
|
||||||
>
|
>
|
||||||
<td class="px-4">{dep["bank_name"]}</td>
|
<td class="px-4">{dep["bank_name"]}</td>
|
||||||
<td class="px-4">{dep["creationtime"]}</td>
|
<td class="px-4">{dep["creationtime"]}</td>
|
||||||
<td class="px-4">{dep["trader_name"]} {dep["surname"]}</td>
|
<td class="px-4"
|
||||||
|
>{dep["trader_name"]} {dep["surname"]}</td
|
||||||
|
>
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -334,8 +343,10 @@
|
|||||||
<p class="font-semibold">{foundedDispute["id"]}</p> -->
|
<p class="font-semibold">{foundedDispute["id"]}</p> -->
|
||||||
<p class="text-sm mt-3">ID клиента</p>
|
<p class="text-sm mt-3">ID клиента</p>
|
||||||
<p class="font-semibold">{selectedDispute["external_user_id"]}</p>
|
<p class="font-semibold">{selectedDispute["external_user_id"]}</p>
|
||||||
<p class="text-sm mt-3">External ID</p>
|
<p class="text-sm mt-3">ID депозита мерчанта</p>
|
||||||
<p class="font-semibold">{selectedDispute["external_uuid"]}</p>
|
<p class="font-semibold">{selectedDispute["external_uuid"]}</p>
|
||||||
|
<p class="text-sm mt-3">Мерчант</p>
|
||||||
|
<p class="font-semibold">{selectedDispute["merchant_name"]}</p>
|
||||||
<p class="text-sm mt-3">Статус</p>
|
<p class="text-sm mt-3">Статус</p>
|
||||||
<p class="">{orderStatusMap[selectedDispute["status"]]}</p>
|
<p class="">{orderStatusMap[selectedDispute["status"]]}</p>
|
||||||
{#if selectedDispute["token"] !== ""}
|
{#if selectedDispute["token"] !== ""}
|
||||||
@ -344,7 +355,10 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{#if selectedDispute["trader_name"] !== ""}
|
{#if selectedDispute["trader_name"] !== ""}
|
||||||
<p class="text-sm mt-3">Трейдер</p>
|
<p class="text-sm mt-3">Трейдер</p>
|
||||||
<p>{selectedDispute["trader_name"]} {selectedDispute["surname"]}</p>
|
<p>
|
||||||
|
{selectedDispute["trader_name"]}
|
||||||
|
{selectedDispute["surname"]}
|
||||||
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
{#if selectedDispute["close_reason"] !== ""}
|
{#if selectedDispute["close_reason"] !== ""}
|
||||||
<p class="text-sm mt-3">Причина отклонения</p>
|
<p class="text-sm mt-3">Причина отклонения</p>
|
||||||
@ -400,7 +414,9 @@
|
|||||||
rollbackOrder(selectedDispute["uuid"]);
|
rollbackOrder(selectedDispute["uuid"]);
|
||||||
};
|
};
|
||||||
alertTraderName =
|
alertTraderName =
|
||||||
selectedDispute["trader_name"] + " " + selectedDispute["surname"];
|
selectedDispute["trader_name"] +
|
||||||
|
" " +
|
||||||
|
selectedDispute["surname"];
|
||||||
}}
|
}}
|
||||||
class="btn btn-outline btn-info mt-4"
|
class="btn btn-outline btn-info mt-4"
|
||||||
>
|
>
|
||||||
@ -474,7 +490,9 @@
|
|||||||
changeSum(selectedDispute["uuid"]);
|
changeSum(selectedDispute["uuid"]);
|
||||||
};
|
};
|
||||||
alertTraderName =
|
alertTraderName =
|
||||||
selectedDispute["trader_name"] + " " + selectedDispute["surname"];
|
selectedDispute["trader_name"] +
|
||||||
|
" " +
|
||||||
|
selectedDispute["surname"];
|
||||||
}}
|
}}
|
||||||
class="btn btn-outline btn-info"
|
class="btn btn-outline btn-info"
|
||||||
>
|
>
|
||||||
@ -491,7 +509,9 @@
|
|||||||
changeSumWithoutBalance(selectedDispute["uuid"]);
|
changeSumWithoutBalance(selectedDispute["uuid"]);
|
||||||
};
|
};
|
||||||
alertTraderName =
|
alertTraderName =
|
||||||
selectedDispute["trader_name"] + " " + selectedDispute["surname"];
|
selectedDispute["trader_name"] +
|
||||||
|
" " +
|
||||||
|
selectedDispute["surname"];
|
||||||
}}
|
}}
|
||||||
class="btn btn-outline btn-info"
|
class="btn btn-outline btn-info"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -2,6 +2,8 @@
|
|||||||
import { getAuthInfo, makeAuthHeaderForAxios } from "$lib/auth/Auth";
|
import { getAuthInfo, makeAuthHeaderForAxios } from "$lib/auth/Auth";
|
||||||
import { makePost } from "$lib/tools/requests/requests";
|
import { makePost } from "$lib/tools/requests/requests";
|
||||||
import { sayError, sayInfo } from "$lib/tools/toaster/Toaster";
|
import { sayError, sayInfo } from "$lib/tools/toaster/Toaster";
|
||||||
|
import Pagination from "$lib/ui-components/pagination.svelte";
|
||||||
|
import { onMount } from "svelte";
|
||||||
|
|
||||||
let referrerValue = "";
|
let referrerValue = "";
|
||||||
let referralValue = "";
|
let referralValue = "";
|
||||||
@ -29,7 +31,7 @@
|
|||||||
bid_platform: bidPlatformValue,
|
bid_platform: bidPlatformValue,
|
||||||
},
|
},
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
@ -40,6 +42,73 @@
|
|||||||
|
|
||||||
inProcess = false;
|
inProcess = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let loadRefReferralValue = "";
|
||||||
|
let loadRefReferrerValue = "";
|
||||||
|
|
||||||
|
let loadReferralInProgress = false;
|
||||||
|
|
||||||
|
let foundReferrals = [];
|
||||||
|
let totalPages = 1;
|
||||||
|
let currentPage = 1;
|
||||||
|
async function loadReferral() {
|
||||||
|
if (loadReferralInProgress) return;
|
||||||
|
|
||||||
|
const referrer = loadRefReferrerValue.trim();
|
||||||
|
const referral = loadRefReferrerValue.trim();
|
||||||
|
|
||||||
|
loadReferralInProgress = true;
|
||||||
|
const res = await makePost(
|
||||||
|
"admin/users/referral/load",
|
||||||
|
{
|
||||||
|
referrer: referrer === "" ? undefined : referrer,
|
||||||
|
referral: referral === "" ? undefined : referral,
|
||||||
|
page: currentPage,
|
||||||
|
},
|
||||||
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (res.error) {
|
||||||
|
sayError("Не удалось получить информацию");
|
||||||
|
} else {
|
||||||
|
foundReferrals = res.data.data;
|
||||||
|
totalPages = res.data.pages;
|
||||||
|
}
|
||||||
|
loadReferralInProgress = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let selectedReferral = {};
|
||||||
|
let showChangeRef = false;
|
||||||
|
let newRefBid = "";
|
||||||
|
let newRefPlatformBid = "";
|
||||||
|
let updateInProgress = false;
|
||||||
|
|
||||||
|
async function updateReferral(referral_code, bid, bid_platform) {
|
||||||
|
if (updateInProgress) return;
|
||||||
|
|
||||||
|
updateInProgress = true;
|
||||||
|
const res = await makePost(
|
||||||
|
"admin/users/referral/update",
|
||||||
|
{
|
||||||
|
referral_code,
|
||||||
|
bid: Number(bid),
|
||||||
|
bid_platform: Number(bid_platform),
|
||||||
|
},
|
||||||
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (res.error) {
|
||||||
|
sayError("Не удалось обновить информацию");
|
||||||
|
} else {
|
||||||
|
loadReferral();
|
||||||
|
showChangeRef = false;
|
||||||
|
}
|
||||||
|
updateInProgress = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
loadReferral();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="w-full flex flex-col gap-8">
|
<div class="w-full flex flex-col gap-8">
|
||||||
@ -49,7 +118,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="w-full flex flex-col p-4 rounded-box bg-base-300">
|
<div class="w-full flex flex-col p-4 rounded-box bg-base-300">
|
||||||
<label class={"input input-bordered flex items-center gap-2 "}>
|
<label class={"input input-bordered flex items-center gap-2 "}>
|
||||||
Реферер UUID
|
Реферер UUID:
|
||||||
<input
|
<input
|
||||||
bind:value={referrerValue}
|
bind:value={referrerValue}
|
||||||
type="text"
|
type="text"
|
||||||
@ -57,7 +126,7 @@
|
|||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
<label class={"input input-bordered flex items-center gap-2 mt-2"}>
|
<label class={"input input-bordered flex items-center gap-2 mt-2"}>
|
||||||
Реферал UUID
|
Реферал UUID:
|
||||||
<input
|
<input
|
||||||
bind:value={referralValue}
|
bind:value={referralValue}
|
||||||
type="text"
|
type="text"
|
||||||
@ -65,11 +134,15 @@
|
|||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
<label class={"input input-bordered flex items-center gap-2 mt-2"}>
|
<label class={"input input-bordered flex items-center gap-2 mt-2"}>
|
||||||
Ставка
|
Ставка:
|
||||||
<input bind:value={bidValue} type="text" class="grow text-lg text-info" />
|
<input
|
||||||
|
bind:value={bidValue}
|
||||||
|
type="text"
|
||||||
|
class="grow text-lg text-info"
|
||||||
|
/>
|
||||||
</label>
|
</label>
|
||||||
<label class={"input input-bordered flex items-center gap-2 mt-2"}>
|
<label class={"input input-bordered flex items-center gap-2 mt-2"}>
|
||||||
Ставка платформы
|
Ставка платформы:
|
||||||
<input
|
<input
|
||||||
bind:value={bidPlatformValue}
|
bind:value={bidPlatformValue}
|
||||||
type="text"
|
type="text"
|
||||||
@ -89,4 +162,146 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="flex gap-4">
|
||||||
|
<div class="bg-accent rounded-[4px] w-[10px] h-full"></div>
|
||||||
|
<h1 class="text-2xl font-semibold">Информация по рефералам</h1>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="w-full flex flex-col p-4 rounded-box bg-base-300">
|
||||||
|
<label class={"input input-bordered flex items-center gap-2 "}>
|
||||||
|
Реферер UUID:
|
||||||
|
<input
|
||||||
|
bind:value={loadRefReferralValue}
|
||||||
|
type="text"
|
||||||
|
class="grow text-lg text-info"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<label class={"input input-bordered flex items-center gap-2 mt-2"}>
|
||||||
|
Реферал UUID:
|
||||||
|
<input
|
||||||
|
bind:value={loadRefReferrerValue}
|
||||||
|
type="text"
|
||||||
|
class="grow text-lg text-info"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<button
|
||||||
|
on:click={() => {
|
||||||
|
currentPage = 1;
|
||||||
|
totalPages = 1;
|
||||||
|
loadReferral();
|
||||||
|
}}
|
||||||
|
class="btn btn-outline btn-info mt-4"
|
||||||
|
>
|
||||||
|
{#if inProcess}
|
||||||
|
<span class="loading loading-md"></span>
|
||||||
|
{:else}
|
||||||
|
Найти
|
||||||
|
{/if}
|
||||||
|
</button>
|
||||||
|
{#if loadReferralInProgress}
|
||||||
|
<span class="loading loading-md self-center mt-4"></span>
|
||||||
|
{:else}
|
||||||
|
<div class="w-full flex flex-col justify-center items-center mt-4">
|
||||||
|
<Pagination
|
||||||
|
{totalPages}
|
||||||
|
pageChangedCallback={(n) => {
|
||||||
|
currentPage = n;
|
||||||
|
loadReferral();
|
||||||
|
}}
|
||||||
|
disableButtons={loadReferralInProgress}
|
||||||
|
css={"btn-neutral"}
|
||||||
|
/>
|
||||||
|
<p class="opacity-50 text-xs mt-1">
|
||||||
|
Всего страниц: {totalPages}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="overflow-x-auto mt-4">
|
||||||
|
<table class="table">
|
||||||
|
<!-- head -->
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Имя реферала</th>
|
||||||
|
<th>Имя реферера</th>
|
||||||
|
<th>Ставка</th>
|
||||||
|
<th>Ставка платформы</th>
|
||||||
|
<th>Опции</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{#each foundReferrals as ref}
|
||||||
|
<tr class="hover:bg-neutral group">
|
||||||
|
<td class="">{ref["referral_name"]}</td>
|
||||||
|
<td>{ref["referrer_name"]}</td>
|
||||||
|
<td>{ref["bid"]}%</td>
|
||||||
|
<td>{ref["bid_platform"]}%</td>
|
||||||
|
<td>
|
||||||
|
<button
|
||||||
|
class="btn btn-info btn-xs"
|
||||||
|
on:click={() => {
|
||||||
|
selectedReferral = ref;
|
||||||
|
newRefBid = ref["bid"];
|
||||||
|
newRefPlatformBid =
|
||||||
|
ref["bid_platform"];
|
||||||
|
showChangeRef = true;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Изменить
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/each}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{#if showChangeRef}
|
||||||
|
<div
|
||||||
|
class="fixed inset-0 z-[1001] bg-black bg-opacity-50 flex justify-center items-center"
|
||||||
|
>
|
||||||
|
<div class="flex flex-col p-4 bg-base-100 rounded-md gap-1">
|
||||||
|
<p class="font-bold text-lg">
|
||||||
|
Изменение реферала {selectedReferral.referral_name}
|
||||||
|
</p>
|
||||||
|
<label class={"input input-bordered flex items-center gap-2 mt-4"}>
|
||||||
|
Ставка:
|
||||||
|
<input
|
||||||
|
bind:value={newRefBid}
|
||||||
|
type="text"
|
||||||
|
class="grow text-lg text-info"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<label class={"input input-bordered flex items-center gap-2 mt-2"}>
|
||||||
|
Ставка платформы:
|
||||||
|
<input
|
||||||
|
bind:value={newRefPlatformBid}
|
||||||
|
type="text"
|
||||||
|
class="grow text-lg text-info"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<button
|
||||||
|
class="btn btn-outline btn-success mt-2"
|
||||||
|
on:click={() => {
|
||||||
|
updateReferral(
|
||||||
|
selectedReferral.referral_code,
|
||||||
|
newRefBid,
|
||||||
|
newRefPlatformBid,
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Сохранить
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="btn btn-outline"
|
||||||
|
on:click={() => {
|
||||||
|
showChangeRef = false;
|
||||||
|
selectedReferral = {};
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Закрыть
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|||||||
@ -1,12 +1,14 @@
|
|||||||
<script>
|
<script>
|
||||||
import { browser } from "$app/environment";
|
import { browser } from "$app/environment";
|
||||||
import { getAuthInfo, makeAuthHeaderForAxios } from "$lib/auth/Auth.js";
|
import { getAuthInfo, makeAuthHeaderForAxios } from "$lib/auth/Auth.js";
|
||||||
import { makePost } from "$lib/tools/requests/requests.js";
|
import { makeGet, makePost } from "$lib/tools/requests/requests.js";
|
||||||
import { toValidNumberFormat } from "$lib/tools/strings/Strings.js";
|
import { toValidNumberFormat } from "$lib/tools/strings/Strings.js";
|
||||||
import { sayError } from "$lib/tools/toaster/Toaster.js";
|
import { sayError, sayInfo } from "$lib/tools/toaster/Toaster.js";
|
||||||
import { redirect } from "$lib/tools/url/URLTools.js";
|
import { redirect } from "$lib/tools/url/URLTools.js";
|
||||||
import CopyButton from "$lib/ui-components/CopyButton.svelte";
|
import CopyButton from "$lib/ui-components/CopyButton.svelte";
|
||||||
import Pagination from "$lib/ui-components/pagination.svelte";
|
import Pagination from "$lib/ui-components/pagination.svelte";
|
||||||
|
import { get } from "ol/proj.js";
|
||||||
|
import { onMount } from "svelte";
|
||||||
|
|
||||||
export let data;
|
export let data;
|
||||||
let { userData } = data;
|
let { userData } = data;
|
||||||
@ -26,7 +28,7 @@
|
|||||||
{
|
{
|
||||||
token: token,
|
token: token,
|
||||||
},
|
},
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
);
|
);
|
||||||
if (result.status === 401) {
|
if (result.status === 401) {
|
||||||
sayError("Данные авторизации устарели");
|
sayError("Данные авторизации устарели");
|
||||||
@ -48,7 +50,7 @@
|
|||||||
{
|
{
|
||||||
token: token,
|
token: token,
|
||||||
},
|
},
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
);
|
);
|
||||||
if (userResult.status === 401) {
|
if (userResult.status === 401) {
|
||||||
userInfoReloading = false;
|
userInfoReloading = false;
|
||||||
@ -80,7 +82,7 @@
|
|||||||
// orderBy: "uuid",
|
// orderBy: "uuid",
|
||||||
statuses_to_send: Number(ordersFilter),
|
statuses_to_send: Number(ordersFilter),
|
||||||
},
|
},
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
);
|
);
|
||||||
if (result.status === 401) {
|
if (result.status === 401) {
|
||||||
sayError("Данные авторизации устарели");
|
sayError("Данные авторизации устарели");
|
||||||
@ -112,7 +114,7 @@
|
|||||||
page: Number(reqsCurrentPage),
|
page: Number(reqsCurrentPage),
|
||||||
token: token,
|
token: token,
|
||||||
},
|
},
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
);
|
);
|
||||||
if (result.status === 401) {
|
if (result.status === 401) {
|
||||||
sayError("Данные авторизации устарели");
|
sayError("Данные авторизации устарели");
|
||||||
@ -147,7 +149,7 @@
|
|||||||
token: token,
|
token: token,
|
||||||
page: 1,
|
page: 1,
|
||||||
},
|
},
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
);
|
);
|
||||||
if (result.status === 401) {
|
if (result.status === 401) {
|
||||||
sayError("Данные авторизации устарели");
|
sayError("Данные авторизации устарели");
|
||||||
@ -183,7 +185,7 @@
|
|||||||
const res = await makePost(
|
const res = await makePost(
|
||||||
"admin/find",
|
"admin/find",
|
||||||
{},
|
{},
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
showLoadingFind = false;
|
showLoadingFind = false;
|
||||||
@ -194,6 +196,72 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
let showAddRef = false;
|
let showAddRef = false;
|
||||||
|
|
||||||
|
let showAcceptTopup = false;
|
||||||
|
let selectedTopupOrder = {};
|
||||||
|
let acceptedTopupHash = "";
|
||||||
|
let acceptedTopupRate = "";
|
||||||
|
let acceptedTopupAmount = "";
|
||||||
|
let acceptTopupInProgress = false;
|
||||||
|
async function acceptTopupOrder(deposit_id, usdt_rate, tx_hash, amount) {
|
||||||
|
if (typeof tx_hash !== "string" || tx_hash.length < 32) return;
|
||||||
|
if (acceptTopupInProgress) return;
|
||||||
|
acceptTopupInProgress = true;
|
||||||
|
const res = await makePost(
|
||||||
|
"admin/trader_transactions/accept",
|
||||||
|
{
|
||||||
|
deposit_id,
|
||||||
|
usdt_rate,
|
||||||
|
tx_hash,
|
||||||
|
amount,
|
||||||
|
},
|
||||||
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
|
);
|
||||||
|
if (res.error) {
|
||||||
|
sayError("Не удалось принять депозит");
|
||||||
|
} else {
|
||||||
|
sayInfo("Депозит успешно принят");
|
||||||
|
}
|
||||||
|
acceptTopupInProgress = false;
|
||||||
|
getUserDeposits();
|
||||||
|
showAcceptTopup = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let loadingDeclineTopup = false;
|
||||||
|
async function declineTopupOrder(deposit_id) {
|
||||||
|
if (loadingDeclineTopup) return;
|
||||||
|
loadingDeclineTopup = true;
|
||||||
|
const res = await makePost(
|
||||||
|
"admin/trader_transactions/decline",
|
||||||
|
{
|
||||||
|
deposit_id,
|
||||||
|
},
|
||||||
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (res.error) {
|
||||||
|
sayError("Не удалось отклонить депозит");
|
||||||
|
} else {
|
||||||
|
sayInfo("Депозит успешно отклонён");
|
||||||
|
}
|
||||||
|
loadingDeclineTopup = false;
|
||||||
|
getUserDeposits();
|
||||||
|
}
|
||||||
|
let rates = {};
|
||||||
|
async function getRate() {
|
||||||
|
const res = await makeGet(
|
||||||
|
"rate",
|
||||||
|
makeAuthHeaderForAxios(getAuthInfo()?.a),
|
||||||
|
);
|
||||||
|
console.log(res);
|
||||||
|
if (res.data) {
|
||||||
|
rates = res.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
getRate();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="w-full flex flex-col gap-8">
|
<div class="w-full flex flex-col gap-8">
|
||||||
@ -208,7 +276,9 @@
|
|||||||
<div
|
<div
|
||||||
class="bg-base-300 rounded-t-box p-4 pb-2 border-2 border-b-0 border-base-300"
|
class="bg-base-300 rounded-t-box p-4 pb-2 border-2 border-b-0 border-base-300"
|
||||||
>
|
>
|
||||||
<p class="text-lg font-semibold leading-none">Основная информация</p>
|
<p class="text-lg font-semibold leading-none">
|
||||||
|
Основная информация
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="flex flex-col p-4 gap-2 border-2 border-t-0 rounded-b-box border-base-300"
|
class="flex flex-col p-4 gap-2 border-2 border-t-0 rounded-b-box border-base-300"
|
||||||
@ -229,7 +299,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<p class="opacity-50 text-xs">Валюта</p>
|
<p class="opacity-50 text-xs">Валюта</p>
|
||||||
<p class="text-accent font-semibold">{userData?.code}</p>
|
<p class="text-accent font-semibold">
|
||||||
|
{userData?.code}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<p class="opacity-50 text-xs">Торговля</p>
|
<p class="opacity-50 text-xs">Торговля</p>
|
||||||
@ -238,7 +310,9 @@
|
|||||||
? "text-primary font-semibold"
|
? "text-primary font-semibold"
|
||||||
: "text-error font-semibold"}
|
: "text-error font-semibold"}
|
||||||
>
|
>
|
||||||
{userData["can_trade"] === "t" ? "Активна" : "Отключена"}
|
{userData["can_trade"] === "t"
|
||||||
|
? "Активна"
|
||||||
|
: "Отключена"}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
@ -276,7 +350,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<p class="opacity-50 text-xs">Страховка</p>
|
<p class="opacity-50 text-xs">Страховка</p>
|
||||||
<p class="text-accent font-semibold">{userData?.insurance} USDT</p>
|
<p class="text-accent font-semibold">
|
||||||
|
{userData?.insurance} USDT
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<p class="opacity-50 text-xs">Ставка</p>
|
<p class="opacity-50 text-xs">Ставка</p>
|
||||||
@ -284,7 +360,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<p class="opacity-50 text-xs">Ставка на выплаты</p>
|
<p class="opacity-50 text-xs">Ставка на выплаты</p>
|
||||||
<p class="text-accent font-semibold">{userData.payout_bid}%</p>
|
<p class="text-accent font-semibold">
|
||||||
|
{userData.payout_bid}%
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<p class="opacity-50 text-xs">Кошелёк пополнения</p>
|
<p class="opacity-50 text-xs">Кошелёк пополнения</p>
|
||||||
@ -318,14 +396,16 @@
|
|||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
href={`/admin/change-balance/${token}`}
|
href={`/admin/change-balance/${token}`}
|
||||||
class="btn btn-neutral btn-outline rounded-lg btn-sm">Изменить баланс</a
|
class="btn btn-neutral btn-outline rounded-lg btn-sm"
|
||||||
|
>Изменить баланс</a
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
if (confirm("Вы уверены, что хотите удалить пользователя?"))
|
if (confirm("Вы уверены, что хотите удалить пользователя?"))
|
||||||
deleteUser();
|
deleteUser();
|
||||||
}}
|
}}
|
||||||
class="btn btn-error btn-outline rounded-lg btn-sm">Удалить</button
|
class="btn btn-error btn-outline rounded-lg btn-sm"
|
||||||
|
>Удалить</button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -427,7 +507,9 @@
|
|||||||
disableButtons={disablePagesUserOrders}
|
disableButtons={disablePagesUserOrders}
|
||||||
css={"btn-neutral mt-2"}
|
css={"btn-neutral mt-2"}
|
||||||
/>
|
/>
|
||||||
<p class="opacity-50 text-xs mt-1">Всего страниц: {numPagesUserOrders}</p>
|
<p class="opacity-50 text-xs mt-1">
|
||||||
|
Всего страниц: {numPagesUserOrders}
|
||||||
|
</p>
|
||||||
<select
|
<select
|
||||||
bind:value={ordersFilter}
|
bind:value={ordersFilter}
|
||||||
class="select select-bordered min-w-[230px] mt-2"
|
class="select select-bordered min-w-[230px] mt-2"
|
||||||
@ -464,9 +546,14 @@
|
|||||||
<tr class="hover:bg-neutral group">
|
<tr class="hover:bg-neutral group">
|
||||||
<!-- <td class="font-semibold">{order["id"]}</td> -->
|
<!-- <td class="font-semibold">{order["id"]}</td> -->
|
||||||
<td class="font-semibold">{order["uuid"]}</td>
|
<td class="font-semibold">{order["uuid"]}</td>
|
||||||
<td class="font-semibold">{order["external_user_id"]}</td>
|
<td class="font-semibold"
|
||||||
|
>{order["external_user_id"]}</td
|
||||||
|
>
|
||||||
<td class="">{order["status"]}</td>
|
<td class="">{order["status"]}</td>
|
||||||
<td>{toValidNumberFormat(order["summa"])} {userData?.code}</td>
|
<td
|
||||||
|
>{toValidNumberFormat(order["summa"])}
|
||||||
|
{userData?.code}</td
|
||||||
|
>
|
||||||
<td>{orderTypesMap[order["order_type"]]}</td>
|
<td>{orderTypesMap[order["order_type"]]}</td>
|
||||||
<!-- <td>{order["rate"]} {userData?.code}</td> -->
|
<!-- <td>{order["rate"]} {userData?.code}</td> -->
|
||||||
<!-- <td>{order["is_sbp"] === "t" ? "да" : "нет"}</td> -->
|
<!-- <td>{order["is_sbp"] === "t" ? "да" : "нет"}</td> -->
|
||||||
@ -506,6 +593,9 @@
|
|||||||
Всего страниц: {numOfPagesUserDeposits}
|
Всего страниц: {numOfPagesUserDeposits}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
{#if disablePagesUserDeposits}
|
||||||
|
<span class="loading loading-md self-center"></span>
|
||||||
|
{:else}
|
||||||
<div class="overflow-x-auto mt-4">
|
<div class="overflow-x-auto mt-4">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<!-- head -->
|
<!-- head -->
|
||||||
@ -514,25 +604,72 @@
|
|||||||
<th>Статус</th>
|
<th>Статус</th>
|
||||||
<th>Сумма</th>
|
<th>Сумма</th>
|
||||||
<th>Время создания</th>
|
<th>Время создания</th>
|
||||||
<!-- <th>Опции</th> -->
|
<th>Опции</th>
|
||||||
<!-- <th></th> -->
|
<!-- <th></th> -->
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{#each userDeposits as depo}
|
{#each userDeposits as depo}
|
||||||
<tr class="hover:bg-neutral group">
|
<tr class="hover:bg-neutral group">
|
||||||
<td class="">{depoStatusMap[depo["pending"]]}</td>
|
<td
|
||||||
<td>{toValidNumberFormat(depo["amount"])} USDT</td>
|
class={`${depo["pending"] === "0" ? "text-info" : depo["pending"] === "1" ? "text-success" : "text-error"}`}
|
||||||
|
>{depoStatusMap[depo["pending"]]}</td
|
||||||
|
>
|
||||||
|
<td
|
||||||
|
>{toValidNumberFormat(depo["amount"])} USDT</td
|
||||||
|
>
|
||||||
<td>{depo["creationtime"]}</td>
|
<td>{depo["creationtime"]}</td>
|
||||||
<!-- <td class="flex gap-2">
|
<td>
|
||||||
<a href="" class="btn btn-info">Изменить</a>
|
<div class="flex gap-2">
|
||||||
<button class="btn btn-error">Удалить</button>
|
{#if depo.pending === "0"}
|
||||||
</td> -->
|
<button
|
||||||
|
on:click={() => {
|
||||||
|
selectedTopupOrder = depo;
|
||||||
|
acceptedTopupAmount =
|
||||||
|
depo["amount"];
|
||||||
|
try {
|
||||||
|
acceptedTopupRate =
|
||||||
|
rates[
|
||||||
|
userData.code
|
||||||
|
];
|
||||||
|
} catch (e) {}
|
||||||
|
showAcceptTopup = true;
|
||||||
|
}}
|
||||||
|
class="btn btn-success btn-xs min-w-20"
|
||||||
|
>
|
||||||
|
{#if acceptTopupInProgress}
|
||||||
|
<span
|
||||||
|
class="loading loading-sm"
|
||||||
|
></span>
|
||||||
|
{:else}
|
||||||
|
Принять
|
||||||
|
{/if}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
on:click={() => {
|
||||||
|
declineTopupOrder(
|
||||||
|
depo["uuid"],
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
class="btn btn-error btn-xs min-w-20"
|
||||||
|
>
|
||||||
|
{#if loadingDeclineTopup}
|
||||||
|
<span
|
||||||
|
class="loading loading-sm"
|
||||||
|
></span>
|
||||||
|
{:else}
|
||||||
|
Отклонить
|
||||||
|
{/if}
|
||||||
|
</button>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -543,6 +680,71 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
{#if showAcceptTopup}
|
||||||
|
<div class="fixed inset-0 bg-black opacity-60"></div>
|
||||||
|
<div class="fixed inset-0 bg-transparent flex justify-center items-center">
|
||||||
|
<div
|
||||||
|
class="bg-base-300 rounded-md p-4 w-full max-w-[400px] flex flex-col gap-2"
|
||||||
|
>
|
||||||
|
<p class="font-bold text-lg">
|
||||||
|
Принятие завяки {selectedTopupOrder.amount} USDT
|
||||||
|
</p>
|
||||||
|
<label class={"input input-bordered flex items-center gap-2 mt-4"}>
|
||||||
|
Хэш:
|
||||||
|
<input
|
||||||
|
bind:value={acceptedTopupHash}
|
||||||
|
type="text"
|
||||||
|
class="grow text-info text-sm"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<label class={"input input-bordered flex items-center gap-2 mt-2"}>
|
||||||
|
Курс USDT:
|
||||||
|
<input
|
||||||
|
bind:value={acceptedTopupRate}
|
||||||
|
type="text"
|
||||||
|
class="grow text-lg text-info"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<label class={"input input-bordered flex items-center gap-2 mt-2"}>
|
||||||
|
Сумма USDT:
|
||||||
|
<input
|
||||||
|
bind:value={acceptedTopupAmount}
|
||||||
|
type="text"
|
||||||
|
class="grow text-lg text-info"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<div class="flex flex-col gap-1">
|
||||||
|
<button
|
||||||
|
class="btn btn-outline btn-success"
|
||||||
|
on:click={() => {
|
||||||
|
// selectedTopupOrder = {};
|
||||||
|
// showAcceptTopup = false;
|
||||||
|
acceptTopupOrder(
|
||||||
|
selectedTopupOrder.uuid,
|
||||||
|
acceptedTopupRate,
|
||||||
|
acceptedTopupHash,
|
||||||
|
acceptedTopupAmount,
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{#if acceptTopupInProgress}
|
||||||
|
<span class="loading loading-sm"></span>
|
||||||
|
{:else}
|
||||||
|
Принять
|
||||||
|
{/if}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="btn btn-outline"
|
||||||
|
on:click={() => {
|
||||||
|
selectedTopupOrder = {};
|
||||||
|
showAcceptTopup = false;
|
||||||
|
}}>Закрыть</button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<!-- {#if showFoundedOrderWindow}
|
<!-- {#if showFoundedOrderWindow}
|
||||||
<div class="fixed z-[1000] inset-0 flex justify-center items-center bg-black bg-opacity-50">
|
<div class="fixed z-[1000] inset-0 flex justify-center items-center bg-black bg-opacity-50">
|
||||||
<div class="bg-base-100 rounded-md p-4 flex flex-col">
|
<div class="bg-base-100 rounded-md p-4 flex flex-col">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user