From 52e340b85c573cc4e67cd3346b9e153d17f10f58 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sun, 29 Nov 2026 22:36:50 -0500 Subject: [PATCH] Print a ticket as a work order and an asset as a spec sheet: Print Work Order in the ticket menu, or the browser print, gives the letterhead, who and where with access notes, the job details, assets, description, client-visible fill-ins, tasks as boxes to tick, public replies oldest first and a sign-off with times, work done lines and signatures, never internal notes; the asset print button beside Copy Details gives its hardware, network, location and assignee, interfaces, devices in it, licenses, services and quick notes with a QR code that opens it, never credentials or license keys; both print black on white in either theme and the ticket menu now shows for every agent; 26.12.3 changelog entries --- CHANGELOG.md | 3 + agent/asset.php | 15 ++ agent/ticket.php | 14 +- css/itflow_custom.css | 291 +++++++++++++++++++++++++++++++++ functions.php | 1 + functions/print_sheet.php | 333 ++++++++++++++++++++++++++++++++++++++ js/app.js | 14 ++ 7 files changed, 668 insertions(+), 3 deletions(-) create mode 100644 functions/print_sheet.php diff --git a/CHANGELOG.md b/CHANGELOG.md index fc562afb6..2c11eedc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,8 @@ Update from Maintenance > Update as usual - this release has four database chang - An identity provider can be required: the accounts on its email domains then can't sign in with a password, and the sign-in page says which button to use. Passkeys still work, and an agent with an administrator role keeps their password, to get back in if the provider is down. - An agent who signs in with an identity provider or their mail password finds their credentials locked, as after some passkeys: the first username or password they open asks for their ITFlow password, once, until they sign out. - Admin > Settings > Single Sign-on is gone: the client portal's Microsoft 365 sign-in is now a Microsoft 365 identity provider. A contact's Login of Only with an identity provider (once called With their Microsoft account) signs in only that way, with no password, and is offered when a provider is on for client contacts. +- Printing a ticket prints a work order instead of the page as it looks on screen: your letterhead, the client and contact, the site with its access notes, the job's details, its assets, the description, the fill-ins the client can see, the tasks as boxes to tick, the public replies oldest first, and a sign-off with arrival and departure times, lines for the work done and signatures. Internal notes never print. It's Print Work Order in the ticket's menu, or the browser's own print. +- Printing an asset prints a spec sheet: its hardware, network, where it is and who has it, its interfaces, the devices in it, its licenses and services and its quick notes, with a QR code that opens it in ITFlow. Credentials and license keys never print. The new print button sits beside Copy Details. ### Bug Fixes @@ -68,6 +70,7 @@ Update from Maintenance > Update as usual - this release has four database chang - functions/identity_provider.php: the kinds, who a provider covers (identityProviderCovers(), identityProviderFor(), identityProviderRequiredFor(), identityProviderImapFor()), the OpenID Connect code flow with PKCE S256 (identityProviderEndpoints() - Microsoft and Google fixed, Nextcloud from its discovery document; identityProviderAuthorizeUrl(), identityProviderIdentity()) and the IMAP check (identityProviderImapCheck(), DirectoryTree ImapEngine, certificate checked). Microsoft's address is Graph /me userPrincipalName (guests refused), Google's needs email_verified. - login_provider.php starts a sign-in (?provider=N, a single-use state in the session, ten minutes) and takes the code back, then hands the account to login.php as ?provider_login= with $_SESSION['pending_provider_login'], which signs in through its usual success path - role choice included - with $_SESSION['signed_in_with'] = 'provider' (left out of MFA enforcement as a passkey is) and signed_in_via the provider's name. client/login_microsoft.php serves it for the migrated app's redirect address. IMAP is checked in login.php's password step ('imap'); an administrator's own password still works there. - Admin: admin/identity_providers.php (list), admin/modals/identity_provider/identity_provider_edit.php (Add and Edit), admin/post/identity_provider.php (save_identity_provider, turn_identity_provider_on / off, delete_identity_provider - locked in the demo). The identity settings page and edit_identity_provider are gone. portalSignInMethods() and identityProviderContactsWording() take an email, to offer only the providers that sign it in; vaultLockedReason() says why the vault is locked. +- functions/print_sheet.php draws the work order (ticketWorkOrderHtml()) and spec sheet (assetSpecSheetHtml()) into their pages, hidden on screen; css .itflow-print-sheet hides the rest of the page when printing (the .container-fluid:has() rule). [data-print-page] buttons call window.print() (js/app.js). The ticket's actions bar and menu now show for every agent. ## [26.12.2] diff --git a/agent/asset.php b/agent/asset.php index e17c00739..b66cb31c8 100644 --- a/agent/asset.php +++ b/agent/asset.php @@ -332,6 +332,9 @@ if (mysqli_num_rows($sql) == 0) { + + + $asset_spec_rows, + 'guests' => $asset_guests, + 'rack' => $asset_rack, + 'holds' => $asset_holds ?: [], + 'interfaces' => $interfaces, + 'interface_links' => $interface_links, + 'software' => $held_software, + 'services' => $linked_services, + ]) ?> +