This commit is contained in:
FIRST_NAME LAST_NAME 2026-02-25 22:05:33 +03:00
parent f32b3e8604
commit 48e9c7eb5d
3 changed files with 43 additions and 1 deletions

View File

@ -287,6 +287,7 @@
<th class="text-left px-2">{"Статус"}</th> <th class="text-left px-2">{"Статус"}</th>
<th class="text-left px-2">{"Сумма"}</th> <th class="text-left px-2">{"Сумма"}</th>
<th class="text-left px-2">{"Банк"}</th> <th class="text-left px-2">{"Банк"}</th>
<th class="text-left px-2">{"Мерчант"}</th>
<th class="text-left px-2">{"Время создания"}</th> <th class="text-left px-2">{"Время создания"}</th>
<th class="text-left px-2">{"Трейдер"}</th> <th class="text-left px-2">{"Трейдер"}</th>
</thead> </thead>
@ -318,6 +319,7 @@
{dep["currency_code"]}</td {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["merchant_name"]}</td>
<td class="px-4">{dep["creationtime"]}</td> <td class="px-4">{dep["creationtime"]}</td>
<td class="px-4" <td class="px-4"
>{dep["trader_name"]} {dep["surname"]}</td >{dep["trader_name"]} {dep["surname"]}</td

View File

@ -105,6 +105,27 @@
} }
updateInProgress = false; updateInProgress = false;
} }
let deleteInProgress = false;
async function deleteReferral(referral_code, referral_token) {
if (deleteInProgress) return;
deleteInProgress = true;
const res = await makePost(
"admin/users/referral/delete",
{
referral_code,
referral_token,
},
makeAuthHeaderForAxios(getAuthInfo()?.a),
);
if (res.error) {
sayError("Не удалось удалить реферала");
} else {
loadReferral();
}
deleteInProgress = false;
}
onMount(() => { onMount(() => {
loadReferral(); loadReferral();
@ -247,6 +268,23 @@
> >
Изменить Изменить
</button> </button>
<button
class="btn btn-error btn-xs min-w-16"
on:click={() => {
deleteReferral(
ref["referral_code"],
ref["referral_token"],
);
}}
>
{#if deleteInProgress}
<span
class="loading loading-spinner loading-xs"
></span>
{:else}
Удалить
{/if}
</button>
</td> </td>
</tr> </tr>
{/each} {/each}

View File

@ -621,7 +621,7 @@
<td>{depo["creationtime"]}</td> <td>{depo["creationtime"]}</td>
<td> <td>
<div class="flex gap-2"> <div class="flex gap-2">
{#if depo.pending === "0"} {#if depo.pending === "0" || depo.pending === "2"}
<button <button
on:click={() => { on:click={() => {
selectedTopupOrder = depo; selectedTopupOrder = depo;
@ -645,6 +645,8 @@
Принять Принять
{/if} {/if}
</button> </button>
{/if}
{#if depo.pending === "0"}
<button <button
on:click={() => { on:click={() => {
declineTopupOrder( declineTopupOrder(