fix: improve rendering for batch row status
This commit is contained in:
parent
86ffb5d58f
commit
5cec585fdf
2 changed files with 17 additions and 1 deletions
|
@ -53,7 +53,7 @@ class BatchMasterView(MasterView):
|
|||
|
||||
labels = {
|
||||
'id': "Batch ID",
|
||||
'status_code': "Batch Status",
|
||||
'status_code': "Status",
|
||||
}
|
||||
|
||||
sort_defaults = ('id', 'desc')
|
||||
|
@ -62,6 +62,10 @@ class BatchMasterView(MasterView):
|
|||
rows_title = "Batch Rows"
|
||||
rows_sort_defaults = 'sequence'
|
||||
|
||||
row_labels = {
|
||||
'status_code': "Status",
|
||||
}
|
||||
|
||||
def __init__(self, request, context=None):
|
||||
super().__init__(request, context=context)
|
||||
self.batch_handler = self.get_batch_handler()
|
||||
|
@ -381,6 +385,12 @@ class BatchMasterView(MasterView):
|
|||
|
||||
g.set_label('sequence', "Seq.", column_only=True)
|
||||
|
||||
g.set_renderer('status_code', self.render_row_status)
|
||||
|
||||
def render_row_status(self, row, key, value):
|
||||
""" """
|
||||
return row.STATUS.get(value, value)
|
||||
|
||||
##############################
|
||||
# configuration
|
||||
##############################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue