mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
CourseLocation: change add-address key, cleaning add-address options
This commit is contained in:
parent
349a0e69f1
commit
82db55cfec
@ -37,9 +37,9 @@
|
||||
<li>
|
||||
<add-address
|
||||
v-if="!isPersonLocation"
|
||||
:key="key"
|
||||
:context="context"
|
||||
:key="addAddress.type"
|
||||
:options="addAddress.options"
|
||||
:options="options"
|
||||
:addressChangedCallback="submitTemporaryAddress"
|
||||
ref="addAddress">
|
||||
</add-address>
|
||||
@ -76,10 +76,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
addAddress: {
|
||||
type: 'accompanying_course_location',
|
||||
options: {
|
||||
/// Options override default.
|
||||
/// null value take default component value
|
||||
button: {
|
||||
text: {
|
||||
create: 'courselocation.add_temporary_address',
|
||||
@ -90,12 +87,6 @@ export default {
|
||||
create: 'courselocation.add_temporary_address',
|
||||
edit: 'courselocation.edit_temporary_address'
|
||||
},
|
||||
/// Display each step in page or Modal
|
||||
openPanesInModal: true,
|
||||
// Use Date fields
|
||||
//useDate: {
|
||||
// validFrom: true
|
||||
//},
|
||||
hideAddress: true
|
||||
}
|
||||
}
|
||||
@ -109,6 +100,13 @@ export default {
|
||||
...mapGetters([
|
||||
'isLocationValid'
|
||||
]),
|
||||
options() {
|
||||
return this.addAddress.options;
|
||||
},
|
||||
key() {
|
||||
return (this.context.edit) ? 'address_' + this.context.addressId
|
||||
: this.accompanyingCourse.type + '_' + this.accompanyingCourse.id ;
|
||||
},
|
||||
isTemporaryAddress() {
|
||||
return this.accompanyingCourse.locationStatus === 'address';
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user