Commit Graph

52 Commits

Author SHA1 Message Date
johnnyq
3b5c11c552 Add managed mode, so one ITFlow can manage others - Admin > Managed Instances adds an instance and gives a one-time connection code (a week) that the other ITFlow pastes into the new Admin > Managed By, after which it checks in every minute from the new Manager Check-in cron job with a health report (versions, update waiting and whether it has security fixes, cron, last backup, errors today, agents against the seat limit, clients, storage) and takes back what the manager sets; the manager lists each instance's version, health, seats and last check-in with a page per instance showing what needs a look, its requests and everything it reported, can update it by hand or automatically after a set number of days (security releases straight away, not retried for six hours after a failure), set its seat limit and white-label key (locked on the instance while set), make it read-only (look, export and download only, across agents, portal, guest links and the API) or suspended (a notice with the manager's message and contact, 503 for the API) with other cron jobs paused until it is active again, sign in to it as support through a signed one-time two-minute link into a two-hour session that takes no seat, can't open the vault and can't set passwords or make API keys, and remove it, while the new Managed Instances job notifies when one stops checking in and closes requests never answered; instances only call the manager, can disconnect unless config.php sets $config_manager_required, and the Update page and queue_update defer to the manager; database 3.5.8 adds managed_instances, managed_instance_commands, settings.config_manager_keys and settings.config_managed, the logic is in the new functions/managed.php with api/managed/enroll.php, api/managed/checkin.php, login_support.php and includes/managed_blocked.php, cronJobClaim() takes a paused reason that leaves a due job due, getAgentUserLimit() and getActiveAgentUserCount() honour the manager's limit and leave out the support user, the vault helpers read a missing session key as empty, the audit log knows the new types and actions, and the email parser no longer logs an App Logs error every minute while parsing is switched off; changelog updated 2026-11-05 15:22:41 -05:00
johnnyq
954f1e3688 Contract templates: show Contract Templates in the admin menu under Templates when the accounting module is on (its link was still commented out from when contracts were hidden), show the Templates heading when accounting is the only module on, and when there are no templates yet tell an admin on New Contract where to make them; changelog updated 2026-10-27 17:48:21 -04:00
johnnyq
58e502ad38 Add Get started, a guided walk through what is left to set up after installing (cron, email, backups, billing, support, the team, starter content and a first client), each step a short form of its own with Skip for now and ticked off from the settings themselves, shown to the first admin to sign in on a new install and as a Finish setting up card on the dashboard until done, skipped or dismissed, and in Admin > Get started any time; database 3.4.7 adds settings.config_getting_started (on for a new install, off for an updated one), config_getting_started_skipped and config_getting_started_opened_at; the mail server check moves to settingsMailServerCheck() for Admin > Mail and the Email step, app.js only starts DataTables where it is loaded, and setup's finish step points at Get started 2026-10-25 14:28:17 -04:00
johnnyq
2b401cb405 Custom Links rebuilt: tabs for the agent menu, top bar, client portal, admin menu and reports menu with counts plus All and Archived, search by name, address or description, sortable columns, each link with its icon, description, address and new-tab marker, links whose address can't work flagged; drag into order on a menu's tab or move up and down, new links at the end of their menu in place of the Order number; one add and edit window with a live preview of the link in its menu, an icon picker with search, a description shown on hover and a new-tab switch that follows the address until changed; copy, open, archive, restore and confirmed delete; addresses limited to web addresses, ITFlow pages, mailto, tel and the remote tool schemes asset links allow, with javascript and data refused and old ones drawn as going nowhere; menus read one shared helper, the agent menu's links sit under Tools even without Reports, the admin menu's get a Links heading, new-tab links get a small arrow, links without an icon get the link arrow and every link shows its description on hover; fixes mailto and tel links showing as unsupported in the side menus, the portal menu taking any address, the delete message missing the name and the new-tab tick never showing; edits audit what changed from what to what; adds functions/custom_link.php and js/custom_link_form.js, no database change; changelog 2026-10-24 14:03:40 -04:00
johnnyq
80cdc4de41 AI stage 1: rebuild AI Providers and AI Models in the standard list pattern with ready-made provider kinds (OpenAI, Anthropic, Azure OpenAI, Gemini, Mistral, Groq, OpenRouter, Ollama, LM Studio, OpenAI-compatible), Test that lists a provider's models, Save anyway for a provider that doesn't answer, a first model offered when adding the first provider, the API key no longer shown, from-to audit lines, and delete confirms that say what goes and what stops; model window with suggested models, use case notes and Try it; new AI Usage page logging each request by feature, user, client, model, tokens, time and failure, with totals, views and filters, pruned with the audit log; passwords, keys, 2FA links and card numbers taken out before sending and put back in the answer, on by default per provider; new Use AI role permission; Reword shown only when set up and allowed, placed first in the toolbar, with its own instructions, undo in one step and a fixed endpoint on admin pages; ticket summary and template drafts purified; Settings overview warns while AI requests keep failing; database 3.3.8 adds provider kind and redact, ai_usage and module_ai 2026-10-20 17:45:00 -04:00
johnnyq
23297082ae Mail queue stage 3: show failed and stuck mail on the Settings overview and Mail tile, a mail queue summary on the Mail Tests tab and a failed-this-week count on the Mail Queue menu item, add Mail Queue to the Ctrl K search for admins, and say where to watch a test email go 2026-10-20 11:35:36 -04:00
johnnyq
928fc5f10a Settings stage 2: move Tickets, Projects, Quotes, Invoices and billing and Defaults onto the settings frame with sections and live next-number previews that refuse a number already in use, validate email addresses instead of blanking them, check the ticket close time and stop its PHP warnings, warn when late fees are on but reminders are off, limit the start page to real ITFlow pages and escape it where shown, keep archived default accounts, rename the Defaults fields to their columns, and keep the reminder, billing time, expense and mileage anchors 2026-10-20 11:29:58 -04:00
johnnyq
1b0169f421 Settings stage 1: add a Settings overview with a tile and current summary for every page, attention items for problems and a Find a setting search that opens the setting highlighted, add a shared settings frame with described sections, a save bar with unsaved state and Undo, a leave-page warning, server-side validation that keeps typed values and audit entries listing each change from old to new, and move Company details, Localization, Theme, Modules and Telemetry onto it with logo and favicon previews, the company phone following the country, a localization sample, a live theme preview, white-label key checks and Telemetry as a single switch 2026-10-20 11:29:24 -04:00
johnnyq
dfc708145d Vendor templates stage 1: Admin > Vendor Templates rebuilt on the standard list with Active and Archived tabs, support line, hours and SLA, how many clients have a vendor from each, last used and changed by, sortable and searchable including by support line; new template page with what a vendor starts with, the clients with it and their account numbers, the license templates that use it, made and changed by, and history; shared New/Edit window on the vendor window's tabs with per-field push to the vendors made from it, each logged on the vendor; copy, archive, restore and delete with vendors and license templates unlinked on delete; Make a template from a client's vendor, linking the vendor to it, and the vendor page linking its template for admins; Delete offered to every admin role, not only the built-in Administrator; the admin handler no longer includes the agent vendor handler; database 3.3.4 adds vendor_template_created_by and vendor_template_updated_by, backfilled from the audit log 2026-10-19 12:34:53 -04:00
johnnyq
a5a43e37ac Audit logs stage 3: failed sign-ins say why and are logged against the account they were for - wrong password, no account with that email, disabled, archived or invited account, client archived, portal turned off, a wrong MFA or two-step code after the right password - with failed Microsoft 365 portal sign-ins logged too and marked Their account in the audit log; the IP lockout counts portal failures as well; the first sign-in from an IP address is badged New IP in the audit lists and quick look; new Admin > Sign-ins under Access with People and IP addresses views, search, date filter, sortable columns and paging; admins get a notification and an email on a run of failed sign-ins or turned-away API calls from one address or against one account, set in Settings > Security (10 to start, 5, 20, 50 or never), each in the audit log Security view and in Mail > Previews; API calls counted per key, day and endpoint, with a 30-day calls column and last IP on API Keys and a usage window, expired-key calls logged against the key, and usage deleted with the key and after the log retention; database 3.3.2 drops the unused auth_logs table and adds settings.config_login_alert_failures and api_key_usage; new functions/sign_in.php, admin/sign_ins.php and admin/modals/api/api_key_usage.php; the license template page no longer warns when view is missing 2026-10-19 00:56:52 -04:00
johnnyq
f74ad10dd8 License templates stage 1: Admin > License Templates on the standard list with full search across name, version, summary, type, license type and notes, Active and Archived tabs with counts, sortable columns for type, license type, licenses and clients using it, seats in use against seats bought, last used and last changed with who, a row menu and an empty state; a page for each template showing what a license made from it starts with, the licenses made from it with their client, seats and renewal, how many renew in the next 30 days or have lapsed, and who made and last changed it; New license for a client from the template page or the list picks the client and takes seats, key, purchase and renewal dates and order reference, saves and opens that client's Licenses; Copy, Archive, Restore and Delete, archived templates no longer offered on New License and deleting one leaving its licenses in place unlinked; the template window gets icons in front of each field, a summary line and notes every license should carry; licenses remember the template they were started from on New License and the license quick look shows From the template, linked for admins; migration 3.2.8 adds the template link to licenses and who made and changed each template, counting a license whose name exactly matches a single template's name as made from it so existing templates don't start at zero; t_licenses updated for the new gone or archived wording; changelog updated 2026-10-18 19:52:20 -04:00
johnnyq
afaaa5fc32 Taxes stage 1: Admin > Taxes rebuilt (renamed from Tax Rates) listing each rate with its whole percent, parts, description, registration number and usage (invoices, quotes, recurring invoices, products, clients), Current and Archived tabs showing what replaced a rate, Restore, Make default, and Delete only for a rate never used; rates made of parts (state and county, GST and QST) with parts charged on top of the ones above, the whole rate shown as typed, four decimal places and a registration number per rate or part printed with the company details on invoices, quotes and PDFs; changing the percent or parts of a rate on a sent invoice or quote makes a new rate of the same name and archives the old one, so billed lines keep the old rate while products, client rates, the default, recurring invoices and optionally drafts move to the new one, and archiving offers to move whatever still uses it; How lines are taxed settings for the default rate, taxing billed time, trips and expenses, and discounts taken off before tax (on by default, shared across lines by amount, paid, cancelled and answered documents never recalculated); clients get their own tax rate and tax exempt with certificate number and expiry on the Billing tab, new lines defaulting to the client's rate then the product's then the default and to no tax for exempt clients, exempt badge on the client header and overview, a warning with Take the tax off on open documents that still carry taxed lines for an exempt client, and Tax exempt with the certificate under the client on untaxed documents; totals, PDFs, guest and portal views show tax by part; Unbilled Time can bill at each client's usual rate and the ticket, Add Tickets, Add Expenses and Add Trips windows start on it; API client fields for rate and exemption and tax_id default on invoice item create; Tax Collected shows exact percents; demo taxes get parts and registration numbers, demo clients their rates and two nonprofits exemptions; database 3.1.1 makes tax_percent decimal(9,4) and adds tax description, registration and replaced-by, tax_components, client rate and exemption columns and the tax settings; new functions/tax.php and js/tax_form.js; changelog updated 2026-10-17 13:00:54 -04:00
johnnyq
e29369926f Client portal stage 4: accounts - Your account rebuilt with details and an ask-us link, phone numbers, ticket email choices, password change needing the current password and 8 characters with an email notice, two-step sign-in with an authenticator app set up from a QR code, remembered browsers with Forget them, phone PIN and recent sign-ins with the device; activity rebuilt with signing-in and changes tabs and paging; sign-in asks portal users with two-step sign-in for a code, remembers the browser on request and locks an account after five wrong codes in ten minutes, matching portal users by contact_user_id; Admin > Client Portal can require two-step sign-in, sending anyone without it to set it up first, and agents can turn it off for a contact from the contact page; password links stored as SHA-256 and running out after an hour for Forgot password and a week for invites, the nightly run clearing only run-out links, Forgot password limited to one email per account every five minutes and ten requests per address in ten minutes, the reset page rebuilt with the password typed twice and a confirmation email, fixing the empty-token check that let anyone trigger the reset email; contacts choose every ticket email or replies and fixes only, and primary and technical contacts can hear about new tickets at their company or every update, honoured by agent, portal, email parser and recurring ticket emails; announcements for every client or one with tone and start and end dates on the portal home page, managed in Admin > Client Portal; View as contact opens the portal read only as a contact from the agent contact page, audited, with billing shown only when the agent's role reads sales and financial, nothing written or paid while viewing; agent contact page shows two-step status, last sign-in and ticket email choices; database 3.1.0 adds portal_announcements, contact ticket email columns and config_client_portal_require_mfa and hashes outstanding links; new functions/portal.php; changelog updated 2026-10-17 12:05:55 -04:00
johnnyq
6ef84c4547 Feature: Add Ticket Canned Responses 2026-08-15 17:29:17 -04:00
johnnyq
e2512b0f86 Fixed Side nav titles, Fixed ajax on bootstrap modals, fixed pagination all regressions 2026-08-14 18:32:33 -04:00
johnnyq
dc6b191eed Update Font, Migrated away from JQUERY dependent libs: toastr to bootstrap5 toasts, daterangepicker to flatpickr, select2 to Tom Select, InputMask to IMask 2026-08-14 17:08:40 -04:00
johnnyq
a084e37c39 Initial migration from AdminLTE 3 to 4, bootstrap 4 to 5 2026-08-14 13:22:11 -04:00
johnnyq
b8c9d5b4cf Query Optimization: Select only needed columns instead of SELECT * on looped queries 2026-08-06 12:59:43 -04:00
johnnyq
c30c12674a Sync DB Seed data between setup and setup cli 2026-08-03 22:41:31 -04:00
johnnyq
119334ab71 Cron Fix 2026-07-30 16:44:56 -04:00
johnnyq
d08ef6184a Add optional ticket SLAs
Response/resolution targets stamped at creation from per-client/priority assignments, business-hours due date math, warn/breach alert stages via cron/ticket_sla.php, ticket list coloring, per-ticket SLA override, admin page for plans/assignments/business hours. DB update 2.5.0. No behavior change unless SLAs are assigned. Bulk reply now only counts Public replies as first response.
2026-07-29 00:00:42 -04:00
johnnyq
b3f959ac55 Use Short echo tags across the code 2026-07-28 18:47:52 -04:00
johnnyq
9c65644adc Update the rest of the PHP functions to use camelCase 2026-07-23 17:39:06 -04:00
johnnyq
d5a1305192 Reorg Admin Side nav menu 2026-07-21 14:17:16 -04:00
johnnyq
dfedc31c04 Update Tax to Tax Rates in admin side nav 2026-07-15 00:43:09 -04:00
johnnyq
dae7f09650 Remove _details, fix plural and singular file naming in admin, update admin post to match agent post 2026-07-15 00:38:34 -04:00
johnnyq
38a042d435 Remove _details and use singular filename for certain objects 2026-07-15 00:12:27 -04:00
johnnyq
7bc47a58fe Replace Function nullable_htmlentities() with just escapeHtml() and update all instances throughout 2026-07-14 17:10:45 -04:00
johnnyq
99218d02ad Document Templates: UI Enhancement / Cleanup Document templates 2026-03-03 11:16:36 -05:00
johnnyq
0a30300bde replace all instances of mysqli_fetch_array with mysqli_fetch_assoc for better performance and memory usage 2026-01-14 17:30:23 -05:00
johnnyq
27fde82aff Fixed Adding Payment provider not adding an account, now adding you can customize the income/expense account, expense category, and Expense vendor. Moved Saved Payment Provider Methods into Payment Providers as a link instead of on the admin side nav. Same with AI Provider and AI Models. 2025-12-12 16:42:09 -05:00
johnnyq
4a26ea7ed9 Hide Permission Modules on sidenav admin menu as this is not ready for custom modules 2025-12-05 12:46:44 -05:00
johnnyq
18429fda2c Remove all side nav Quick adds 2025-11-23 14:53:39 -05:00
johnnyq
29e1b56e78 Hide contract side nav as its not yet complete 2025-11-16 17:58:07 -05:00
johnnyq
7230325e62 Migrate Ticket Template add to ajax-modal, add category type option if not defined, add product type if not defined 2025-11-12 17:04:53 -05:00
johnnyq
af8e733cfb Added Quick Add Links to the majority of Side bars navs 2025-11-12 16:27:03 -05:00
johnnyq
abb97ad99f [Feature] Added Asset Tags 2025-11-11 19:57:51 -05:00
johnnyq
1d3f206660 Addec Contract Templates Listing add modal and add post code 2025-11-07 17:55:19 -05:00
johnnyq
559506fc90 Added Access Modules to view current modules and to allow custom modules for the future for use in custom code directories 2025-10-23 15:55:54 -04:00
johnnyq
c66aa92365 Update All Side Nav Links to be absolute so the side bar includes can be navigatable when navs are included in custom code 2025-10-23 13:07:02 -04:00
johnnyq
16242be74e Update Client Nav to use Absolute links and updated more of the inc_alls to use Document Server Root 2025-10-07 13:44:08 -04:00
johnnyq
6a7a02d220 Add Custom Links Admin Nav option 2025-10-01 13:48:52 -04:00
johnnyq
edabc5c33f rename /user/ to /agent/ and update links to use agent/ instead 2025-09-23 18:04:23 -04:00
wrongecho
8c0d542d7d Better logic handling for the default page redirects 2025-09-08 15:40:59 +01:00
johnnyq
9642babb7e Fix issue with AI Settings displaying in Admin Menu if the module invoice/accouting module is turned off 2025-09-05 19:00:17 -04:00
johnnyq
9d9bfc65d5 Fix Active side nav for api keys 2025-09-03 18:46:01 -04:00
Marcus Hill
2c160d1ac9 Take you back to dashboard rather than a redirect 2025-08-30 15:31:49 +01:00
johnnyq
fd73f132bc Fixed a few table names in Stripe Migration, Removed legacy stripe and AI settings 2025-08-28 11:44:29 -04:00
johnnyq
2333d81276 Update more broken links from file dirextory consolidation 2025-07-29 18:34:51 -04:00
johnnyq
95950700d8 Moved user items to user directory 2025-07-28 17:57:06 -04:00