feat: implement I-9 and W-4 tax form handling with dedicated use cases and mappers
This commit is contained in:
@@ -4,27 +4,26 @@ enum TaxFormType { i9, w4 }
|
||||
|
||||
enum TaxFormStatus { notStarted, inProgress, submitted, approved, rejected }
|
||||
|
||||
class TaxForm extends Equatable {
|
||||
abstract class TaxForm extends Equatable {
|
||||
final String id;
|
||||
final TaxFormType type;
|
||||
TaxFormType get type;
|
||||
final String title;
|
||||
final String? subtitle;
|
||||
final String? description;
|
||||
final TaxFormStatus status;
|
||||
final String? staffId;
|
||||
final Map<String, dynamic>? formData;
|
||||
final Map<String, dynamic> formData;
|
||||
final DateTime? createdAt;
|
||||
final DateTime? updatedAt;
|
||||
|
||||
const TaxForm({
|
||||
required this.id,
|
||||
required this.type,
|
||||
required this.title,
|
||||
this.subtitle,
|
||||
this.description,
|
||||
this.status = TaxFormStatus.notStarted,
|
||||
this.staffId,
|
||||
this.formData,
|
||||
this.formData = const {},
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
});
|
||||
@@ -43,3 +42,37 @@ class TaxForm extends Equatable {
|
||||
updatedAt,
|
||||
];
|
||||
}
|
||||
|
||||
class I9TaxForm extends TaxForm {
|
||||
const I9TaxForm({
|
||||
required super.id,
|
||||
required super.title,
|
||||
super.subtitle,
|
||||
super.description,
|
||||
super.status,
|
||||
super.staffId,
|
||||
super.formData,
|
||||
super.createdAt,
|
||||
super.updatedAt,
|
||||
});
|
||||
|
||||
@override
|
||||
TaxFormType get type => TaxFormType.i9;
|
||||
}
|
||||
|
||||
class W4TaxForm extends TaxForm {
|
||||
const W4TaxForm({
|
||||
required super.id,
|
||||
required super.title,
|
||||
super.subtitle,
|
||||
super.description,
|
||||
super.status,
|
||||
super.staffId,
|
||||
super.formData,
|
||||
super.createdAt,
|
||||
super.updatedAt,
|
||||
});
|
||||
|
||||
@override
|
||||
TaxFormType get type => TaxFormType.w4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user