Skip to content

Commit f4c26e4

Browse files
authored
Merge pull request #2178 from BacLuc/adapt-admin-to-api-platform
Adapt camp admin to api platform
2 parents f83ee7d + 25dbcc7 commit f4c26e4

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

frontend/src/components/dialog/DialogCategoryCreate.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default {
3737
data () {
3838
return {
3939
entityProperties: [
40-
'campId',
40+
'camp',
4141
'short',
4242
'name',
4343
'color',
@@ -53,7 +53,7 @@ export default {
5353
showDialog: function (showDialog) {
5454
if (showDialog) {
5555
this.setEntityData({
56-
campId: this.camp.id,
56+
camp: this.camp._meta.self,
5757
short: '',
5858
name: '',
5959
color: '#000000',
@@ -68,7 +68,7 @@ export default {
6868
methods: {
6969
createCategory () {
7070
return this.create().then(() => {
71-
this.api.reload(this.camp)
71+
this.api.reload(this.camp.categories())
7272
})
7373
}
7474
}

frontend/src/components/dialog/DialogCategoryForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default {
5555
},
5656
contentTypes () {
5757
return this.api.get().contentTypes().items.map(ct => ({
58-
value: ct,
58+
value: ct._meta.self,
5959
text: this.$tc('contentNode.' + camelCase(ct.name) + '.name')
6060
}))
6161
}

frontend/src/components/dialog/DialogMaterialListCreate.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ export default {
3131
data () {
3232
return {
3333
entityProperties: [
34-
'campId',
34+
'camp',
3535
'name'
3636
],
37-
entityUri: '/material-lists'
37+
entityUri: '/material_lists'
3838
}
3939
},
4040
watch: {
4141
showDialog: function (showDialog) {
4242
if (showDialog) {
4343
this.setEntityData({
44-
campId: this.camp.id,
44+
camp: this.camp._meta.self,
4545
name: ''
4646
})
4747
} else {

frontend/src/components/dialog/DialogPeriodCreate.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default {
3131
data () {
3232
return {
3333
entityProperties: [
34-
'campId',
34+
'camp',
3535
'description',
3636
'start',
3737
'end'
@@ -43,7 +43,7 @@ export default {
4343
showDialog: function (showDialog) {
4444
if (showDialog) {
4545
this.setEntityData({
46-
campId: this.camp.id,
46+
camp: this.camp._meta.self,
4747
description: '',
4848
start: '',
4949
end: ''

0 commit comments

Comments
 (0)