From e85f7801828b2db7b4962e0f4ea34b7d3152a680 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 20 Nov 2026 13:20:55 -0500 Subject: [PATCH] Starter Content: rebuilt on the Maintenance page layout with what is left to add and Add all at the top, each pack as a row with its counts, Pick which, Add and Update, demo data beneath, totals and how adding works at the side, and Update and Remove demo data confirmed in the standard window --- CHANGELOG.md | 2 + admin/starter_content.php | 413 +++++++++++++++++++++----------------- css/itflow_custom.css | 8 +- 3 files changed, 234 insertions(+), 189 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94972ecab..252f7ebb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -209,6 +209,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u - Unbilled Time: the time logged is under the hours to bill rather than a column of its own, so the list fits beside Bill these clients. - Forms: the + beside a picker and the Cancel button look the same in every window, a vendor's What they are is Description as on other records, and a few notes under fields that only said where a value shows are gone. - Starter Content and the demo data are in US spelling - license, authorized, organization, fiber and the like. Where you loaded them before, nothing is added twice: the Authorised Contacts Only vendor tag and the Licence assigned canned response you have count as loaded, and bringing the starter canned responses up to date gives the response its new name. Bringing the starter ticket templates up to date has New Hire Onboarding ask for the License. Loading the demo data again, or removing it, still finds what an earlier load made. +- Maintenance > Starter Content is laid out like Backup and Update: how much of the library you don't have yet, with Add all, at the top; each pack with how many it would add and how many of it you have, Pick which, its Add and its Update; the demo data under them; and the totals, how adding works and what to know about the demo data at the side. Update and Remove demo data ask first in the usual window. ### Bug Fixes @@ -413,6 +414,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u - Related tickets: database 4.0.8 adds `ticket_links` (`ticket_id` as the primary key, `link_group`, `linked_by`, `linked_at`; deleted with its ticket). `functions/ticket_link.php`: `ticketLinksReady()`, `ticketLinkGroup()`, `ticketLinkMembers()`, `ticketLinkTogether()` (any number of tickets and everything already related to them into one group, with a ticket history line naming the newly related ones), `ticketUnlink()`, `ticketRelated()` and `ticketLinkCounts()` (scoped to the agent's clients), `ticketLinkHidden()`, `ticketLinkCandidates()` and `ticketLinkCarry()` (from `ticketMergeInto()`). A group is numbered by its lowest ticket id, renumbered by `ticketLinkTidy()` as tickets leave, so one number never names two groups; a group left with one ticket is deleted. `agent/post/ticket_link.php` handles `link_tickets`, `unlink_ticket` and `bulk_link_tickets`; Reply to all and Resolve all open `ticket_bulk_reply.php` and `ticket_bulk_resolve.php` with `ticket_ids[]`. - Look and feel: `.itflow-dash-rail` is a grid (`repeat(auto-fill, minmax(10rem, 1fr))`, `.itflow-dash-rail-clear` spans it; `.itflow-ov-stats` stays flex), and the attention items of `dashboardAttention()` and `clientOverviewAttention()` take `one`, used when the count is 1. `formatAssignee()` highlights unassigned in warning, `ticketBillableHtml()` draws not billable in `bg-body-secondary`, and `ticketSlaState()` gives `breached` for an open ticket with a `ticket_response_sla_met` or `ticket_resolution_sla_met` of 0 or a deadline in the past. `includes/filter_footer.php` links the first, last and neighboring pages with an ellipsis between, in place of every tenth page. The list pages render `tagPills()` only for a row with tags, and `agent/includes/inc_client_top_head.php` passes `$can_edit` false. `categoryAddButtonHtml()` and `quickAddButton()` are called with their default `btn-outline-secondary` everywhere. `js/app.js` focuses the dialog again on the next tick when AdminLTE's `shown.bs.modal` handler has put focus on its `.btn-close`. - Starter content: `starterRenamed()` in `admin/post/starter_content_model.php` maps a starter item's old name, keyed as `starterExistingNames()` keys it, to its new one. Tags and canned responses here under the old name count as present (`starterExistingRenamed()`, `starterCannedResponseNames()`), `starterUpdateCannedResponses()` renames one before replacing it, and `demoAttachTags()` falls back to the old tag name. `demoDataRenamed()` holds the demo products' old name and description and the errand trip's old purpose; `demoProductId()` finds a demo product either way for load and removal, and a load renames an old one in place. +- `admin/starter_content.php` is rebuilt on the Maintenance page layout (a hero card, then the packs as a `list-group` sharing Get started's `.itflow-gs-pack-icon` and `.itflow-gs-pack-about`, and an At a glance card); `.itflow-starter-pack-cell` is gone. Update and Remove demo data are `confirm-link` buttons in place of `onsubmit` confirms. ## [26.11.8] diff --git a/admin/starter_content.php b/admin/starter_content.php index bb18caa32..5d7936d4c 100644 --- a/admin/starter_content.php +++ b/admin/starter_content.php @@ -1,5 +1,13 @@ Starter Content - the library of defaults for a typical MSP, pack by pack + * (starterContentPacks()), and the demo data. Laid out as the other Maintenance pages are: what + * it is and the one thing to do at the top, the packs and the demo data under it, and at a glance + * and how it works to the side. Pick which and Preview are includes/starter_content_pick.php, shared + * with Get started's Starter content step; js/starter_content.js keeps the ticks and counts in step. + */ + require_once "includes/inc_all_admin.php"; define('FROM_STARTER_CONTENT', true); @@ -12,214 +20,251 @@ $starter_content_packs = starterContentPacks(); // Each pack's items not here yet - for Pick which, and how many Add brings $starter_content_items = []; $starter_content_status = []; +$total_in_library = $total_missing = 0; foreach ($starter_content_packs as $pack => $pack_details) { $starter_content_items[$pack] = starterContentItems($mysqli, $pack); $total = starterContentTotal($pack); $missing = count($starter_content_items[$pack]); $starter_content_status[$pack] = ['total' => $total, 'missing' => $missing, 'present' => $total - $missing]; + $total_in_library += $total; + $total_missing += $missing; } +$total_present = $total_in_library - $total_missing; $demo_data_status = demoDataStatus($mysqli); $demo_data_loaded = count($demo_data_status['loaded']); +$demo_data_total = intval($demo_data_status['total']); -$total_missing = 0; -foreach ($starter_content_status as $pack_status) { - $total_missing = $total_missing + $pack_status['missing']; +// The top of the page says where the install stands +if (!$total_missing) { + $hero = ['tone' => 'success', 'icon' => 'fa-check', 'title' => 'Everything in the library is here']; +} elseif (!$total_present) { + $hero = ['tone' => 'primary', 'icon' => 'fa-seedling', 'title' => 'Start from a library of MSP defaults']; +} else { + $hero = ['tone' => 'primary', 'icon' => 'fa-seedling', 'title' => "$total_missing more to add from the library"]; } ?> -
-
-

Starter Content

- -
-
- - -
+
+ +
+ + +
+
+
+ +
+

+

+ Categories, tags, ticket and project templates, canned responses, vendor, document and license templates, and the products and services a typical MSP starts from. + Add what's useful - what you already have is never changed. +

+ +
+ + +
+ +
+
+
- -
-
-

- A library of opinionated defaults for a typical MSP. Add whichever packs are useful - on a - brand new install or on one that has been running for years. -

-

- Adding never overwrites or deletes anything. Anything already present under the same name is - skipped, so a pack can be added again later to pick up entries you removed by mistake, and - adding twice never produces duplicates. Pick which, under a pack, lists what it would add - as it will - look, with a preview of each template - to add only some of it. Everything added is editable and deletable - afterwards like any other record. Ticket templates, canned responses, vendor templates, document templates and license - templates added from an earlier version can be brought up to this one with Update - that one does replace what they hold. -

- -
- - - - - - - - - - - - $pack_details) { - $pack_status = $starter_content_status[$pack]; - ?> - - - - - - - + +
+ + +
+ + + + + +
+ + + + +
+ + + + + + + + +
+
+

Demo data

+
+
+
+ + + + Not added -
-
ContentIn libraryAlready hereWill be added
- -
- -
Add first, or these come in without them. - - -
- - - - - - -
- -
- - -
- - Nothing to add - - - -
- - -
- + +
+
+

Packs

+
+
+ $pack_details) { + $pack_status = $starter_content_status[$pack]; + $all_here = !$pack_status['missing']; + $can_update = !empty($pack_details['update']) && $pack_status['present']; + // Loading out of order works, it just produces less - said up front rather than + // leaving someone with 77 uncategorized products + $requires = $pack_details['requires'] ?? ''; + $needs_first = $requires && !empty($starter_content_status[$requires]['missing']) && !$all_here; + ?> +
+
+ +
+ +
+
+ + + All here + + + to add · of here + + +
+
+ +
Add first, or these come in without them.
+ + +
-
-
+
+

+ A made-up MSP's book of business for demos, training and screenshots - clients with their people, equipment, documentation, credentials, + tickets and billing, and your own side of the books, spread over the last two years so every report has history behind it. +

-

- Ticket templates bring their task lists, what they ask for and their request forms with them - - the request forms come in turned off, ready to turn on in each template's Client portal tab. Canned responses - come in shared, offered to every agent on the ticket categories they are for. Document templates come with what - they ask for and how often their documents are reviewed - who should have each is yours to set. License templates come with - their vendor - added from the vendor templates when it isn't here - and are sold as the products of the same name once those are - here; who should have each is yours to set too. Products are filed under income - categories and priced as starting points only - hardware and resold licensing come in at - zero because they are quoted per deal. -

- -
-
- -
-
-

Demo Data

-
-
- -

- A fictional book of business for demos, training and screenshots - clients - with the people, equipment, documentation, credentials, tickets and billing a typical MSP would be carrying for - them. Each one arrives with an onboarding project, an onboarding ticket per asset, response targets, racked - infrastructure, a documented switch port map, IP addresses and a supplier list. Managed, co-managed, break fix and hosting only - clients are all represented, most of them paid up to date and a few of them not. - Your own side of the business is generated too - bank accounts, suppliers, operating costs, recurring expenses, - transfers, catalog lines for the things you sell, closure days, monthly budgets, and a working diary of team - meetings, maintenance windows and the unbilled running around that never gets logged against a client. - Everything is spread across the last two years and dated relative to today, so the dashboard, - ticket queue, aging, profit and loss and every other report have real history behind them rather than one flat month. -

-

- This is sample data, not configuration. Nothing in it is labeled as demo data - the clients, tags and references - all read as real, which is the point. Removal matches the client names in - the library, so renaming a demo client stops it being removable. Contacts use addresses on the - reserved .example domain, which cannot receive mail, and the agreements are created with email - notification switched off. Anything shared - accounts, suppliers, response targets, tax rates, catalog lines and - calendars - is matched on more than its name, so records this install already had are never touched, and the - company side of the books is always built against accounts this page created rather than yours. -

- - -
- - This install already has client(s) of its own. - Demo data is meant for a demo or training install - it will sit alongside your real clients in every list, report and total until it is removed. -
- - - - - -

- Add the Categories and Tags packs above first, or the tickets, invoices and tags come in bare. -

- - -
- - -
- - - -

- demo client(s) are here: - -

- -
- -
- - -
- - -
- - -
+ +
+ This install has client of its own. + Demo data sits beside them in every list, report and total until it is removed - it is meant for a demo or training install. +
+ + +

+ Add the Categories and Tags packs first, or the tickets, invoices and tags come in bare. +

-
+ +
+ Which clients +
+ + + +
+
+ - +
+ +
+ + +
+ + +
+ + +
+ +
+
+
+ +
+ +
+
+

At a glance

+
+
    +
  • + In the library + in packs +
  • +
  • + Already here + +
  • +
  • + To add + None' ?> +
  • +
  • + Demo data + +
  • +
+
+ +
+
+

How adding works

+
+
+
    +
  • Adding never changes or removes anything. A name you already have is skipped, so a pack can be added again to bring back something deleted - never a duplicate.
  • +
  • Pick which, under a pack, lists what it would add as it will look, with a preview of each template. Untick what you don't want.
  • +
  • Update brings templates and canned responses added from an earlier version up to this one - it replaces what they hold.
  • +
  • Request forms come with the ticket templates, turned off. Canned responses come in shared. Products are priced as starting points - hardware and resold licensing at zero.
  • +
+
+
+ +
+
+

About demo data

+
+
+
    +
  • Nothing in it says demo - the clients, tags and references read as real, which is the point.
  • +
  • Removing it goes by the client names, so a renamed demo client stays.
  • +
  • Contacts are on the .example domain, which can't receive mail, and agreements come with notifications off.
  • +
  • Accounts, suppliers, response targets, tax rates, catalog lines and calendars you already had are never touched.
  • +
+
+
+ +
+
diff --git a/css/itflow_custom.css b/css/itflow_custom.css index 88d4a5574..2e7515ee3 100644 --- a/css/itflow_custom.css +++ b/css/itflow_custom.css @@ -9413,7 +9413,9 @@ a.itflow-portal-request:focus-visible { cursor: pointer; } .itflow-gs-packs .list-group-item.is-here .itflow-gs-pack-icon, -.itflow-gs-packs .list-group-item.is-here .fw-semibold { +.itflow-gs-packs .list-group-item.is-here .fw-semibold, +.itflow-starter-packs .list-group-item.is-here .itflow-gs-pack-icon, +.itflow-starter-packs .list-group-item.is-here .fw-semibold { opacity: .6; } .itflow-gs-pack-about { @@ -9566,10 +9568,6 @@ a.itflow-portal-request:focus-visible { .itflow-starter-pick-group:first-child { margin-top: .25rem; } -/* Maintenance > Starter Content - the list under its pack, in the first column */ -.itflow-starter-pack-cell { - min-width: 18rem; -} /* Preview - the facts as a list beside their labels, then what it says as it reads */ .itflow-starter-preview-facts { display: grid;