Compare commits

..

No commits in common. "b2153e647d30e54a8c7602d7644ef7a8d1bd705a" and "88bb1091a9bc56debcbfe8dbeff9b8a39ca0e25c" have entirely different histories.

2 changed files with 3 additions and 12 deletions

View File

@ -25,7 +25,7 @@ class FilterScope extends Filter
public function getQuery(): Builder public function getQuery(): Builder
{ {
$query = Membership::orderByRaw('member_id, activity_id, subactivity_id'); $query = (new Membership())->newQuery();
if ($this->active === true) { if ($this->active === true) {
$query = $query->active(); $query = $query->active();

View File

@ -43,7 +43,6 @@
<th>Beginn</th> <th>Beginn</th>
<th>Ende</th> <th>Ende</th>
<th>Aktiv</th> <th>Aktiv</th>
<th>Aktion</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -55,9 +54,6 @@
<td v-text="membership.from.human" /> <td v-text="membership.from.human" />
<td v-text="membership.to?.human" /> <td v-text="membership.to?.human" />
<td><ui-bool :value="membership.isActive" /></td> <td><ui-bool :value="membership.isActive" /></td>
<td>
<ui-action-button tooltip="Löschen" class="btn-danger" icon="trash" @click.prevent="onDelete(membership)" />
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -70,14 +66,9 @@
<script lang="js" setup> <script lang="js" setup>
import {useIndex, indexProps} from '@/composables/useIndex.js'; import {useIndex, indexProps} from '@/composables/useIndex.js';
import useSwal from '@/stores/swalStore.ts';
const swal = useSwal();
const props = defineProps(indexProps); const props = defineProps(indexProps);
const {data, meta, getFilter, setFilter, axios} = useIndex(props.data, 'membership');
async function onDelete(membership) { const {data, meta, getFilter, setFilter} = useIndex(props.data, 'memberships');
await swal.confirm('Mitgliedschaft löschen', `Mitgliedschaft von ${membership.member.fullname} löschen`);
await axios.delete(membership.links.destroy);
}
</script> </script>