refactor: move priority emails to customer card
Priority emails are now per-customer, not per-company. Each customer can have a list of email addresses that automatically elevate ticket priority to "tärkeä" when they send email. Field added to customer form under "Lisätiedot" section. Removed separate priority_emails settings from API/rules tabs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
3
api.php
3
api.php
@@ -1198,6 +1198,7 @@ switch ($action) {
|
||||
'elaskuvalittaja' => trim($input['elaskuvalittaja'] ?? ''),
|
||||
'ytunnus' => trim($input['ytunnus'] ?? ''),
|
||||
'lisatiedot' => trim($input['lisatiedot'] ?? ''),
|
||||
'priority_emails' => trim($input['priority_emails'] ?? ''),
|
||||
'liittymat' => parseLiittymat($input),
|
||||
'luotu' => date('Y-m-d H:i:s'),
|
||||
];
|
||||
@@ -1223,7 +1224,7 @@ switch ($action) {
|
||||
foreach ($customers as $c) {
|
||||
if ($c['id'] === $id) {
|
||||
$changes = [];
|
||||
$fields = ['yritys','yhteyshenkilö','puhelin','sahkoposti','laskutusosoite','laskutuspostinumero','laskutuskaupunki','laskutussahkoposti','elaskuosoite','elaskuvalittaja','ytunnus','lisatiedot'];
|
||||
$fields = ['yritys','yhteyshenkilö','puhelin','sahkoposti','laskutusosoite','laskutuspostinumero','laskutuskaupunki','laskutussahkoposti','elaskuosoite','elaskuvalittaja','ytunnus','lisatiedot','priority_emails'];
|
||||
foreach ($fields as $f) {
|
||||
if (isset($input[$f])) {
|
||||
$old = $c[$f] ?? '';
|
||||
|
||||
Reference in New Issue
Block a user