display reviewer name and basic review action
This commit is contained in:
parent
c158e9fc35
commit
570d3b69f3
@ -21,6 +21,10 @@ class RequestReview(Base):
|
|||||||
fname_ccpo = Column(String)
|
fname_ccpo = Column(String)
|
||||||
lname_ccpo = Column(String)
|
lname_ccpo = Column(String)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def full_name_reviewer(self):
|
||||||
|
return self.reviewer.full_name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def full_name_mao(self):
|
def full_name_mao(self):
|
||||||
return "{} {}".format(self.fname_mao, self.lname_mao)
|
return "{} {}".format(self.fname_mao, self.lname_mao)
|
||||||
|
@ -42,3 +42,12 @@ class RequestStatusEvent(Base):
|
|||||||
@property
|
@property
|
||||||
def displayname(self):
|
def displayname(self):
|
||||||
return self.new_status.value
|
return self.new_status.value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def log_name(self):
|
||||||
|
if self.new_status == RequestStatus.CHANGES_REQUESTED:
|
||||||
|
return "Denied"
|
||||||
|
elif self.new_status == RequestStatus.PENDING_FINANCIAL_VERIFICATION:
|
||||||
|
return "Accepted"
|
||||||
|
else:
|
||||||
|
return self.displayname
|
||||||
|
@ -35,7 +35,7 @@ def render_approval(request, form=None):
|
|||||||
return render_template(
|
return render_template(
|
||||||
"requests/approval.html",
|
"requests/approval.html",
|
||||||
data=data,
|
data=data,
|
||||||
statuses=request.status_events,
|
statuses=reversed(request.status_events),
|
||||||
request_id=request.id,
|
request_id=request.id,
|
||||||
status=request.status.value,
|
status=request.status.value,
|
||||||
pending_review=pending_review,
|
pending_review=pending_review,
|
||||||
|
@ -148,7 +148,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<article class='approval-log__log-item'>
|
<article class='approval-log__log-item'>
|
||||||
<div>
|
<div>
|
||||||
<h3 class='approval-log__log-item__header'>Denied by Darth Vader</h3>
|
<h3 class='approval-log__log-item__header'>{{ status.log_name }} by {{ status.review.full_name_reviewer }}</h3>
|
||||||
{% if status.review.comment %}
|
{% if status.review.comment %}
|
||||||
<p>{{ status.review.comment }}</p>
|
<p>{{ status.review.comment }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -171,13 +171,13 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<footer class='approval-log__log-item__timestamp'><time datetime='2018-07-02 04:23:02 EST'>{{ status.time_created.strftime("%Y-%m-%d %H:%M:%S %Z") }}</time></footer>
|
{% set timestamp=status.time_created.strftime("%Y-%m-%d %H:%M:%S %Z") %}
|
||||||
|
<footer class='approval-log__log-item__timestamp'><time datetime='{{ timestamp }}'>{{ timestamp }}</time></footer>
|
||||||
</article>
|
</article>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user