Skip to content

Ticket change over - #117

Merged
foucblg merged 18 commits into
devfrom
ticket-change-over
Jun 29, 2026
Merged

Ticket change over#117
foucblg merged 18 commits into
devfrom
ticket-change-over

Conversation

@foucblg

@foucblg foucblg commented Jun 9, 2026

Copy link
Copy Markdown

Description

Summary

...

Issues/PR dependencies

Issues to be resolved

Required PRs

Changes Made

  • ...
  • ...

Additional Notes

Classification

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 🔨 Refactor (non-breaking change that neither fixes a bug nor adds a feature)
  • 🔧 Infra CI/CD (changes to configs of workflows)
  • 💥 BREAKING CHANGE (fix or feature that require a new minimal version of the front-end)
  • 😶‍🌫️ No impact for the end-users

Impact & Scope

  • Core functionality changes
  • Single module changes
  • Multiple modules changes
  • Other: ...

Testing

  • 1. Tested this locally
  • 2. Added/modified tests that pass the CI (or tested in a downstream fork)
  • 3. Tested in a local client using a pre-prod backend
  • 0. Untestable (exceptionally), will be tested in prod directly

Documentation

  • Updated the docs accordingly :
  • // Comments
  • No documentation needed

foucblg added 7 commits June 14, 2026 15:54
# Conflicts:
#	lib/l10n/app_en.arb
#	lib/l10n/app_fr.arb
#	lib/l10n/app_localizations.dart
#	lib/l10n/app_localizations_en.dart
#	lib/l10n/app_localizations_fr.dart
@foucblg
foucblg force-pushed the ticket-change-over branch from fa032a1 to 1053640 Compare June 14, 2026 14:01
Comment thread lib/tickets/class/ticket_event.dart
Comment thread lib/tickets/providers/ticket_event_edit_provider.dart
Comment thread lib/tickets/ui/components/session_card.dart Outdated
// ── Edit Questions Section ──────────────────────────────────────────────────
void _updateTicketEventState(WidgetRef ref, TicketEvent updated) {
ref.read(ticketEventByIdProvider(updated.id).notifier).setEvent(updated);
ref.read(selectedTicketEventProvider.notifier).state = updated;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Weird, updating the state twice

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ticketEventByIdProvider(id) — cached event data for the edit screen
selectedTicketEventProvider — “which event did the user pick?”
After an edit (session/category/question change, etc.), onEventUpdated calls this helper to keep both copies aligned

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

OK, but why updating the state instead of having a dedicated function

final dateFormatter = DateFormat('dd/MM/yyyy HH:mm', locale.toString());
final editNotifier = ref.read(ticketEventEditProvider.notifier);

final titleController = TextEditingController(text: event.name);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Use useTextEditingController to auto dispose

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

No — not in that spot. useTextEditingController only works inside a HookWidget’s build method (or a custom hook called from there). Lines 388–389 sit in _showGeneralInfoEditDialog, a top-level async function, so hooks aren’t valid there.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why is this widget not a hookwidget then ?

),
);
}),
OutlinedButton.icon(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

  • 1

final editNotifier = ref.read(ticketEventEditProvider.notifier);

final textController = TextEditingController(text: question.question);
final priceController = TextEditingController(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

  • 1

Comment thread lib/tickets/ui/pages/manage_ticket_event_page.dart Outdated
Comment thread lib/tools/repository/repository.dart Outdated
body: body != null ? jsonEncode(body) : null,
);
if (response.statusCode == 204) {
if (response.statusCode == 204 || response.statusCode == 200) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hm, for which endpoint, should be a back change imo

Comment thread lib/tools/functions.dart Outdated
@foucblg
foucblg merged commit 9111e9d into dev Jun 29, 2026
2 checks passed
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