Skip to content

Game qa s4.2 #360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ const BadgeDetailPage: FC = () => {
if (activeTab === BadgeDetailsTabViews.manualAward) {
activeTabElement = <ManualAwardTab
badge={badgeDetailsHandler.data as GameBadge}
onManualAssign={() => setActiveTab(BadgeDetailsTabViews.awardedMembers)}
/>
}
if (activeTab === BadgeDetailsTabViews.batchAward) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import { generateCSV, manualAssignRequestAsync } from '../badge-details.function
import styles from './ManualAwardTab.module.scss'

export interface ManualAwardTabProps {
badge: GameBadge
badge: GameBadge,
onManualAssign: () => void
}

const ManualAwardTab: FC<ManualAwardTabProps> = (props: ManualAwardTabProps) => {
Expand Down Expand Up @@ -76,6 +77,7 @@ const ManualAwardTab: FC<ManualAwardTabProps> = (props: ManualAwardTabProps) =>
isOpen={showBadgeAssigned}
onClose={() => {
setShowBadgeAssigned(false)
props.onManualAssign()
}}
/>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@ export async function submitRequestAsync(request: CreateBadgeRequest): Promise<G
form.append('badge_description', request.badgeDesc)
form.append('active', request.badgeActive ? 'true' : 'false')

return xhrPostAsync(url, form)
return xhrPostAsync(url, form, {
headers: {
'Content-Type': 'multipart/form-data',
},
})
}