fixed charts

This commit is contained in:
FIRST_NAME LAST_NAME 2025-01-10 13:37:30 +03:00
parent 4f7df27e2c
commit ab93c78309
3 changed files with 23 additions and 5 deletions

View File

@ -11,6 +11,11 @@
export let currencyCode;
export let merchantId;
$: {
console.log("CHart", currencyCode);
console.log("CHart", merchantId);
}
const bgChartMap = {
dark: "#1c2229",
forest: "#171212",
@ -167,6 +172,10 @@
onMount(() => {
window.addEventListener("theme-changed", listener);
listener({ detail: document.documentElement.getAttribute("data-theme") });
// if (selectedPeriod) {
// getData();
// }
// console.log(chartTheme);
return () => {
window.removeEventListener("theme-changed", listener);

View File

@ -1,2 +1,4 @@
export const prerender = true;
export const ssr = false;
export const ssr = false;
console.log = () => {};

View File

@ -138,6 +138,7 @@
$: if (selectedMerchant !== "") {
settlesCurrentPage = 1;
getMerchantSettles();
console.log(selectedMerchant);
}
$: if (settlesFilter.length > 0) {
@ -245,6 +246,7 @@
if (selectedMerchant !== merch["id"]) {
selectedMerchant = merch["id"];
getStatistics();
console.log(selectedMerchant);
}
}}
class={"group " +
@ -309,10 +311,15 @@
</table>
</div>
<div class="mt-4"></div>
{#each merchantsGeos as merch}
<p class="text-2xl font-bold">Объем для региона {merch["code"]}:</p>
<Chart1 currencyCode={merch["code"]} merchantId={selectedMerchant} />
{/each}
{#key merchantsGeos}
{#each merchantsGeos as merch}
<p class="text-2xl font-bold">Объем для региона {merch["code"]}:</p>
<Chart1
currencyCode={merch["code"]}
merchantId={selectedMerchant}
/>
{/each}
{/key}
<p class="mt-4 text-2xl font-bold">
Показать статистику за период для ID: {selectedMerchant}
</p>