Skip to content

Commit d91c7f5

Browse files
authored
Merge pull request #633 from bettercodepaul/2116-Header-Schusszettel
Schusszettel-Header Attribute entfernt, &Cypress Test fix
2 parents a3f989d + 712ef12 commit d91c7f5

4 files changed

Lines changed: 10 additions & 32 deletions

File tree

bogenliga/cypress.config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
import { defineConfig } from "cypress";
1+
import { defineConfig } from 'cypress';
22

33
export default defineConfig({
44
e2e: {
55
// We've imported your old cypress plugins here.
66
// You may want to clean this up later by importing these.
77
setupNodeEvents(on, config) {
8-
return require("./cypress/plugins/index.js")(on, config);
8+
return require('./cypress/plugins/index.js')(on, config);
99
},
1010
testIsolation: false,
1111
},
1212

1313
component: {
1414
devServer: {
15-
framework: "angular",
16-
bundler: "webpack",
15+
framework: 'angular',
16+
bundler: 'webpack',
1717
},
18-
specPattern: "**/*.cy.ts",
18+
specPattern: '**/*.cy.ts',
1919
},
2020
});

bogenliga/cypress/e2e/bsapp/online-wettkampfdurchfuehrung/tablet-schusszettel/admin_sitzungsverwaltung.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Admin - Tablet-Schusszettel-Verwaltung', () => {
1111

1212
cy.get('.info-item').should('contain.text', 'Liga');
1313
cy.get('.info-item').should('contain.text', '1');
14-
cy.get('.info-item').should('contain.text', '05.05.2018');
14+
cy.get('.info-item').should('contain.text', '12.12.2025');
1515
cy.get('.info-item').should('contain.text', '15:30');
1616
cy.get('.info-item').should('contain.text', 'Reutlingen');
1717
});

bogenliga/src/app/modules/schusszettel/components/shared/match-kontext/match-kontext.component.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@ <h2 id="match-context-heading" class="visually-hidden">
99
</h2>
1010

1111
<dl class="match-context__list">
12-
<div class="pair"><dt>Datum</dt><dd>{{ today }}</dd></div>
1312
<div class="pair"><dt>Liga</dt><dd>{{ ligaName }}</dd></div>
1413
<div class="pair"><dt>Veranstaltung</dt><dd>{{ veranstaltungName }} {{ sportjahr }}</dd></div>
1514
<div class="pair"><dt>Wettkampf-Tag</dt><dd>{{ wettkampfTag }}</dd></div>
16-
<div class="pair"><dt>Beginn</dt><dd>{{ beginn }}</dd></div>
17-
<div class="pair"><dt>Ort</dt><dd>{{ ort }}</dd></div>
1815
<div class="pair"><dt>Team</dt><dd>{{ i.eigenesTeam.teamName }}</dd></div>
1916
<div class="pair"><dt>Gegner</dt><dd>{{ i.gegnerischesTeam.teamName }}</dd></div>
2017
<div class="pair" *ngIf="getCurrentPasse() > 0"><dt>Aktuelle Passe</dt><dd>{{ getCurrentPasse() }}</dd></div>

bogenliga/src/app/modules/schusszettel/components/shared/match-kontext/match-kontext.component.ts

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ export class MatchKontextComponent {
1111
/** full tablet state; may be null until loaded */
1212
@Input() infos: TabletSchusszettel | null = null;
1313

14-
/** Getter methods to safely access wettkampfInfo properties */
15-
get today(): string {
16-
return this.infos?.wettkampfInfo?.wettkampfDatum
17-
? new Date(this.infos.wettkampfInfo.wettkampfDatum).toLocaleDateString('de-DE')
18-
: new Date().toLocaleDateString('de-DE');
19-
}
20-
2114
get wettkampfName(): string {
2215
return this.infos?.wettkampfInfo?.wettkampftypName || 'Unbekannt';
2316
}
@@ -30,24 +23,10 @@ export class MatchKontextComponent {
3023
return this.infos?.wettkampfInfo?.veranstaltungName || 'Unbekannt';
3124
}
3225

33-
get ort(): string {
34-
const ortsname = this.infos?.wettkampfInfo?.wettkampfOrtsname || '';
35-
const ortsinfo = this.infos?.wettkampfInfo?.wettkampfOrtsinfo || '';
36-
37-
if (ortsname && ortsinfo) {
38-
return `${ortsname}, ${ortsinfo}`;
39-
}
40-
return ortsname || ortsinfo || 'Unbekannt';
41-
}
42-
4326
get wettkampfTag(): number | string {
4427
return this.infos?.wettkampfInfo?.wettkampfTag || 'Unbekannt';
4528
}
4629

47-
get beginn(): string {
48-
return this.infos?.wettkampfInfo?.wettkampfBeginn || 'Unbekannt';
49-
}
50-
5130
get sportjahr(): number | string {
5231
return this.infos?.wettkampfInfo?.veranstaltungSportjahr || 'Unbekannt';
5332
}
@@ -58,13 +37,15 @@ export class MatchKontextComponent {
5837
if (this.infos?.currentPasseNumber != null && this.infos.currentPasseNumber > 0) {
5938
return this.infos.currentPasseNumber;
6039
}
61-
40+
41+
6242
// Fallback calculation if backend value not available
6343
if (!this.infos?.satzErgebnisse || this.infos.satzErgebnisse.length === 0) {
6444
return 1;
6545
}
66-
46+
6747
const completedPasses = this.infos.satzErgebnisse.length;
6848
return completedPasses + 1;
6949
}
50+
7051
}

0 commit comments

Comments
 (0)