Skip to content

Commit

Permalink
Show Submission Detail for user
Browse files Browse the repository at this point in the history
root 가 아닌 일반 유저의 경우 submission-detail을 볼 수 없는 경우가 있어 수정 (user의 경우 testcase 정보는 볼수 없음)
  • Loading branch information
jimin9038 authored and dotoleeoak committed Aug 6, 2021
1 parent bbaf714 commit 1c17c89
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/pages/oj/views/problem/ProblemSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@
<b-table class="align-center"
:items="submission_detail.testcases"
:per-page="submission_detail_table_rows"
:fields="submission_detail_table_fields">
:fields="submission_detail_table_fields"
v-show="submission_detail.testcases">
<template #cell(result)="data">
<span :style="'color: '+resultTextColor(data.item.result)">{{data.item.result}}</span>
</template>
Expand Down Expand Up @@ -339,7 +340,7 @@ export default {
create_time: time.utcToLocal(data.create_time, 'YYYY-MM-DD HH:mm'),
result: JUDGE_STATUS[data.result].name,
bytes: new Blob([data.code]).size,
testcases: data.info.data && data.info.data.map(
testcases: data.info && data.info.data && data.info.data.map(
tc => {
return {
title: tc.test_case,
Expand Down

0 comments on commit 1c17c89

Please sign in to comment.