12
This commit is contained in:
parent
3edbd93224
commit
155d683199
@ -2,8 +2,8 @@
|
||||
import { SvelteToast } from "@zerodevx/svelte-toast";
|
||||
import { onMount } from "svelte";
|
||||
import "../../app.css";
|
||||
import Navbar from "../../lib/ui-components/navbar.svelte";
|
||||
import { checkAuth, checkAuthSync } from "../../lib/auth/Auth";
|
||||
import Navbar from "$lib/ui-components/navbar.svelte";
|
||||
import { checkAuth, checkAuthSync } from "$lib/auth/Auth";
|
||||
import { redirect } from "$lib/tools/url/URLTools";
|
||||
import { AuthStorage } from "$lib/tools/storages/auth-storage";
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { makePost } from "$lib/tools/requests/Requests";
|
||||
import { sayError, sayInfo, sayWarning } from "$lib/tools/toaster/Toaster";
|
||||
import { onMount } from "svelte";
|
||||
import { checkAuth, saveAuthInfo } from "../../../lib/auth/Auth";
|
||||
import { checkAuth, saveAuthInfo } from "$lib/auth/Auth";
|
||||
import { redirect } from "$lib/tools/url/URLTools";
|
||||
import { AuthStorage } from "$lib/tools/storages/auth-storage";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import { isStringEmptyOrSpaces } from "../../../lib/tools/strings/Strings";
|
||||
import { isStringEmptyOrSpaces } from "$lib/tools/strings/Strings";
|
||||
import { makePost, makeGet } from "$lib/tools/requests/Requests";
|
||||
import {
|
||||
checkAuthSync,
|
||||
|
@ -16,6 +16,7 @@
|
||||
let value_cardNumber;
|
||||
let value_phone;
|
||||
let value_status;
|
||||
let value_limit;
|
||||
|
||||
let canChange = false;
|
||||
|
||||
@ -27,6 +28,7 @@
|
||||
value_cardNumber = reqInfo[0]?.cardnumber;
|
||||
value_phone = reqInfo[0]?.phone;
|
||||
value_status = reqInfo[0]?.status === "t";
|
||||
value_limit = Number(reqInfo[0]?.daily_volume_limit);
|
||||
}
|
||||
|
||||
function checkFields() {
|
||||
@ -41,6 +43,11 @@
|
||||
canChange = false;
|
||||
return;
|
||||
}
|
||||
if(value_limit < 0)
|
||||
{
|
||||
canChange = false;
|
||||
return;
|
||||
}
|
||||
|
||||
canChange = true;
|
||||
|
||||
@ -78,7 +85,8 @@
|
||||
bankname: value_bankName,
|
||||
cardnumber: value_cardNumber,
|
||||
phone: value_phone,
|
||||
status: value_status ? "true":"false"
|
||||
status: value_status ? "true":"false",
|
||||
limit: value_limit.toString()
|
||||
},
|
||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
||||
);
|
||||
@ -131,6 +139,10 @@
|
||||
Телефон
|
||||
<input type="text" class="grow text-info" bind:value={value_phone} />
|
||||
</label>
|
||||
<label class="input input-bordered flex items-center gap-2">
|
||||
Лимит
|
||||
<input type="number" class="grow text-info" bind:value={value_limit} />
|
||||
</label>
|
||||
<div class="flex p-4 items-center gap-2">
|
||||
<p>Активный:</p>
|
||||
<input
|
||||
|
@ -185,7 +185,7 @@
|
||||
</div>
|
||||
<div class="flex gap-2 p-2 items-center text-lg">
|
||||
<p class="font-bold">Заморожено:</p>
|
||||
<p class="text-info">{userData?.insurance}</p>
|
||||
<p class="text-info">{userData?.insurance} USDT</p>
|
||||
</div>
|
||||
<div class="flex gap-2 p-2 items-center text-lg">
|
||||
<p class="font-bold">Ставка:</p>
|
||||
@ -227,7 +227,7 @@
|
||||
<div class="flex items-center gap-4">
|
||||
<div class="bg-accent rounded-[4px] w-[10px] h-full"></div>
|
||||
<h1 class="text-2xl font-semibold">Реквизиты пользователя</h1>
|
||||
<button class="btn btn-accent">Добавить реквизит</button>
|
||||
<button disabled class="btn btn-accent">Добавить реквизит</button>
|
||||
</div>
|
||||
<div class="w-full flex flex-col p-4 rounded-box bg-base-300">
|
||||
<div class="overflow-x-auto mt-4">
|
||||
@ -243,6 +243,8 @@
|
||||
<th>Телефон</th>
|
||||
<th>Имя</th>
|
||||
<th>Девайс</th>
|
||||
<th>Объем {userData.code}</th>
|
||||
<th>Лимит {userData.code}</th>
|
||||
<th>Опции</th>
|
||||
<!-- <th></th> -->
|
||||
</tr>
|
||||
@ -260,6 +262,8 @@
|
||||
<td>{requisite["phone"]}</td>
|
||||
<td>{requisite["name"]}</td>
|
||||
<td>{requisite["device_id"]}</td>
|
||||
<td>{requisite["daily_volume"]}</td>
|
||||
<td>{requisite["daily_volume_limit"]}</td>
|
||||
<td class="flex gap-2">
|
||||
<a
|
||||
href={"/admin/user/edit/req/" + token + "/" + requisite["id"]}
|
||||
|
@ -24,7 +24,7 @@ const config = {
|
||||
"/admin/user/edit/req/sampleToken/sampleReqID",
|
||||
"/admin/user/neworder/sampleToken",
|
||||
"/admin/user/profile/sampleToken",
|
||||
"/admin",
|
||||
"/admin/",
|
||||
"/admin/login",
|
||||
"/admin/newuser",
|
||||
"/admin/userslist",
|
||||
|
Loading…
x
Reference in New Issue
Block a user