瀏覽代碼

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 查看文件

@@ -2,12 +2,17 @@ Dear {{display_name}},

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}}/

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
Office hotline: 02 8103 5092

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

+ 2
- 0
js/bts_timesheet.js 查看文件

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

+ 11
- 6
ts.php 查看文件

@@ -389,9 +389,11 @@ class AcareOffice{
$message = str_ireplace("{{user_login}}", $staff->user_login, $message);
$message = str_ireplace("{{job_start}}", $start, $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){
@@ -675,15 +677,18 @@ class AcareOffice{
//ajax browse job with different filters
function list_job(){
check_ajax_referer('acaresydney');
$start = $_POST['start'];
$finish = $_POST['finish'];
$start = $_POST['start'] . " 00:00:00";
$finish = $_POST['finish']. " 23:59:59";
$response = array(
'status'=>'success',
'jobs' => [],
);
$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)){
$response['status'] = 'success';

Loading…
取消
儲存