feat: Enhance attire verification status system with more granular states and update related UI and data handling.
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user