Module switches: Dispatch, Bookkeeping, Purchasing, Trips and Calendar can be switched off in Admin > Settings > Modules, Dispatch coming with ticketing and the other three with invoicing, each hidden from menus, dashboard, search, reports and the API and refused on its pages, windows and handlers while off; Purchasing starts off unless already in use, Bookkeeping off posts the default accounts in place of account pickers, database 3.9.4, new moduleOn, moduleOffText and bookkeepingAccount helpers, purchase order settings tile summary, 26.11.9 changelog entries

This commit is contained in:
johnnyq
2026-11-18 14:27:16 -05:00
parent 00724866e3
commit 9bcf0e433b
108 changed files with 772 additions and 167 deletions

View File

@@ -27,12 +27,12 @@ const DISPATCH_LENGTHS = [15, 30, 45, 60, 90, 120, 180, 240, 360, 480];
/** May the signed-in agent see Dispatch? */
function dispatchCan() {
return lookupUserPermission('module_support') >= 1;
return moduleOn('dispatch') && lookupUserPermission('module_support') >= 1;
}
/** May they book, move and assign there? */
function dispatchCanEdit() {
return calendarCanScheduleTickets();
return moduleOn('dispatch') && calendarCanScheduleTickets();
}
/** The agents who can be dispatched to - active, and able to work tickets (Support at Modify, or an admin): user_id => [id, name, color]. */