show customer name on appointments, RT#34237
authorIvan Kohler <ivan@freeside.biz>
Tue, 6 Oct 2015 03:12:09 +0000 (20:12 -0700)
committerIvan Kohler <ivan@freeside.biz>
Tue, 6 Oct 2015 03:12:09 +0000 (20:12 -0700)
rt/share/html/Elements/CalendarDaySchedule
rt/share/html/Elements/CalendarSlotSchedule

index 5be5b06..bac9a78 100644 (file)
@@ -31,8 +31,13 @@ $CurrentUser => undef
 %     my( $starts, $due, $col, $t ) = @{ $schedule{'scheduled'}->{$id} };
 %     my $s = int(($starts-$stime)/10);
 %     my $e = int(($due-$stime)/10)-1;
+
+%     #false laziness w/misc/xmlhttp-ticket-update.html & CalendarSlotSchedule
+%     my %hash = $m->comp('/Ticket/Elements/Customers', Ticket => $t);
+%     my @cust_main = values( %{$hash{cust_main}} );
+
       <AREA
-         onmouseover = "overlib('<%$id%>: <% FS::sched_avail::pretty_time($starts). '-'. FS::sched_avail::pretty_time($due) %><BR>XX miles away<BR>more info', WRAP, BGCOLOR, '#000000', FGCOLOR, '#<%$col%>')"
+         onmouseover = "overlib('<% FS::sched_avail::pretty_time($starts). '-'. FS::sched_avail::pretty_time($due) %><BR>' + <% $cust_main[0]->_FreesideURILabel |js_string %>, WRAP, BGCOLOR, '#000000', FGCOLOR, '#<%$col%>')"
          onmouseout  = "nd(); return true;"
          shape       = "rect"
          coords      = "<%$s%>,0,<%$e%>,<%$height%>"
index 4a9b3bc..632fabb 100644 (file)
 %     $selectable = 0;
 %
 %     if ( $starts >= $tod_row ) { #first row
+%
+%       #false laziness w/misc/xmlhttp-ticket-update.html & CalendarDaySchedule
+%       my %hash = $m->comp('/Ticket/Elements/Customers', Ticket => $t);
+%       my @cust_main = values( %{$hash{cust_main}} );
+%
 %       $content .= ($content?', ':''). #$id. ': '.
 %                   #false laziness w/xmlhttp-ticket-update.html
 %                   FS::sched_avail::pretty_time($starts). '-'.
-%                   FS::sched_avail::pretty_time($due);
+%                   FS::sched_avail::pretty_time($due).
+%                   ': '. encode_entities($cust_main[0]->_FreesideURILabel);
 %                   #'install for custname XX miles away'; #XXX placeholder/more
 %       $draggable_ticketid = $id;
 %       $draggable_length = $due - $starts;