diff --git a/CHANGELOG.md b/CHANGELOG.md index 4adf49d38..a3cd78e32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -136,6 +136,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u - Knowledge Base articles: files - a script, a form, a vendor's guide - go with an article, added on its page, up to 20, of the kinds Files takes. Whoever can read the article can download them: your team, its clients' contacts in the portal, or anyone on the public help center. PDF on an article's page takes it as a PDF. With AI set up for documentation, Review with AI reads an article and says whether it looks good, needs work or is out of date, what to fix or check, and - for an article clients or anyone can read - anything about one client or its systems that shouldn't be in it, with a summary to use. Copying an article copies its files. - Invoices: an invoice a recurring invoice's autopay pays now says so - beside its number and under Payment on its page, and under its due date in the invoices list: which card and when (Autopay Dec 1), once it's sent for a draft, Autopay won't charge when the card runs out before the due date or the payment provider is turned off, and Autopay didn't pay it for one still owed after its due date, with why when the card was declined. An invoice that fell due before autopay was set up isn't marked. The client's link to the invoice says autopay will pay it, and when, so they don't pay it twice - as the client portal already did. - Documents: how often a document is reviewed can be set on the document itself, from How often beside its review - every 3 months to every 2 years, never, or as its template says. A document with no template can be reviewed on a schedule too; it shows Review due on Files, its client's overview and the reports like any other. Changing it doesn't count as reviewing it. +- Files: drag a file or document onto a folder on the left to move it there - tick several first and drag one of them to move them all. A folder drags onto another to go inside it, with everything in it, or onto Top level to come out. Holding over a closed folder opens it, and the folders in the path above the list take a drop too. Files from your computer dropped on a folder on the left upload into it. Each move goes in the audit log. - Modules: Admin > Settings > Modules has five more switches, to take out of ITFlow what your business doesn't use - Dispatch, which comes with Ticketing; Bookkeeping, Purchasing and Trips, which come with invoicing; and the Calendar. Each part is off while the one it comes with is, and shows faded under it. Switched off, a part leaves the menus, the dashboard, search, the reports and the API, and its pages and windows say it is off. Nothing in it is deleted - switched back on, it is all there. Dispatch, Bookkeeping, Trips and the Calendar start on, as before. - Bookkeeping: switch it off when your books are kept somewhere else. Accounts, Transactions, Transfers, Reconcile and the statement imports go, and nobody picks an account: payments and income go into the default payment account, and expenses come out of the default expense account - both in Admin > Settings > Defaults, or the first account when there's no default. An expense is paid by The business or Paid personally. The dashboard leaves out the account balances, and the Tax Package its Accounts section. - Calendar: switched off, the calendar, its events and the calendar feeds go - a subscribed calendar stops getting them. Tickets are still booked from the ticket and on Dispatch, and booked work still shows on the dashboard. @@ -303,6 +304,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u - `libs/tinymce` trimmed to what ITFlow loads, 5.3 MB to 2.6 MB: the 10 plugins in `js/app.js` and `js/portal.js` (autolink, autoresize, autosave, code, codesample, fullscreen, image, link, lists, table), the `oxide` and `oxide-dark` skins and the `default` and `dark` content styles. The 19 other plugins are gone - `media`, where TinyMCE's GHSA-mf2p-h6hf-fcwm was, among them - with the `tinymce-5` skins and the `document`, `writer` and `tinymce-5` content styles. `libs/fontawesome-free/webfonts` keeps only its `.woff2` and `.woff` fonts, 2.8 MB to 0.4 MB, as browsers take the first format they can read and every one ITFlow supports reads `.woff2`; the `.eot`, `.svg` and `.ttf` copies were for Internet Explorer and very old Safari. CONTRIBUTING's `libs/` row now says an update replaces only the files already there. - Stripe customers Stripe no longer has: new `billingStripeCustomerGone($e)` in `functions/billing_pay.php` - an `InvalidRequestException` with code `resource_missing` on the `customer` parameter ("No such customer: 'cus_...'") - and `billingStripeCustomerForget($client_id, $customer_id)`, which deletes the `client_payment_provider` row only while it still holds that customer, removes the client's saved cards through `paymentCardRemove()` (so the autopay on them goes with each recurring invoice's history saying why), and logs, audits and `appNotify()`s it. Used where the stored customer goes to Stripe: `billingStripeCheckoutIntent()` and the guest pay page's PaymentIntent (`guest/guest_ajax.php`) retry once without a customer; `billingStripeChargeSaved()` returns a message for the client; the portal's `create_stripe_checkout` answers `{reload: true}` with a flash, and `js/portal_stripe.js` reloads into the Add a card step; `stripe_save_card`, Charge Saved Card (`agent/post/payment.php`) and the nightly autopay (`cron/nightly_tasks.php`) record what happened. Any other Stripe error is handled as before. `js/autopay_setup_stripe.js` is gone - nothing has loaded it since `js/portal_stripe.js` took over the portal's card form, and it was the version that never checked the server's answer. - `Clients-Template.csv` is gone from the top folder - nothing linked to it, and the Import window gives each kind's template. +- Files: `agent/js/files.js` drags list rows and grid cards (`[data-files-item]`, with `data-id` and `data-folder-id`) and tree folders (`[data-folder-drag]`) onto `[data-folder-drop]` - the tree's rows and the path's crumbs, only for agents with Modify on Support. Files and documents post `bulk_move_files`, which now leaves an item already in the folder alone rather than logging a move. A folder posts the new `move_folder` (`agent/post/folder.php`) with `folder_id` and `parent_folder`, refused for a folder that isn't the client's or one inside the folder moved; the same parent is a no-op. Files from the computer dropped on a tree folder open Upload with that folder (`[data-files-upload]`). ## [26.11.8] diff --git a/agent/files.php b/agent/files.php index c66b18fac..a66b31929 100644 --- a/agent/files.php +++ b/agent/files.php @@ -9,6 +9,10 @@ * details, what they are linked to); documents open their page. Files can be * dropped straight onto the list to upload them into the folder on show. * + * Files, documents and folders drag onto a folder in the tree or the path to + * move there - the ticked ones together (agent/js/files.js). Files from the + * computer dropped on a folder in the tree upload into it. + * * Documents can be tagged; filtering by a tag shows the documents with it - * from every folder at the top level, like a search. * @@ -274,6 +278,15 @@ function filesItemMenu($item) { return $html; } +/** What makes a file or document draggable onto a folder - nothing when it can't be moved from here. */ +function filesDragAttr($item) { + global $can_edit, $archived; + if (!$can_edit || !empty($item['archived']) || $archived) { + return ''; + } + return ' draggable="true" data-files-item="' . $item['kind'] . '" data-id="' . $item['id'] . '" data-folder-id="' . $item['folder_id'] . '" data-name="' . escapeHtml($item['name']) . '"'; +} + /** "in Folder / Sub" for a search result outside the folder on show. */ function filesFolderNote($item) { global $folder_tree, $folder_id, $client_id; @@ -304,7 +317,8 @@ function filesFolderTree($parent_id, $depth = 0) { . ''; } $html .= '