Skip to content

Ticket info aktivity - #191

Open
MartinsMikroKosmos wants to merge 11 commits into
masterfrom
ticket-info-aktivity
Open

MartinsMikroKosmos wants to merge 11 commits into
masterfrom
ticket-info-aktivity

Conversation

@MartinsMikroKosmos

@MartinsMikroKosmos MartinsMikroKosmos commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Info Scan Mode Added
needs libpretixSync

+ strings fror englisch and german
- Add `InfoModeActivity` to perform simulated ticket checks using the device camera.
- Replace manual test inputs with `ScannerView` for live barcode/QR code scanning.
- Display detailed ticket information in scan results, including attendee names, seat assignments, addon text, and question answers.
- Implement a check-in history view using a `RecyclerView` to show past entry and exit events across all lists.
- Add PIN protection support for accessing Info Mode via app settings.
- Update UI with modern layouts and provide localized strings for English and German.
… slug, and merge immediate scan results into the history list.

@pc-coholic pc-coholic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guter erster Aufschlag, aber ein bisschen Liebe braucht der Info-Modus leider noch...

  • Info-Modus-Activity respektiert nicht die Kamera/Hardware-Scanner Einstellung; sollte bei Bedarf Camera-View ausblenden + HW-Scan Infos anzeigen
  • Keine Möglichkeit manuell nach einem Ticket zu suchen um es zu beauskunften (Mit Berücksichtung eventuell fehlender Such-Permission) (Optional - kann zurückgestellt werden)
  • Kein Keyboard-Input Handler
  • Vermutlich dann auch kein Intent-Handler?
  • Kein NFC-Handler
  • Fehlermeldung verkürzt (Bspw. nur "Medientausch" anstatt "Ticket bereits in ein Medium umgetauscht", new line: "Medientausch")
  • Click auf "Check-In"-Button macht nur einen Toast anstatt die reguläre Checkin-Activity zu nutzen
  • Ticket dass Medientasuch benötigt wird mit Meldung "Achtung nötig" angezeigt anstatt dem Hinweis auf einen notwendigen Medientausch
  • PIN-Modus: Beschriftung für Info-Modus falsch: In Anlehnung an alle anderen Punkte "Info-Modus sperren"
  • Ticket beauskunften -> einchecken -> wieder beauskunften: Es fehlt in der Liste der Checkins
  • Uhrzeiten in Checkin-Historie sind nicht lokalisiert (falsche Zeitzone)
  • Checkin-Historie umgekehrt sortieren (neueste/most relevant nach oben)
  • Checkin-Historien-Box geht nicht bis zum unteren Bildschirmrand  (bisserl mehr ConstraintLayout?)

Gerade was die ganzen Wege angeht, wie man ein Ticket eingescannt bekommen kann (per Kamera, per USB-Barcodescanner im Keyboard-Modus, per NFC, per Broadcast-Intent eines Hardware-Barcodescanners) müsstest du das Rad nicht ein Mal neu erfinden - das haben wir ja alles schon Mal gebaut.

Ebenso die Darstellung der Checkin-Ablehngründe/Fehlermeldungen: Da solltest du die bestehenden Komponenten einfach weiterverwenden können ohne das Rad neu zu erfinden; eventuell müssen sie nur aus den bestehenden Activities gezogen und wiederverwertbar gemacht werden.


class CheckinHistoryAdapter : ListAdapter<TicketCheckinHistoryEntry, CheckinHistoryAdapter.ViewHolder>(DIFF) {

private val timeFormat = DateTimeFormatter.ofPattern("dd.MM. HH:mm")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Darf gerne auch noch Sekunden bekommen (um besser sehen zu können, die schnell hintereinander stattfanden)

Comment on lines +31 to +41
val context = binding.root.context
val isExit = entry.type == "exit"

binding.icon.setImageResource(
if (isExit) R.drawable.ic_exit_orange_24dp else R.drawable.ic_entry_gray_24dp
)
binding.typeLabel.text = context.getString(
if (isExit) R.string.info_mode_checkin_type_exit else R.string.info_mode_checkin_type_entry
)
binding.listName.text = entry.listName
binding.timestamp.text = entry.dateTime?.format(timeFormat).orEmpty()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ist für mich überhaupt garnicht sichbar - weder der Listname noch das Entry/Exit-Symbol

Comment on lines -154 to -156
/**
* implementation of an adapter for a listview to hold EventCards and EventItemCards
*/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Der Kommentar hätte auch ruhig stehen bleiben dürfen...

checkProvider.check(
config.eventSelectionToMap(),
secret,
"barcode",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bitte nicht barcode hardcoden sondern den tatsächlichen Weg des Scan-Inputs verwenden.

checkProvider.check(
config.eventSelectionToMap(),
secret,
"barcode",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bitte nicht barcode hardcoden sondern den tatsächlichen Weg des Scan-Inputs verwenden.

Move the CheckResult -> message/state/sound mapping out of
MainActivity.displayScanResult so other activities can reuse it.
No behaviour change.
The check-in button now hands the secret and its source type to
MainActivity instead of running its own check and showing a toast,
so questions, medium exchange and unpaid dialogs work as usual.
Adds a toolbar search that reuses SearchListAdapter and respects
the search permission. The layout moves to ConstraintLayout so the
check-in history reaches the bottom of the screen.
Timestamps are converted to the device timezone and show seconds,
entries are sorted newest first.
@MartinsMikroKosmos

Copy link
Copy Markdown
Contributor Author

Hab versucht alles von den Review punkten zu erledigen nur der bug das ich wenn ich zweimal hintereinander das gleiche scann konnte ich nicht beheben.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants