from notebook

This commit is contained in:
aboba 2024-11-06 15:17:53 +03:00
parent 1c3685199b
commit 2b6a9f7c5a
22 changed files with 23 additions and 22 deletions

View File

@ -1,7 +1,7 @@
<script>
import { SvelteToast } from "@zerodevx/svelte-toast";
import { onMount } from "svelte";
import "../../app.css";
import "../app.css";
import Navbar from "$lib/ui-components/navbar.svelte";
import { checkAuth, checkAuthSync } from "$lib/auth/Auth";
import { redirect } from "$lib/tools/url/URLTools";

View File

@ -90,12 +90,12 @@
// $: if (foundedDispute !== 0) newSum = Number(foundedDispute?.summa);
let showLoadingChangeSum = false;
async function changeSum(id) {
async function changeSum(uuid) {
showLoadingChangeSum = true;
const res = await makePost(
"admin/rollbackOrder",
{
id: Number(id),
id: uuid,
summa: newSum.toString(),
},
makeAuthHeaderForAxios(getAuthInfo()?.a)
@ -169,9 +169,10 @@
<p class="text-sm mt-3">Сумма</p>
<p>
{foundedDispute["summa"]}
{foundedDispute["currency_code"]} ({(
{foundedDispute["currency_code"]}
<!-- ({(
Number(foundedDispute["summa"]) / Number(foundedDispute["rate"])
).toFixed(2)} USDT)
).toFixed(2)} USDT) -->
</p>
<!-- <p class="text-sm mt-3">Курс</p>
<p>{foundedDispute["rate"]} {foundedDispute["currency_code"]}</p> -->
@ -225,14 +226,14 @@
/>
<button
on:click={() => {
changeSum(foundedDispute["id"]);
changeSum(foundedDispute["uuid"]);
}}
class="btn btn-outline btn-info"
>
{#if showLoadingChangeSum}
<span class="loading loading-dots loading-xs"></span>
{:else}
{"Изменить суму ручками"}
{"Изменить сумму ручками"}
{/if}
</button>
<button

View File

@ -20,21 +20,21 @@ const config = {
prerender: {
// default: true,
entries: [
"/admin/user/change/sampleToken",
"/admin/user/edit/req/sampleToken/sampleReqID",
"/admin/user/neworder/sampleToken",
"/admin/user/profile/sampleToken",
"/admin/",
"/admin/login",
"/admin/newuser",
"/admin/userslist",
"/admin/disputes",
"/admin/payouts",
"/admin/merchants",
"/admin/orders",
"/admin/currencies",
"/admin/sms",
"/admin/withdrawals"
"/user/change/sampleToken",
"/user/edit/req/sampleToken/sampleReqID",
"/user/neworder/sampleToken",
"/user/profile/sampleToken",
"/",
"/login",
"/newuser",
"/userslist",
"/disputes",
"/payouts",
"/merchants",
"/orders",
"/currencies",
"/sms",
"/withdrawals"
],
},
},