mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
linter error fixes
This commit is contained in:
parent
2881159364
commit
3041a84c1a
@ -10,7 +10,7 @@
|
||||
}}
|
||||
<!-- Using components -->
|
||||
<BInputGroup :prepend="$t('unregister_mail.info')" class="mt-3">
|
||||
<BFormInput readonly v-model="props.email" />
|
||||
<BFormInput v-model="email" readonly />
|
||||
<BInputGroupText>
|
||||
<BButton variant="outline-success" class="test-button" @click="sendRegisterMail">
|
||||
{{ $t('unregister_mail.button') }}
|
||||
@ -22,6 +22,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { sendActivationEmail } from '../graphql/sendActivationEmail'
|
||||
import { BButton, BFormInput, BInputGroup, BInputGroupText } from 'bootstrap-vue-next'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
@ -43,14 +44,16 @@ const props = defineProps({
|
||||
const { t } = useI18n()
|
||||
const { toastError, toastSuccess } = useAppToast()
|
||||
|
||||
const email = ref(props.email)
|
||||
|
||||
const { mutate: activateEmail } = useMutation(sendActivationEmail)
|
||||
|
||||
const sendRegisterMail = async () => {
|
||||
try {
|
||||
await activateEmail({
|
||||
email: props.email,
|
||||
email: email.value,
|
||||
})
|
||||
toastSuccess(t('unregister_mail.success', { email: props.email }))
|
||||
toastSuccess(t('unregister_mail.success', { email: email.value }))
|
||||
} catch (error) {
|
||||
toastError(t('unregister_mail.error', { message: error.message }))
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
<template>
|
||||
<div class="component-creation-transaction-list">
|
||||
<div class="h3">{{ $t('transactionlist.title') }}</div>
|
||||
@ -20,7 +19,7 @@
|
||||
align="center"
|
||||
:hide-ellipsis="true"
|
||||
/>
|
||||
<BButton v-b-toggle="'collapse-1'" variant="light" size="sm">{{ t('help.help') }}</BButton>
|
||||
<BButton v-b-toggle="'collapse-1'" variant="light" size="sm">{{ t('help.help') }}</BButton>
|
||||
<BCollapse id="collapse-1" class="mt-2">
|
||||
<div>
|
||||
{{ t('transactionlist.submitted') }} {{ t('math.equals') }}
|
||||
@ -44,29 +43,29 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { useQuery } from '@vue/apollo-composable';
|
||||
import { adminListContributions } from '../graphql/adminListContributions';
|
||||
import { BTable, BPagination, BButton, BCollapse, vBToggle } from 'bootstrap-vue-next';
|
||||
import { ref, watch } from 'vue'
|
||||
import { useQuery } from '@vue/apollo-composable'
|
||||
import { adminListContributions } from '../graphql/adminListContributions'
|
||||
import { BTable, BPagination, BButton, BCollapse, vBToggle } from 'bootstrap-vue-next'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const props = defineProps({
|
||||
userId: { type: Number, required: true },
|
||||
});
|
||||
})
|
||||
|
||||
const items = ref([]);
|
||||
const rows = ref(0);
|
||||
const currentPage = ref(1);
|
||||
const perPage = ref(10);
|
||||
const items = ref([])
|
||||
const rows = ref(0)
|
||||
const currentPage = ref(1)
|
||||
const perPage = ref(10)
|
||||
|
||||
const fields = [
|
||||
{
|
||||
key: 'createdAt',
|
||||
label: t('transactionlist.submitted'),
|
||||
formatter: (value) => {
|
||||
return new Date(value).toLocaleDateString();
|
||||
return new Date(value).toLocaleDateString()
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -77,7 +76,7 @@ const fields = [
|
||||
key: 'confirmedAt',
|
||||
label: t('transactionlist.confirmed'),
|
||||
formatter: (value) => {
|
||||
return value ? new Date(value).toLocaleDateString() : null;
|
||||
return value ? new Date(value).toLocaleDateString() : null
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -88,27 +87,27 @@ const fields = [
|
||||
key: 'amount',
|
||||
label: t('transactionlist.amount'),
|
||||
formatter: (value) => {
|
||||
return `${value} GDD`;
|
||||
return `${value} GDD`
|
||||
},
|
||||
},
|
||||
{ key: 'memo', label: t('transactionlist.memo'), class: 'text-break' },
|
||||
];
|
||||
]
|
||||
|
||||
const { result, refetch } = useQuery(adminListContributions, {
|
||||
currentPage: currentPage.value,
|
||||
pageSize: perPage.value,
|
||||
order: 'DESC',
|
||||
userId: props.userId,
|
||||
});
|
||||
})
|
||||
|
||||
watch(result, (newResult) => {
|
||||
if (newResult && newResult.adminListContributions) {
|
||||
rows.value = newResult.adminListContributions.contributionCount;
|
||||
items.value = newResult.adminListContributions.contributionList;
|
||||
rows.value = newResult.adminListContributions.contributionCount
|
||||
items.value = newResult.adminListContributions.contributionList
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
watch(currentPage, () => {
|
||||
refetch();
|
||||
});
|
||||
</script>s
|
||||
refetch()
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
<BTable striped hover :fields="fields" :items="items"></BTable>
|
||||
</div>
|
||||
<BPagination
|
||||
pills
|
||||
v-model="currentPage"
|
||||
pills
|
||||
size="lg"
|
||||
:per-page="perPage"
|
||||
:total-rows="rows"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user