diff --git a/CHANGELOG.md b/CHANGELOG.md index bc8aaa78e..a28b94a98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -130,6 +130,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u - Purchasing: an agent who can only see some clients only sees the purchase orders whose lines are all for clients they can see. A purchase order's History shows who made, sent, approved, ordered, received and billed it, and it is in the audit log. From Mountaineer IT's build of ITFlow. - Menu: fewer entries to scroll past. Recurring Expenses is now a tab on Expenses, and Transfers a tab on Transactions, with the tabs across the top of each page. Purchasing is one entry with its pages as tabs, and its number is the purchase orders waiting for your approval - otherwise the items waiting to be ordered. - Client menu: Calendar, Racks, Certificates, Shared Links, Services and Trips stay out of a client's menu while the client has none of them, when two or more are empty, so the menu is shorter for most clients. More, at the bottom of the menu, shows them - to add a client's first rack, say. Each comes back as soon as the client has one, and always shows on its own page. +- Admin menu: eight entries shorter, nine with texting set up. Templates is one entry under Lists & Templates, with Tickets, Projects, Canned Responses, Contracts, Vendors, Licenses and Documents as tabs across its pages. Logs, under Maintenance, has Audit Logs, Sign-ins and App Logs as tabs. Text Messaging has Setup and, once texting is set up, Messages, with the texts that failed to send in the last week counted on the menu. Where ITFlow points you to one of these pages, it now says where it is - Admin > Templates > Tickets, say. ### Bug Fixes @@ -273,6 +274,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u - Microsoft Graph mail: database 3.9.2 adds `config_mail_graph_token`, `config_mail_graph_token_expires_at` and `config_mail_graph_scopes` to `settings`. New `functions/mail_graph.php`: `mailGraphToken($permission, $fresh)` trades the mailbox's refresh token for a Graph token (scope `offline_access https://graph.microsoft.com/.default`), keeps it with the scopes it carries and the new refresh token Microsoft hands back, and returns it when it carries `Mail.Send` or `Mail.ReadWrite` - otherwise null, and SMTP or IMAP are used. An app that can't use Graph is asked again after `MAIL_GRAPH_RECHECK_MINUTES` (60), or after `mailGraphForget()` (the OAuth tab's save and Connect). When the cached scopes already had a mail permission and the renewal fails, it throws with Microsoft's reason, so the email or the run stops with it rather than falling back. `mailGraphSend()` posts the finished MIME to `/me/sendMail`, or past `MAIL_GRAPH_MIME_LIMIT` (3 MB) makes a draft, adds the attachments (upload sessions over 3 MB) and sends it, deleting the draft on failure. `mailGraphMailbox()` returns `MailGraphMailbox` (`functions/mail_graph_mailbox.php`), standing in for the parts of ImapEngine `cron/ticket_email_parser.php` uses: unread, unflagged mail oldest first, each read by ImapEngine's `FileMessage` from its MIME, with read, flagged and move done through Graph. `mailGraphMailboxTest()` and `mailGraphState()` serve the Tests and OAuth tabs. The Exchange token renewals (`cron/mail_queue.php`, `cron/ticket_email_parser.php` and the Tests tab) now send `scope` (`MAIL_MICROSOFT_EXCHANGE_SCOPE`), so a refresh token last renewed for Graph still gives an Exchange token. `MAIL_GRAPH_URL` and `MAIL_MICROSOFT_LOGIN_URL` can be defined in config.php to point at a test server. From Mountaineer IT's build of ITFlow. - Purchase orders: database 3.9.3 adds `order_items` (the To Order list - `order_item_status` waiting / ordered / received, `order_item_source` manual / reorder), `purchase_orders` (UNIQUE `po_prefix`, `po_number`; `po_ship_to_office_id` NULL for another address in `po_ship_to`; `po_expense_id` for the vendor bill), and `po_items`, `po_receipts` and `po_tracking`, each cascading from its purchase order. `settings` gets `config_po_prefix` ('PO-'), `config_po_next_number`, `config_po_approval` (0) and `config_po_approval_over`, and `modules` gets `module_procurement` - the name and the `product_vendor_id` link match Mountaineer IT's build. Everything is in the new `functions/purchase_orders.php`: `poReady()` is false until the update has run and `poLevel()` is 0 while invoicing is off; `poRequireLevel()` and `poForRequest()` stop a page, handler or window with the reason (`poOffReason()`) or the role refusal, and `poForRequest()` also refuses a PO with a line for a client the agent can't reach (`poAccessible()`; lists use `poScopeSql()`). Numbers come from `poNextNumber()` under `GET_LOCK`, with `poCreate()` retrying on a duplicate. `poMarkOrdered()` approves a draft itself when `poNeedsApproval()` says no, noting why; `poSendForApproval()` and `poDecide()` notify through `poTell()` (bell and `emailQueue()`), and `poMayApprove()` keeps a non-admin from approving their own unless they are the only approver. `poReceive()` puts own-stock lines of a tracked product on the shelf with `productStockMove(..., 'received')` (Sales at 2) and turns client lines into assets - an asset, its primary interface '01', an asset_history row and an audit entry each, up to `PO_ASSETS_MAX` (50) a line (Support at 2) - and `poUndoReceipt()` reverses one receipt. `poRecordBill()` records the expense with `expenseSave()` and sets `stock_expense_id` on the stock it received. `poPdf()` draws on `BillingPdf`, and `poEmail()` attaches it with `billingEmailPdf()` and queues it with `emailQueue()`. History is the 'Purchase Order' kind in `auditLogKinds()`. `permissionRefusedText()` reads an optional `full` from `roleModuleInfo()` for a module whose Full level isn't deleting. Pages: `agent/to_order.php`, `purchase_orders.php`, `purchase_order.php`, `receiving.php`; windows in `agent/modals/purchasing/`; handlers in `agent/post/purchase_order.php`; settings in `admin/settings_purchase_order.php`; `js/purchase_orders.js`. From Mountaineer IT's build of ITFlow. - Menus: `pageTabsHtml()` (`functions/format.php`) draws tabs across pages that share one side nav entry - `expenseTabsHtml()` for Expenses and Recurring, `poTabsHtml()` for To Order, Purchase Orders and Receiving. The side nav drops Recurring Expenses (and `$num_recurring_expenses` from `get_side_nav_counts.php`), Transfers and the PURCHASING header; the BILLING header shows for roles with Sales or Purchasing. `client_side_nav.php` marks a quiet item `data-nav-quiet hidden` when its count is 0, it isn't the page open and two or more are quiet, and adds More (`data-nav-more`, handled in `js/app.js`). `inc_all_client.php` adds `$num_calendar_bookings` - open tickets booked from today - when a client has no upcoming events, so its Calendar still shows booked work. +- Admin menu: `adminNavGroups()` (`functions/settings.php`) lists the admin pages that share one side nav entry - logs, templates and text messaging - with each page's file, icon, label, record pages and badge count, leaving out pages for modules that are off and Messages until a texting provider is active. `adminNavGroupItemHtml()` draws the entry and `adminNavGroupTabsHtml()` the tabs atop each page (none for a group of one). The TEMPLATES and Sign-ins entries and the separate Audit Logs, App Logs and Text Messages entries are gone from `admin/includes/side_nav.php`, and the on-screen paths to those pages - in the import windows, onboarding, API errors and AI errors - say Admin > Templates > ..., Admin > Logs > ... or Admin > Text Messaging > Messages. ## [26.11.8] diff --git a/admin/app_logs.php b/admin/app_logs.php index 9395d9baf..009fccd0e 100644 --- a/admin/app_logs.php +++ b/admin/app_logs.php @@ -85,6 +85,8 @@ $filters_url = function ($modal) use ($dtf, $dtt, $view, $category_filter) { ?> += adminNavGroupTabsHtml('logs') ?> +
API Keys
-Sign-ins
- -Agent Banners
AI Providers
-Text Messaging
- -Project Templates
- -Ticket Templates
- -Canned Responses
- -Contract Templates
- -Vendor Templates
- -License Templates
- -Document Templates
- -Audit Logs
- -App Logs
- -A file exported from Admin > Canned Responses in this or another ITFlow. They come in shared, offered to everyone. The ticket categories they are offered on are matched by name, and made when they aren't here; a status after the reply is matched by name too.
+A file exported from Admin > Templates > Canned Responses in this or another ITFlow. They come in shared, offered to everyone. The ticket categories they are offered on are matched by name, and made when they aren't here; a status after the reply is matched by name too.
A file exported from Admin > Document Templates in this or another ITFlow. Each comes in with its images, its fill-ins and how often its documents are reviewed. A new one is required of no one until you say who should have one on its page.
+A file exported from Admin > Templates > Documents in this or another ITFlow. Each comes in with its images, its fill-ins and how often its documents are reviewed. A new one is required of no one until you say who should have one on its page.
A file exported from Admin > License Templates in this or another ITFlow. Each comes in with what a license made from it starts with. Its vendor is the vendor template here of that name, or one added from the file; what it is sold as, the product here of that name. A new one is required of no one until you say who should have it on its page.
+A file exported from Admin > Templates > Licenses in this or another ITFlow. Each comes in with what a license made from it starts with. Its vendor is the vendor template here of that name, or one added from the file; what it is sold as, the product here of that name. A new one is required of no one until you say who should have it on its page.
A file exported from Admin > Ticket Templates in this or another ITFlow. Categories and tags they use are matched by name, and made when they aren't here. A request form comes in turned off - turn it on in the template's Client portal tab.
+A file exported from Admin > Templates > Tickets in this or another ITFlow. Categories and tags they use are matched by name, and made when they aren't here. A request form comes in turned off - turn it on in the template's Client portal tab.
A file exported from Admin > Vendor Templates in this or another ITFlow. Each comes in with what a vendor made from it starts with, and is required of no one until you say who should have it on its page.
+A file exported from Admin > Templates > Vendors in this or another ITFlow. Each comes in with what a vendor made from it starts with, and is required of no one until you say who should have it on its page.
No contract templates yet - a template fills in the type, term, cover and terms of a new contract. - Make one in Admin > Contract Templates + Make one in Admin > Templates > Contracts
diff --git a/agent/modals/vendor/vendor_template_clients.php b/agent/modals/vendor/vendor_template_clients.php index 9e24cd225..863411271 100644 --- a/agent/modals/vendor/vendor_template_clients.php +++ b/agent/modals/vendor/vendor_template_clients.php @@ -20,7 +20,7 @@ while ($row = mysqli_fetch_assoc($sql)) { $templates[] = $row; } if (!$templates) { - echo json_encode(['error' => 'There are no vendor templates yet - an admin adds them under Admin > Vendor Templates.']); + echo json_encode(['error' => 'There are no vendor templates yet - an admin adds them under Admin > Templates > Vendors.']); exit; } diff --git a/agent/user/modals/canned_response_save.php b/agent/user/modals/canned_response_save.php index 5927f355d..5b603ae29 100644 --- a/agent/user/modals/canned_response_save.php +++ b/agent/user/modals/canned_response_save.php @@ -53,7 +53,7 @@ ob_start();' . escapeHtml($group['label']) + . ($count ? ' ' . $count . '' : '') + . '