Sama logiikka kuin headerissa — kun yrityksellä on logo,
pelkkä logo riittää eikä tekstejä näytetä.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Korvattu yleinen lisätiedot-tekstikenttä neljällä erillisellä
kentällä (vlan, laite, portti, ip) jotta tiedoista voi hakea
ja filtteröidä tarkemmin.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Moduulijärjestelmä: yrityskohtaiset tabit (customers, support, leads, archive,
changelog, settings) valittavissa checkboxeina yrityksen asetuksissa
- Käyttäjäroolit: superadmin (pääkäyttäjä), admin (yritysadmin), user (käyttäjä)
- Superadmin: kaikki oikeudet kuten ennen
- Yritysadmin: muokkaa oman yrityksen asetuksia, moduuleita, postilaatikoita
- Käyttäjä: peruskäyttö ilman hallintaoikeuksia
- Päivitetty-kenttä näyttää suhteellista aikaa (15min sitten, 2h sitten, 3pv sitten)
- DB: enabled_modules sarake companies-tauluun, role ENUM laajennettu
- Automaattinen migraatio: vanhat admin → superadmin
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Priority was missing from the tickets list endpoint,
so colors weren't showing in the ticket table.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Urgent (red) and tärkeä (orange) row colors now override
the "käsittelyssä" green highlight so priority is always visible.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
Reply form:
- Mailbox/sender selection dropdown (choose which email to reply from)
- CC field (auto-filled from incoming email CC, editable)
- Reply templates dropdown (quick insert pre-made responses)
Priority system:
- Three levels: normaali, tärkeä, urgent
- Priority dropdown in ticket detail view
- Priority-based sorting (urgent/tärkeä always on top)
- Visual indicators in ticket list (colored rows, emoji badges)
- Priority emails: per-company email list that auto-sets "tärkeä"
Response templates:
- CRUD management in Settings tab
- Dropdown selector in reply form
- Templates insert into textarea
Telegram alerts:
- Bot token + chat ID configuration in Settings
- Test button to verify connection
- Auto-alert on urgent tickets (both manual and from email fetch)
- Alert on priority email matches
Database changes:
- New tables: reply_templates, customer_priority_emails
- New columns: tickets.cc, tickets.priority
- ALTER TABLE migration in initDatabase()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- When company logo is set, show only "Hallintapaneeli" without
company name (logo identifies the company)
- Ticket auto-refresh checkbox is checked by default
- Auto-refresh starts when switching to support tab
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Header is now white with neutral text colors.
Nav tab bar uses primary-color background with white text.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Added extractDominantColor() JS function that picks the dominant
color from uploaded logo and suggests it as theme color.
Updated gdcheck.php to show all needed extensions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Changed header from colored gradient background to clean white
with primary-color text, border-bottom accent line, and updated
button styles. Logos now display nicely against white background.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
finfo_open() is not available on CloudLinux alt-php84.
Now validates by file extension first, and only uses finfo
if the extension is available. Falls back gracefully.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
With MySQL migration, data/companies/{id}/ directories may not exist.
Now creates directory automatically instead of returning 404.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
check_auth was returning branding based on active company with
wrong field name (company_nimi instead of nimi), causing Noxus Intra
to show instead of company name on refresh. Now uses dbGetBranding()
with the request domain, same as the branding endpoint.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Users can only log in from domains belonging to their assigned company.
E.g. cuitunet users can only log in via intra.cuitunet.fi.
Admin users can still log in from any domain.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Drops all tables (with FK checks disabled) before recreating.
Use: migrate.php?reset=1 or php migrate.php --reset
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Column name yhteyshenkilö contains ö which \w doesn't match
without the /u flag. This caused SQL syntax errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Foreign key constraints fail if charset doesn't match between
referencing and referenced tables. Added utf8mb4 to user_companies,
reset_tokens, and login_attempts tables.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PDO extension was not available on CloudLinux/alt-php84 server.
MySQLi is available, so rewrote entire database layer to use it.
Added helper functions (_dbRun, _dbFetchAll, _dbFetchOne, etc.)
that handle named parameter conversion and type binding automatically.
All public db*() function signatures remain identical.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MySQL/PDO doesn't support multiple CREATE TABLE statements in a single
exec() call. Split into an array of individual statements with a loop.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
initUsers() luo oletusadminin ennen deploy-skriptiä,
joten tiedostot eivät ole tyhjiä. Nyt ylikirjoitetaan aina.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Väliaikainen skripti joka luo companies.json, users.json, config.json
tuotantopalvelimelle. Poistettava käytön jälkeen.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Allekirjoitukset tallennetaan users.json:iin (signatures-objekti, avaimena mailbox_id)
- Käyttäjälomakkeessa dynaamiset textareat jokaiselle postilaatikolle
- Allekirjoitus liitetään automaattisesti sähköpostivastauksiin (ticket_reply)
- Esikatselu näkyy tikettivastauslomakkeen alla
- Muistiinpanoihin (ticket_note) ei lisätä allekirjoitusta
- Uusi all_mailboxes endpoint palauttaa kaikki käyttäjän postilaatikot
- check_auth ja login palauttavat nyt myös user_id ja signatures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dropdown siirretty header-left → header-right, kompaktimpi nappikoko
headerissa, flex-wrap tukee kapeampia näyttöjä.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>