This topic is locked
[SOLVED]

Show more than just Subject on calendar item (List Page)

10/13/2022 4:35:52 PM
PHPRunner General questions
1NET author

Wondering how to add more than just the subject field to the individual events on the calendar display page (List Page)

I am wanting to populate the event with:
Subject

Accocated Person: .$data[person];

Allocated Vehicle: .$data[vehicle];

Status: .$data[image.jpg];
possibly even a graphic

fhumanes 10/20/2022

Hello,

The XLINESOFT template uses the FULLCALENDAR plugin where I have done tests and right now, I only see that the title of the appointment is exclusively TXT, could not put HTML (composition of information that you require).

In this other solution, used by Daypilot, if HTML admits, so you could put a richer text.

References:

Cheers,
fernando

1NET author 10/21/2022

So your solution is to completely change the javascript backend by including another solution that is going to cost another US$500 and not to use the existing system in phprunner?

I've successfully included the Description of the job includuing the delivery area in the subject line by concat(job_description,' - ',delivery_area) as subject directly from the MySQL Code
i'm thinking further concat startements with line breaks \r "
" may work
Any thoughts

1NET author 10/22/2022

The fix!

EVENTS->CALCALENDAR->After Record Added

$values["lastid"]=DB::LastId();
$Subject = $data["Subject"];

// Get info from orders table
$rs1 = DB::Query("select * from orders where job_id=".$values["Subject"]."");
while( $data1 = $rs1->fetchAssoc() )
{
$Client = $data1["Client_Name"];
$Area = $data1["Area"];
}
// Get info from drivers table
$rs2 = DB::Query("select * from drivers where driver_id=".$values["driver_id"]."");
while( $data2 = $rs2->fetchAssoc() )
{
$Driver = $data2["Driver_Name"];
$Phone_Number = $data2["Phone_Number"];
}
// Get info from trucks table
$rs3 = DB::Query("select * from trucks where truck_id=".$values["truck_id"]."");
while( $data3 = $rs3->fetchAssoc() )
{
$Registration_Number = $data3["Registration_Number"];
$Make_Model = $data3["Make_Model"];
}

$newDescription = "$Client - $Area - $Driver ($Phone_Number) - [$Registration_Number] $Make_Model";

$sql1 = "update orders set calcalendar_id=".$values["lastid"]." where job_id=".$values["Subject"]."";
db_exec($sql1);

$sql2 = "update calcalendar set Description='$newDescription' where id=".$values["lastid"]."";
db_exec($sql2);

unset($values["calcalendar_id"]);
Sergey Kornilov admin 10/22/2022

Thank you for sharing!