added pipework history job
This commit is contained in:
@@ -282,6 +282,7 @@ class BuildingModel {
|
||||
b.city AS building_city,
|
||||
wi.id AS item_id,
|
||||
wi.name AS item_name,
|
||||
wi.num AS item_num,
|
||||
wi.label AS item_label,
|
||||
wi.type AS item_type,
|
||||
wv.id AS value_id,
|
||||
@@ -293,7 +294,7 @@ class BuildingModel {
|
||||
FROM Workflowvalue wv
|
||||
JOIN Workflowitem wi ON wv.item_id = wi.id
|
||||
JOIN Building b ON wv.object_id = b.id";
|
||||
$where = ["wi.object_type = 'Building'", "wi.num < 150"];
|
||||
$where = ["wi.object_type = 'Building'", "wi.name NOT LIKE '%delimiter%'"];
|
||||
|
||||
if ($from !== null && $to !== null) {
|
||||
$where[] = "(wv.changed >= " . intval($from) . " AND wv.changed <= " . intval($to) . ")";
|
||||
|
||||
@@ -143,6 +143,7 @@ HTML;
|
||||
<th style="padding: 10px; border-bottom: 1px solid #d1d5db; color: #374151; font-weight: 600;">Ort</th>
|
||||
<th style="padding: 10px; border-bottom: 1px solid #d1d5db; color: #374151; font-weight: 600;">Feld</th>
|
||||
<th style="padding: 10px; border-bottom: 1px solid #d1d5db; color: #374151; font-weight: 600;">Wert</th>
|
||||
<th style="padding: 10px; border-bottom: 1px solid #d1d5db; color: #374151; font-weight: 600;">Doku</th>
|
||||
<th style="padding: 10px; border-bottom: 1px solid #d1d5db; color: #374151; font-weight: 600;">Editiert</th>
|
||||
<th style="padding: 10px; border-bottom: 1px solid #d1d5db; color: #374151; font-weight: 600;">Von</th>
|
||||
</tr>
|
||||
@@ -185,6 +186,7 @@ HTML;
|
||||
$city = htmlspecialchars($item->building_city ?? 'N/A');
|
||||
$label = htmlspecialchars($item->item_label ?? 'N/A');
|
||||
$editedAt = date("d.m.Y H:i", $item->last_edited_at); // Shortened format for space
|
||||
$type = intval($item->item_num) > 150 ? 'Ist-Zustand' : 'Planung';
|
||||
|
||||
$html .= <<<HTML
|
||||
<tr style="border-bottom: 1px solid #e5e7eb;">
|
||||
@@ -192,6 +194,7 @@ HTML;
|
||||
<td style="padding: 10px; color: #4b5563;">{$city}</td>
|
||||
<td style="padding: 10px; color: #4b5563;">{$label}</td>
|
||||
<td style="padding: 10px; color: #111827; max-width: 200px; word-wrap: break-word;">{$valueDisplay}</td>
|
||||
<td style="padding: 10px; color: #4b5563;">{$type}</td>
|
||||
<td style="padding: 10px; color: #4b5563; white-space: nowrap;">{$editedAt}</td>
|
||||
<td style="padding: 10px; color: #4b5563;">{$userName}</td>
|
||||
</tr>
|
||||
@@ -253,7 +256,7 @@ try {
|
||||
|
||||
// Recipients
|
||||
$mail->setFrom('thetool@xinon.at', 'XINON TheTool'); // Use sender address from config if available
|
||||
$mail->addAddress('mark.zaff@xinon.eu', 'Mark Zaff');
|
||||
$mail->addAddress('mark.zaff@xinon.eu', 'Mark Zaff');
|
||||
$mail->addAddress('luca.haid@xinon.eu', 'Luca Haid');
|
||||
|
||||
// Content
|
||||
|
||||
Reference in New Issue
Block a user