Skip to content

Commit

Permalink
Merge pull request #198 from sharifrahaman/rating-issues-stop-empty-s…
Browse files Browse the repository at this point in the history
…tring

Rating issues pass expected values only
  • Loading branch information
sharifrahaman committed Nov 1, 2023
2 parents 44e660f + f179bd3 commit d2d35e0
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Project/src/MakeCall/CallSurvey.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,18 @@ export default class CallSurvey extends React.Component {

submitRating() {
const rating = {};
rating.overallRating = { score: this.state.overallRating, issues: [this.state.overallIssue] };
if (this.state.audioRating !== 0) rating.audioRating = { score: this.state.audioRating, issues: [this.state.audioIssue] };
if (this.state.videoRating !== 0) rating.videoRating = { score: this.state.videoRating, issues: [this.state.videoIssue] };
if (this.state.screenShareRating !== 0) rating.screenshareRating = { score: this.state.screenShareRating, issues: [this.state.screenShareIssue] };
rating.overallRating = { score: this.state.overallRating };
if (this.state.overallIssue) rating.overallRating.issues = [this.state.overallIssue];

if (this.state.audioRating !== 0) rating.audioRating = { score: this.state.audioRating };
if (this.state.audioIssue) rating.audioRating.issues = [this.state.audioIssue];

if (this.state.videoRating !== 0) rating.videoRating = { score: this.state.videoRating };
if (this.state.videoIssue) rating.videoRating.issues = [this.state.videoIssue];

if (this.state.screenShareRating !== 0) rating.screenshareRating = { score: this.state.screenShareRating };
if (this.state.screenShareIssue) rating.screenshareRating.issues = [this.state.screenShareIssue];

this.call.feature(Features.CallSurvey).submitSurvey(rating).then((res) => {
if (this.appInsights && this.state.improvementSuggestion !== '') {
this.appInsights.trackEvent({
Expand Down

0 comments on commit d2d35e0

Please sign in to comment.