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:
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user