bugfixing

This commit is contained in:
MuslemRahimi 2025-04-02 00:42:12 +02:00
parent 7956ecfd5a
commit a1f71dbff5
4 changed files with 24 additions and 24 deletions

View File

@ -180,11 +180,11 @@
switch (timeFrame) { switch (timeFrame) {
case "5Y": case "5Y":
return fullStatement?.filter( return fullStatement?.filter(
(item) => currentYear - parseInt(item?.calendarYear) < 5, (item) => currentYear - parseInt(item?.fiscalYear) < 5,
); );
case "10Y": case "10Y":
return fullStatement?.filter( return fullStatement?.filter(
(item) => currentYear - parseInt(item?.calendarYear) < 10, (item) => currentYear - parseInt(item?.fiscalYear) < 10,
); );
default: default:
return fullStatement; return fullStatement;
@ -203,7 +203,7 @@
let properties = [ let properties = [
{ {
key: filterRule === "annual" ? "calendarYear" : "date", key: filterRule === "annual" ? "fiscalYear" : "date",
label: filterRule === "annual" ? "Year" : "Quarter", label: filterRule === "annual" ? "Year" : "Quarter",
}, },
]; ];
@ -264,7 +264,7 @@
const xList = []; const xList = [];
for (let i = financialData.length - 1; i >= 0; i--) { for (let i = financialData.length - 1; i >= 0; i--) {
const statement = financialData[i]; const statement = financialData[i];
const year = statement.calendarYear.slice(-2); const year = statement.fiscalYear.slice(-2);
const quarter = statement.period; const quarter = statement.period;
xList.push( xList.push(
filterRule === "annual" ? "FY" + year : "FY" + year + " " + quarter, filterRule === "annual" ? "FY" + year : "FY" + year + " " + quarter,
@ -514,12 +514,12 @@
{#each financialData as cash} {#each financialData as cash}
{#if filterRule === "annual"} {#if filterRule === "annual"}
<td class=" font-semibold text-sm text-end"> <td class=" font-semibold text-sm text-end">
{"FY" + cash?.calendarYear?.slice(-2)} {"FY" + cash?.fiscalYear?.slice(-2)}
</td> </td>
{:else} {:else}
<td class=" font-semibold text-sm text-end"> <td class=" font-semibold text-sm text-end">
{"FY" + {"FY" +
cash?.calendarYear?.slice(-2) + cash?.fiscalYear?.slice(-2) +
" " + " " +
cash?.period} cash?.period}
</td> </td>

View File

@ -217,11 +217,11 @@
switch (timeFrame) { switch (timeFrame) {
case "5Y": case "5Y":
return fullStatement?.filter( return fullStatement?.filter(
(item) => currentYear - parseInt(item?.calendarYear) < 5, (item) => currentYear - parseInt(item?.fiscalYear) < 5,
); );
case "10Y": case "10Y":
return fullStatement?.filter( return fullStatement?.filter(
(item) => currentYear - parseInt(item?.calendarYear) < 10, (item) => currentYear - parseInt(item?.fiscalYear) < 10,
); );
default: default:
return fullStatement; return fullStatement;
@ -240,7 +240,7 @@
let properties = [ let properties = [
{ {
key: filterRule === "annual" ? "calendarYear" : "date", key: filterRule === "annual" ? "fiscalYear" : "date",
label: filterRule === "annual" ? "Year" : "Quarter", label: filterRule === "annual" ? "Year" : "Quarter",
}, },
]; ];
@ -300,7 +300,7 @@
const xList = []; const xList = [];
for (let i = financialData.length - 1; i >= 0; i--) { for (let i = financialData.length - 1; i >= 0; i--) {
const statement = financialData[i]; const statement = financialData[i];
const year = statement.calendarYear.slice(-2); const year = statement.fiscalYear.slice(-2);
const quarter = statement.period; const quarter = statement.period;
xList.push( xList.push(
filterRule === "annual" ? "FY" + year : "FY" + year + " " + quarter, filterRule === "annual" ? "FY" + year : "FY" + year + " " + quarter,
@ -550,12 +550,12 @@
{#each financialData as cash} {#each financialData as cash}
{#if filterRule === "annual"} {#if filterRule === "annual"}
<td class=" font-semibold text-sm text-end"> <td class=" font-semibold text-sm text-end">
{"FY" + cash?.calendarYear?.slice(-2)} {"FY" + cash?.fiscalYear?.slice(-2)}
</td> </td>
{:else} {:else}
<td class=" font-semibold text-sm text-end"> <td class=" font-semibold text-sm text-end">
{"FY" + {"FY" +
cash?.calendarYear?.slice(-2) + cash?.fiscalYear?.slice(-2) +
" " + " " +
cash?.period} cash?.period}
</td> </td>

View File

@ -180,11 +180,11 @@
switch (timeFrame) { switch (timeFrame) {
case "5Y": case "5Y":
return fullStatement?.filter( return fullStatement?.filter(
(item) => currentYear - parseInt(item?.calendarYear) < 5, (item) => currentYear - parseInt(item?.fiscalYear) < 5,
); );
case "10Y": case "10Y":
return fullStatement?.filter( return fullStatement?.filter(
(item) => currentYear - parseInt(item?.calendarYear) < 10, (item) => currentYear - parseInt(item?.fiscalYear) < 10,
); );
default: default:
return fullStatement; return fullStatement;
@ -202,7 +202,7 @@
let properties = [ let properties = [
{ {
key: filterRule === "annual" ? "calendarYear" : "date", key: filterRule === "annual" ? "fiscalYear" : "date",
label: filterRule === "annual" ? "Year" : "Quarter", label: filterRule === "annual" ? "Year" : "Quarter",
}, },
]; ];
@ -262,7 +262,7 @@
const xList = []; const xList = [];
for (let i = financialData.length - 1; i >= 0; i--) { for (let i = financialData.length - 1; i >= 0; i--) {
const statement = financialData[i]; const statement = financialData[i];
const year = statement.calendarYear.slice(-2); const year = statement.fiscalYear.slice(-2);
const quarter = statement.period; const quarter = statement.period;
xList.push( xList.push(
filterRule === "annual" ? "FY" + year : "FY" + year + " " + quarter, filterRule === "annual" ? "FY" + year : "FY" + year + " " + quarter,
@ -512,12 +512,12 @@
{#each financialData as cash} {#each financialData as cash}
{#if filterRule === "annual"} {#if filterRule === "annual"}
<td class=" font-semibold text-sm text-end"> <td class=" font-semibold text-sm text-end">
{"FY" + cash?.calendarYear?.slice(-2)} {"FY" + cash?.fiscalYear?.slice(-2)}
</td> </td>
{:else} {:else}
<td class=" font-semibold text-sm text-end"> <td class=" font-semibold text-sm text-end">
{"FY" + {"FY" +
cash?.calendarYear?.slice(-2) + cash?.fiscalYear?.slice(-2) +
" " + " " +
cash?.period} cash?.period}
</td> </td>

View File

@ -169,11 +169,11 @@
switch (timeFrame) { switch (timeFrame) {
case "5Y": case "5Y":
return fullStatement?.filter( return fullStatement?.filter(
(item) => currentYear - parseInt(item?.calendarYear) < 5, (item) => currentYear - parseInt(item?.fiscalYear) < 5,
); );
case "10Y": case "10Y":
return fullStatement?.filter( return fullStatement?.filter(
(item) => currentYear - parseInt(item?.calendarYear) < 10, (item) => currentYear - parseInt(item?.fiscalYear) < 10,
); );
default: default:
return fullStatement; return fullStatement;
@ -191,7 +191,7 @@
let properties = [ let properties = [
{ {
key: filterRule === "annual" ? "calendarYear" : "date", key: filterRule === "annual" ? "fiscalYear" : "date",
label: filterRule === "annual" ? "Year" : "Quarter", label: filterRule === "annual" ? "Year" : "Quarter",
}, },
]; ];
@ -251,7 +251,7 @@
const xList = []; const xList = [];
for (let i = financialData.length - 1; i >= 0; i--) { for (let i = financialData.length - 1; i >= 0; i--) {
const statement = financialData[i]; const statement = financialData[i];
const year = statement.calendarYear.slice(-2); const year = statement.fiscalYear.slice(-2);
const quarter = statement.period; const quarter = statement.period;
xList.push( xList.push(
filterRule === "annual" ? "FY" + year : "FY" + year + " " + quarter, filterRule === "annual" ? "FY" + year : "FY" + year + " " + quarter,
@ -501,12 +501,12 @@
{#each financialData as cash} {#each financialData as cash}
{#if filterRule === "annual"} {#if filterRule === "annual"}
<td class=" font-semibold text-sm text-end"> <td class=" font-semibold text-sm text-end">
{"FY" + cash?.calendarYear?.slice(-2)} {"FY" + cash?.fiscalYear?.slice(-2)}
</td> </td>
{:else} {:else}
<td class=" font-semibold text-sm text-end"> <td class=" font-semibold text-sm text-end">
{"FY" + {"FY" +
cash?.calendarYear?.slice(-2) + cash?.fiscalYear?.slice(-2) +
" " + " " +
cash?.period} cash?.period}
</td> </td>