diff --git a/src/layouts/config.js b/src/layouts/config.js index 04ac4b62e3dc..33e0bb77e348 100644 --- a/src/layouts/config.js +++ b/src/layouts/config.js @@ -37,11 +37,11 @@ export const nativeMenuItems = [ { title: "Users", path: "/identity/administration/users" }, { title: "Risky Users", path: "/identity/administration/risky-users" }, { title: "Groups", path: "/identity/administration/groups" }, - { title: "Devices", path: "/identity/administration/devices" }, { title: "Group Templates", path: "/identity/administration/group-templates", }, + { title: "Devices", path: "/identity/administration/devices" }, { title: "Deleted Items", path: "/identity/administration/deleted-items" }, { title: "Roles", path: "/identity/administration/roles" }, { title: "JIT Admin", path: "/identity/administration/jit-admin" }, @@ -468,7 +468,7 @@ export const nativeMenuItems = [ title: "Timers", path: "/cipp/advanced/timers", roles: ["superadmin"], - } + }, ], }, ], diff --git a/src/pages/endpoint/autopilot/list-devices/index.js b/src/pages/endpoint/autopilot/list-devices/index.js index a913807cb792..b738be0ba6af 100644 --- a/src/pages/endpoint/autopilot/list-devices/index.js +++ b/src/pages/endpoint/autopilot/list-devices/index.js @@ -12,29 +12,35 @@ const Page = () => { type: "POST", url: "/api/ExecAssignAPDevice", data: { - TenantFilter: "Tenant", - userid: "id", - message: "message", - Device: "id", + device: "id", + serialNumber: "serialNumber", }, - confirmText: "Select the user to assign", - modalDropdown: { - url: "/api/listUsers", - labelField: "userPrincipalName", - valueField: "id", - addedField: { - userPrincipalName: "userPrincipalName", - addressableUserName: "displayName", - groupName: "displayName", + confirmText: "Select the user to assign the device to", + fields: [ + { + type: "autoComplete", + name: "user", + label: "Select User", + multiple: false, + creatable: false, + api: { + url: "/api/listUsers", + labelField: (user) => `${user.displayName} (${user.userPrincipalName})`, + valueField: "userPrincipalName", + addedField: { + userPrincipalName: "userPrincipalName", + addressableUserName: "displayName", + }, + }, }, - }, + ], color: "info", }, { label: "Delete Device", type: "POST", url: "/api/RemoveAPDevice", - data: { ID: "id", tenantFilter: "Tenant" }, + data: { ID: "id" }, confirmText: "Are you sure you want to delete this device?", color: "danger", },