feat: add staff documents feature with document card and progress card

- Implemented DocumentCard widget to display individual staff documents with status and actions.
- Created DocumentsProgressCard widget to show overall verification progress of documents.
- Established StaffDocumentsModule for dependency injection and routing to documents page.
- Updated pubspec.yaml and pubspec.lock for new dependencies and configurations.
This commit is contained in:
Achintha Isuru
2026-01-25 02:19:30 -05:00
parent dad706654b
commit 753a93c24a
17 changed files with 1502 additions and 0 deletions

View File

@@ -47,6 +47,9 @@ export 'src/entities/financial/invoice_item.dart';
export 'src/entities/financial/invoice_decline.dart';
export 'src/entities/financial/staff_payment.dart';
// Profile
export 'src/entities/profile/staff_document.dart';
// Ratings & Penalties
export 'src/entities/ratings/staff_rating.dart';
export 'src/entities/ratings/penalty_log.dart';

View File

@@ -0,0 +1,60 @@
import 'package:equatable/equatable.dart';
/// Status of a compliance document.
enum DocumentStatus {
verified,
pending,
missing,
rejected,
expired
}
/// Represents a staff compliance document.
class StaffDocument extends Equatable {
/// The unique identifier of the staff document record.
final String id;
/// The ID of the staff member.
final String staffId;
/// The ID of the document definition.
final String documentId;
/// The name of the document.
final String name;
/// A description of the document.
final String? description;
/// The status of the document.
final DocumentStatus status;
/// The URL of the uploaded document image/file.
final String? documentUrl;
/// 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 => [
id,
staffId,
documentId,
name,
description,
status,
documentUrl,
expiryDate,
];
}