X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=index.php;h=0c3ae09546181fcd434342216abe9719978dcd2f;hb=b2f3faa3e8e647967e17aac9e9be7ffbad8f9716;hp=46a27e3238c3ccde6e700bff1f12bc5a7f0631b2;hpb=a8968f20cd3b06b2cc19de6871019d4aaae6b79b;p=contractor-progress.git diff --git a/index.php b/index.php index 46a27e3..0c3ae09 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,20 @@ . + require_once('code/tasks.php'); function index_main() { @@ -29,7 +44,7 @@ function task_summary($tem_prefix, $where_clause/*, ... */) { tem_set('task_price', $price); tem_set('task_state', task_state_pretty($state)); if(logged_in_as_contractor()) { - tem_set('client', db_get_value('people', 'name', 'where id=%i', $client_id)); + tem_set('client', db_get_value('people', 'username', 'where id=%i', $client_id)); } tem_show($tem_prefix . '_row'); $total += $price; @@ -51,9 +66,10 @@ function _index_main() { } if(logged_in_as_contractor()) { + tem_show('su_link'); tem_show('needs_attention_header'); task_summary('needs_approval', 'where state=%i order by id desc', TASK_WORKING); - task_summary('needs_fixing', 'where state=%i || state=%i order by id desc', TASK_NEEDS_QUOTE, TASK_BUG); + task_summary('needs_fixing', 'where (state=%i || state=%i) || (client_id=1 && state<%i) order by id desc', TASK_NEEDS_QUOTE, TASK_BUG, TASK_QUEUED); task_summary('finished_unpaid', 'where state=%i && paid = 0 order by id desc', TASK_FINISHED); task_summary('finished_paid', 'where state=%i && paid = 1 order by id desc', TASK_FINISHED); task_summary('queue', 'where state=%i order by client_id, ord', TASK_QUEUED);