Преглед изворни кода

bugfix sunday display 23:59:59

master
patrick пре 6 година
родитељ
комит
47a631bd47
3 измењених фајлова са 20 додато и 8 уклоњено
  1. +7
    -2
      html/email_job.html
  2. +2
    -0
      js/bts_timesheet.js
  3. +11
    -6
      ts.php

+ 7
- 2
html/email_job.html Прегледај датотеку



Below is your job arrangement for the current week, please click the link to view your jobs Below is your job arrangement for the current week, please click the link to view your jobs


Please confirm your jobs after you open the link.

https://acaresydney.com.au/task/{{user_login}}/start-{{job_start}}/finish-{{job_finish}}/ https://acaresydney.com.au/task/{{user_login}}/start-{{job_start}}/finish-{{job_finish}}/


If you have any questions, please call Helen directly or email
If you receive multiple emails (duplicates), please do not worry, the link in each email will always get you up to date job information. It's always wise to check the latest email.


If you have any questions, please call Helen directly or email
helen@acaresydney.com.au helen@acaresydney.com.au
Office hotline: 02 8103 5092


Kind Regards Kind Regards
Team of Team of
AcareSydney WebOffice
AcareSydney WebOffice
Hotline 02 8103 5092

+ 2
- 0
js/bts_timesheet.js Прегледај датотеку

} }
}).fail(function(){ }).fail(function(){
el.append('<span class="error">' + 'Network Error occured' + '</span>'); el.append('<span class="error">' + 'Network Error occured' + '</span>');
//clear staff pending list, stop further processing
s = [];
}).always(function(){//next staff }).always(function(){//next staff
if (staff.length >0){ if (staff.length >0){
s = staff.pop(); s = staff.pop();

+ 11
- 6
ts.php Прегледај датотеку

$message = str_ireplace("{{user_login}}", $staff->user_login, $message); $message = str_ireplace("{{user_login}}", $staff->user_login, $message);
$message = str_ireplace("{{job_start}}", $start, $message); $message = str_ireplace("{{job_start}}", $start, $message);
$message = str_ireplace("{{job_finish}}", $finish, $message); $message = str_ireplace("{{job_finish}}", $finish, $message);
$headers = ['Bcc: patrick@biukop.com.au'];
//wp_mail("sp@lawipac.com", "Your Job arrangement 22 July ~ 28 July", $message, $headers);
wp_mail($staff->user_email, "Your Job arrangement $start ~ $finish", $message, $headers);
$headers = ['Bcc: patrick@biukop.com.au, timesheet@acaresydney.com.au'];
$subject = $staff->display_name . " Job arrangement $start ~ $finish";
//wp_mail("sp@lawipac.com", $subject, $message, $headers);
//wp_mail("timesheet@acaresydney.com.au", $subject, $message, $headers);
wp_mail($staff->user_email, $subject, $message, $headers);
} }
public function bts_staff_item($attr){ public function bts_staff_item($attr){
//ajax browse job with different filters //ajax browse job with different filters
function list_job(){ function list_job(){
check_ajax_referer('acaresydney'); check_ajax_referer('acaresydney');
$start = $_POST['start'];
$finish = $_POST['finish'];
$start = $_POST['start'] . " 00:00:00";
$finish = $_POST['finish']. " 23:59:59";
$response = array( $response = array(
'status'=>'success', 'status'=>'success',
'jobs' => [], 'jobs' => [],
); );
$sql = "SELECT * FROM $this->table_name WHERE start>='%s' and start <='%s' order by start ASC ,staff ASC"; $sql = "SELECT * FROM $this->table_name WHERE start>='%s' and start <='%s' order by start ASC ,staff ASC";
$jobs = $this->db->get_results($this->db->prepare ($sql, array($start, $finish)));
$query = $this->db->prepare ($sql, array($start, $finish));
$response['sql'] = $query;
$jobs = $this->db->get_results($query);
if (! empty($jobs)){ if (! empty($jobs)){
$response['status'] = 'success'; $response['status'] = 'success';

Loading…
Откажи
Сачувај