Skip to content

Commit

Permalink
TEOC - Fix for the edit incident error with different displayname for…
Browse files Browse the repository at this point in the history
…mat (#74)
  • Loading branch information
v-royavinash authored Feb 23, 2023
1 parent f37e4b5 commit 2edf7b9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions EOC-TeamsFx/tabs/src/components/IncidentDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ class IncidentDetails extends React.PureComponent<IIncidentDetailsProps, IIncide
if (selectedValue.detail.length > 0) {
inputValidationObj.incidentCommandarHasError = false;
selctedIncCommander.push({
displayName: selectedValue.detail[0] ? selectedValue.detail[0].displayName : '',
displayName: selectedValue.detail[0] ? selectedValue.detail[0].displayName.replace(",", "") : '',
userPrincipalName: selectedValue.detail[0] ? selectedValue.detail[0].userPrincipalName : '',
id: selectedValue.detail[0] ? selectedValue.detail[0].id : ''
})
Expand All @@ -427,7 +427,7 @@ class IncidentDetails extends React.PureComponent<IIncidentDetailsProps, IIncide
}
// create user object for incident commander
incInfo.incidentCommander = {
userName: selectedValue.detail[0] ? selectedValue.detail[0].displayName : '',
userName: selectedValue.detail[0] ? selectedValue.detail[0].displayName.replace(",", "") : '',
userEmail: selectedValue.detail[0] ? selectedValue.detail[0].userPrincipalName : '',
userId: selectedValue.detail[0] ? selectedValue.detail[0].id : ''
}
Expand Down Expand Up @@ -698,12 +698,12 @@ class IncidentDetails extends React.PureComponent<IIncidentDetailsProps, IIncide
if (incInfo) {
incInfo["assignedUser"] = selectedValue.detail.map((user: any) => {
selectedUsersArr.push({
displayName: user.displayName,
displayName: user.displayName.replace(",", ""),
userPrincipalName: user.userPrincipalName,
id: user.id
});
return {
"userName": user ? user.displayName : "",
"userName": user ? user.displayName.replace(",", "") : "",
"userEmail": user ? user.userPrincipalName : "",
"userId": user ? user.id : "",
}
Expand All @@ -721,12 +721,12 @@ class IncidentDetails extends React.PureComponent<IIncidentDetailsProps, IIncide
if (incInfo) {
incInfo["assignedUser"] = selectedValue.detail.map((user: any) => {
selectedUsersArr.push({
displayName: user.displayName,
displayName: user.displayName.replace(",", ""),
userPrincipalName: user.userPrincipalName,
id: user.id
});
return {
"userName": user ? user.displayName : "",
"userName": user ? user.displayName.replace(",", "") : "",
"userEmail": user ? user.userPrincipalName : "",
"userId": user ? user.id : "",
}
Expand Down

0 comments on commit 2edf7b9

Please sign in to comment.