From fe358b8bbd08802e14a39c911718e4dee9c0a60f Mon Sep 17 00:00:00 2001 From: FIRST_NAME LAST_NAME Date: Fri, 20 Dec 2024 21:20:48 +0300 Subject: [PATCH] 20-12-2024 --- src/routes/+page.svelte | 16 +++++---- src/routes/orders/+page.svelte | 40 ++++++++++++++++----- src/routes/sms/+page.svelte | 64 ++++++++++++++++++++++++---------- tailwind.config.js | 3 +- 4 files changed, 88 insertions(+), 35 deletions(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index bba4aea..636528d 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -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"); - }); - \ No newline at end of file + onMount(() => { + if (checkAuthSync()) redirect("/admin/userslist"); + else redirect("/admin/login"); + }); + + +
+ +
diff --git a/src/routes/orders/+page.svelte b/src/routes/orders/+page.svelte index cd9b532..544007c 100644 --- a/src/routes/orders/+page.svelte +++ b/src/routes/orders/+page.svelte @@ -157,7 +157,9 @@
-
+

UUID

{foundedDispute["uuid"]}

-

Владелец

-

{foundedDispute["name"]}

-

Карта

-

{foundedDispute["cardnumber"]}

-

Телефон

-

{foundedDispute["phone"]}

+ {#if foundedDispute["bank_name"] !== ""} +

Банк

+

{foundedDispute["bank_name"]}

+ {/if} + {#if foundedDispute["name"] !== ""} +

Владелец

+

{foundedDispute["name"]}

+ {/if} + {#if foundedDispute["cardnumber"] !== ""} +

Карта

+

{foundedDispute["cardnumber"]}

+ {/if} + {#if foundedDispute["phone"] !== ""} +

Телефон

+

{foundedDispute["phone"]}

+ {/if}

Время создания

{foundedDispute["creationtime"]}

diff --git a/src/routes/sms/+page.svelte b/src/routes/sms/+page.svelte index 056cbd7..5004269 100644 --- a/src/routes/sms/+page.svelte +++ b/src/routes/sms/+page.svelte @@ -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 @@

Токен:

- +
{#each tableHeads as head} - {headNamesMap[head]} + {#if head !== "bank"} + {headNamesMap[head]} + {/if} {/each} {#each notifications as noti} - - {#each tableHeads as head} - {noti[head]} - {/each} - + {#if noti["matched_order_uuid"] !== ""} + + {#each tableHeads as head} + {#if head !== "bank"} + {noti[head]} + {/if} + {/each} + + {:else} + + {#each tableHeads as head} + {#if head !== "bank"} + {noti[head]} + {/if} + {/each} + + {/if} {/each} diff --git a/tailwind.config.js b/tailwind.config.js index 9448448..65c680d 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -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"],