@tuki-io/tuki-widgets 0.0.219-dev.57 → 0.0.219-dev.58

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.
@@ -241,6 +241,29 @@ function toStatus(provisioningStatus) {
241
241
  }
242
242
  return provisioningStatus.toLowerCase() === 'active' ? 'active' : 'inactive';
243
243
  }
244
+ function toWorkspaceDevices(item, index) {
245
+ if (item.workspaceDevices?.length) {
246
+ return item.workspaceDevices.map(workspaceDevice => ({
247
+ id: workspaceDevice.deviceId,
248
+ kind: 'device',
249
+ label: workspaceDevice.model || workspaceDevice.mac,
250
+ model: workspaceDevice.model,
251
+ mac: workspaceDevice.mac,
252
+ }));
253
+ }
254
+ const device = item.device;
255
+ if (!device) {
256
+ return [];
257
+ }
258
+ const model = device.deviceType || device.userDeviceType || undefined;
259
+ return [{
260
+ id: device.pkid || device.webexUUID || device.name || `device-${index}`,
261
+ kind: 'device',
262
+ label: model || device.name || 'Unnamed device',
263
+ model,
264
+ mac: /^SEP/i.test(device.name || '') ? device.name.slice(3) : undefined,
265
+ }];
266
+ }
244
267
  function toWorkspace(item, index, isCucm) {
245
268
  const device = item.device;
246
269
  const firstDirectoryNumber = device.associatedDNs?.[0]?.directoryNumber ?? '';
@@ -251,13 +274,7 @@ function toWorkspace(item, index, isCucm) {
251
274
  capacity: null,
252
275
  location: item.site?.name || device.siteName || device.location || '',
253
276
  siteId: item.site?.id ?? null,
254
- devices: (item.workspaceDevices || []).map(workspaceDevice => ({
255
- id: workspaceDevice.deviceId,
256
- kind: 'device',
257
- label: workspaceDevice.model || workspaceDevice.mac,
258
- model: workspaceDevice.model,
259
- mac: workspaceDevice.mac,
260
- })),
277
+ devices: toWorkspaceDevices(item, index),
261
278
  scheduling: 'Not set',
262
279
  callingLicense: firstDirectoryNumber,
263
280
  provisioningType: 'On-premises',
@@ -987,9 +1004,9 @@ class WorkspacesComponent {
987
1004
  onMoveToMT(workspace) {
988
1005
  const dialogRef = this.dialog.open(WorkspaceConfirmDialogComponent, {
989
1006
  data: {
990
- title: `Upgrade workspace ${workspace.displayName} to Multi Tenant?`,
991
- message: `<p>Upgrading this workspace will prepare it for migration to Multi Tenant.</p>
992
- <p>During this process, the workspace configuration will be copied to the Multi Tenant environment.
1007
+ title: `Upgrade workspace ${workspace.displayName} to Webex Calling?`,
1008
+ message: `<p>Upgrading this workspace will prepare it for migration to Webex Calling.</p>
1009
+ <p>During this process, the workspace configuration will be copied to the Webex Calling environment.
993
1010
  The workspace will remain active on the current system until the Activate step is completed.</p>
994
1011
  <p>Do you want to continue?</p>`,
995
1012
  confirmButtonText: 'Yes, upgrade',