Skip to content

Commit

Permalink
Update client-side feedback properties to match Django model
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinEtchells committed Sep 9, 2024
1 parent 20d6618 commit e2c5737
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ class FeedbackButtons extends HTMLElement {
showFeedback(messageId) {
let collectedData = {
rating: 0,
text: "",
chips: /** @type {string[]}*/ ([]),
rating_text: "",
rating_chips: /** @type {string[]}*/ ([]),
};

const starIcon = `
Expand Down Expand Up @@ -182,11 +182,11 @@ class FeedbackButtons extends HTMLElement {
if (chip.checked) {
const text = this.querySelector(`[for="${chip.id}"]`)?.textContent;
if (text) {
collectedData.chips.push(text);
collectedData.rating_chips.push(text);
}
}
});
collectedData.text = textInput?.value || "";
collectedData.rating_text = textInput?.value || "";
sendFeedback();
showPanel(3);
}
Expand Down

0 comments on commit e2c5737

Please sign in to comment.