Added more docs.
This commit is contained in:
parent
f23002a6b8
commit
ed3152aa2b
|
@ -31,12 +31,20 @@ export interface ExerciseSubmission {
|
||||||
createdAt: string,
|
createdAt: string,
|
||||||
gym: SimpleGym,
|
gym: SimpleGym,
|
||||||
exercise: Exercise,
|
exercise: Exercise,
|
||||||
status: string,
|
status: ExerciseSubmissionStatus,
|
||||||
submitterName: string,
|
submitterName: string,
|
||||||
weight: number,
|
weight: number,
|
||||||
reps: number
|
reps: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum ExerciseSubmissionStatus {
|
||||||
|
WAITING = 'WAITING',
|
||||||
|
PROCESSING = 'PROCESSING',
|
||||||
|
FAILED = 'FAILED',
|
||||||
|
COMPLETED = 'COMPLETED',
|
||||||
|
VERIFIED = 'VERIFIED'
|
||||||
|
}
|
||||||
|
|
||||||
export interface Gym {
|
export interface Gym {
|
||||||
countryCode: string,
|
countryCode: string,
|
||||||
countryName: string,
|
countryName: string,
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
|
<!--
|
||||||
|
This is the submission page, where users can submit their lift to a particular
|
||||||
|
gym's leaderboards.
|
||||||
|
|
||||||
|
A high-level overview of the submission process is as follows:
|
||||||
|
|
||||||
|
1. The user uploads a video of their lift, and receives a `videoId` in return.
|
||||||
|
2. The user submits their lift's JSON data, including the `videoId`.
|
||||||
|
3. The API responds (if the data is valid) with the created submission, with the status WAITING.
|
||||||
|
4. Eventually the API will process the submission and status will change to either COMPLETED or FAILED.
|
||||||
|
|
||||||
|
-->
|
||||||
<template>
|
<template>
|
||||||
<q-page v-if="gym">
|
<q-page v-if="gym">
|
||||||
<q-form @submit="onSubmitted">
|
<q-form @submit="onSubmitted">
|
||||||
|
@ -50,6 +62,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<q-uploader
|
<q-uploader
|
||||||
|
id="uploader"
|
||||||
:url="getUploadUrl(gym)"
|
:url="getUploadUrl(gym)"
|
||||||
:label="$t('gymPage.submitPage.upload')"
|
:label="$t('gymPage.submitPage.upload')"
|
||||||
field-name="file"
|
field-name="file"
|
||||||
|
@ -83,6 +96,7 @@ import {
|
||||||
} from 'src/api/gymboard-api';
|
} from 'src/api/gymboard-api';
|
||||||
import {getGymFromRoute} from 'src/router/gym-routing';
|
import {getGymFromRoute} from 'src/router/gym-routing';
|
||||||
import SlimForm from 'components/SlimForm.vue';
|
import SlimForm from 'components/SlimForm.vue';
|
||||||
|
import {QUploader} from "quasar";
|
||||||
|
|
||||||
interface Option {
|
interface Option {
|
||||||
value: string,
|
value: string,
|
||||||
|
@ -99,6 +113,7 @@ let submissionModel = ref({
|
||||||
weightUnit: 'Kg',
|
weightUnit: 'Kg',
|
||||||
reps: 1,
|
reps: 1,
|
||||||
videoId: -1,
|
videoId: -1,
|
||||||
|
videoFile: null,
|
||||||
date: new Date().toLocaleDateString('en-CA')
|
date: new Date().toLocaleDateString('en-CA')
|
||||||
});
|
});
|
||||||
const weightUnits = ['Kg', 'Lbs'];
|
const weightUnits = ['Kg', 'Lbs'];
|
||||||
|
|
Loading…
Reference in New Issue