fix: add ignore_for_file to data connect Repos and modify CI to avoid analyzing deleted files

This commit is contained in:
2026-02-20 19:51:44 +05:30
parent 24835f127e
commit 474be43448
259 changed files with 1810 additions and 1714 deletions

View File

@@ -2,18 +2,18 @@ import '../../entities/availability/availability_slot.dart';
/// Adapter for [AvailabilitySlot] domain entity.
class AvailabilityAdapter {
static const Map<String, Map<String, String>> _slotDefinitions = {
'MORNING': {
static const Map<String, Map<String, String>> _slotDefinitions = <String, Map<String, String>>{
'MORNING': <String, String>{
'id': 'morning',
'label': 'Morning',
'timeRange': '4:00 AM - 12:00 PM',
},
'AFTERNOON': {
'AFTERNOON': <String, String>{
'id': 'afternoon',
'label': 'Afternoon',
'timeRange': '12:00 PM - 6:00 PM',
},
'EVENING': {
'EVENING': <String, String>{
'id': 'evening',
'label': 'Evening',
'timeRange': '6:00 PM - 12:00 AM',
@@ -22,7 +22,7 @@ class AvailabilityAdapter {
/// Converts a backend slot name (e.g. 'MORNING') to a Domain [AvailabilitySlot].
static AvailabilitySlot fromPrimitive(String slotName, {bool isAvailable = false}) {
final def = _slotDefinitions[slotName.toUpperCase()] ?? _slotDefinitions['MORNING']!;
final Map<String, String> def = _slotDefinitions[slotName.toUpperCase()] ?? _slotDefinitions['MORNING']!;
return AvailabilitySlot(
id: def['id']!,
label: def['label']!,

View File

@@ -1,4 +1,3 @@
import '../../entities/shifts/shift.dart';
import '../../entities/clock_in/attendance_status.dart';
/// Adapter for Clock In related data.

View File

@@ -18,7 +18,7 @@ class TaxFormAdapter {
final TaxFormType formType = _stringToType(type);
final TaxFormStatus formStatus = _stringToStatus(status);
final Map<String, dynamic> formDetails =
formData is Map ? Map<String, dynamic>.from(formData as Map) : <String, dynamic>{};
formData is Map ? Map<String, dynamic>.from(formData) : <String, dynamic>{};
if (formType == TaxFormType.i9) {
return I9TaxForm(

View File

@@ -2,10 +2,6 @@ import 'package:equatable/equatable.dart';
/// Represents a specific time slot within a day (e.g., Morning, Afternoon, Evening).
class AvailabilitySlot extends Equatable {
final String id;
final String label;
final String timeRange;
final bool isAvailable;
const AvailabilitySlot({
required this.id,
@@ -13,6 +9,10 @@ class AvailabilitySlot extends Equatable {
required this.timeRange,
this.isAvailable = true,
});
final String id;
final String label;
final String timeRange;
final bool isAvailable;
AvailabilitySlot copyWith({
String? id,
@@ -29,5 +29,5 @@ class AvailabilitySlot extends Equatable {
}
@override
List<Object?> get props => [id, label, timeRange, isAvailable];
List<Object?> get props => <Object?>[id, label, timeRange, isAvailable];
}

View File

@@ -4,15 +4,15 @@ import 'availability_slot.dart';
/// Represents availability configuration for a specific date.
class DayAvailability extends Equatable {
final DateTime date;
final bool isAvailable;
final List<AvailabilitySlot> slots;
const DayAvailability({
required this.date,
this.isAvailable = false,
this.slots = const [],
this.slots = const <AvailabilitySlot>[],
});
final DateTime date;
final bool isAvailable;
final List<AvailabilitySlot> slots;
DayAvailability copyWith({
DateTime? date,
@@ -27,5 +27,5 @@ class DayAvailability extends Equatable {
}
@override
List<Object?> get props => [date, isAvailable, slots];
List<Object?> get props => <Object?>[date, isAvailable, slots];
}

View File

@@ -2,11 +2,6 @@ import 'package:equatable/equatable.dart';
/// Simple entity to hold attendance state
class AttendanceStatus extends Equatable {
final bool isCheckedIn;
final DateTime? checkInTime;
final DateTime? checkOutTime;
final String? activeShiftId;
final String? activeApplicationId;
const AttendanceStatus({
this.isCheckedIn = false,
@@ -15,9 +10,14 @@ class AttendanceStatus extends Equatable {
this.activeShiftId,
this.activeApplicationId,
});
final bool isCheckedIn;
final DateTime? checkInTime;
final DateTime? checkOutTime;
final String? activeShiftId;
final String? activeApplicationId;
@override
List<Object?> get props => [
List<Object?> get props => <Object?>[
isCheckedIn,
checkInTime,
checkOutTime,

View File

@@ -2,10 +2,6 @@ import 'package:equatable/equatable.dart';
/// Summary of staff earnings.
class PaymentSummary extends Equatable {
final double weeklyEarnings;
final double monthlyEarnings;
final double pendingEarnings;
final double totalEarnings;
const PaymentSummary({
required this.weeklyEarnings,
@@ -13,9 +9,13 @@ class PaymentSummary extends Equatable {
required this.pendingEarnings,
required this.totalEarnings,
});
final double weeklyEarnings;
final double monthlyEarnings;
final double pendingEarnings;
final double totalEarnings;
@override
List<Object?> get props => [
List<Object?> get props => <Object?>[
weeklyEarnings,
monthlyEarnings,
pendingEarnings,

View File

@@ -23,6 +23,21 @@ enum TimeCardStatus {
/// Represents a time card for a staff member.
class TimeCard extends Equatable {
/// Creates a [TimeCard].
const TimeCard({
required this.id,
required this.shiftTitle,
required this.clientName,
required this.date,
required this.startTime,
required this.endTime,
required this.totalHours,
required this.hourlyRate,
required this.totalPay,
required this.status,
this.location,
});
/// Unique identifier of the time card (often matches Application ID).
final String id;
/// Title of the shift.
@@ -46,23 +61,8 @@ class TimeCard extends Equatable {
/// Location name.
final String? location;
/// Creates a [TimeCard].
const TimeCard({
required this.id,
required this.shiftTitle,
required this.clientName,
required this.date,
required this.startTime,
required this.endTime,
required this.totalHours,
required this.hourlyRate,
required this.totalPay,
required this.status,
this.location,
});
@override
List<Object?> get props => [
List<Object?> get props => <Object?>[
id,
shiftTitle,
clientName,

View File

@@ -26,7 +26,7 @@ class PermanentOrder extends Equatable {
final Map<String, double> roleRates;
@override
List<Object?> get props => [
List<Object?> get props => <Object?>[
startDate,
permanentDays,
positions,

View File

@@ -4,6 +4,15 @@ import 'package:equatable/equatable.dart';
///
/// Attire items are specific clothing or equipment required for jobs.
class AttireItem extends Equatable {
/// Creates an [AttireItem].
const AttireItem({
required this.id,
required this.label,
this.iconName,
this.imageUrl,
this.isMandatory = false,
});
/// Unique identifier of the attire item.
final String id;
@@ -19,15 +28,6 @@ class AttireItem extends Equatable {
/// Whether this item is mandatory for onboarding.
final bool isMandatory;
/// Creates an [AttireItem].
const AttireItem({
required this.id,
required this.label,
this.iconName,
this.imageUrl,
this.isMandatory = false,
});
@override
List<Object?> get props => <Object?>[id, label, iconName, imageUrl, isMandatory];
}

View File

@@ -22,7 +22,7 @@ enum ExperienceSkill {
static ExperienceSkill? fromString(String value) {
try {
return ExperienceSkill.values.firstWhere((e) => e.value == value);
return ExperienceSkill.values.firstWhere((ExperienceSkill e) => e.value == value);
} catch (_) {
return null;
}

View File

@@ -13,7 +13,7 @@ enum Industry {
static Industry? fromString(String value) {
try {
return Industry.values.firstWhere((e) => e.value == value);
return Industry.values.firstWhere((Industry e) => e.value == value);
} catch (_) {
return null;
}

View File

@@ -11,6 +11,17 @@ enum DocumentStatus {
/// Represents a staff compliance document.
class StaffDocument extends Equatable {
const StaffDocument({
required this.id,
required this.staffId,
required this.documentId,
required this.name,
this.description,
required this.status,
this.documentUrl,
this.expiryDate,
});
/// The unique identifier of the staff document record.
final String id;
@@ -35,19 +46,8 @@ class StaffDocument extends Equatable {
/// The expiry date of the document.
final DateTime? expiryDate;
const StaffDocument({
required this.id,
required this.staffId,
required this.documentId,
required this.name,
this.description,
required this.status,
this.documentUrl,
this.expiryDate,
});
@override
List<Object?> get props => [
List<Object?> get props => <Object?>[
id,
staffId,
documentId,

View File

@@ -5,6 +5,18 @@ enum TaxFormType { i9, w4 }
enum TaxFormStatus { notStarted, inProgress, submitted, approved, rejected }
abstract class TaxForm extends Equatable {
const TaxForm({
required this.id,
required this.title,
this.subtitle,
this.description,
this.status = TaxFormStatus.notStarted,
this.staffId,
this.formData = const <String, dynamic>{},
this.createdAt,
this.updatedAt,
});
final String id;
TaxFormType get type;
final String title;
@@ -16,20 +28,8 @@ abstract class TaxForm extends Equatable {
final DateTime? createdAt;
final DateTime? updatedAt;
const TaxForm({
required this.id,
required this.title,
this.subtitle,
this.description,
this.status = TaxFormStatus.notStarted,
this.staffId,
this.formData = const {},
this.createdAt,
this.updatedAt,
});
@override
List<Object?> get props => [
List<Object?> get props => <Object?>[
id,
type,
title,

View File

@@ -1,10 +1,7 @@
// ignore_for_file: always_specify_types, depend_on_referenced_packages, dead_code, dead_null_aware_expression, unused_local_variable, unused_import, sort_constructors_first, prefer_final_fields, prefer_const_constructors, deprecated_member_use, implicit_call_tearoffs
import 'package:equatable/equatable.dart';
class CoverageReport extends Equatable {
final double overallCoverage;
final int totalNeeded;
final int totalFilled;
final List<CoverageDay> dailyCoverage;
const CoverageReport({
required this.overallCoverage,
@@ -12,16 +9,16 @@ class CoverageReport extends Equatable {
required this.totalFilled,
required this.dailyCoverage,
});
final double overallCoverage;
final int totalNeeded;
final int totalFilled;
final List<CoverageDay> dailyCoverage;
@override
List<Object?> get props => [overallCoverage, totalNeeded, totalFilled, dailyCoverage];
List<Object?> get props => <Object?>[overallCoverage, totalNeeded, totalFilled, dailyCoverage];
}
class CoverageDay extends Equatable {
final DateTime date;
final int needed;
final int filled;
final double percentage;
const CoverageDay({
required this.date,
@@ -29,7 +26,12 @@ class CoverageDay extends Equatable {
required this.filled,
required this.percentage,
});
final DateTime date;
final int needed;
final int filled;
final double percentage;
@override
List<Object?> get props => [date, needed, filled, percentage];
List<Object?> get props => <Object?>[date, needed, filled, percentage];
}

View File

@@ -1,11 +1,7 @@
// ignore_for_file: always_specify_types, depend_on_referenced_packages, dead_code, dead_null_aware_expression, unused_local_variable, unused_import, sort_constructors_first, prefer_final_fields, prefer_const_constructors, deprecated_member_use, implicit_call_tearoffs
import 'package:equatable/equatable.dart';
class DailyOpsReport extends Equatable {
final int scheduledShifts;
final int workersConfirmed;
final int inProgressShifts;
final int completedShifts;
final List<DailyOpsShift> shifts;
const DailyOpsReport({
required this.scheduledShifts,
@@ -14,9 +10,14 @@ class DailyOpsReport extends Equatable {
required this.completedShifts,
required this.shifts,
});
final int scheduledShifts;
final int workersConfirmed;
final int inProgressShifts;
final int completedShifts;
final List<DailyOpsShift> shifts;
@override
List<Object?> get props => [
List<Object?> get props => <Object?>[
scheduledShifts,
workersConfirmed,
inProgressShifts,
@@ -26,15 +27,6 @@ class DailyOpsReport extends Equatable {
}
class DailyOpsShift extends Equatable {
final String id;
final String title;
final String location;
final DateTime startTime;
final DateTime endTime;
final int workersNeeded;
final int filled;
final String status;
final double? hourlyRate;
const DailyOpsShift({
required this.id,
@@ -47,9 +39,18 @@ class DailyOpsShift extends Equatable {
required this.status,
this.hourlyRate,
});
final String id;
final String title;
final String location;
final DateTime startTime;
final DateTime endTime;
final int workersNeeded;
final int filled;
final String status;
final double? hourlyRate;
@override
List<Object?> get props => [
List<Object?> get props => <Object?>[
id,
title,
location,
@@ -61,3 +62,4 @@ class DailyOpsShift extends Equatable {
hourlyRate,
];
}

View File

@@ -1,6 +1,18 @@
// ignore_for_file: always_specify_types, depend_on_referenced_packages, dead_code, dead_null_aware_expression, unused_local_variable, unused_import, sort_constructors_first, prefer_final_fields, prefer_const_constructors, deprecated_member_use, implicit_call_tearoffs
import 'package:equatable/equatable.dart';
class ForecastReport extends Equatable {
const ForecastReport({
required this.projectedSpend,
required this.projectedWorkers,
required this.averageLaborCost,
required this.chartData,
this.totalShifts = 0,
this.totalHours = 0.0,
this.avgWeeklySpend = 0.0,
this.weeklyBreakdown = const <ForecastWeek>[],
});
final double projectedSpend;
final int projectedWorkers;
final double averageLaborCost;
@@ -12,19 +24,8 @@ class ForecastReport extends Equatable {
final double avgWeeklySpend;
final List<ForecastWeek> weeklyBreakdown;
const ForecastReport({
required this.projectedSpend,
required this.projectedWorkers,
required this.averageLaborCost,
required this.chartData,
this.totalShifts = 0,
this.totalHours = 0.0,
this.avgWeeklySpend = 0.0,
this.weeklyBreakdown = const [],
});
@override
List<Object?> get props => [
List<Object?> get props => <Object?>[
projectedSpend,
projectedWorkers,
averageLaborCost,
@@ -37,26 +38,21 @@ class ForecastReport extends Equatable {
}
class ForecastPoint extends Equatable {
final DateTime date;
final double projectedCost;
final int workersNeeded;
const ForecastPoint({
required this.date,
required this.projectedCost,
required this.workersNeeded,
});
final DateTime date;
final double projectedCost;
final int workersNeeded;
@override
List<Object?> get props => [date, projectedCost, workersNeeded];
List<Object?> get props => <Object?>[date, projectedCost, workersNeeded];
}
class ForecastWeek extends Equatable {
final int weekNumber;
final double totalCost;
final int shiftsCount;
final double hoursCount;
final double avgCostPerShift;
const ForecastWeek({
required this.weekNumber,
@@ -65,9 +61,14 @@ class ForecastWeek extends Equatable {
required this.hoursCount,
required this.avgCostPerShift,
});
final int weekNumber;
final double totalCost;
final int shiftsCount;
final double hoursCount;
final double avgCostPerShift;
@override
List<Object?> get props => [
List<Object?> get props => <Object?>[
weekNumber,
totalCost,
shiftsCount,
@@ -75,3 +76,4 @@ class ForecastWeek extends Equatable {
avgCostPerShift,
];
}

View File

@@ -1,25 +1,22 @@
// ignore_for_file: always_specify_types, depend_on_referenced_packages, dead_code, dead_null_aware_expression, unused_local_variable, unused_import, sort_constructors_first, prefer_final_fields, prefer_const_constructors, deprecated_member_use, implicit_call_tearoffs
import 'package:equatable/equatable.dart';
class NoShowReport extends Equatable {
final int totalNoShows;
final double noShowRate;
final List<NoShowWorker> flaggedWorkers;
const NoShowReport({
required this.totalNoShows,
required this.noShowRate,
required this.flaggedWorkers,
});
final int totalNoShows;
final double noShowRate;
final List<NoShowWorker> flaggedWorkers;
@override
List<Object?> get props => [totalNoShows, noShowRate, flaggedWorkers];
List<Object?> get props => <Object?>[totalNoShows, noShowRate, flaggedWorkers];
}
class NoShowWorker extends Equatable {
final String id;
final String fullName;
final int noShowCount;
final double reliabilityScore;
const NoShowWorker({
required this.id,
@@ -27,7 +24,12 @@ class NoShowWorker extends Equatable {
required this.noShowCount,
required this.reliabilityScore,
});
final String id;
final String fullName;
final int noShowCount;
final double reliabilityScore;
@override
List<Object?> get props => [id, fullName, noShowCount, reliabilityScore];
List<Object?> get props => <Object?>[id, fullName, noShowCount, reliabilityScore];
}

View File

@@ -1,11 +1,7 @@
// ignore_for_file: always_specify_types, depend_on_referenced_packages, dead_code, dead_null_aware_expression, unused_local_variable, unused_import, sort_constructors_first, prefer_final_fields, prefer_const_constructors, deprecated_member_use, implicit_call_tearoffs
import 'package:equatable/equatable.dart';
class PerformanceReport extends Equatable {
final double fillRate;
final double completionRate;
final double onTimeRate;
final double avgFillTimeHours; // in hours
final List<PerformanceMetric> keyPerformanceIndicators;
const PerformanceReport({
required this.fillRate,
@@ -14,22 +10,28 @@ class PerformanceReport extends Equatable {
required this.avgFillTimeHours,
required this.keyPerformanceIndicators,
});
final double fillRate;
final double completionRate;
final double onTimeRate;
final double avgFillTimeHours; // in hours
final List<PerformanceMetric> keyPerformanceIndicators;
@override
List<Object?> get props => [fillRate, completionRate, onTimeRate, avgFillTimeHours, keyPerformanceIndicators];
List<Object?> get props => <Object?>[fillRate, completionRate, onTimeRate, avgFillTimeHours, keyPerformanceIndicators];
}
class PerformanceMetric extends Equatable {
final String label;
final String value;
final double trend; // e.g. 0.05 for +5%
class PerformanceMetric extends Equatable { // e.g. 0.05 for +5%
const PerformanceMetric({
required this.label,
required this.value,
required this.trend,
});
final String label;
final String value;
final double trend;
@override
List<Object?> get props => [label, value, trend];
List<Object?> get props => <Object?>[label, value, trend];
}

View File

@@ -1,12 +1,7 @@
// ignore_for_file: always_specify_types, depend_on_referenced_packages, dead_code, dead_null_aware_expression, unused_local_variable, unused_import, sort_constructors_first, prefer_final_fields, prefer_const_constructors, deprecated_member_use, implicit_call_tearoffs
import 'package:equatable/equatable.dart';
class ReportsSummary extends Equatable {
final double totalHours;
final double otHours;
final double totalSpend;
final double fillRate;
final double avgFillTimeHours;
final double noShowRate;
const ReportsSummary({
required this.totalHours,
@@ -16,9 +11,15 @@ class ReportsSummary extends Equatable {
required this.avgFillTimeHours,
required this.noShowRate,
});
final double totalHours;
final double otHours;
final double totalSpend;
final double fillRate;
final double avgFillTimeHours;
final double noShowRate;
@override
List<Object?> get props => [
List<Object?> get props => <Object?>[
totalHours,
otHours,
totalSpend,
@@ -27,3 +28,4 @@ class ReportsSummary extends Equatable {
noShowRate,
];
}

View File

@@ -1,14 +1,7 @@
// ignore_for_file: always_specify_types, depend_on_referenced_packages, dead_code, dead_null_aware_expression, unused_local_variable, unused_import, sort_constructors_first, prefer_final_fields, prefer_const_constructors, deprecated_member_use, implicit_call_tearoffs
import 'package:equatable/equatable.dart';
class SpendReport extends Equatable {
final double totalSpend;
final double averageCost;
final int paidInvoices;
final int pendingInvoices;
final int overdueInvoices;
final List<SpendInvoice> invoices;
final List<SpendChartPoint> chartData;
final List<SpendIndustryCategory> industryBreakdown;
const SpendReport({
required this.totalSpend,
@@ -20,9 +13,17 @@ class SpendReport extends Equatable {
required this.chartData,
required this.industryBreakdown,
});
final double totalSpend;
final double averageCost;
final int paidInvoices;
final int pendingInvoices;
final int overdueInvoices;
final List<SpendInvoice> invoices;
final List<SpendChartPoint> chartData;
final List<SpendIndustryCategory> industryBreakdown;
@override
List<Object?> get props => [
List<Object?> get props => <Object?>[
totalSpend,
averageCost,
paidInvoices,
@@ -35,28 +36,21 @@ class SpendReport extends Equatable {
}
class SpendIndustryCategory extends Equatable {
final String name;
final double amount;
final double percentage;
const SpendIndustryCategory({
required this.name,
required this.amount,
required this.percentage,
});
final String name;
final double amount;
final double percentage;
@override
List<Object?> get props => [name, amount, percentage];
List<Object?> get props => <Object?>[name, amount, percentage];
}
class SpendInvoice extends Equatable {
final String id;
final String invoiceNumber;
final DateTime issueDate;
final double amount;
final String status;
final String vendorName;
final String? industry;
const SpendInvoice({
required this.id,
@@ -67,17 +61,25 @@ class SpendInvoice extends Equatable {
required this.vendorName,
this.industry,
});
final String id;
final String invoiceNumber;
final DateTime issueDate;
final double amount;
final String status;
final String vendorName;
final String? industry;
@override
List<Object?> get props => [id, invoiceNumber, issueDate, amount, status, vendorName, industry];
List<Object?> get props => <Object?>[id, invoiceNumber, issueDate, amount, status, vendorName, industry];
}
class SpendChartPoint extends Equatable {
const SpendChartPoint({required this.date, required this.amount});
final DateTime date;
final double amount;
const SpendChartPoint({required this.date, required this.amount});
@override
List<Object?> get props => [date, amount];
List<Object?> get props => <Object?>[date, amount];
}

View File

@@ -2,35 +2,6 @@ import 'package:equatable/equatable.dart';
import 'package:krow_domain/src/entities/shifts/break/break.dart';
class Shift extends Equatable {
final String id;
final String title;
final String clientName;
final String? logoUrl;
final double hourlyRate;
final String location;
final String locationAddress;
final String date;
final String startTime;
final String endTime;
final String createdDate;
final bool? tipsAvailable;
final bool? travelTime;
final bool? mealProvided;
final bool? parkingAvailable;
final bool? gasCompensation;
final String? description;
final String? instructions;
final List<ShiftManager>? managers;
final double? latitude;
final double? longitude;
final String? status;
final int? durationDays; // For multi-day shifts
final int? requiredSlots;
final int? filledSlots;
final String? roleId;
final bool? hasApplied;
final double? totalValue;
final Break? breakInfo;
const Shift({
required this.id,
@@ -63,6 +34,35 @@ class Shift extends Equatable {
this.totalValue,
this.breakInfo,
});
final String id;
final String title;
final String clientName;
final String? logoUrl;
final double hourlyRate;
final String location;
final String locationAddress;
final String date;
final String startTime;
final String endTime;
final String createdDate;
final bool? tipsAvailable;
final bool? travelTime;
final bool? mealProvided;
final bool? parkingAvailable;
final bool? gasCompensation;
final String? description;
final String? instructions;
final List<ShiftManager>? managers;
final double? latitude;
final double? longitude;
final String? status;
final int? durationDays; // For multi-day shifts
final int? requiredSlots;
final int? filledSlots;
final String? roleId;
final bool? hasApplied;
final double? totalValue;
final Break? breakInfo;
@override
List<Object?> get props => <Object?>[

View File

@@ -32,8 +32,8 @@ sealed class AuthException extends AppException {
/// Thrown when email/password combination is incorrect.
class InvalidCredentialsException extends AuthException {
const InvalidCredentialsException({String? technicalMessage})
: super(code: 'AUTH_001', technicalMessage: technicalMessage);
const InvalidCredentialsException({super.technicalMessage})
: super(code: 'AUTH_001');
@override
String get messageKey => 'errors.auth.invalid_credentials';
@@ -41,8 +41,8 @@ class InvalidCredentialsException extends AuthException {
/// Thrown when attempting to register with an email that already exists.
class AccountExistsException extends AuthException {
const AccountExistsException({String? technicalMessage})
: super(code: 'AUTH_002', technicalMessage: technicalMessage);
const AccountExistsException({super.technicalMessage})
: super(code: 'AUTH_002');
@override
String get messageKey => 'errors.auth.account_exists';
@@ -50,8 +50,8 @@ class AccountExistsException extends AuthException {
/// Thrown when the user session has expired.
class SessionExpiredException extends AuthException {
const SessionExpiredException({String? technicalMessage})
: super(code: 'AUTH_003', technicalMessage: technicalMessage);
const SessionExpiredException({super.technicalMessage})
: super(code: 'AUTH_003');
@override
String get messageKey => 'errors.auth.session_expired';
@@ -59,8 +59,8 @@ class SessionExpiredException extends AuthException {
/// Thrown when user profile is not found in database after Firebase auth.
class UserNotFoundException extends AuthException {
const UserNotFoundException({String? technicalMessage})
: super(code: 'AUTH_004', technicalMessage: technicalMessage);
const UserNotFoundException({super.technicalMessage})
: super(code: 'AUTH_004');
@override
String get messageKey => 'errors.auth.user_not_found';
@@ -68,8 +68,8 @@ class UserNotFoundException extends AuthException {
/// Thrown when user is not authorized for the current app (wrong role).
class UnauthorizedAppException extends AuthException {
const UnauthorizedAppException({String? technicalMessage})
: super(code: 'AUTH_005', technicalMessage: technicalMessage);
const UnauthorizedAppException({super.technicalMessage})
: super(code: 'AUTH_005');
@override
String get messageKey => 'errors.auth.unauthorized_app';
@@ -77,8 +77,8 @@ class UnauthorizedAppException extends AuthException {
/// Thrown when password doesn't meet security requirements.
class WeakPasswordException extends AuthException {
const WeakPasswordException({String? technicalMessage})
: super(code: 'AUTH_006', technicalMessage: technicalMessage);
const WeakPasswordException({super.technicalMessage})
: super(code: 'AUTH_006');
@override
String get messageKey => 'errors.auth.weak_password';
@@ -86,8 +86,8 @@ class WeakPasswordException extends AuthException {
/// Thrown when sign-up process fails.
class SignUpFailedException extends AuthException {
const SignUpFailedException({String? technicalMessage})
: super(code: 'AUTH_007', technicalMessage: technicalMessage);
const SignUpFailedException({super.technicalMessage})
: super(code: 'AUTH_007');
@override
String get messageKey => 'errors.auth.sign_up_failed';
@@ -95,8 +95,8 @@ class SignUpFailedException extends AuthException {
/// Thrown when sign-in process fails.
class SignInFailedException extends AuthException {
const SignInFailedException({String? technicalMessage})
: super(code: 'AUTH_008', technicalMessage: technicalMessage);
const SignInFailedException({super.technicalMessage})
: super(code: 'AUTH_008');
@override
String get messageKey => 'errors.auth.sign_in_failed';
@@ -104,8 +104,8 @@ class SignInFailedException extends AuthException {
/// Thrown when email exists but password doesn't match.
class PasswordMismatchException extends AuthException {
const PasswordMismatchException({String? technicalMessage})
: super(code: 'AUTH_009', technicalMessage: technicalMessage);
const PasswordMismatchException({super.technicalMessage})
: super(code: 'AUTH_009');
@override
String get messageKey => 'errors.auth.password_mismatch';
@@ -113,8 +113,8 @@ class PasswordMismatchException extends AuthException {
/// Thrown when account exists only with Google provider (no password).
class GoogleOnlyAccountException extends AuthException {
const GoogleOnlyAccountException({String? technicalMessage})
: super(code: 'AUTH_010', technicalMessage: technicalMessage);
const GoogleOnlyAccountException({super.technicalMessage})
: super(code: 'AUTH_010');
@override
String get messageKey => 'errors.auth.google_only_account';
@@ -131,8 +131,8 @@ sealed class HubException extends AppException {
/// Thrown when attempting to delete a hub that has active orders.
class HubHasOrdersException extends HubException {
const HubHasOrdersException({String? technicalMessage})
: super(code: 'HUB_001', technicalMessage: technicalMessage);
const HubHasOrdersException({super.technicalMessage})
: super(code: 'HUB_001');
@override
String get messageKey => 'errors.hub.has_orders';
@@ -140,8 +140,8 @@ class HubHasOrdersException extends HubException {
/// Thrown when hub is not found.
class HubNotFoundException extends HubException {
const HubNotFoundException({String? technicalMessage})
: super(code: 'HUB_002', technicalMessage: technicalMessage);
const HubNotFoundException({super.technicalMessage})
: super(code: 'HUB_002');
@override
String get messageKey => 'errors.hub.not_found';
@@ -149,8 +149,8 @@ class HubNotFoundException extends HubException {
/// Thrown when hub creation fails.
class HubCreationFailedException extends HubException {
const HubCreationFailedException({String? technicalMessage})
: super(code: 'HUB_003', technicalMessage: technicalMessage);
const HubCreationFailedException({super.technicalMessage})
: super(code: 'HUB_003');
@override
String get messageKey => 'errors.hub.creation_failed';
@@ -167,8 +167,8 @@ sealed class OrderException extends AppException {
/// Thrown when order creation is attempted without a hub.
class OrderMissingHubException extends OrderException {
const OrderMissingHubException({String? technicalMessage})
: super(code: 'ORDER_001', technicalMessage: technicalMessage);
const OrderMissingHubException({super.technicalMessage})
: super(code: 'ORDER_001');
@override
String get messageKey => 'errors.order.missing_hub';
@@ -176,8 +176,8 @@ class OrderMissingHubException extends OrderException {
/// Thrown when order creation is attempted without a vendor.
class OrderMissingVendorException extends OrderException {
const OrderMissingVendorException({String? technicalMessage})
: super(code: 'ORDER_002', technicalMessage: technicalMessage);
const OrderMissingVendorException({super.technicalMessage})
: super(code: 'ORDER_002');
@override
String get messageKey => 'errors.order.missing_vendor';
@@ -185,8 +185,8 @@ class OrderMissingVendorException extends OrderException {
/// Thrown when order creation fails.
class OrderCreationFailedException extends OrderException {
const OrderCreationFailedException({String? technicalMessage})
: super(code: 'ORDER_003', technicalMessage: technicalMessage);
const OrderCreationFailedException({super.technicalMessage})
: super(code: 'ORDER_003');
@override
String get messageKey => 'errors.order.creation_failed';
@@ -194,8 +194,8 @@ class OrderCreationFailedException extends OrderException {
/// Thrown when shift creation fails.
class ShiftCreationFailedException extends OrderException {
const ShiftCreationFailedException({String? technicalMessage})
: super(code: 'ORDER_004', technicalMessage: technicalMessage);
const ShiftCreationFailedException({super.technicalMessage})
: super(code: 'ORDER_004');
@override
String get messageKey => 'errors.order.shift_creation_failed';
@@ -203,8 +203,8 @@ class ShiftCreationFailedException extends OrderException {
/// Thrown when order is missing required business context.
class OrderMissingBusinessException extends OrderException {
const OrderMissingBusinessException({String? technicalMessage})
: super(code: 'ORDER_005', technicalMessage: technicalMessage);
const OrderMissingBusinessException({super.technicalMessage})
: super(code: 'ORDER_005');
@override
String get messageKey => 'errors.order.missing_business';
@@ -221,8 +221,8 @@ sealed class ProfileException extends AppException {
/// Thrown when staff profile is not found.
class StaffProfileNotFoundException extends ProfileException {
const StaffProfileNotFoundException({String? technicalMessage})
: super(code: 'PROFILE_001', technicalMessage: technicalMessage);
const StaffProfileNotFoundException({super.technicalMessage})
: super(code: 'PROFILE_001');
@override
String get messageKey => 'errors.profile.staff_not_found';
@@ -230,8 +230,8 @@ class StaffProfileNotFoundException extends ProfileException {
/// Thrown when business profile is not found.
class BusinessNotFoundException extends ProfileException {
const BusinessNotFoundException({String? technicalMessage})
: super(code: 'PROFILE_002', technicalMessage: technicalMessage);
const BusinessNotFoundException({super.technicalMessage})
: super(code: 'PROFILE_002');
@override
String get messageKey => 'errors.profile.business_not_found';
@@ -239,8 +239,8 @@ class BusinessNotFoundException extends ProfileException {
/// Thrown when profile update fails.
class ProfileUpdateFailedException extends ProfileException {
const ProfileUpdateFailedException({String? technicalMessage})
: super(code: 'PROFILE_003', technicalMessage: technicalMessage);
const ProfileUpdateFailedException({super.technicalMessage})
: super(code: 'PROFILE_003');
@override
String get messageKey => 'errors.profile.update_failed';
@@ -257,8 +257,8 @@ sealed class ShiftException extends AppException {
/// Thrown when no open roles are available for a shift.
class NoOpenRolesException extends ShiftException {
const NoOpenRolesException({String? technicalMessage})
: super(code: 'SHIFT_001', technicalMessage: technicalMessage);
const NoOpenRolesException({super.technicalMessage})
: super(code: 'SHIFT_001');
@override
String get messageKey => 'errors.shift.no_open_roles';
@@ -266,8 +266,8 @@ class NoOpenRolesException extends ShiftException {
/// Thrown when application for shift is not found.
class ApplicationNotFoundException extends ShiftException {
const ApplicationNotFoundException({String? technicalMessage})
: super(code: 'SHIFT_002', technicalMessage: technicalMessage);
const ApplicationNotFoundException({super.technicalMessage})
: super(code: 'SHIFT_002');
@override
String get messageKey => 'errors.shift.application_not_found';
@@ -275,8 +275,8 @@ class ApplicationNotFoundException extends ShiftException {
/// Thrown when no active shift is found for clock out.
class NoActiveShiftException extends ShiftException {
const NoActiveShiftException({String? technicalMessage})
: super(code: 'SHIFT_003', technicalMessage: technicalMessage);
const NoActiveShiftException({super.technicalMessage})
: super(code: 'SHIFT_003');
@override
String get messageKey => 'errors.shift.no_active_shift';
@@ -288,8 +288,8 @@ class NoActiveShiftException extends ShiftException {
/// Thrown when there is no network connection.
class NetworkException extends AppException {
const NetworkException({String? technicalMessage})
: super(code: 'NET_001', technicalMessage: technicalMessage);
const NetworkException({super.technicalMessage})
: super(code: 'NET_001');
@override
String get messageKey => 'errors.generic.no_connection';
@@ -297,8 +297,8 @@ class NetworkException extends AppException {
/// Thrown when an unexpected error occurs.
class UnknownException extends AppException {
const UnknownException({String? technicalMessage})
: super(code: 'UNKNOWN', technicalMessage: technicalMessage);
const UnknownException({super.technicalMessage})
: super(code: 'UNKNOWN');
@override
String get messageKey => 'errors.generic.unknown';
@@ -306,8 +306,8 @@ class UnknownException extends AppException {
/// Thrown when the server returns an error (500, etc.).
class ServerException extends AppException {
const ServerException({String? technicalMessage})
: super(code: 'SRV_001', technicalMessage: technicalMessage);
const ServerException({super.technicalMessage})
: super(code: 'SRV_001');
@override
String get messageKey => 'errors.generic.server_error';
@@ -315,8 +315,8 @@ class ServerException extends AppException {
/// Thrown when the service is unavailable (Data Connect down).
class ServiceUnavailableException extends AppException {
const ServiceUnavailableException({String? technicalMessage})
: super(code: 'SRV_002', technicalMessage: technicalMessage);
const ServiceUnavailableException({super.technicalMessage})
: super(code: 'SRV_002');
@override
String get messageKey => 'errors.generic.service_unavailable';
@@ -324,8 +324,8 @@ class ServiceUnavailableException extends AppException {
/// Thrown when user is not authenticated.
class NotAuthenticatedException extends AppException {
const NotAuthenticatedException({String? technicalMessage})
: super(code: 'AUTH_NOT_LOGGED', technicalMessage: technicalMessage);
const NotAuthenticatedException({super.technicalMessage})
: super(code: 'AUTH_NOT_LOGGED');
@override
String get messageKey => 'errors.auth.not_authenticated';