|
|
@@ -179,7 +179,7 @@ export default {
|
|
|
}),
|
|
|
computed: {
|
|
|
mainTitle () {
|
|
|
- if (this.$route.query.source === 'event') {
|
|
|
+ if (this.$route.query?.source === 'event') {
|
|
|
return 'ثبت نام در رویداد'
|
|
|
} else {
|
|
|
return 'ثبت نام در دوره آموزشی'
|
|
|
@@ -189,18 +189,18 @@ export default {
|
|
|
return 'تکمیل اطلاعات'
|
|
|
},
|
|
|
step2Title () {
|
|
|
- if (this.$route.query.source === 'event') {
|
|
|
+ if (this.$route.query?.source === 'event') {
|
|
|
return 'مشاهده جزییات و قوانین رویداد'
|
|
|
} else {
|
|
|
return 'مشاهده جزییات و قوانین دوره'
|
|
|
}
|
|
|
},
|
|
|
getTarget () {
|
|
|
- if (this.$route.query.source === 'event') {
|
|
|
+ if (this.$route.query?.source === 'event') {
|
|
|
return 'EVENT'
|
|
|
- } else if (this.$route.query.source === 'classroom') {
|
|
|
+ } else if (this.$route.query?.source === 'classroom') {
|
|
|
return 'TRAINING'
|
|
|
- } else if (this.$route.query.source === 'store') {
|
|
|
+ } else if (this.$route.query?.source === 'store') {
|
|
|
return 'STORE'
|
|
|
} else {
|
|
|
return 'NAV'
|
|
|
@@ -210,10 +210,10 @@ export default {
|
|
|
return 'inventory_2'
|
|
|
},
|
|
|
showDiscountSection () {
|
|
|
- return this.$route.query.type !== 'enrollment' && this.classroom.price !== 0
|
|
|
+ return this.$route.query?.type !== 'enrollment' && this.classroom.price !== 0
|
|
|
},
|
|
|
showPayStage () {
|
|
|
- return this.$route.query.type !== 'enrollment'
|
|
|
+ return this.$route.query?.type !== 'enrollment'
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -221,7 +221,7 @@ export default {
|
|
|
mounted () {
|
|
|
this.loadClassroomFromStore()
|
|
|
this.orderPrice = this.classroom.price
|
|
|
- if (this.$route.query.source === 'event') {
|
|
|
+ if (this.$route.query?.source === 'event') {
|
|
|
this.getEventTest()
|
|
|
}
|
|
|
this.mounted = true
|
|
|
@@ -237,9 +237,9 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
onComplete () {
|
|
|
- if (this.$route.query.type === 'register') {
|
|
|
+ if (this.$route.query?.type === 'register') {
|
|
|
this.createInvoiceForClassroomOrRegisterEvent()
|
|
|
- } else if (this.$route.query.type === 'enrollment') {
|
|
|
+ } else if (this.$route.query?.type === 'enrollment') {
|
|
|
this.enrollClassroom()
|
|
|
} else {
|
|
|
this.$router.push({ name: 'UserPanel.ShopPaymentFromWallet', query: this.$route.query })
|
|
|
@@ -305,7 +305,7 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.entityEdit.editEntity(false)
|
|
|
.then(() => {
|
|
|
- if (this.$route.query.type === 'register') {
|
|
|
+ if (this.$route.query?.type === 'register') {
|
|
|
this.createInvoiceForClassroomOrRegisterEvent()
|
|
|
} else {
|
|
|
this.$router.push({ name: 'UserPanel.ShopPaymentFromWallet', query: this.$route.query })
|
|
|
@@ -343,7 +343,7 @@ export default {
|
|
|
type: 'positive'
|
|
|
})
|
|
|
const eventRegistrationId = data.model.classroom_info.id
|
|
|
- if (this.$route.query.source === 'event') {
|
|
|
+ if (this.$route.query?.source === 'event') {
|
|
|
this.$router.push({ name: 'UserPanel.Profile.EventInfo', params: { id: eventRegistrationId } })
|
|
|
} else {
|
|
|
this.$router.push({ name: 'UserPanel.Profile.ClassroomInfo', params: { id: eventRegistrationId } })
|