@velaro/cli 1.4.191 → 1.4.193
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,14 +3,14 @@ import { runCommand } from '../run.js';
|
|
|
3
3
|
|
|
4
4
|
// -- velaro workforce ----------------------------------------------------------
|
|
5
5
|
// Read-only view of each work schedule's Workforce Management settings.
|
|
6
|
-
// Backend: velaro-messaging GET WorkSchedules (siteId from the vmsg-siteId header, never an arg).
|
|
6
|
+
// Backend: velaro-messaging GET WorkSchedules/List (siteId from the vmsg-siteId header, never an arg).
|
|
7
7
|
// Writes are UI-only (Settings > Schedules): the WorkSchedules save replaces the whole set.
|
|
8
8
|
export const workforceCommand = {
|
|
9
9
|
command: 'workforce',
|
|
10
10
|
describe: 'Show Workforce Management settings (break allowance, enforce availability, after-hours action) per schedule',
|
|
11
11
|
builder: (y) => y.option('json', { type: 'boolean', default: false, describe: 'Raw JSON output' }),
|
|
12
12
|
handler: runCommand(async (argv) => {
|
|
13
|
-
const rows = await messagingGet('/WorkSchedules');
|
|
13
|
+
const rows = await messagingGet('/WorkSchedules/List');
|
|
14
14
|
const list = Array.isArray(rows) ? rows : (rows?.schedules ?? []);
|
|
15
15
|
if (argv.json) { console.log(JSON.stringify(list, null, 2)); return; }
|
|
16
16
|
if (list.length === 0) { console.log('No work schedules configured.'); return; }
|
package/package.json
CHANGED