urca non ci credo, potrebbe già funzionare
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -22,7 +22,7 @@ class SessionState extends Equatable {
|
||||
final User? user; // Utente di Supabase Auth
|
||||
final CompanyModel? company;
|
||||
final StoreModel? currentStore;
|
||||
final StaffMemberModel? currentStaff;
|
||||
final StaffMemberModel? currentStaffMember;
|
||||
final OnboardingStep onboardingStep;
|
||||
final bool isMobileDevice;
|
||||
|
||||
@@ -31,7 +31,7 @@ class SessionState extends Equatable {
|
||||
this.user,
|
||||
this.company,
|
||||
this.currentStore,
|
||||
this.currentStaff,
|
||||
this.currentStaffMember,
|
||||
this.onboardingStep = OnboardingStep.none,
|
||||
this.isMobileDevice = false,
|
||||
});
|
||||
@@ -51,7 +51,7 @@ class SessionState extends Equatable {
|
||||
user: user ?? this.user,
|
||||
company: company ?? this.company,
|
||||
currentStore: currentStore ?? this.currentStore,
|
||||
currentStaff: currentStaff ?? this.currentStaff,
|
||||
currentStaffMember: currentStaff ?? this.currentStaffMember,
|
||||
onboardingStep: onboardingStep ?? this.onboardingStep,
|
||||
isMobileDevice: isMobileDevice ?? this.isMobileDevice,
|
||||
);
|
||||
@@ -63,7 +63,7 @@ class SessionState extends Equatable {
|
||||
user,
|
||||
company,
|
||||
currentStore,
|
||||
currentStaff,
|
||||
currentStaffMember,
|
||||
onboardingStep,
|
||||
isMobileDevice,
|
||||
];
|
||||
|
||||
@@ -108,4 +108,12 @@ class CoreRepository {
|
||||
throw Exception('Creazione profilo staff fallita: $e');
|
||||
}
|
||||
}
|
||||
|
||||
// Assegna un membro a un negozio
|
||||
Future<void> assignStaffToStore(String staffId, String storeId) async {
|
||||
await _supabase.from('staff_in_stores').insert({
|
||||
'staff_member_id': staffId,
|
||||
'store_id': storeId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ class FluxTextField extends StatefulWidget {
|
||||
final List<TextInputFormatter>? inputFormatters;
|
||||
final TextCapitalization? textCapitalization;
|
||||
final bool? autocorrect;
|
||||
final bool? enabled;
|
||||
|
||||
const FluxTextField({
|
||||
super.key, // Usiamo super.key per Flutter moderno
|
||||
@@ -39,6 +40,7 @@ class FluxTextField extends StatefulWidget {
|
||||
this.inputFormatters,
|
||||
this.textCapitalization,
|
||||
this.autocorrect,
|
||||
this.enabled = true,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -115,6 +117,7 @@ class _FluxTextFieldState extends State<FluxTextField> {
|
||||
inputFormatters: widget.inputFormatters,
|
||||
|
||||
textCapitalization: widget.textCapitalization ?? TextCapitalization.none,
|
||||
enabled: widget.enabled,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user