Browse Source

Fix taskId in submissions page.

pull/6/head
t123yh 7 years ago
parent
commit
d871c95121
  1. 3
      libs/submissions_process.js
  2. 4
      views/submissions_item.ejs

3
libs/submissions_process.js

@ -1,5 +1,6 @@
const getSubmissionInfo = (s, displayConfig) => ({
taskId: s.id,
submissionId: s.id,
taskId: s.task_id,
user: s.user.username,
userId: s.user_id,
problemName: s.problem.title,

4
views/submissions_item.ejs

@ -25,7 +25,7 @@ Vue.component('submission-item', {
} else return 'Waiting';
},
submissionLink() {
return submissionUrl.replace('VanDarkholme', this.data.info.taskId);
return submissionUrl.replace('VanDarkholme', this.data.info.submissionId);
},
problemLink() {
return problemUrl.replace('VanDarkholme', this.data.info.problemId);
@ -50,7 +50,7 @@ Vue.component('submission-item', {
<script id="submissionItemTemplate" type="text/x-template">
<tr>
<td><a :href="submissionLink">#{{ data.info.taskId }}</a></td>
<td><a :href="submissionLink">#{{ data.info.submissionId }}</a></td>
<td ref="problemLabel"><a style="width: 230px; height: 22px; display: block; margin: 0 auto; line-height: 22px;" :href="problemLink">#{{ config.inContest ? alpha(data.info.problemId) : data.info.problemId }}. {{ data.info.problemName }}</a></td>
<td><a :href="submissionLink"><status-label :status="statusString"></status-label></a></td>

Loading…
Cancel
Save