#15: issue experts workflow now very slick
This commit is contained in:
parent
2d4f7a897d
commit
adcdacc6c1
10 changed files with 172 additions and 59 deletions
|
|
@ -53,6 +53,7 @@ FROM followuprequests as request,
|
|||
where not exists (select * from followupactions as action
|
||||
where action.request_id = request.id
|
||||
and action.closed = true)
|
||||
and request.locked_by is null
|
||||
and request.elector_id = electors.id
|
||||
and request.visit_id = visits.id
|
||||
and visits.address_id = addresses.id
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ SELECT electors.name ||', '|| addresses.address ||', '|| addresses.postcode ||',
|
|||
followupactions.request_id,
|
||||
canvassers.username ||', '|| canvassers.fullname ||', '|| addresses.address ||', '|| addresses.postcode ||', '|| canvassers.phone ||', '|| canvassers.email AS actor_expanded,
|
||||
followupactions.actor,
|
||||
canvassers.fullname AS actor_name,
|
||||
followupactions.date,
|
||||
followupactions.notes,
|
||||
followupactions.closed,
|
||||
|
|
@ -43,3 +44,10 @@ WHERE followupactions.request_id = followuprequests.id
|
|||
AND followupactions.actor = canvassers.id
|
||||
;
|
||||
GRANT SELECT ON lv_followupactions TO canvassers, issueexperts;
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- request locking
|
||||
------------------------------------------------------------------------
|
||||
ALTER TABLE followuprequests ADD COLUMN locked_by INTEGER REFERENCES canvassers(id) ON DELETE SET NULL;
|
||||
ALTER TABLE followuprequests ADD COLUMN locked TIMESTAMP;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block extra-head %}
|
||||
<meta http-equiv="refresh" content="60">
|
||||
{% endblock %}
|
||||
|
||||
{% block back-links %}
|
||||
<div>
|
||||
<div class='back-link-container'>
|
||||
|
|
@ -81,9 +85,13 @@ Method
|
|||
{{ record.raised }}
|
||||
</td>
|
||||
<td>
|
||||
<a href='{{servlet-context}}/form-issues-Issue?id={{ record.issue_id }}'>
|
||||
{{ record.issue_id_expanded }}
|
||||
</a>
|
||||
{% ifequal record.issue_id "Other" %}
|
||||
{{ record.issue_detail }}
|
||||
{% else %}
|
||||
<a href='{{servlet-context}}/form-issues-Issue?id={{ record.issue_id }}'>
|
||||
{{ record.issue_id }}
|
||||
</a>
|
||||
{% endifequal %}
|
||||
</td>
|
||||
<td>
|
||||
<a href='{{servlet-context}}/form-followupmethods-Followupmethod?id={{ record.method_id }}'>
|
||||
|
|
|
|||
|
|
@ -49,12 +49,12 @@
|
|||
Issue
|
||||
</label>
|
||||
{% ifmemberof issueexperts analysts issueeditors admin %}
|
||||
<span id='visit' name='visit' class='pseudo-widget disabled'>
|
||||
{{issue.id}}
|
||||
<span id='issue_id' name='issue_id' class='pseudo-widget disabled'>
|
||||
{{issue.id}} <em>{{record.issue_detail}}</em>
|
||||
</span>
|
||||
{% else %}
|
||||
<span id='visit_id' name='visit_id' class='pseudo-widget not-authorised'>
|
||||
You are not permitted to view visit of followuprequests
|
||||
<span id='issue_id' name='issue_id' class='pseudo-widget not-authorised'>
|
||||
You are not permitted to view issue of followuprequests
|
||||
</span>
|
||||
{% endifmemberof %}
|
||||
{% ifmemberof issueexperts admin %}
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
<tbody>
|
||||
{% for action in actions %}
|
||||
<tr>
|
||||
<td>{{action.actor}}</td>
|
||||
<td><a href="{{servlet-context}}/form-canvassers-Canvasser?id={{action.actor}}">{{action.actor_name}}</a></td>
|
||||
<td>{{action.date}}</td>
|
||||
<td>{{action.closed}}</td>
|
||||
</tr>
|
||||
|
|
@ -116,13 +116,13 @@
|
|||
</table>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if not closed %}
|
||||
<p class='widget'>
|
||||
<label for='notes'>
|
||||
Your notes
|
||||
</label>
|
||||
{% ifmemberof admin issueexperts %}
|
||||
<textarea rows='8' cols='60' id='notes' name='notes'>
|
||||
</textarea>
|
||||
<textarea rows='8' cols='60' id='notes' name='notes'></textarea>
|
||||
{% endifmemberof %}
|
||||
</p>
|
||||
<p class='widget'>
|
||||
|
|
@ -156,6 +156,7 @@
|
|||
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
|
||||
</p>
|
||||
{% endifmemberof %}
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue