Skip to content
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',
},
})
}