Refactor Slack message formatting for new bookings.
Updated the message format to simplify content, translate to Danish, and remove unnecessary fields. This improves clarity and aligns with localized conventions.
This commit is contained in:
@@ -90,20 +90,15 @@ class slack implements notification_i
|
||||
// Get the customer name
|
||||
$customer_name = (new users_o())->getCustomerName($customer_number);
|
||||
// Format the message
|
||||
return "*New booking created* ( ID: " . $id . " )\n"
|
||||
. "Customer: $customer_name\n"
|
||||
. "Customer number: $customer_number\n"
|
||||
. "Wash type: $wash_type\n"
|
||||
. "Contact email: $contact_email\n"
|
||||
. "Reference number: $reference_number\n"
|
||||
return "*Ny booking oprettet* ( ID: " . $id . " )\n"
|
||||
. "Kunde: $customer_name ($customer_number)\n"
|
||||
. "Type: $wash_type\n"
|
||||
. "Reference nummer: $reference_number\n"
|
||||
. "RegNr Traekker: $regNrTraekker\n"
|
||||
. "RegNr Trailer: $regNrTrailer\n"
|
||||
. "Wash certificate email: $washCertificateEmail\n"
|
||||
. "Date: $date\n"
|
||||
. "Department: $department_name\n"
|
||||
. "Pickup: $pickup_bool\n"
|
||||
. "Notes: $notes\n"
|
||||
. "Status: $status";
|
||||
. "Dato: $date\n"
|
||||
. "Hentning: $pickup_bool\n"
|
||||
. "Noter: $notes";
|
||||
}
|
||||
|
||||
public function format_unfulfilled_booking($id, $customer_number, string $wash_type, string $contact_email, string $reference_number, string $regNrTraekker, string $regNrTrailer, string $washCertificateEmail, string $date, int $department, $pickup_bool, string $notes, string $washCertificateStatus, string $washCertificateUrl, string $status): string
|
||||
|
||||
Reference in New Issue
Block a user