proper handling of feedback types
This commit is contained in:
@ -55,7 +55,7 @@ export default function FeedbackForm({ publisherId, onDone }) {
|
||||
assignmentId: 0,
|
||||
publisherId: publisherId,
|
||||
date: new Date(),
|
||||
placementCount: 0,
|
||||
placementCount: 1,
|
||||
videoCount: 0,
|
||||
returnVisitInfoCount: 0,
|
||||
conversationCount: 0
|
||||
@ -72,9 +72,9 @@ export default function FeedbackForm({ publisherId, onDone }) {
|
||||
|
||||
const handleSubmit = async (e) => {
|
||||
e.preventDefault();
|
||||
item.
|
||||
item.publisher = { connect: { id: pubId } };
|
||||
item.type = ReportType.Feedback;
|
||||
item.publisher = { connect: { id: pubId } };
|
||||
//ToDo: create dedicated feedback type instead of using placementCount for subtype
|
||||
item.type = item.placementCount === 1 ? ReportType.Feedback_Problem : (item.placementCount === 2 ? ReportType.Feedback_Suggestion : ReportType.Feedback);
|
||||
delete item.assignmentId;
|
||||
|
||||
try {
|
||||
|
Reference in New Issue
Block a user