Commit 6f27264e authored by janis.streib's avatar janis.streib 🦉
Browse files

ADD: use paginator for ou list as well

parent 3dccb3c3
Pipeline #114894 passed with stages
in 8 minutes and 6 seconds
......@@ -6,61 +6,63 @@
</b-checkbox>
<hr/>
<Loading :data="[ous, mgrs]">
<template v-for="ou in ous">
<b-card no-body :key="'card-account-' + ou.short_name" class="mb-4 shadow">
<template v-slot:header>
<b-row>
<b-col>
<h4>
{{ ou.name }} ({{ ou.short_name }})
</h4>
<p class="text-muted">Organisationseinheit</p>
</b-col>
</b-row>
</template>
<b-button block squared variant="outline-secondary" v-b-toggle="ou.short_name + '-collapse'">
OE-Betreuer<br/>
<font-awesome-icon class="collapse-icon" :icon="['fas','chevron-down']"/>
</b-button>
<b-collapse :id="ou.short_name + '-collapse'">
<b-table :items="mgrs2ou[ou.short_name]" :fields="ou_list_fields">
<template v-slot:cell(first_name)="data">
{{ mgrs[data.item.mgr_login_name].first_name }}
</template>
<template v-slot:cell(last_name)="data">
{{ mgrs[data.item.mgr_login_name].last_name }}
</template>
<template v-slot:cell(email)="data">
<b-link :href="'mailto:'+mgrs[data.item.mgr_login_name].email">
{{ mgrs[data.item.mgr_login_name].email }}
</b-link>
</template>
<template v-slot:head(actions)>
<b-button @click="assign_mgr(ou.short_name)" block variant="outline-success"
:id="'button-assign-mgr-' + ou.short_name">
<font-awesome-icon :icon="['fas', 'plus']"/>
</b-button>
<b-tooltip :target="'button-assign-mgr-' + ou.short_name" triggers="hover"
variant="success" placement="left">
Neuen Account zuordnen
</b-tooltip>
</template>
<template v-slot:cell(actions)="data">
<b-button-group class="d-flex">
<b-button @click="deleteMgrItem(data.item)" variant="outline-danger"
:id="'button-unassign-mgr-' + data.item.bcd_name">
<font-awesome-icon :icon="['fas', 'unlink']"></font-awesome-icon>
<Paginator :items="ous" items_per_page="15">
<template v-slot:item="card_data">
<b-card no-body :key="'card-account-' + card_data.item.short_name" class="mb-4 shadow">
<template v-slot:header>
<b-row>
<b-col>
<h4>
{{ card_data.item.name }} ({{ card_data.item.short_name }})
</h4>
<p class="text-muted">Organisationseinheit</p>
</b-col>
</b-row>
</template>
<b-button block squared variant="outline-secondary" v-b-toggle="card_data.item.short_name + '-collapse'">
OE-Betreuer<br/>
<font-awesome-icon class="collapse-icon" :icon="['fas','chevron-down']"/>
</b-button>
<b-collapse :id="card_data.item.short_name + '-collapse'">
<b-table :items="mgrs2ou[card_data.item.short_name]" :fields="ou_list_fields">
<template v-slot:cell(first_name)="data">
{{ mgrs[data.item.mgr_login_name].first_name }}
</template>
<template v-slot:cell(last_name)="data">
{{ mgrs[data.item.mgr_login_name].last_name }}
</template>
<template v-slot:cell(email)="data">
<b-link :href="'mailto:'+mgrs[data.item.mgr_login_name].email">
{{ mgrs[data.item.mgr_login_name].email }}
</b-link>
</template>
<template v-slot:head(actions)>
<b-button @click="assign_mgr(card_data.item.short_name)" block variant="outline-success"
:id="'button-assign-mgr-' + card_data.item.short_name">
<font-awesome-icon :icon="['fas', 'plus']"/>
</b-button>
<b-tooltip :target="'button-unassign-mgr-' + data.item.bcd_name" triggers="hover"
variant="danger" placement="left">
Zuweisung aufheben
<b-tooltip :target="'button-assign-mgr-' + card_data.item.short_name" triggers="hover"
variant="success" placement="left">
Neuen Account zuordnen
</b-tooltip>
</b-button-group>
</template>
</b-table>
</b-collapse>
</b-card>
</template>
</template>
<template v-slot:cell(actions)="data">
<b-button-group class="d-flex">
<b-button @click="deleteMgrItem(data.item)" variant="outline-danger"
:id="'button-unassign-mgr-' + data.item.bcd_name">
<font-awesome-icon :icon="['fas', 'unlink']"></font-awesome-icon>
</b-button>
<b-tooltip :target="'button-unassign-mgr-' + data.item.bcd_name" triggers="hover"
variant="danger" placement="left">
Zuweisung aufheben
</b-tooltip>
</b-button-group>
</template>
</b-table>
</b-collapse>
</b-card>
</template>
</Paginator>
<div v-if="!ous || ous.length === 0"
class="font-italic text-center mb-3">
Keine Organisationseinheiten vorhanden
......@@ -76,6 +78,7 @@
<script>
import OUService from '@/api-services/ou.service'
import Loading from '@/components/Loading'
import Paginator from '@/components/Paginator'
import apiutil from '@/util/apiutil'
import DBEditor from '@/components/DBEditor'
import transactionutil from '@/util/transactionutil'
......@@ -83,7 +86,7 @@ import Mgr2OuService from '@/api-services.gen/cntl.mgr2ou'
export default {
name: 'OE',
components: {DBEditor, Loading},
components: {DBEditor, Loading, Paginator},
watch: {
only_own_oe: {
immediate: true,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment