diff --git a/src/api/mock/front-back-api-mock.json b/src/api/mock/front-back-api-mock.json index f4cae65..75ed41f 100644 --- a/src/api/mock/front-back-api-mock.json +++ b/src/api/mock/front-back-api-mock.json @@ -799,7 +799,7 @@ "responses": [ { "uuid": "6e32e8f4-b0c6-4ceb-b997-16f63b908234", - "body": "{\n \"total\": {{queryParam 'limit' 20}},\n \"submissions\": [\n {{#repeat (queryParam 'limit' 20)}}\n {\n \"id\": \"{{faker 'string.uuid'}}\",\n \"userId\": \"{{faker 'string.uuid'}}\",\n \"userName\": \"{{faker 'internet.userName'}}\",\n \"problemId\": {{faker 'number.int' min=100 max=1000}},\n \"totalScore\": {{faker 'number.int' min=100 max=1000}},\n \"maxTime\": {{faker 'number.int' min=100 max=1000}},\n \"maxMemory\": {{faker 'number.float' min=100 max=1000}},\n \"codeLength\": {{faker 'number.float' min=100 max=1000}},\n \"languageId\": \"{{body 'languageId'}},\n \"judgeStatus\": \"{{oneOf (array 'AC' 'WA' 'TLE' 'CE')}}\",\n \"submittedAt\": \"{{date '2020-01-01' '2024-11-05' 'yyyy-MM-dd\\'T\\'HH:mm:ss.SSS\\'Z\\''}}\"\n }\n {{/repeat}}\n ]\n}", + "body": "{\n \"total\": {{queryParam 'limit' 20}},\n \"submissions\": [\n {{#repeat (queryParam 'limit' 20)}}\n {\n \"id\": \"{{faker 'string.uuid'}}\",\n \"userId\": \"{{faker 'string.uuid'}}\",\n \"userName\": \"{{faker 'internet.userName'}}\",\n \"problemId\": {{faker 'number.int' min=100 max=1000}},\n \"totalScore\": {{faker 'number.int' min=100 max=1000}},\n \"maxTime\": {{faker 'number.int' min=100 max=1000}},\n \"maxMemory\": {{faker 'number.float' min=100 max=1000}},\n \"codeLength\": {{faker 'number.float' min=100 max=1000}},\n \"languageId\": \"{{body 'languageId'}}\",\n \"judgeStatus\": \"{{oneOf (array 'AC' 'WA' 'TLE' 'CE')}}\",\n \"submittedAt\": \"{{date '2020-01-01' '2024-11-05' 'yyyy-MM-dd\\'T\\'HH:mm:ss.SSS\\'Z\\''}}\"\n }\n {{/repeat}}\n ]\n}", "latency": 0, "statusCode": 200, "label": "", @@ -830,7 +830,7 @@ "responses": [ { "uuid": "1bcfbc5d-6c44-43ec-8b67-c936c3691a23", - "body": "{\n \"id\": \"{{urlParam 'submissionId'}}\",\n \"userId\": \"{{faker 'string.uuid'}}\",\n \"userName\": \"{{faker 'internet.userName'}}\",\n \"problemId\": {{faker 'number.int' min=100 max=1000}},\n \"totalScore\": {{faker 'number.int' min=100 max=1000}},\n \"maxTime\": {{faker 'number.int' min=100 max=1000}},\n \"maxMemory\": {{faker 'number.float' min=100 max=1000}},\n \"codeLength\": {{faker 'number.float' min=100 max=1000}},\n \"languageId\": \"{{body 'languageId'}},\n \"overallJudgeStatus\": \"{{oneOf (array 'AC' 'WA' 'TLE' 'CE')}}\",\n \"submittedAt\": \"{{date '2020-01-01' '2024-11-05' 'yyyy-MM-dd\\'T\\'HH:mm:ss.SSS\\'Z\\''}}\",\n \"judgeResults\": [\n {{#repeat 3}}\n {\n \"testcaseId\": \"{{faker 'string.uuid'}}\",\n \"testcaseName\": \"{{faker 'internet.userName'}}\",\n \"judgeStatus\": \"{{oneOf (array 'AC' 'WA' 'TLE' 'CE')}}\",\n \"score\": {{faker 'number.int' min=100 max=1000}},\n \"time\": {{faker 'number.int' min=100 max=1000}},\n \"memory\": {{faker 'number.float' min=100 max=1000}},\n }\n {{/repeat}}\n ]\n}", + "body": "{\n \"id\": \"{{urlParam 'submissionId'}}\",\n \"userId\": \"{{faker 'string.uuid'}}\",\n \"userName\": \"{{faker 'internet.userName'}}\",\n \"problemId\": {{faker 'number.int' min=100 max=1000}},\n \"totalScore\": {{faker 'number.int' min=100 max=1000}},\n \"maxTime\": {{faker 'number.int' min=100 max=1000}},\n \"maxMemory\": {{faker 'number.float' min=100 max=1000}},\n \"codeLength\": {{faker 'number.float' min=100 max=1000}},\n \"languageId\": \"{{body 'languageId'}}\",\n \"overallJudgeStatus\": \"{{oneOf (array 'AC' 'WA' 'TLE' 'CE')}}\",\n \"submittedAt\": \"{{date '2020-01-01' '2024-11-05' 'yyyy-MM-dd\\'T\\'HH:mm:ss.SSS\\'Z\\''}}\",\n \"judgeResults\": [\n {{#repeat 3}}\n {\n \"testcaseId\": \"{{faker 'string.uuid'}}\",\n \"testcaseName\": \"{{faker 'internet.userName'}}\",\n \"judgeStatus\": \"{{oneOf (array 'AC' 'WA' 'TLE' 'CE')}}\",\n \"score\": {{faker 'number.int' min=100 max=1000}},\n \"time\": {{faker 'number.int' min=100 max=1000}},\n \"memory\": {{faker 'number.float' min=100 max=1000}},\n }\n {{/repeat}}\n ]\n}", "latency": 0, "statusCode": 200, "label": "", diff --git a/src/components/PagedTable.vue b/src/components/PagedTable.vue new file mode 100644 index 0000000..d73786d --- /dev/null +++ b/src/components/PagedTable.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/src/utils/date.ts b/src/utils/date.ts new file mode 100644 index 0000000..7235a19 --- /dev/null +++ b/src/utils/date.ts @@ -0,0 +1,10 @@ +export const dateToString = (date: Date): string => { + return date.toLocaleString('ja-JP', { + year: 'numeric', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit', + second: '2-digit' + }) +} diff --git a/src/views/UserView.vue b/src/views/UserView.vue index 07a33eb..b81dc4b 100644 --- a/src/views/UserView.vue +++ b/src/views/UserView.vue @@ -1,9 +1,23 @@ - + + + diff --git a/src/views/user/UserSubmissions.vue b/src/views/user/UserSubmissions.vue index 9a01b5a..bb8e13c 100644 --- a/src/views/user/UserSubmissions.vue +++ b/src/views/user/UserSubmissions.vue @@ -1,8 +1,89 @@ - +