Skip to content

Commit

Permalink
fix: Attempt already exist bug
Browse files Browse the repository at this point in the history
  • Loading branch information
vdvibhu20 committed Apr 19, 2024
1 parent 4bea1a3 commit 6fa04ae
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 13 deletions.
30 changes: 17 additions & 13 deletions app/pods/components/intermediate-contest-view/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,23 @@
</div>
<div class="row justify-content-center mt-4">
{{#if queued}}
<button
class="button-dashed button-orange font-sm extra-bold mr-2"
{{action (mut showStartDialog) false}} >
<i class="fas fa-arrow-left mr-3"></i>
<span class="d-sm-inline d-none">Take me back</span>
<span class="d-sm-none d-inline">Back</span>
</button>
<button
class="button-solid button-orange font-sm extra-bold ml-2"
{{action (perform createAttemptTask)}}>
<span class="d-sm-inline d-none">Yes, start with my test</span>
<span class="d-inline d-sm-none">Start</span>
</button>
{{#if createAttemptTask.isRunning}}
<div class="py-5">Starting Your Contest <span class="dot-loader"></span></div>
{{else}}
<button
class="button-dashed button-orange font-sm extra-bold mr-2"
{{action (mut showStartDialog) false}} >
<i class="fas fa-arrow-left mr-3"></i>
<span class="d-sm-inline d-none">Take me back</span>
<span class="d-sm-none d-inline">Back</span>
</button>
<button
class="button-solid button-orange font-sm extra-bold ml-2"
{{action (perform createAttemptTask)}}>
<span class="d-sm-inline d-none">Yes, start with my test</span>
<span class="d-inline d-sm-none">Start</span>
</button>
{{/if}}
{{else}}
<p>
<Timer @to={{queueTimeEnd}} @onEnd={{action (mut queued) true}} as |time|>
Expand Down
4 changes: 4 additions & 0 deletions app/pods/contests/contest/loading/route.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Route from '@ember/routing/route';

export default Route.extend({
});
2 changes: 2 additions & 0 deletions app/pods/contests/contest/loading/template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{outlet}}
<LoadingComponent class="w-100"/>
1 change: 1 addition & 0 deletions app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Router.map(function() {
this.route('problem');
this.route('project')
});
this.route('loading');
});
});
this.route('dcb', function() {
Expand Down
11 changes: 11 additions & 0 deletions tests/unit/pods/contests/contest/loading/route-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';

module('Unit | Route | contests/contest/loading', function(hooks) {
setupTest(hooks);

test('it exists', function(assert) {
let route = this.owner.lookup('route:contests/contest/loading');
assert.ok(route);
});
});

0 comments on commit 6fa04ae

Please sign in to comment.