20-12-2024

This commit is contained in:
FIRST_NAME LAST_NAME 2024-12-20 21:20:48 +03:00
parent ab5e815b48
commit fe358b8bbd
4 changed files with 88 additions and 35 deletions

View File

@ -3,10 +3,12 @@
import { redirect } from "$lib/tools/url/URLTools";
import { onMount } from "svelte";
onMount(()=>{
if(checkAuthSync())
redirect("/admin/userslist");
else
redirect("/admin/login");
});
onMount(() => {
if (checkAuthSync()) redirect("/admin/userslist");
else redirect("/admin/login");
});
</script>
<div class="w-full flex justify-center items-center">
<span class="loading loading-lg"></span>
</div>

View File

@ -157,7 +157,9 @@
<div
class="fixed inset-0 z-[1000] bg-black bg-opacity-50 flex justify-center items-center"
>
<div class="flex flex-col p-4 bg-base-100 rounded-md">
<div
class="flex flex-col p-4 bg-base-100 rounded-md overflow-y-auto max-h-[90%]"
>
<p class="text-sm">UUID</p>
<p class="font-semibold">{foundedDispute["uuid"]}</p>
<!-- <p class="text-sm mt-3">ID заявки</p>
@ -166,6 +168,18 @@
<p class="font-semibold">{foundedDispute["external_user_id"]}</p>
<p class="text-sm mt-3">Статус</p>
<p class="">{orderStatusMap[foundedDispute["status"]]}</p>
{#if foundedDispute["token"] !== ""}
<p class="text-sm mt-3">Токен трейдера</p>
<p>{foundedDispute["token"]}</p>
{/if}
{#if foundedDispute["trader_name"] !== ""}
<p class="text-sm mt-3">Трейдер</p>
<p>{foundedDispute["trader_name"]} {foundedDispute["surname"]}</p>
{/if}
{#if foundedDispute["close_reason"] !== ""}
<p class="text-sm mt-3">Причина отклонения</p>
<p>{foundedDispute["close_reason"]}</p>
{/if}
<p class="text-sm mt-3">Сумма</p>
<p>
{foundedDispute["summa"]}
@ -176,12 +190,22 @@
</p>
<!-- <p class="text-sm mt-3">Курс</p>
<p>{foundedDispute["rate"]} {foundedDispute["currency_code"]}</p> -->
<p class="text-sm mt-3">Владелец</p>
<p>{foundedDispute["name"]}</p>
<p class="text-sm mt-3">Карта</p>
<p>{foundedDispute["cardnumber"]}</p>
<p class="text-sm mt-3">Телефон</p>
<p>{foundedDispute["phone"]}</p>
{#if foundedDispute["bank_name"] !== ""}
<p class="text-sm mt-3">Банк</p>
<p>{foundedDispute["bank_name"]}</p>
{/if}
{#if foundedDispute["name"] !== ""}
<p class="text-sm mt-3">Владелец</p>
<p>{foundedDispute["name"]}</p>
{/if}
{#if foundedDispute["cardnumber"] !== ""}
<p class="text-sm mt-3">Карта</p>
<p>{foundedDispute["cardnumber"]}</p>
{/if}
{#if foundedDispute["phone"] !== ""}
<p class="text-sm mt-3">Телефон</p>
<p>{foundedDispute["phone"]}</p>
{/if}
<p class="text-sm mt-3">Время создания</p>
<p>{foundedDispute["creationtime"]}</p>
<!-- <p>{foundedDispute["closetime"]}</p> -->

View File

@ -17,14 +17,13 @@
from_bank_name: "Название банка",
from_to: "Получатель",
got_from_device_uuid: "Девайс UUID",
initial_text:
"Текст сообщения",
initial_text: "Текст сообщения",
matched_order_uuid: "Совпадение с заявкой",
on_device_msg_creation: "Время сообщения на устройство",
to_bank_id: "ID банка",
type: "Тип",
uuid: "UUID",
requisite_type: "Тип реквизита"
requisite_type: "Тип реквизита",
};
let selectedNotificationType = "push";
@ -51,7 +50,7 @@
notification_type: selectedNotificationType === "push" ? 1 : 2,
fromDate: formatDateTime(value_startTime),
toDate: formatDateTime(value_endTime),
token: (value_token.length >= 36 ? value_token:undefined),
token: value_token.length >= 36 ? value_token : undefined,
page: currentPage,
},
makeAuthHeaderForAxios(getAuthInfo()?.a)
@ -80,24 +79,27 @@
showLoadingNotifies = false;
}
$: if(selectedNotificationType) {
$: if (selectedNotificationType) {
currentPage = 1;
}
$: if (value_startTime !== "" && value_endTime !== "") {
currentPage = 1;
getNotifications();
}
$: if(typeof value_token === 'string' && value_token.length >= 36 || value_token.length === 0) {
$: if (
(typeof value_token === "string" && value_token.length >= 36) ||
value_token.length === 0
) {
currentPage = 1;
getNotifications();
}
function formatDateForStartup(date) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const month = String(date.getMonth() + 1).padStart(2, "0");
const day = String(date.getDate()).padStart(2, "0");
const hours = String(date.getHours()).padStart(2, "0");
const minutes = String(date.getMinutes()).padStart(2, "0");
return `${year}-${month}-${day}T${hours}:${minutes}`;
}
@ -198,7 +200,11 @@
</div>
<div class="flex items-center gap-2">
<p>Токен:</p>
<input type="text" bind:value={value_token} class="input input-sm input-bordered">
<input
type="text"
bind:value={value_token}
class="input input-sm input-bordered"
/>
</div>
</div>
<Pagination
@ -220,19 +226,39 @@
<thead>
<tr>
{#each tableHeads as head}
<th>{headNamesMap[head]}</th>
{#if head !== "bank"}
<th>{headNamesMap[head]}</th>
{/if}
{/each}
</tr>
</thead>
<tbody>
{#each notifications as noti}
<tr class="hover:bg-neutral group border-t-[2px] border-neutral">
{#each tableHeads as head}
<td class={head === "initial_text" ? "text-xs" : ""}
>{noti[head]}</td
>
{/each}
</tr>
{#if noti["matched_order_uuid"] !== ""}
<tr
class="hover:bg-info hover:bg-opacity-50 group border-t-[2px] border-neutral bg-accent bg-opacity-10"
>
{#each tableHeads as head}
{#if head !== "bank"}
<td class={head === "initial_text" ? "text-xs" : ""}
>{noti[head]}</td
>
{/if}
{/each}
</tr>
{:else}
<tr
class="hover:bg-info hover:bg-opacity-50 group border-t-[2px] border-neutral bg-warning bg-opacity-10"
>
{#each tableHeads as head}
{#if head !== "bank"}
<td class={head === "initial_text" ? "text-xs" : ""}
>{noti[head]}</td
>
{/if}
{/each}
</tr>
{/if}
{/each}
</tbody>
</table>

View File

@ -1,11 +1,12 @@
/** @type {import('tailwindcss').Config} */
import daisyui from 'daisyui';
export default {
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
extend: {}
},
plugins: [
require('daisyui'),
daisyui,
],
daisyui: {
themes: ["forest"],