feat: Enhance attire verification status system with more granular states and update related UI and data handling.

This commit is contained in:
Achintha Isuru
2026-02-25 19:05:03 -05:00
parent 6eafba311b
commit 4515d42cd3
9 changed files with 334 additions and 157 deletions

View File

@@ -1,11 +1,39 @@
/// Represents the verification status of an attire item photo.
enum AttireVerificationStatus {
/// The photo is waiting for review.
pending,
/// Job is created and waiting to be processed.
pending('PENDING'),
/// The photo was rejected.
failed,
/// Job is currently being processed by machine or human.
processing('PROCESSING'),
/// The photo was approved.
success,
/// 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 AttireVerificationStatus(this.value);
/// The string value expected by the Core API.
final String value;
/// Creates a [AttireVerificationStatus] from a string.
static AttireVerificationStatus fromString(String value) {
return AttireVerificationStatus.values.firstWhere(
(AttireVerificationStatus e) => e.value == value,
orElse: () => AttireVerificationStatus.error,
);
}
}