1111 </div >
1212 </div >
1313 <div class =" grid grid-cols-3 gap-2" >
14- <div class =" bg-gray-50 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-700 border-gray-200 dark:border-gray-700 transition-all px-2 py-2 rounded-md border max-w-64 w-full flex items-center justify-between gap-2" v-for =" (task, index) in translationTasks" :key =" index" >
14+ <div
15+ class =" bg-gray-50 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-700 border-gray-200 dark:border-gray-700 transition-all px-2 py-2 rounded-md border max-w-64 w-full flex items-center justify-between gap-2"
16+ v-for =" (task, index) in translationTasks"
17+ :key =" index"
18+ >
1519 <span class =" truncate" >
1620 {{ task.state?.taskName }} to
1721 </span >
@@ -44,7 +48,7 @@ const currentPaginationWindow = ref({limit: 25, offset: 0});
4448const props = defineProps <{
4549 meta: any ;
4650 getJobTasks: (limit ? : number , offset ? : number ) => Promise <
47- {tasks : { state: Record <string , any >, status: string }[], total : number } >;
51+ {state: Record <string , any >, status: string }[]>;
4852 job: {
4953 id: string ;
5054 name: string ;
@@ -60,9 +64,7 @@ const props = defineProps<{
6064}>();
6165
6266onMounted (async () => {
63- const {tasks, total} = await props .getJobTasks (currentPaginationWindow .value .limit , currentPaginationWindow .value .offset );
64- translationTasks .value = tasks ;
65-
67+ translationTasks .value = await props .getJobTasks (currentPaginationWindow .value .limit , currentPaginationWindow .value .offset );
6668 websocket .subscribe (` /background-jobs-task-update/${props .job .id } ` , (data : { taskIndex: number , status? : string , state? : Record <string , any > }) => {
6769 if ( data .taskIndex <= currentPaginationWindow .value .offset + currentPaginationWindow .value .limit && data .taskIndex >= currentPaginationWindow .value .offset ) {
6870 if (data .state ) {
0 commit comments