|
@@ -172,7 +172,7 @@ export default {
|
|
|
mixins: [mixinAuth],
|
|
mixins: [mixinAuth],
|
|
|
data () {
|
|
data () {
|
|
|
const classroomId = this.$route.params.id
|
|
const classroomId = this.$route.params.id
|
|
|
- const userId = this.$store.getters['Auth/user'].id
|
|
|
|
|
|
|
+ // const userId = this.$store.getters['Auth/user'].id
|
|
|
return {
|
|
return {
|
|
|
mounted: false,
|
|
mounted: false,
|
|
|
tab: 'classroomInfo',
|
|
tab: 'classroomInfo',
|
|
@@ -305,10 +305,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
projectListInputs: [
|
|
projectListInputs: [
|
|
|
- { type: 'hidden', name: 'project__classroom', value: classroomId },
|
|
|
|
|
- { type: 'hidden', name: 'owner', value: userId }
|
|
|
|
|
|
|
+ { type: 'hidden', name: 'classroom', value: classroomId }
|
|
|
|
|
+ // { type: 'hidden', name: 'owner', value: userId }
|
|
|
],
|
|
],
|
|
|
- projectListApi: APIGateway.projectAttendanceSheets.APIAdresses.base,
|
|
|
|
|
|
|
+ // projectListApi: APIGateway.projectAttendanceSheets.APIAdresses.base,
|
|
|
|
|
+ projectListApi: APIGateway.project.APIAdresses.attendanceSheetsList,
|
|
|
projectListTable: {
|
|
projectListTable: {
|
|
|
columns: [
|
|
columns: [
|
|
|
{
|
|
{
|
|
@@ -323,35 +324,35 @@ export default {
|
|
|
required: true,
|
|
required: true,
|
|
|
label: 'شناسه',
|
|
label: 'شناسه',
|
|
|
align: 'left',
|
|
align: 'left',
|
|
|
- field: row => row.project_info.id
|
|
|
|
|
|
|
+ field: row => row.id
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: 'title',
|
|
name: 'title',
|
|
|
required: true,
|
|
required: true,
|
|
|
label: 'عنوان پروژه',
|
|
label: 'عنوان پروژه',
|
|
|
align: 'left',
|
|
align: 'left',
|
|
|
- field: row => row.project_info.title
|
|
|
|
|
|
|
+ field: row => row.title
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: 'creation_time',
|
|
name: 'creation_time',
|
|
|
required: true,
|
|
required: true,
|
|
|
label: 'زمان شروع',
|
|
label: 'زمان شروع',
|
|
|
align: 'left',
|
|
align: 'left',
|
|
|
- field: row => row.project_info?.beginning_doing_period ? ShamsiDate.getDateTime(row.project_info.beginning_doing_period) : '-'
|
|
|
|
|
|
|
+ field: row => row?.beginning_doing_period ? ShamsiDate.getDateTime(row.beginning_doing_period) : '-'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: 'creation_time',
|
|
name: 'creation_time',
|
|
|
required: true,
|
|
required: true,
|
|
|
label: 'زمان پایان',
|
|
label: 'زمان پایان',
|
|
|
align: 'left',
|
|
align: 'left',
|
|
|
- field: row => row.project_info?.ending_doing_period ? ShamsiDate.getDateTime(row.project_info.ending_doing_period) : '-'
|
|
|
|
|
|
|
+ field: row => row?.ending_doing_period ? ShamsiDate.getDateTime(row.ending_doing_period) : '-'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: 'status',
|
|
name: 'status',
|
|
|
required: true,
|
|
required: true,
|
|
|
label: 'وضعیت',
|
|
label: 'وضعیت',
|
|
|
align: 'left',
|
|
align: 'left',
|
|
|
- field: row => (new ProjectAttendanceSheets(row)).is_answer_verified_info.label
|
|
|
|
|
|
|
+ field: row => (new ProjectAttendanceSheets(this.getProjectAttendanceSheets(row))).is_answer_verified_info.label
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: 'actions',
|
|
name: 'actions',
|
|
@@ -393,6 +394,13 @@ export default {
|
|
|
|
|
|
|
|
return session.session_attendance_sheets[0]
|
|
return session.session_attendance_sheets[0]
|
|
|
},
|
|
},
|
|
|
|
|
+ getProjectAttendanceSheets (project) {
|
|
|
|
|
+ if (!project?.project_attendance_sheets || project.project_attendance_sheets.length === 0) {
|
|
|
|
|
+ return null
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return project.project_attendance_sheets[0]
|
|
|
|
|
+ },
|
|
|
goToLiveStreamUrl () {
|
|
goToLiveStreamUrl () {
|
|
|
window.open(this.classroom.live_streaming_url, '_blank')
|
|
window.open(this.classroom.live_streaming_url, '_blank')
|
|
|
},
|
|
},
|