first commit
This commit is contained in:
24
client/helpers/document_status.py
Normal file
24
client/helpers/document_status.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from dataclasses import dataclass
|
||||
|
||||
@dataclass
|
||||
class DocumentsStatus:
|
||||
NEW = 'new'
|
||||
ANALISE = 'analise'
|
||||
IN_PROGRESS = 'in_progress'
|
||||
WAITING_FOR_PAYMENT = 'waiting_for_payment'
|
||||
COMPLETED = 'completed'
|
||||
CANCELED = 'canceld'
|
||||
|
||||
|
||||
@staticmethod
|
||||
def get_label(status):
|
||||
mapping = {
|
||||
DocumentsStatus.NEW: 'Nou',
|
||||
DocumentsStatus.ANALISE: 'Analiza',
|
||||
DocumentsStatus.IN_PROGRESS: 'In progres',
|
||||
DocumentsStatus.WAITING_FOR_PAYMENT: 'Asteptam plata',
|
||||
DocumentsStatus.COMPLETED: 'Complet',
|
||||
DocumentsStatus.CANCELED: 'Anulat'
|
||||
}
|
||||
return mapping.get(status, status)
|
||||
|
||||
Reference in New Issue
Block a user