added password reset - resend invite link (#10)

Co-authored-by: Copilot <copilot@github.com>
Reviewed-on: #10
Co-authored-by: Mark M2 Macbook <marco@catelli.it>
Co-committed-by: Mark M2 Macbook <marco@catelli.it>
This commit is contained in:
2026-04-29 09:20:17 +02:00
committed by brontomark
parent fe5d1bd9e4
commit 1dff8ab90d
4 changed files with 87 additions and 2 deletions

View File

@@ -102,6 +102,15 @@ class StaffCubit extends Cubit<StaffState> {
}
}
Future<void> resetPasswordOrResendInviteLink(String email) async {
try {
await _repository.resetPasswordOrResendInviteLink(email);
emit(state.copyWith(status: StaffStatus.emailSent, error: null));
} catch (e) {
emit(state.copyWith(status: StaffStatus.error, error: e.toString()));
}
}
// Associa un dipendente a un negozio
Future<void> assignMemberToStore(String staffId, String storeId) async {
try {

View File

@@ -1,6 +1,6 @@
part of 'staff_cubit.dart';
enum StaffStatus { initial, loading, success, error }
enum StaffStatus { initial, loading, success, emailSent, error }
class StaffState extends Equatable {
final StaffStatus status;