feat: Refactor PhoneInput to use StatefulWidget and improve phone number handling
This commit is contained in:
@@ -44,7 +44,7 @@ class HomeRepositoryImpl implements HomeRepository {
|
||||
if (shiftDate == null) return false;
|
||||
|
||||
final isDateMatch = DateFormat('yyyy-MM-dd').format(shiftDate) == targetYmd;
|
||||
final isAssigned = app.status is Known && (app.status as Known).value == ApplicationStatus.ACCEPTED;
|
||||
final isAssigned = app.status is Known && ((app.status as Known).value == ApplicationStatus.ACCEPTED || (app.status as Known).value == ApplicationStatus.CONFIRMED);
|
||||
|
||||
return isDateMatch && isAssigned;
|
||||
})
|
||||
|
||||
@@ -13,7 +13,6 @@ import 'package:staff_home/src/presentation/widgets/home_page/quick_action_item.
|
||||
import 'package:staff_home/src/presentation/widgets/home_page/recommended_shift_card.dart';
|
||||
import 'package:staff_home/src/presentation/widgets/home_page/section_header.dart';
|
||||
import 'package:staff_home/src/presentation/widgets/shift_card.dart';
|
||||
import 'package:staff_home/src/presentation/widgets/worker/auto_match_toggle.dart';
|
||||
|
||||
/// The home page for the staff worker application.
|
||||
///
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:intl/intl.dart';
|
||||
|
||||
import 'package:design_system/design_system.dart';
|
||||
import 'package:krow_domain/krow_domain.dart';
|
||||
import '../navigation/home_navigator.dart';
|
||||
|
||||
class ShiftCard extends StatefulWidget {
|
||||
final Shift shift;
|
||||
@@ -73,10 +74,7 @@ class _ShiftCardState extends State<ShiftCard> {
|
||||
? null
|
||||
: () {
|
||||
setState(() => isExpanded = !isExpanded);
|
||||
Modular.to.pushNamed(
|
||||
'/shift-details/${widget.shift.id}',
|
||||
arguments: widget.shift,
|
||||
);
|
||||
Modular.to.pushShiftDetails(widget.shift);
|
||||
},
|
||||
child: Container(
|
||||
margin: const EdgeInsets.only(bottom: 12),
|
||||
|
||||
Reference in New Issue
Block a user