Compare commits

...

14 Commits

Author SHA1 Message Date
Zainab2604 73deb3912e Fix hopefully last merge conflict 2025-06-22 13:56:11 +02:00
Zainab MohamedBasheer f70df881de Merge pull request '#76-Hinzufügen-einer-Seitenanzahl-bei-neuen-Kennzahlen' (#78) from #76-Hinzufügen-einer-Seitenanzahl-bei-neuen-Kennzahlen into main
Reviewed-on: #78
2025-06-20 10:32:25 +02:00
s8613 e3149e0aa4 Merge remote-tracking branch 'origin/main' into #76-Hinzufügen-einer-Seitenanzahl-bei-neuen-Kennzahlen
# Conflicts:
#	project/frontend/src/components/KennzahlenTable.tsx
2025-06-20 06:35:00 +02:00
Abdulrahman Dabbagh 443a0c5d66 Merge pull request '#77-progress-pitch-books-table' (#79) from #77-progress-pitch-books-table into main
Reviewed-on: #79
2025-06-20 01:43:07 +02:00
Jaronim Pracht 9a08331574 Merge branch 'main' into #77-progress-pitch-books-table 2025-06-18 16:40:14 +02:00
Jaronim Pracht 017670f95e Add progress on pitch-books table 2025-06-18 16:38:11 +02:00
s8613 f205165350 Fixed table columns sizing always changing widths 2025-06-17 13:05:13 +02:00
s8613 eea2d015b2 fixed small styling issue 2025-06-17 12:22:17 +02:00
s8613 6816e1a2d7 fixed small styling issue 2025-06-17 12:12:33 +02:00
s8613 26224671bb Fixed change of tabs 2025-06-17 11:45:54 +02:00
s8613 615007b437 Fixed change of tabs 2025-06-17 11:45:30 +02:00
s8613 ac8cf2f7c2 Updated extractedResult_.$pitchBook.$kpi.tsx for page number editing 2025-06-17 11:43:20 +02:00
s8613 c144db3f13 Updated KennzahlenTabel 2025-06-17 11:29:49 +02:00
Jaronim Pracht 6ef258c999 Merge branch 'main' into #23-Progress 2025-06-17 10:51:21 +02:00
1 changed files with 4 additions and 0 deletions

View File

@ -72,6 +72,7 @@ function ExtractedResultsPage() {
const originalValue = kpiValues[0]?.entity || "";
const originalPage = kpiValues[0]?.page || 0;
// Funktion, um gleiche Werte zusammenzufassen und die Seiten zu sammeln
function groupKpiValues(values: Array<{ entity: string; page: number; [key: string]: any }>): Array<{ entity: string; pages: number[]; [key: string]: any }> {
const map = new Map<string, { entity: string; pages: number[]; [key: string]: any }>();
values.forEach((item: { entity: string; page: number; [key: string]: any }) => {
@ -98,6 +99,7 @@ function ExtractedResultsPage() {
? (parseInt(customPage) > 0 ? parseInt(customPage) : 1)
: groupedKpiValues[selectedIndex]?.pages[0] || 1;
// Um zu prüfen, ob der Wert nur aus Leerzeichen besteht
const isSelectedValueEmpty = selectedIndex === -1 ? customValue.trim() === "" : !selectedValue;
useEffect(() => {
@ -111,6 +113,7 @@ function ExtractedResultsPage() {
const updatedData = { ...kpiData };
let baseObject;
if (selectedIndex >= 0) {
// Das Originalobjekt mit allen Feldern für diesen Wert suchen
const original = kpiValues.find(v => v.entity.toLowerCase() === groupedKpiValues[selectedIndex].entity.toLowerCase()) as { status?: string; source?: string } | undefined;
baseObject = {
label: kpi.toUpperCase(),
@ -177,6 +180,7 @@ function ExtractedResultsPage() {
event: React.ChangeEvent<HTMLInputElement>,
) => {
const value = event.target.value;
// Allow empty string or positive numbers only (no 0)
if (value === '' || (/^\d+$/.test(value) && parseInt(value) > 0)) {
setCustomPage(value);
}