Skip to content

Commit

Permalink
Add a column on to the list display (#480)
Browse files Browse the repository at this point in the history
* Add a column on to the list display

* Make the request str description more useful
  • Loading branch information
paopow authored and Aditya Bharadwaj committed Jan 22, 2021
1 parent e0d2bce commit d4f01da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions orchestra/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ class StaffingRequestInquiryAdmin(RelatedFieldAdmin, AjaxSelectAdmin):
})
list_display = (
'id', 'communication_preference__worker', 'communication_method',
'request',
'created_at',
)
search_fields = (
Expand Down
7 changes: 5 additions & 2 deletions orchestra/models/communication/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ class StaffBotRequestMixin(object):
def get_request_cause_description(self):
return self.RequestCause(self.request_cause).description

def get_request_status_description(self):
return self.Status(self.status).description

def __str__(self):
return '{} - {} - {}'.format(
self.task.id,
self.task,
self.get_request_cause_description(),
self.required_role_counter
self.get_request_status_description()
)


Expand Down

0 comments on commit d4f01da

Please sign in to comment.