mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-08 17:12:25 +03:00
Add company colors to notifications
This commit is contained in:
parent
37374a254f
commit
493fff1f92
9 changed files with 27 additions and 3 deletions
|
@ -447,10 +447,13 @@ class Booking extends EA_Controller
|
|||
$appointment_id = $this->appointments_model->save($appointment);
|
||||
$appointment = $this->appointments_model->find($appointment_id);
|
||||
|
||||
$company_color = setting('company_color');
|
||||
|
||||
$settings = [
|
||||
'company_name' => setting('company_name'),
|
||||
'company_link' => setting('company_link'),
|
||||
'company_email' => setting('company_email'),
|
||||
'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null,
|
||||
'date_format' => setting('date_format'),
|
||||
'time_format' => setting('time_format'),
|
||||
];
|
||||
|
|
|
@ -88,10 +88,13 @@ class Booking_cancellation extends EA_Controller
|
|||
|
||||
$service = $this->services_model->find($appointment['id_services']);
|
||||
|
||||
$company_color = setting('company_color');
|
||||
|
||||
$settings = [
|
||||
'company_name' => setting('company_name'),
|
||||
'company_email' => setting('company_email'),
|
||||
'company_link' => setting('company_link'),
|
||||
'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null,
|
||||
'date_format' => setting('date_format'),
|
||||
'time_format' => setting('time_format'),
|
||||
];
|
||||
|
|
|
@ -278,10 +278,13 @@ class Calendar extends EA_Controller
|
|||
$customer = $this->customers_model->find($appointment['id_users_customer']);
|
||||
$service = $this->services_model->find($appointment['id_services']);
|
||||
|
||||
$company_color = setting('company_color');
|
||||
|
||||
$settings = [
|
||||
'company_name' => setting('company_name'),
|
||||
'company_link' => setting('company_link'),
|
||||
'company_email' => setting('company_email'),
|
||||
'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null,
|
||||
'date_format' => setting('date_format'),
|
||||
'time_format' => setting('time_format'),
|
||||
];
|
||||
|
@ -354,10 +357,13 @@ class Calendar extends EA_Controller
|
|||
$customer = $this->customers_model->find($appointment['id_users_customer']);
|
||||
$service = $this->services_model->find($appointment['id_services']);
|
||||
|
||||
$company_color = setting('company_color');
|
||||
|
||||
$settings = [
|
||||
'company_name' => setting('company_name'),
|
||||
'company_email' => setting('company_email'),
|
||||
'company_link' => setting('company_link'),
|
||||
'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null,
|
||||
'date_format' => setting('date_format'),
|
||||
'time_format' => setting('time_format'),
|
||||
];
|
||||
|
|
|
@ -102,10 +102,13 @@ class Google extends EA_Controller
|
|||
|
||||
$local_events = [...$appointments, ...$unavailabilities];
|
||||
|
||||
$company_color = setting('company_color');
|
||||
|
||||
$settings = [
|
||||
'company_name' => setting('company_name'),
|
||||
'company_link' => setting('company_link'),
|
||||
'company_email' => setting('company_email'),
|
||||
'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null,
|
||||
];
|
||||
|
||||
$provider_timezone = new DateTimeZone($provider['timezone']);
|
||||
|
|
|
@ -67,11 +67,14 @@ class Recovery extends EA_Controller
|
|||
|
||||
$new_password = $this->accounts->regenerate_password($username, $email);
|
||||
|
||||
$company_color = setting('company_color');
|
||||
|
||||
if ($new_password) {
|
||||
$settings = [
|
||||
'company_name' => setting('company_name'),
|
||||
'company_link' => setting('company_link'),
|
||||
'company_email' => setting('company_email'),
|
||||
'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null,
|
||||
];
|
||||
|
||||
$this->email_messages->send_password($new_password, $email, $settings);
|
||||
|
|
|
@ -272,10 +272,13 @@ class Appointments_api_v1 extends EA_Controller
|
|||
|
||||
$customer = $this->customers_model->find($appointment['id_users_customer'], true);
|
||||
|
||||
$company_color = setting('company_color');
|
||||
|
||||
$settings = [
|
||||
'company_name' => setting('company_name'),
|
||||
'company_email' => setting('company_email'),
|
||||
'company_link' => setting('company_link'),
|
||||
'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null,
|
||||
'date_format' => setting('date_format'),
|
||||
'time_format' => setting('time_format'),
|
||||
];
|
||||
|
@ -352,10 +355,13 @@ class Appointments_api_v1 extends EA_Controller
|
|||
|
||||
$customer = $this->customers_model->find($deleted_appointment['id_users_customer'], true);
|
||||
|
||||
$company_color = setting('company_color');
|
||||
|
||||
$settings = [
|
||||
'company_name' => setting('company_name'),
|
||||
'company_email' => setting('company_email'),
|
||||
'company_link' => setting('company_link'),
|
||||
'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null,
|
||||
'date_format' => setting('date_format'),
|
||||
'time_format' => setting('time_format'),
|
||||
];
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<body style="font: 13px arial, helvetica, tahoma;">
|
||||
|
||||
<div class="email-container" style="width: 650px; border: 1px solid #eee; margin: 30px auto;">
|
||||
<div id="header" style="background-color: #429a82; height: 45px; padding: 10px 15px;">
|
||||
<div id="header" style="background-color: <?= $settings['company_color'] ?? '#429a82' ?>; height: 45px; padding: 10px 15px;">
|
||||
<strong id="logo" style="color: white; font-size: 20px; margin-top: 10px; display: inline-block">
|
||||
<?= e($settings['company_name']) ?>
|
||||
</strong>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<body style="font: 13px arial, helvetica, tahoma;">
|
||||
|
||||
<div class="email-container" style="width: 650px; border: 1px solid #eee; margin: 30px auto;">
|
||||
<div id="header" style="background-color: #429a82; height: 45px; padding: 10px 15px;">
|
||||
<div id="header" style="background-color: <?= $settings['company_color'] ?? '#429a82' ?>; height: 45px; padding: 10px 15px;">
|
||||
<strong id="logo" style="color: white; font-size: 20px; margin-top: 10px; display: inline-block">
|
||||
<?= e($settings['company_name']) ?>
|
||||
</strong>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<body style="font: 13px arial, helvetica, tahoma;">
|
||||
|
||||
<div class="email-container" style="width: 650px; border: 1px solid #eee; margin: 30px auto;">
|
||||
<div id="header" style="background-color: #429a82; height: 45px; padding: 10px 15px;">
|
||||
<div id="header" style="background-color: <?= $settings['company_color'] ?? '#429a82' ?>; height: 45px; padding: 10px 15px;">
|
||||
<strong id="logo" style="color: white; font-size: 20px; margin-top: 10px; display: inline-block">
|
||||
<?= e($settings['company_name']) ?>
|
||||
</strong>
|
||||
|
|
Loading…
Reference in a new issue