mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
My appointments: Only show for cases that are not this one, and also that aren't complete
Appointments: Allow phone numbers to be up to 30 chars long
This commit is contained in:
@@ -197,7 +197,7 @@ else if($respondent_id)
|
||||
?>
|
||||
<p><?php echo T_("Add new phone number (with area code, eg 0398761234):"); ?></p>
|
||||
<form id="addPhone" method="get" action="" class="form-inline form-group">
|
||||
<div class="pull-left"><input type="tel" maxlength="10" size="12" pattern="[0-9]{10}" class="form-control" name="phonenum"/></div>
|
||||
<div class="pull-left"><input type="tel" size="15" class="form-control" name="phonenum"/></div>
|
||||
 <input type="submit" class="btn btn-info" value="<?php echo T_("Add this phone number"); ?>"/>
|
||||
<input type="hidden" name="start" value="<?php print $_GET['start']; ?>"/>
|
||||
<input type="hidden" name="end" value="<?php print $_GET['end']; ?>"/>
|
||||
|
||||
@@ -84,20 +84,25 @@ if (isset($_GET['callnext']))
|
||||
|
||||
$rs = "";
|
||||
|
||||
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".DATE_TIME_FORMAT."') as start,DATE_FORMAT(CONVERT_TZ(c.end,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as end,
|
||||
$sql = "SELECT c.case_id,DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".DATE_TIME_FORMAT."') as start,DATE_FORMAT(CONVERT_TZ(c.end,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as end,
|
||||
DATE_FORMAT(CONVERT_TZ(c.start,'UTC',r.Time_zone_name),'".TIME_FORMAT."') as rstart,DATE_FORMAT(CONVERT_TZ(c.end,'UTC',r.Time_zone_name),'".TIME_FORMAT."') as rend, c.completed_call_id,
|
||||
CONCAT(r.firstName, ' ', r.lastName) as respname, IFNULL(ao.firstName,'" . TQ_("Any operator") . "') as witho,
|
||||
CASE WHEN op.next_case_id IS NULL THEN CONCAT('<a href=\"?callnext=',c.case_id,'\">".T_("Call next")."</a>') ELSE CONCAT('".T_("Calling case")." ', op.next_case_id, ' ".T_("next")."') END as callnext,
|
||||
q.description as qd
|
||||
q.description as qd,
|
||||
(SELECT note FROM case_note WHERE case_note.case_id = c.case_id ORDER BY case_note_id DESC LIMIT 1) as note
|
||||
FROM `appointment` as c
|
||||
JOIN operator as op on (op.operator_id = $operator_id)
|
||||
LEFT JOIN `case` as cu ON (cu.current_operator_id = $operator_id)
|
||||
JOIN `case` as cc ON (cc.case_id = c.case_id)
|
||||
JOIN `outcome` as o ON (o.outcome_id = cc.current_outcome_id)
|
||||
JOIN `questionnaire` as q ON (q.questionnaire_id = cc.questionnaire_id)
|
||||
JOIN respondent as r on (r.respondent_id = c.respondent_id)
|
||||
LEFT JOIN operator AS ao ON (ao.operator_id = c.require_operator_id)
|
||||
WHERE c.end >= CONVERT_TZ(NOW(),'System','UTC')
|
||||
AND o.outcome_type_id IN (1,5)
|
||||
AND c.completed_call_id IS NULL
|
||||
AND (c.require_operator_id = $operator_id)
|
||||
AND cu.case_id != c.case_id
|
||||
ORDER BY c.start DESC";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
@@ -110,7 +115,7 @@ if (empty($rs))
|
||||
else
|
||||
{
|
||||
translate_array($rs,array("des"));
|
||||
xhtml_table($rs,array("start","end","rstart","qd","respname","witho","callnext"),array(T_("Start"),T_("End"),T_("RTime Start"),T_("Questionnaire"),T_("Respondent"),T_("Operator"),T_("Call next")));
|
||||
xhtml_table($rs,array("case_id","start","qd","note","callnext"),array(T_("Case id"),T_("Start"),T_("Questionnaire"),T_("Last Note"),T_("Call next")));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user