Skip to content

Commit

Permalink
AIContestClassList 비밀번호 에러 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
minkyung00 committed Nov 21, 2021
1 parent 10034fa commit 1707260
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
19 changes: 19 additions & 0 deletions OJ-BE/account/migrations/0003_userprofile_submit_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 3.2.6 on 2021-11-20 16:30

import django.contrib.postgres.fields.jsonb
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('account', '0002_userprofile_user_join_contest'),
]

operations = [
migrations.AddField(
model_name='userprofile',
name='submit_info',
field=django.contrib.postgres.fields.jsonb.JSONField(default=list),
),
]
9 changes: 6 additions & 3 deletions OJ-FE/src/pages/oj/components/ModalView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<b-button
pill variant="outline-primary"
class="modal-default-button"
@click="goProblem (problemID)">
@click="goProblem()">
<b>입장하기</b>
</b-button>
</slot>
Expand All @@ -42,9 +42,12 @@
}
},
methods: {
goProblem (problemID) {
goProblem () {
if (this.passwordFromUser === this.problemPassword) {
this.$router.push({name: 'aiproblem-class-details', params: {problemID: problemID}})
this.$router.push({name: 'aiproblem-class-details', params: {problemID: this.problemID}})
console.log('p-id', this.problemID)
console.log('p-pwd', this.problemPassword)
console.log('pwd', this.passwordFromUser)
}
}
}
Expand Down
13 changes: 10 additions & 3 deletions OJ-FE/src/pages/oj/views/aicontest/AIContestClassList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@
<b-card-text class="problem-text">
<p class="content" style="font-size: 16px; float: right; margin-top: -45px;">{{problem.start_time | localtime('YYYY-M-D')}} - {{problem.end_time | localtime('YYYY-M-D')}}</p>
</b-card-text>
<b-button pill variant="outline-primary" @click="isModalViewed = true" size="sm" style="float: right; margin-top: -30px; font-size: 1.1rem;"><b>입장하기</b></b-button>

<ModalView v-if="isModalViewed" v-bind:problemID="problem._id" v-bind:problemPassword="problem.password" @close="isModalViewed = false"></ModalView>
<b-button pill variant="outline-primary" @click="modalButtonClick(problem._id, problem.password)" size="sm" style="float: right; margin-top: -30px; font-size: 1.1rem;"><b>입장하기</b></b-button>
<ModalView v-if="isModalViewed" v-bind:problemID="modalProblemID" v-bind:problemPassword="modalProblemPwd" @close="isModalViewed = false"></ModalView>
</b-card-body>
</b-card>
</div>
Expand Down Expand Up @@ -97,6 +96,8 @@
return {
// tagList: [],
isModalViewed: false,
modalProblemID: '',
modalProblwmPwd: '',
problemTableColumns: [
{
title: '#',
Expand Down Expand Up @@ -215,6 +216,12 @@
})
},
// 추가 부분
modalButtonClick (problemID, problemPwd) {
console.log('modal button')
this.isModalViewed = true
this.modalProblemID = problemID
this.modalProblemPwd = problemPwd
},
goRouter () {
this.$router.push({name: 'aiproblem-list'})
},
Expand Down

0 comments on commit 1707260

Please sign in to comment.