feat: Implement comprehensive staff document management with verification status tracking and complete document listing.
This commit is contained in:
@@ -77,6 +77,7 @@ export 'src/adapters/financial/bank_account/bank_account_adapter.dart';
|
||||
|
||||
// Profile
|
||||
export 'src/entities/profile/staff_document.dart';
|
||||
export 'src/entities/profile/document_verification_status.dart';
|
||||
export 'src/entities/profile/attire_item.dart';
|
||||
export 'src/entities/profile/attire_verification_status.dart';
|
||||
export 'src/entities/profile/relationship_type.dart';
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/// Represents the verification status of a compliance document.
|
||||
enum DocumentVerificationStatus {
|
||||
/// Job is created and waiting to be processed.
|
||||
pending('PENDING'),
|
||||
|
||||
/// Job is currently being processed by machine or human.
|
||||
processing('PROCESSING'),
|
||||
|
||||
/// Machine verification passed automatically.
|
||||
autoPass('AUTO_PASS'),
|
||||
|
||||
/// Machine verification failed automatically.
|
||||
autoFail('AUTO_FAIL'),
|
||||
|
||||
/// Machine results are inconclusive and require human review.
|
||||
needsReview('NEEDS_REVIEW'),
|
||||
|
||||
/// Human reviewer approved the verification.
|
||||
approved('APPROVED'),
|
||||
|
||||
/// Human reviewer rejected the verification.
|
||||
rejected('REJECTED'),
|
||||
|
||||
/// An error occurred during processing.
|
||||
error('ERROR');
|
||||
|
||||
const DocumentVerificationStatus(this.value);
|
||||
|
||||
/// The string value expected by the Core API.
|
||||
final String value;
|
||||
|
||||
/// Creates a [DocumentVerificationStatus] from a string.
|
||||
static DocumentVerificationStatus fromString(String value) {
|
||||
return DocumentVerificationStatus.values.firstWhere(
|
||||
(DocumentVerificationStatus e) => e.value == value,
|
||||
orElse: () => DocumentVerificationStatus.error,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,12 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
import 'document_verification_status.dart';
|
||||
|
||||
/// Status of a compliance document.
|
||||
enum DocumentStatus {
|
||||
verified,
|
||||
pending,
|
||||
missing,
|
||||
rejected,
|
||||
expired
|
||||
}
|
||||
enum DocumentStatus { verified, pending, missing, rejected, expired }
|
||||
|
||||
/// Represents a staff compliance document.
|
||||
class StaffDocument extends Equatable {
|
||||
|
||||
const StaffDocument({
|
||||
required this.id,
|
||||
required this.staffId,
|
||||
@@ -21,7 +16,10 @@ class StaffDocument extends Equatable {
|
||||
required this.status,
|
||||
this.documentUrl,
|
||||
this.expiryDate,
|
||||
this.verificationId,
|
||||
this.verificationStatus,
|
||||
});
|
||||
|
||||
/// The unique identifier of the staff document record.
|
||||
final String id;
|
||||
|
||||
@@ -46,15 +44,23 @@ class StaffDocument extends Equatable {
|
||||
/// The expiry date of the document.
|
||||
final DateTime? expiryDate;
|
||||
|
||||
/// The ID of the verification record.
|
||||
final String? verificationId;
|
||||
|
||||
/// The detailed verification status.
|
||||
final DocumentVerificationStatus? verificationStatus;
|
||||
|
||||
@override
|
||||
List<Object?> get props => <Object?>[
|
||||
id,
|
||||
staffId,
|
||||
documentId,
|
||||
name,
|
||||
description,
|
||||
status,
|
||||
documentUrl,
|
||||
expiryDate,
|
||||
];
|
||||
id,
|
||||
staffId,
|
||||
documentId,
|
||||
name,
|
||||
description,
|
||||
status,
|
||||
documentUrl,
|
||||
expiryDate,
|
||||
verificationId,
|
||||
verificationStatus,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user