prod updt
This commit is contained in:
parent
a764948bc7
commit
e3f2e33b90
@ -16,7 +16,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/";
|
||||||
|
|
||||||
let BasicURLValue = API_PATH_TEST;
|
let BasicURLValue = API_PATH_MAIN;
|
||||||
|
|
||||||
async function makePost(url, data, options = undefined,
|
async function makePost(url, data, options = undefined,
|
||||||
responseProcessor = defaultResponseProcessor,
|
responseProcessor = defaultResponseProcessor,
|
||||||
|
@ -161,7 +161,7 @@
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
const response = await axios.get(
|
const response = await axios.get(
|
||||||
API_PATH_TEST + "loadFile?dispute=" +
|
API_PATH_MAIN + "loadFile?dispute=" +
|
||||||
selectedDispute["order_id"],
|
selectedDispute["order_id"],
|
||||||
// "17731",
|
// "17731",
|
||||||
{
|
{
|
||||||
@ -338,7 +338,7 @@
|
|||||||
on:click={() => {
|
on:click={() => {
|
||||||
axios
|
axios
|
||||||
.get(
|
.get(
|
||||||
API_PATH_TEST + "loadFile?dispute=" +
|
API_PATH_MAIN + "loadFile?dispute=" +
|
||||||
selectedDispute["order_id"],
|
selectedDispute["order_id"],
|
||||||
{
|
{
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
|
@ -280,7 +280,7 @@
|
|||||||
<th>Регион</th>
|
<th>Регион</th>
|
||||||
<th>Статус</th>
|
<th>Статус</th>
|
||||||
<th>Баланс</th>
|
<th>Баланс</th>
|
||||||
<th>Тип баланса</th>
|
<!-- <th>Тип баланса</th> -->
|
||||||
<th>Pay In</th>
|
<th>Pay In</th>
|
||||||
<th>Pay Out</th>
|
<th>Pay Out</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -291,7 +291,7 @@
|
|||||||
<td class="font-semibold">{merch["code"]}</td>
|
<td class="font-semibold">{merch["code"]}</td>
|
||||||
<td>{merch["is_active"] === "t" ? "Активен":"Отключен"}</td>
|
<td>{merch["is_active"] === "t" ? "Активен":"Отключен"}</td>
|
||||||
<td>{merch["balance"]} {merch["balance_type"] === "0" ? "USDT":merch["code"]}</td>
|
<td>{merch["balance"]} {merch["balance_type"] === "0" ? "USDT":merch["code"]}</td>
|
||||||
<td>{merch["balance_type"] === "0" ? "crypto":"fiat"}</td>
|
<!-- <td>{merch["balance_type"] === "0" ? "crypto":"fiat"}</td> -->
|
||||||
<td>{merch["payin"]}%</td>
|
<td>{merch["payin"]}%</td>
|
||||||
<td>{merch["payout"]}%</td>
|
<td>{merch["payout"]}%</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -30,14 +30,19 @@
|
|||||||
value_bid,
|
value_bid,
|
||||||
value_currency_code,
|
value_currency_code,
|
||||||
value_paid_bid,
|
value_paid_bid,
|
||||||
value_deposit_address
|
value_deposit_address,
|
||||||
|
value_insurance
|
||||||
);
|
);
|
||||||
|
|
||||||
function checkFields(name, surname, balance, role, bid, code, pbid, addr) {
|
function checkFields(name, surname, balance, role, bid, code, pbid, addr, insurance) {
|
||||||
if (isStringEmptyOrSpaces(code) || code === "-1") {
|
if (isStringEmptyOrSpaces(code) || code === "-1") {
|
||||||
canCreateUser = false;
|
canCreateUser = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(!Number.isFinite(insurance) || insurance < 0) {
|
||||||
|
canCreateUser = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (isStringEmptyOrSpaces(addr) || addr.length < 8) {
|
if (isStringEmptyOrSpaces(addr) || addr.length < 8) {
|
||||||
canCreateUser = false;
|
canCreateUser = false;
|
||||||
return;
|
return;
|
||||||
@ -97,6 +102,7 @@
|
|||||||
setupNewUser();
|
setupNewUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let value_insurance = 0;
|
||||||
async function setupNewUser() {
|
async function setupNewUser() {
|
||||||
//todo
|
//todo
|
||||||
const result = await makePost(
|
const result = await makePost(
|
||||||
@ -113,6 +119,7 @@
|
|||||||
payout_bid: Number(value_paid_bid) + "",
|
payout_bid: Number(value_paid_bid) + "",
|
||||||
bid: value_bid.toString(),
|
bid: value_bid.toString(),
|
||||||
deposit_address: value_deposit_address + "",
|
deposit_address: value_deposit_address + "",
|
||||||
|
insurance: value_insurance.toString()
|
||||||
},
|
},
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
||||||
);
|
);
|
||||||
@ -186,6 +193,15 @@
|
|||||||
class="grow text-lg text-info"
|
class="grow text-lg text-info"
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
<label class={"input input-bordered flex items-center gap-2 "}>
|
||||||
|
Страховка (USDT):
|
||||||
|
<input
|
||||||
|
bind:value={value_insurance}
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
class="grow text-lg text-info"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
<label class={"input input-bordered flex items-center gap-2 "}>
|
<label class={"input input-bordered flex items-center gap-2 "}>
|
||||||
Ставка (%):
|
Ставка (%):
|
||||||
<input
|
<input
|
||||||
|
@ -60,12 +60,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let showLoadingRollback = false;
|
let showLoadingRollback = false;
|
||||||
async function rollbackOrder(id) {
|
async function rollbackOrder(uuid) {
|
||||||
showLoadingRollback = true;
|
showLoadingRollback = true;
|
||||||
const res = await makePost(
|
const res = await makePost(
|
||||||
"admin/rollbackOrder",
|
"admin/rollbackOrder",
|
||||||
{
|
{
|
||||||
id: Number(id),
|
id: uuid,
|
||||||
summa: foundedDispute["summa"],
|
summa: foundedDispute["summa"],
|
||||||
},
|
},
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
||||||
@ -160,8 +160,8 @@
|
|||||||
<div class="flex flex-col p-4 bg-base-100 rounded-md">
|
<div class="flex flex-col p-4 bg-base-100 rounded-md">
|
||||||
<p class="text-sm">UUID</p>
|
<p class="text-sm">UUID</p>
|
||||||
<p class="font-semibold">{foundedDispute["uuid"]}</p>
|
<p class="font-semibold">{foundedDispute["uuid"]}</p>
|
||||||
<p class="text-sm mt-3">ID заявки</p>
|
<!-- <p class="text-sm mt-3">ID заявки</p>
|
||||||
<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">{foundedDispute["external_user_id"]}</p>
|
<p class="font-semibold">{foundedDispute["external_user_id"]}</p>
|
||||||
<p class="text-sm mt-3">Статус</p>
|
<p class="text-sm mt-3">Статус</p>
|
||||||
@ -173,8 +173,8 @@
|
|||||||
Number(foundedDispute["summa"]) / Number(foundedDispute["rate"])
|
Number(foundedDispute["summa"]) / Number(foundedDispute["rate"])
|
||||||
).toFixed(2)} USDT)
|
).toFixed(2)} USDT)
|
||||||
</p>
|
</p>
|
||||||
<p class="text-sm mt-3">Курс</p>
|
<!-- <p class="text-sm mt-3">Курс</p>
|
||||||
<p>{foundedDispute["rate"]} {foundedDispute["currency_code"]}</p>
|
<p>{foundedDispute["rate"]} {foundedDispute["currency_code"]}</p> -->
|
||||||
<p class="text-sm mt-3">Владелец</p>
|
<p class="text-sm mt-3">Владелец</p>
|
||||||
<p>{foundedDispute["name"]}</p>
|
<p>{foundedDispute["name"]}</p>
|
||||||
<p class="text-sm mt-3">Карта</p>
|
<p class="text-sm mt-3">Карта</p>
|
||||||
@ -186,7 +186,7 @@
|
|||||||
<!-- <p>{foundedDispute["closetime"]}</p> -->
|
<!-- <p>{foundedDispute["closetime"]}</p> -->
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
rollbackOrder(foundedDispute["id"]);
|
rollbackOrder(foundedDispute["uuid"]);
|
||||||
}}
|
}}
|
||||||
class="btn btn-outline btn-info mt-4"
|
class="btn btn-outline btn-info mt-4"
|
||||||
>
|
>
|
||||||
|
@ -451,7 +451,7 @@
|
|||||||
on:click={() => {
|
on:click={() => {
|
||||||
axios
|
axios
|
||||||
.get(
|
.get(
|
||||||
API_PATH_TEST + "loadFile?dispute=" +
|
API_PATH_MAIN + "loadFile?dispute=" +
|
||||||
selectedPayout["order_id"],
|
selectedPayout["order_id"],
|
||||||
{
|
{
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
|
@ -26,6 +26,6 @@ export async function load({ params }) {
|
|||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
token: userToken,
|
token: userToken,
|
||||||
userData: userResult.data
|
userData: userResult.data,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,11 @@
|
|||||||
}, makeAuthHeaderForAxios(getAuthInfo()?.a));
|
}, makeAuthHeaderForAxios(getAuthInfo()?.a));
|
||||||
}
|
}
|
||||||
showLoadingFind = false;
|
showLoadingFind = false;
|
||||||
|
const orderTypesMap = {
|
||||||
|
"card": "Карта",
|
||||||
|
"sbp": "СБП",
|
||||||
|
"clearing_account": "По номеру счёта"
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="w-full flex flex-col gap-8">
|
<div class="w-full flex flex-col gap-8">
|
||||||
@ -367,14 +371,15 @@
|
|||||||
<!-- head -->
|
<!-- head -->
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID заявки</th>
|
<!-- <th>ID заявки</th> -->
|
||||||
<th>UUID</th>
|
<th>UUID</th>
|
||||||
<th>ID клиента</th>
|
<th>ID клиента</th>
|
||||||
<th>Статус</th>
|
<th>Статус</th>
|
||||||
<th>Сумма</th>
|
<th>Сумма</th>
|
||||||
<th>Курс</th>
|
<th>Тип заявки</th>
|
||||||
<th>Название реквизита</th>
|
<!-- <th>Курс</th> -->
|
||||||
<th>СБП</th>
|
<!-- <th>Название реквизита</th> -->
|
||||||
|
<!-- <th>СБП</th> -->
|
||||||
<th>Мерчант</th>
|
<th>Мерчант</th>
|
||||||
<th>Время создания</th>
|
<th>Время создания</th>
|
||||||
<th>Время закрытия</th>
|
<th>Время закрытия</th>
|
||||||
@ -385,14 +390,15 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{#each userOrders as order}
|
{#each userOrders as order}
|
||||||
<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>{order["summa"]} {userData?.code}</td>
|
<td>{order["summa"]} {userData?.code}</td>
|
||||||
<td>{order["rate"]} {userData?.code}</td>
|
<td>{orderTypesMap[order["order_type"]]}</td>
|
||||||
<td>{order["is_sbp"] === "t" ? "да" : "нет"}</td>
|
<!-- <td>{order["rate"]} {userData?.code}</td> -->
|
||||||
<td>{order["merchant_id"]}</td>
|
<!-- <td>{order["is_sbp"] === "t" ? "да" : "нет"}</td> -->
|
||||||
|
<td>{order["merchant"]}</td>
|
||||||
<td>{order["creation_time"]}</td>
|
<td>{order["creation_time"]}</td>
|
||||||
<td>{order["closetime"]}</td>
|
<td>{order["closetime"]}</td>
|
||||||
<!-- <td>
|
<!-- <td>
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<tr class="hover:bg-neutral group">
|
<tr class="hover:bg-neutral group">
|
||||||
<th class="font-normal">{user["token"]}</th>
|
<th class="font-normal">{user["token"]}</th>
|
||||||
<td class="font-semibold">{user["name"]} {user["surname"]}</td>
|
<td class="font-semibold">{user["name"]} {user["surname"]}</td>
|
||||||
<td>{(Number(user["balance"]) / 1e6)} USDT</td>
|
<td>{(Number(user["balance"]))} {user["code"]}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href={"/admin/user/profile/"+user["token"]} class="btn btn-outline btn-info group-hover:btn-warning">Профиль</a>
|
<a href={"/admin/user/profile/"+user["token"]} class="btn btn-outline btn-info group-hover:btn-warning">Профиль</a>
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user