From: Jason Woofenden Date: Wed, 12 Nov 2008 23:37:28 +0000 (-0500) Subject: added TASK_BUG state, improved home page so initial states are displayd and lebeled... X-Git-Url: https://jasonwoof.com/gitweb/?p=contractor-progress.git;a=commitdiff_plain;h=db0666968543559bb521f3a7c15ff4c8ab2f7661 added TASK_BUG state, improved home page so initial states are displayd and lebeled well --- diff --git a/index.html b/index.html index c63f009..6b1ddf4 100644 --- a/index.html +++ b/index.html @@ -16,52 +16,46 @@

Commission a new feature/updateReport a problem

-
-

Tasks needing your attention:

+

Tasks needing your attention:

Task #~task_id~: ~task_title.html~ (~task_state~)
-

Prioritized queue

Use the arrows on the left to change the order.

-
Task #~task_id~: ~task_title.html~ (~task_price.money~)
+
Task #~task_id~: ~task_title.html~ (~task_price.money~)
-

Tasks waiting for Jason:

-
Task #~task_id~: ~task_title.html~ (~task_state~)
+
Task #~task_id~: ~task_title.html~ (~task_state~)
-

Jason is currently working on:

- + -

Finished tasks (unpaid)

- +
Total: ~task_total.money~
-

Finished and paid for

- +
...
diff --git a/index.php b/index.php index 7f2a922..121f099 100644 --- a/index.php +++ b/index.php @@ -39,7 +39,7 @@ function task_summary($tem_prefix, $where_clause) { function _index_main() { task_summary('needs_attention', 'where state=' . TASK_DRAFT . ' || state=' . TASK_NEEDS_CLARIFICATION . ' || state=' . TASK_NEEDS_GO_AHEAD . ' || state=' . TASK_NEEDS_TESTING . ' order by id'); - task_summary('queue', 'where state=' . TASK_QUEUED . ' || state='. TASK_BUG . ' order by ord'); + task_summary('queue', 'where state=' . TASK_QUEUED . ' order by ord'); task_summary('jason', 'where state=' . TASK_NEEDS_QUOTE . ' || state=' . TASK_WORKING . ' || state=' . TASK_BUG . ' order by id desc'); #task_summary('jason_pricing', 'where state=' . TASK_NEEDS_QUOTE . ' order by id desc'); #task_summary('jason_working', 'where state=' . TASK_WORKING . ' order by id desc'); diff --git a/tasks.html b/tasks.html index cce4e0c..829132c 100644 --- a/tasks.html +++ b/tasks.html @@ -10,7 +10,7 @@ -

Add a new entryEdit entry "~client_id.html~"

+

Add a new taskEdit task #~tasks_edit_id~ "~title.html~"

@@ -20,8 +20,13 @@ - - + + + + + + +
Url:
Description:
diff --git a/tasks.php b/tasks.php index 0443889..e923b21 100644 --- a/tasks.php +++ b/tasks.php @@ -46,6 +46,12 @@ function _tasks_main() { tem_show('editing'); } + if(isset($_REQUEST['tasks_new_bug'])) { + tem_show('bug_submit'); + } else { + tem_show('normal_submits'); + } + $delete_id = format_int($_REQUEST['tasks_delete_id']); unset($_REQUEST['tasks_delete_id']); if($delete_id) { @@ -62,22 +68,25 @@ function _tasks_main() { if(isset($_REQUEST['title'])) { list($title, $url, $description) = tasks_get_fields(); + # FIXME + if(isset($_REQUEST['save_draft'])) { + $state = TASK_DRAFT; + } elseif(isset($_REQUEST['save_bug'])) { + $state = TASK_BUG; + } else { + $state = TASK_NEEDS_QUOTE; + } + if("you're happy with the POSTed values") { if($edit_id) { - db_update('tasks', 'title,url,description,state', $title, $url, $description, $state, $paid = 0, 'where id=%i', $edit_id); + db_update('tasks', 'title,url,description,state', $title, $url, $description, $state, 'where id=%i', $edit_id); message('Task updated.'); } else { # new task $paid = 0; - if(isset($_REQUEST['save_draft'])) { - $state = TASK_DRAFT; - } else { - $state = TASK_NEEDS_QUOTE; - } $client_id = 4; # FIXME db_insert('tasks', 'client_id,title,url,description,state,paid', $client_id, $title, $url, $description, $state, $paid); message('Task saved.'); - return './'; } if($GLOBALS['tasks_form_recipient'] != "fixme@example.com") { $to = $GLOBALS['tasks_form_recipient']; @@ -99,8 +108,7 @@ function _tasks_main() { } } if($error !== true) { - tem_show('thankyou'); - return; + return './'; } } # otherwise, we display the form again. tasks_get_fields() has