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