|
|
@@ -27,6 +27,7 @@
|
|
|
<q-separator class="q-my-lg" />
|
|
|
<entity-create v-if="projectLoaded && project.is_enabled_answering"
|
|
|
ref="entityCreate"
|
|
|
+ :key="entityCreateKey"
|
|
|
v-model:value="attendanceSheetsInputs"
|
|
|
:api="attendanceSheetsApi"
|
|
|
:default-layout="false" />
|
|
|
@@ -71,6 +72,7 @@ export default {
|
|
|
return {
|
|
|
mounted: false,
|
|
|
entityLoading: false,
|
|
|
+ entityCreateKey: Date.now(),
|
|
|
projectLoaded: false,
|
|
|
classroomLoaded: false,
|
|
|
project: new Project(),
|
|
|
@@ -143,8 +145,7 @@ export default {
|
|
|
to: { name: 'UserPanel.Profile.ClassroomInfo', params: { id: this.classroom.id } }
|
|
|
},
|
|
|
{
|
|
|
- label: this.classroom.title,
|
|
|
- to: { name: 'UserPanel.Profile.ClassroomInfo', params: { classroom_id: this.classroom.id, project_id: this.project.id } }
|
|
|
+ label: this.project.title
|
|
|
}
|
|
|
]
|
|
|
})
|
|
|
@@ -175,6 +176,7 @@ export default {
|
|
|
})
|
|
|
.catch(() => {
|
|
|
this.entityLoading = false
|
|
|
+ this.entityCreateKey = Date.now()
|
|
|
this.reloadProject()
|
|
|
})
|
|
|
},
|
|
|
@@ -198,8 +200,9 @@ export default {
|
|
|
this.projectLoaded = true
|
|
|
},
|
|
|
setAttendanceSheetsInputsValues () {
|
|
|
+ const answerAttachment = this.currentUserAttendanceSheet?.answer_attachment // ? this.currentUserAttendanceSheet.answer_attachment : false
|
|
|
FormBuilderAssist.setAttributeByName(this.attendanceSheetsInputs, 'answer_text', 'value', this.currentUserAttendanceSheet?.answer_text)
|
|
|
- FormBuilderAssist.setAttributeByName(this.attendanceSheetsInputs, 'answer_attachment', 'value', this.currentUserAttendanceSheet?.answer_attachment)
|
|
|
+ FormBuilderAssist.setAttributeByName(this.attendanceSheetsInputs, 'answer_attachment', 'value', answerAttachment)
|
|
|
},
|
|
|
reloadProject () {
|
|
|
this.$refs.projectEntityEdit.getData()
|