Fix front-end, allow events to be created by a group, allow to get sessions from an event
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
<v-select
|
||||
v-bind:items="categories"
|
||||
v-model="group.category"
|
||||
item-text="name"
|
||||
item-text="title"
|
||||
item-value="@id"
|
||||
label="Categories"
|
||||
single-line
|
||||
@@ -86,7 +86,7 @@
|
||||
create() {
|
||||
// this.group.organizer = "/accounts/" + this.$store.state.user.id;
|
||||
|
||||
eventFetch('/groups', this.$store, { method: 'POST', body: JSON.stringify(this.group) })
|
||||
eventFetch('/groups', this.$store, { method: 'POST', body: JSON.stringify({group: this.group}) })
|
||||
.then(response => response.json())
|
||||
.then((data) => {
|
||||
this.loading = false;
|
||||
@@ -98,7 +98,7 @@
|
||||
.then(response => response.json())
|
||||
.then((data) => {
|
||||
this.loading = false;
|
||||
this.categories = data;
|
||||
this.categories = data.data;
|
||||
});
|
||||
},
|
||||
getAddressData: function (addressData) {
|
||||
|
||||
@@ -69,21 +69,21 @@
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
</v-list>
|
||||
<v-container fluid grid-list-md v-if="group.groupAccounts.length > 0">
|
||||
<v-container fluid grid-list-md v-if="group.members.length > 0">
|
||||
<v-subheader>Membres</v-subheader>
|
||||
<v-layout row>
|
||||
<v-flex xs2 v-for="groupAccount in group.groupAccounts" :key="groupAccount.id">
|
||||
<router-link :to="{name: 'Account', params: {'id': groupAccount.account.id}}">
|
||||
<v-flex xs2 v-for="member in group.members" :key="member.id">
|
||||
<router-link :to="{name: 'Account', params: {'id': member.account.id}}">
|
||||
<v-badge overlap>
|
||||
<span slot="badge" v-if="groupAccount.role == 3"><v-icon>stars</v-icon></span>
|
||||
<span slot="badge" v-if="member.role == 3"><v-icon>stars</v-icon></span>
|
||||
<v-avatar size="75px">
|
||||
<img v-if="!groupAccount.account.avatarRemoteUrl"
|
||||
<img v-if="!member.account.avatarRemoteUrl"
|
||||
class="img-circle elevation-7 mb-1"
|
||||
src="http://lorempixel.com/125/125/"
|
||||
>
|
||||
<img v-else
|
||||
class="img-circle elevation-7 mb-1"
|
||||
:src="groupAccount.account.avatarRemoteUrl"
|
||||
:src="member.account.avatarRemoteUrl"
|
||||
>
|
||||
</v-avatar>
|
||||
</v-badge>
|
||||
@@ -162,7 +162,7 @@
|
||||
.then(response => response.json())
|
||||
.then((data) => {
|
||||
this.loading = false;
|
||||
this.group = data;
|
||||
this.group = data.data;
|
||||
});
|
||||
},
|
||||
deleteGroup() {
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
.then(response => response.json())
|
||||
.then((data) => {
|
||||
this.loading = false;
|
||||
this.groups = data;
|
||||
this.groups = data.data;
|
||||
});
|
||||
},
|
||||
deleteEvent(id) {
|
||||
|
||||
Reference in New Issue
Block a user