File tree Expand file tree Collapse file tree 6 files changed +21
-9
lines changed
Expand file tree Collapse file tree 6 files changed +21
-9
lines changed Original file line number Diff line number Diff line change 1111 Button ,
1212 } from ' flowbite-svelte' ;
1313
14+ import { addContestNameToTaskIndex } from ' $lib/utils/contest' ;
1415 import { taskGradeValues , type Task } from ' $lib/types/task' ;
1516 import { getTaskGradeLabel , removeTaskIndexFromTitle } from ' $lib/utils/task' ;
1617
4344 <TableBodyRow >
4445 <TableBodyCell >出典</TableBodyCell >
4546 <TableBodyCell >
46- {task .contest_id }
47+ {addContestNameToTaskIndex ( task .contest_id , task . task_table_index ) }
4748 </TableBodyCell >
4849 </TableBodyRow >
4950 <TableBodyRow >
Original file line number Diff line number Diff line change 1818 import ExternalLinkWrapper from ' $lib/components/ExternalLinkWrapper.svelte' ;
1919 import AcceptedCounter from ' $lib/components/SubmissionStatus/AcceptedCounter.svelte' ;
2020 import { getBackgroundColorFrom } from ' $lib/services/submission_status' ;
21- import { getContestNameLabel } from ' $lib/utils/contest' ;
21+ import { addContestNameToTaskIndex } from ' $lib/utils/contest' ;
2222 import { toWhiteTextIfNeeds , taskUrl , removeTaskIndexFromTitle } from ' $lib/utils/task' ;
2323
2424 export let grade: string ;
9292 />
9393 </TableBodyCell >
9494 <TableBodyCell class =" pl-0 xs:text-lg text-gray-700 dark:text-gray-300" >
95- {getContestNameLabel (taskResult .contest_id )}
95+ {addContestNameToTaskIndex (taskResult .contest_id , taskResult . task_table_index )}
9696 </TableBodyCell >
9797 <TableBodyCell class =" px-0" >
9898 {#if isAdmin }
Original file line number Diff line number Diff line change 1111
1212 import type { TaskResults } from ' $lib/types/task' ;
1313
14- import { getContestNameLabel } from ' $lib/utils/contest' ;
14+ import { addContestNameToTaskIndex } from ' $lib/utils/contest' ;
1515 import { removeTaskIndexFromTitle } from ' $lib/utils/task' ;
1616
1717 export let taskResults: TaskResults ;
4343 </a >
4444 </TableBodyCell >
4545 <TableBodyCell >
46- {getContestNameLabel (taskResult .contest_id )}
46+ {addContestNameToTaskIndex (taskResult .contest_id , taskResult . task_table_index )}
4747 </TableBodyCell >
4848 <TableBodyCell >{taskResult .updated_at .toLocaleString ()}</TableBodyCell >
4949 </TableBodyRow >
Original file line number Diff line number Diff line change 1010 } from ' flowbite-svelte' ;
1111
1212 import ExternalLinkWrapper from ' $lib/components/ExternalLinkWrapper.svelte' ;
13- import { getContestNameLabel } from ' $lib/utils/contest' ;
13+ import { addContestNameToTaskIndex } from ' $lib/utils/contest' ;
1414 import { taskUrl , removeTaskIndexFromTitle } from ' $lib/utils/task' ;
1515
1616 import type { WorkBookTaskBase , WorkBookTaskCreate , WorkBookTaskEdit } from ' $lib/types/workbook' ;
128128
129129 <!-- 出典 -->
130130 <TableBodyCell class =" xs:text-lg text-gray-700 dark:text-gray-300 truncate" >
131- {getContestNameLabel (task .contestId )}
131+ {addContestNameToTaskIndex (
132+ task .contestId ,
133+ getTaskTableIndex (tasksMapByIds , task .taskId ),
134+ )}
132135 </TableBodyCell >
133136
134137 <!-- 一言(コメント・ヒント) -->
Original file line number Diff line number Diff line change @@ -132,3 +132,9 @@ export const getContestNameLabel = (contest_id: string) => {
132132
133133 return contest_id . toUpperCase ( ) ;
134134} ;
135+
136+ export const addContestNameToTaskIndex = ( contestId : string , taskTableIndex : string ) : string => {
137+ const contestName = getContestNameLabel ( contestId ) ;
138+
139+ return `${ contestName } - ${ taskTableIndex } ` ;
140+ } ;
Original file line number Diff line number Diff line change 2222 import { getBackgroundColorFrom } from ' $lib/services/submission_status' ;
2323
2424 import { taskUrl , removeTaskIndexFromTitle } from ' $lib/utils/task' ;
25- import { getContestNameLabel } from ' $lib/utils/contest' ;
25+ import { addContestNameToTaskIndex } from ' $lib/utils/contest' ;
2626
2727 import type { WorkBookTaskBase } from ' $lib/types/workbook' ;
2828 import type { TaskResult , TaskGrade } from ' $lib/types/task' ;
5050
5151 const getContestNameFrom = (taskId : string ): string => {
5252 const contestId = getContestIdFrom (taskId );
53- return getContestNameLabel (contestId );
53+ const taskTableIndex = getTaskTableIndex (taskId );
54+
55+ return addContestNameToTaskIndex (contestId , taskTableIndex );
5456 };
5557
5658 const getTaskName = (taskId : string ): string => {
You can’t perform that action at this time.
0 commit comments