Skip to content

Commit

Permalink
Merge pull request #3328 from kris6673/more-dropdowns
Browse files Browse the repository at this point in the history
Fix dropdown functionality in Teams and OneDrive forms
  • Loading branch information
KelvinTegelaar authored Jan 17, 2025
2 parents 7d8ee7a + 155765b commit 9f2ba33
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 25 deletions.
49 changes: 38 additions & 11 deletions src/pages/teams-share/onedrive/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,57 @@ const Page = () => {
url: "/api/ExecSharePointPerms",
data: {
UPN: "ownerPrincipalName",
URL: "webUrl",
RemovePermission: false,
},
confirmText: "Select the User to add to this user's OneDrive permissions",
dropdown: {
url: "/api/listUsers",
labelField: "displayName",
valueField: "userPrincipalName",
},
fields: [
{
type: "autoComplete",
name: "onedriveAccessUser",
label: "Select User",
multiple: false,
creatable: false,
api: {
url: "/api/listUsers",
labelField: (onedriveAccessUser) =>
`${onedriveAccessUser.displayName} (${onedriveAccessUser.userPrincipalName})`,
valueField: "userPrincipalName",
addedField: {
displayName: "displayName",
},
},
},
],
},
{
label: "Remove permissions from OneDrive",
type: "POST",
url: "/api/ExecSharePointPerms",
data: {
UPN: "ownerPrincipalName",
TenantFilter: "TenantFilter",
URL: "webUrl",
RemovePermission: true,
},
confirmText: "Select the User to remove from this user's OneDrive permissions",
dropdown: {
url: "/api/listUsers?TenantFilter=TenantFilter",
labelField: "displayName",
valueField: "userPrincipalName",
},
fields: [
{
type: "autoComplete",
name: "onedriveAccessUser",
label: "Select User",
multiple: false,
creatable: false,
api: {
url: "/api/listUsers",
labelField: (onedriveAccessUser) =>
`${onedriveAccessUser.displayName} (${onedriveAccessUser.userPrincipalName})`,
valueField: "userPrincipalName",
addedField: {
displayName: "displayName",
},
},
},
],
},
];

Expand Down
41 changes: 27 additions & 14 deletions src/pages/teams-share/teams/business-voice/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,31 @@ const Page = () => {
url: "/api/ExecTeamsVoicePhoneNumberAssignment",
data: {
PhoneNumber: "TelephoneNumber",
TenantFilter: "TenantFilter",
PhoneNumberType: "NumberType",
locationOnly: false,
},
modalDropdown: {
url: "/api/listUsers?TenantFilter=TenantFilter",
labelField: "displayName",
valueField: "userPrincipalName",
},
confirmText: "Select the User to assign.",
fields: [
{
type: "autoComplete",
name: "input",
label: "Select User",
multiple: false,
creatable: false,
api: {
url: "/api/listUsers",
labelField: (input) => `${input.displayName} (${input.userPrincipalName})`,
valueField: "userPrincipalName",
},
},
],
confirmText: "Select the User to assign the phone number to.",
},
{
label: "Unassign User",
type: "POST",
url: "/api/ExecRemoveTeamsVoicePhoneNumberAssignment",
data: {
PhoneNumber: "TelephoneNumber",
TenantFilter: "TenantFilter",
AssignedTo: "AssignedTo",
PhoneNumberType: "NumberType",
},
Expand All @@ -41,14 +48,20 @@ const Page = () => {
url: "/api/ExecTeamsVoicePhoneNumberAssignment",
data: {
PhoneNumber: "TelephoneNumber",
TenantFilter: "TenantFilter",
locationOnly: true,
},
modalDropdown: {
url: "/api/ListTeamsLisLocation?TenantFilter=TenantFilter",
labelField: "Description",
valueField: "LocationId",
},
fields: [
{
type: "autoComplete",
name: "input",
label: "Emergency Location",
api: {
url: "/api/ListTeamsLisLocation",
labelField: "Description",
valueField: "LocationId",
},
},
],
confirmText: "Select the Emergency Location.",
},
];
Expand Down

0 comments on commit 9f2ba33

Please sign in to comment.