Merge branch 'master' into seed-garrick-ollivander

This commit is contained in:
Moriz Wahl 2022-01-11 10:38:44 +01:00
commit 4db9ad049b
5 changed files with 18 additions and 13 deletions

View File

@ -58,9 +58,7 @@ const mocks = {
query: apolloQueryMock, query: apolloQueryMock,
}, },
$toasted: { $toasted: {
global: { error: toastedErrorMock,
error: toastedErrorMock,
},
}, },
} }

View File

@ -33,7 +33,7 @@ export default {
this.items = result.data.transactionList.transactions this.items = result.data.transactionList.transactions
}) })
.catch((error) => { .catch((error) => {
this.$toasted.global.error(error.message) this.$toasted.error(error.message)
}) })
}, },
}, },

View File

@ -3,6 +3,9 @@ import UserTable from './UserTable.vue'
const localVue = global.localVue const localVue = global.localVue
const apolloQueryMock = jest.fn()
apolloQueryMock.mockResolvedValue()
describe('UserTable', () => { describe('UserTable', () => {
let wrapper let wrapper
@ -114,6 +117,12 @@ describe('UserTable', () => {
}), }),
} }
}), }),
$apollo: {
query: apolloQueryMock,
},
$store: {
commit: jest.fn(),
},
} }
const Wrapper = (propsData) => { const Wrapper = (propsData) => {

View File

@ -42,15 +42,13 @@ export default {
{ key: 'lastName', label: this.$t('lastname') }, { key: 'lastName', label: this.$t('lastname') },
{ {
key: 'creation', key: 'creation',
// label: this.$t('open_creation') + 'Jan | Feb | März', label: [
label: this.$moment().subtract(2, 'month').format('MMM'),
this.$moment().subtract(2, 'month').format('MMM') + this.$moment().subtract(1, 'month').format('MMM'),
' | ' +
this.$moment().subtract(1, 'month').format('MMM') +
' | ' +
this.$moment().format('MMM'), this.$moment().format('MMM'),
].join(' | '),
formatter: (value, key, item) => { formatter: (value, key, item) => {
return String(value[0]) + ` | ` + String(value[1]) + ` | ` + String(value[2]) return value.join(' | ')
}, },
}, },
{ key: 'show_details', label: this.$t('details') }, { key: 'show_details', label: this.$t('details') },

View File

@ -65,9 +65,9 @@ export class AdminResolver {
loginPendingTaskAdmin.memo = memo loginPendingTaskAdmin.memo = memo
loginPendingTaskAdmin.moderator = moderator loginPendingTaskAdmin.moderator = moderator
loginPendingTasksAdminRepository.save(loginPendingTaskAdmin) await loginPendingTasksAdminRepository.save(loginPendingTaskAdmin)
} }
return await getUserCreations(user.id) return getUserCreations(user.id)
} }
@Authorized([RIGHTS.CREATE_PENDING_CREATION]) @Authorized([RIGHTS.CREATE_PENDING_CREATION])