mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
Merge branch 'user-page-apollo-toast-packages' of github.com:gradido/gradido into user-page-apollo-toast-packages
This commit is contained in:
commit
abfebb13c9
@ -4,15 +4,17 @@ module.exports = {
|
||||
browser: true,
|
||||
node: true,
|
||||
jest: true,
|
||||
'vue/setup-compiler-macros': true,
|
||||
},
|
||||
parserOptions: {
|
||||
parser: 'babel-eslint',
|
||||
ecmaVersion: 2020,
|
||||
},
|
||||
extends: [
|
||||
'standard',
|
||||
'plugin:vue/essential',
|
||||
'plugin:vue/vue3-recommended',
|
||||
'plugin:prettier/recommended',
|
||||
'plugin:@intlify/vue-i18n/recommended',
|
||||
'prettier',
|
||||
],
|
||||
// required to lint *.vue files
|
||||
plugins: ['vue', 'prettier', 'jest'],
|
||||
@ -25,7 +27,7 @@ module.exports = {
|
||||
// add your custom rules here
|
||||
rules: {
|
||||
'no-console': ['error'],
|
||||
'no-debugger': import.meta.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
|
||||
'vue/no-static-inline-styles': [
|
||||
'error',
|
||||
@ -33,6 +35,8 @@ module.exports = {
|
||||
allowBinding: false,
|
||||
},
|
||||
],
|
||||
'vue/multi-word-component-names': 0,
|
||||
'vue/no-v-html': 0,
|
||||
'@intlify/vue-i18n/no-dynamic-keys': 'error',
|
||||
'@intlify/vue-i18n/no-unused-keys': [
|
||||
'error',
|
||||
|
||||
2
admin/components.d.ts
vendored
2
admin/components.d.ts
vendored
@ -26,14 +26,12 @@ declare module 'vue' {
|
||||
EditCreationFormular: typeof import('./src/components/EditCreationFormular.vue')['default']
|
||||
FederationVisualizeItem: typeof import('./src/components/Federation/FederationVisualizeItem.vue')['default']
|
||||
FigureQrCode: typeof import('./src/components/FigureQrCode.vue')['default']
|
||||
IBi0Circle: typeof import('~icons/bi/0-circle')['default']
|
||||
IIcBaselineClose: typeof import('~icons/ic/baseline-close')['default']
|
||||
IOcticonCircleSlash24: typeof import('~icons/octicon/circle-slash24')['default']
|
||||
IOcticonPerson24: typeof import('~icons/octicon/person24')['default']
|
||||
IPhCaretDown: typeof import('~icons/ph/caret-down')['default']
|
||||
IPhCaretUpFill: typeof import('~icons/ph/caret-up-fill')['default']
|
||||
IPhEnvelope: typeof import('~icons/ph/envelope')['default']
|
||||
IPhEvelope: typeof import('~icons/ph/evelope')['default']
|
||||
IPhXCircle: typeof import('~icons/ph/x-circle')['default']
|
||||
NavBar: typeof import('./src/components/NavBar.vue')['default']
|
||||
NotFoundPage: typeof import('./src/components/NotFoundPage.vue')['default']
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.15.8",
|
||||
"@babel/eslint-parser": "^7.24.8",
|
||||
"@babel/node": "^7.15.8",
|
||||
"@babel/preset-env": "^7.15.8",
|
||||
"@iconify/json": "^2.2.228",
|
||||
@ -63,28 +64,29 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@apollo/client": "^3.10.8",
|
||||
"@babel/eslint-parser": "^7.15.8",
|
||||
"@intlify/eslint-plugin-vue-i18n": "^1.4.0",
|
||||
"@vue/compiler-sfc": "^3.4.32",
|
||||
"babel-plugin-transform-require-context": "^0.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "7.25.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-config-prettier": "8.10.0",
|
||||
"eslint-config-standard": "^16.0.3",
|
||||
"eslint-loader": "^4.0.2",
|
||||
"eslint-plugin-import": "^2.25.2",
|
||||
"eslint-plugin-jest": "^25.2.2",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-prettier": "3.3.1",
|
||||
"eslint-plugin-prettier": "5.2.1",
|
||||
"eslint-plugin-promise": "^5.1.1",
|
||||
"eslint-plugin-vue": "^7.20.0",
|
||||
"eslint-plugin-vue": "8.7.1",
|
||||
"jest": "29.7.0",
|
||||
"mock-apollo-client": "^1.2.1",
|
||||
"postcss": "^8.4.8",
|
||||
"postcss-html": "^1.3.0",
|
||||
"postcss-scss": "^4.0.3",
|
||||
"stylelint": "^14.5.3",
|
||||
"stylelint-config-recommended-vue": "^1.3.0",
|
||||
"prettier": "^3.3.3",
|
||||
"stylelint": "14.16.1",
|
||||
"stylelint-config-recommended": "13.0.0",
|
||||
"stylelint-config-recommended-vue": "1.3.0",
|
||||
"stylelint-config-standard-scss": "^3.0.0",
|
||||
"unplugin-icons": "^0.19.0",
|
||||
"unplugin-vue-components": "^0.27.3"
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
import defaultLayout from '@/layouts/defaultLayout'
|
||||
|
||||
export default {
|
||||
name: 'app',
|
||||
name: 'App',
|
||||
components: { defaultLayout },
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -9,11 +9,11 @@
|
||||
</div>
|
||||
<div v-else class="m-3">
|
||||
<label for="role" class="mr-3">{{ $t('userRole.selectLabel') }}</label>
|
||||
<b-form-select class="role-select" v-model="roleSelected" :options="roles" />
|
||||
<b-form-select v-model="roleSelected" class="role-select" :options="roles" />
|
||||
<div class="mt-3 mb-5">
|
||||
<b-button
|
||||
variant="danger"
|
||||
v-b-modal.user-role-modal
|
||||
variant="danger"
|
||||
:disabled="currentRole === roleSelected"
|
||||
@click="showModal()"
|
||||
>
|
||||
@ -41,6 +41,7 @@ export default {
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
emits: ['update-roles'],
|
||||
data() {
|
||||
return {
|
||||
currentRole: this.getCurrentRole(),
|
||||
@ -66,8 +67,8 @@ export default {
|
||||
this.roleSelected === rolesValues.ADMIN
|
||||
? this.$t('userRole.selectRoles.admin')
|
||||
: this.roleSelected === rolesValues.MODERATOR
|
||||
? this.$t('userRole.selectRoles.moderator')
|
||||
: this.$t('userRole.selectRoles.user'),
|
||||
? this.$t('userRole.selectRoles.moderator')
|
||||
: this.$t('userRole.selectRoles.user'),
|
||||
}),
|
||||
{
|
||||
cancelTitle: this.$t('overlay.cancel'),
|
||||
@ -102,7 +103,7 @@ export default {
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
this.$emit('updateRoles', {
|
||||
this.$emit('update-roles', {
|
||||
userId: this.item.userId,
|
||||
roles: roleValue === 'USER' ? [] : [roleValue],
|
||||
})
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<hr />
|
||||
<div class="content-footer">
|
||||
<BTr class="mt-4 mb-4 justify-content-lg-between">
|
||||
<col>
|
||||
<BCol>
|
||||
<div class="copyright text-center text-lg-center text-muted">
|
||||
{{ $t('footer.copyright.year', { year }) }}
|
||||
<a
|
||||
@ -24,7 +24,7 @@
|
||||
{{ $t('footer.short_hash', { shortHash }) }}
|
||||
</a>
|
||||
</div>
|
||||
</col>
|
||||
</BCol>
|
||||
</BTr>
|
||||
</div>
|
||||
</template>
|
||||
@ -37,11 +37,10 @@ const version = CONFIG.APP_VERSION
|
||||
const hash = CONFIG.BUILD_COMMIT
|
||||
const shortHash = CONFIG.BUILD_COMMIT_SHORT
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.content-footer{
|
||||
<style lang="scss" scoped>
|
||||
.content-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@ -10,21 +10,21 @@
|
||||
>
|
||||
<b-button
|
||||
v-if="!editContributionLink"
|
||||
@click="visible = !visible"
|
||||
class="my-3 d-flex justify-content-left"
|
||||
data-test="new-contribution-link-button"
|
||||
@click="visible = !visible"
|
||||
>
|
||||
{{ $t('math.plus') }} {{ $t('contributionLink.newContributionLink') }}
|
||||
</b-button>
|
||||
|
||||
<b-collapse v-model="visible" id="newContribution" class="mt-2">
|
||||
<b-collapse id="newContribution" v-model="visible" class="mt-2">
|
||||
<b-card>
|
||||
<p class="h2 ml-5">{{ $t('contributionLink.contributionLinks') }}</p>
|
||||
<contribution-link-form
|
||||
:contributionLinkData="contributionLinkData"
|
||||
:editContributionLink="editContributionLink"
|
||||
:contribution-link-data="contributionLinkData"
|
||||
:edit-contribution-link="editContributionLink"
|
||||
@get-contribution-links="$emit('get-contribution-links')"
|
||||
@closeContributionForm="closeContributionForm"
|
||||
@close-contribution-form="closeContributionForm"
|
||||
/>
|
||||
</b-card>
|
||||
</b-collapse>
|
||||
@ -33,9 +33,9 @@
|
||||
<contribution-link-list
|
||||
v-if="count > 0"
|
||||
:items="items"
|
||||
@editContributionLinkData="editContributionLinkData"
|
||||
@edit-contribution-link-data="editContributionLinkData"
|
||||
@get-contribution-links="$emit('get-contribution-links')"
|
||||
@closeContributionForm="closeContributionForm"
|
||||
@close-contribution-form="closeContributionForm"
|
||||
/>
|
||||
<div v-else>{{ $t('contributionLink.noContributionLinks') }}</div>
|
||||
</b-card-text>
|
||||
@ -62,6 +62,7 @@ export default {
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
emits: ['get-contribution-links'],
|
||||
data: function () {
|
||||
return {
|
||||
visible: false,
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="contribution-link-form">
|
||||
<b-form class="m-5" @submit.prevent="onSubmit" ref="contributionLinkForm">
|
||||
<b-form ref="contributionLinkForm" class="m-5" @submit.prevent="onSubmit">
|
||||
<!-- Date -->
|
||||
<b-row>
|
||||
<b-col>
|
||||
<b-form-group :label="$t('contributionLink.validFrom')">
|
||||
<b-form-datepicker
|
||||
reset-button
|
||||
v-model="form.validFrom"
|
||||
reset-button
|
||||
size="lg"
|
||||
:min="min"
|
||||
class="mb-4 test-validFrom"
|
||||
@ -20,8 +20,8 @@
|
||||
<b-col>
|
||||
<b-form-group :label="$t('contributionLink.validTo')">
|
||||
<b-form-datepicker
|
||||
reset-button
|
||||
v-model="form.validTo"
|
||||
reset-button
|
||||
size="lg"
|
||||
:min="form.validFrom ? form.validFrom : min"
|
||||
class="mb-4 test-validTo"
|
||||
@ -112,7 +112,7 @@
|
||||
<b-button type="reset" variant="danger" @click.prevent="onReset">
|
||||
{{ $t('contributionLink.clear') }}
|
||||
</b-button>
|
||||
<b-button @click.prevent="$emit('closeContributionForm')">
|
||||
<b-button @click.prevent="$emit('close-contribution-form')">
|
||||
{{ $t('close') }}
|
||||
</b-button>
|
||||
</div>
|
||||
@ -134,6 +134,7 @@ export default {
|
||||
},
|
||||
editContributionLink: { type: Boolean, required: true },
|
||||
},
|
||||
emits: ['close-contribution-form', 'close-contribution-link', 'get-contribution-links'],
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
@ -164,6 +165,16 @@ export default {
|
||||
],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
disabled() {
|
||||
return true
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
contributionLinkData() {
|
||||
this.form = this.contributionLinkData
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
if (this.form.validFrom === null)
|
||||
@ -202,15 +213,5 @@ export default {
|
||||
this.form.validTo = null
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
disabled() {
|
||||
return true
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
contributionLinkData() {
|
||||
this.form = this.contributionLinkData
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -56,6 +56,12 @@ export default {
|
||||
props: {
|
||||
items: { type: Array, required: true },
|
||||
},
|
||||
emits: [
|
||||
'close-contribution-form',
|
||||
'edit-contribution-link-data',
|
||||
'get-contribution-links',
|
||||
'get-contribution-link',
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
fields: [
|
||||
@ -104,7 +110,7 @@ export default {
|
||||
})
|
||||
.then(() => {
|
||||
this.toastSuccess(this.$t('contributionLink.deleted'))
|
||||
this.$emit('closeContributionForm')
|
||||
this.$emit('close-contribution-form')
|
||||
this.$emit('get-contribution-links')
|
||||
})
|
||||
.catch((err) => {
|
||||
@ -113,7 +119,7 @@ export default {
|
||||
})
|
||||
},
|
||||
editContributionLink(row) {
|
||||
this.$emit('editContributionLinkData', row)
|
||||
this.$emit('edit-contribution-link-data', row)
|
||||
},
|
||||
|
||||
showContributionLink(row) {
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<b-form-datepicker v-model="resubmissionDate" :min="now"></b-form-datepicker>
|
||||
<time-picker v-model="resubmissionTime"></time-picker>
|
||||
</b-form-group>
|
||||
<b-tabs content-class="mt-3" v-model="tabindex" data-test="message-type-tabs">
|
||||
<b-tabs v-model="tabindex" content-class="mt-3" data-test="message-type-tabs">
|
||||
<b-tab active>
|
||||
<template #title>
|
||||
<span id="message-tab-title">{{ $t('moderator.message') }}</span>
|
||||
@ -64,8 +64,8 @@
|
||||
type="submit"
|
||||
variant="primary"
|
||||
:disabled="disabled"
|
||||
@click.prevent="onSubmit()"
|
||||
data-test="submit-dialog"
|
||||
@click.prevent="onSubmit()"
|
||||
>
|
||||
{{ $t('save') }}
|
||||
</b-button>
|
||||
@ -81,10 +81,10 @@ import { adminUpdateContribution } from '@/graphql/adminUpdateContribution'
|
||||
import TimePicker from '@/components/input/TimePicker'
|
||||
|
||||
export default {
|
||||
name: 'ContributionMessagesFormular',
|
||||
components: {
|
||||
TimePicker,
|
||||
},
|
||||
name: 'ContributionMessagesFormular',
|
||||
props: {
|
||||
contributionId: {
|
||||
type: Number,
|
||||
@ -103,6 +103,13 @@ export default {
|
||||
required: false,
|
||||
},
|
||||
},
|
||||
emits: [
|
||||
'update-contribution',
|
||||
'update-contributions',
|
||||
'get-contribution',
|
||||
'update-status',
|
||||
'get-list-contribution-messages',
|
||||
],
|
||||
data() {
|
||||
const localInputResubmissionDate = this.inputResubmissionDate
|
||||
? new Date(this.inputResubmissionDate)
|
||||
@ -129,6 +136,22 @@ export default {
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
disabled() {
|
||||
return (
|
||||
(this.chatOrMemo === 0 && this.form.text === '') ||
|
||||
this.loading ||
|
||||
(this.chatOrMemo === 1 && this.form.memo.length < 5) ||
|
||||
(this.showResubmissionDate && !this.resubmissionDate)
|
||||
)
|
||||
},
|
||||
moderatorDisabled() {
|
||||
return this.form.text === '' || this.loading || this.chatOrMemo === 1
|
||||
},
|
||||
now() {
|
||||
return new Date()
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
combineResubmissionDateAndTime() {
|
||||
// getTimezoneOffset
|
||||
@ -224,21 +247,5 @@ export default {
|
||||
this.chatOrMemo = 1
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
disabled() {
|
||||
return (
|
||||
(this.chatOrMemo === 0 && this.form.text === '') ||
|
||||
this.loading ||
|
||||
(this.chatOrMemo === 1 && this.form.memo.length < 5) ||
|
||||
(this.showResubmissionDate && !this.resubmissionDate)
|
||||
)
|
||||
},
|
||||
moderatorDisabled() {
|
||||
return this.form.text === '' || this.loading || this.chatOrMemo === 1
|
||||
},
|
||||
now() {
|
||||
return new Date()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
<template>
|
||||
<div class="contribution-messages-list">
|
||||
<b-container>
|
||||
<div v-for="message in messages" v-bind:key="message.id">
|
||||
<div v-for="message in messages" :key="message.id">
|
||||
<contribution-messages-list-item
|
||||
:message="message"
|
||||
:contributionUserId="contributionUserId"
|
||||
:contribution-user-id="contributionUserId"
|
||||
/>
|
||||
</div>
|
||||
</b-container>
|
||||
<div v-if="contributionStatus === 'PENDING' || contributionStatus === 'IN_PROGRESS'">
|
||||
<contribution-messages-formular
|
||||
:contributionId="contributionId"
|
||||
:contributionMemo="contributionMemo"
|
||||
:hideResubmission="hideResubmission"
|
||||
:inputResubmissionDate="resubmissionAt"
|
||||
:contribution-id="contributionId"
|
||||
:contribution-memo="contributionMemo"
|
||||
:hide-resubmission="hideResubmission"
|
||||
:input-resubmission-date="resubmissionAt"
|
||||
@get-list-contribution-messages="$apollo.queries.Messages.refetch()"
|
||||
@update-status="updateStatus"
|
||||
@reload-contribution="reloadContribution"
|
||||
@ -59,6 +59,7 @@ export default {
|
||||
required: false,
|
||||
},
|
||||
},
|
||||
emits: ['update-status', 'reload-contribution', 'update-contributions'],
|
||||
data() {
|
||||
return {
|
||||
messages: [],
|
||||
|
||||
@ -26,9 +26,9 @@ export default {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
type: {
|
||||
messageType: {
|
||||
type: String,
|
||||
reuired: true,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
@ -36,7 +36,7 @@ export default {
|
||||
let string = this.message
|
||||
const linkified = []
|
||||
let amount
|
||||
if (this.type === 'HISTORY') {
|
||||
if (this.messageType === 'HISTORY') {
|
||||
const split = string.split(/\n\s*---\n\s*/)
|
||||
string = split[1]
|
||||
linkified.push({ type: 'date', text: split[0].trim() })
|
||||
|
||||
@ -6,22 +6,22 @@
|
||||
<div class="m-4 mt-0">
|
||||
<label>{{ $t('creation_form.select_month') }}</label>
|
||||
<BFormRadioGroup
|
||||
id="radio-group-month-selection"
|
||||
v-model="selected"
|
||||
:options="radioOptions()"
|
||||
value-field="item"
|
||||
text-field="name"
|
||||
name="month-selection"
|
||||
id="radio-group-month-selection"
|
||||
/>
|
||||
</div>
|
||||
<div class="m-4" v-if="selected">
|
||||
<div v-if="selected" class="m-4">
|
||||
<label>{{ $t('creation_form.select_value') }}</label>
|
||||
<div>
|
||||
<BInputGroup prepend="GDD" append=".00">
|
||||
<BFormInput type="number" v-model="value" :min="rangeMin" :max="rangeMax" />
|
||||
<BFormInput v-model="value" type="number" :min="rangeMin" :max="rangeMax" />
|
||||
</BInputGroup>
|
||||
<BInputGroup prepend="0" :append="String(rangeMax)" class="mt-3">
|
||||
<BFormInput type="range" v-model="value" :min="rangeMin" :max="rangeMax" step="10" />
|
||||
<BFormInput v-model="value" type="range" :min="rangeMin" :max="rangeMax" step="10" />
|
||||
</BInputGroup>
|
||||
</div>
|
||||
</div>
|
||||
@ -49,8 +49,8 @@
|
||||
type="button"
|
||||
variant="success"
|
||||
class="test-submit"
|
||||
@click="submitCreation"
|
||||
:disabled="selected === '' || value <= 0 || text.length < 10"
|
||||
@click="submitCreation"
|
||||
>
|
||||
{{ $t('creation_form.update_creation') }}
|
||||
</BButton>
|
||||
@ -59,8 +59,8 @@
|
||||
type="button"
|
||||
variant="success"
|
||||
class="test-submit"
|
||||
@click="submitCreation"
|
||||
:disabled="selected === '' || value <= 0 || text.length < 10"
|
||||
@click="submitCreation"
|
||||
>
|
||||
{{ $t('creation_form.submit_creation') }}
|
||||
</BButton>
|
||||
@ -141,6 +141,8 @@ const { mutate: createContribution } = useMutation(adminCreateContribution)
|
||||
|
||||
const { refetch } = useQuery(openCreations)
|
||||
|
||||
const emit = defineEmits(['update-user-data'])
|
||||
|
||||
const submitCreation = async () => {
|
||||
try {
|
||||
const result = await createContribution({
|
||||
@ -174,8 +176,7 @@ const submitCreation = async () => {
|
||||
watch(
|
||||
() => selected.value,
|
||||
async (newValue, oldValue) => {
|
||||
console.log(selected.value)
|
||||
if (newValue !== oldValue && selected.value != '') {
|
||||
if (newValue !== oldValue && selected.value !== '') {
|
||||
updateRadioSelected(newValue)
|
||||
}
|
||||
},
|
||||
|
||||
@ -11,9 +11,9 @@
|
||||
</b-table>
|
||||
<div>
|
||||
<b-pagination
|
||||
v-model="currentPage"
|
||||
pills
|
||||
size="lg"
|
||||
v-model="currentPage"
|
||||
:per-page="perPage"
|
||||
:total-rows="rows"
|
||||
align="center"
|
||||
|
||||
@ -7,13 +7,13 @@
|
||||
<div class="mt-3 mb-5">
|
||||
<b-button
|
||||
v-if="!item.deletedAt"
|
||||
variant="danger"
|
||||
v-b-modal.delete-user-modal
|
||||
variant="danger"
|
||||
@click="showDeleteModal()"
|
||||
>
|
||||
{{ $t('delete_user') }}
|
||||
</b-button>
|
||||
<b-button v-else variant="success" v-b-modal.delete-user-modal @click="showUndeleteModal()">
|
||||
<b-button v-else v-b-modal.delete-user-modal variant="success" @click="showUndeleteModal()">
|
||||
{{ $t('undelete_user') }}
|
||||
</b-button>
|
||||
</div>
|
||||
@ -32,6 +32,7 @@ export default {
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
emits: ['update-deleted-at'],
|
||||
methods: {
|
||||
showDeleteModal() {
|
||||
this.$bvModal
|
||||
@ -91,7 +92,7 @@ export default {
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
this.$emit('updateDeletedAt', {
|
||||
this.$emit('update-deleted-at', {
|
||||
userId: this.item.userId,
|
||||
deletedAt: result.data.deleteUser,
|
||||
})
|
||||
@ -109,7 +110,7 @@ export default {
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
this.$emit('updateDeletedAt', {
|
||||
this.$emit('update-deleted-at', {
|
||||
userId: this.item.userId,
|
||||
deletedAt: result.data.unDeleteUser,
|
||||
})
|
||||
|
||||
@ -20,16 +20,16 @@
|
||||
<div>
|
||||
<b-input-group prepend="GDD" append=".00">
|
||||
<b-form-input
|
||||
type="number"
|
||||
v-model="value"
|
||||
type="number"
|
||||
:min="rangeMin"
|
||||
:max="rangeMax"
|
||||
></b-form-input>
|
||||
</b-input-group>
|
||||
<b-input-group prepend="0" :append="String(rangeMax)" class="mt-3">
|
||||
<b-form-input
|
||||
type="range"
|
||||
v-model="value"
|
||||
type="range"
|
||||
:min="rangeMin"
|
||||
:max="rangeMax"
|
||||
step="10"
|
||||
@ -61,8 +61,8 @@
|
||||
type="button"
|
||||
variant="success"
|
||||
class="test-submit"
|
||||
@click="submitCreation"
|
||||
:disabled="selected === '' || value <= 0 || text.length < 10"
|
||||
@click="submitCreation"
|
||||
>
|
||||
{{ $t('creation_form.update_creation') }}
|
||||
</b-button>
|
||||
@ -97,15 +97,35 @@ export default {
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
emits: ['update-creation-data'],
|
||||
data() {
|
||||
return {
|
||||
text: !this.creationUserData.memo ? '' : this.creationUserData.memo,
|
||||
value: !this.creationUserData.amount ? 0 : Number(this.creationUserData.amount),
|
||||
rangeMin: 0,
|
||||
selected: this.selectedComputed,
|
||||
selected: this.selectedComputed, // TODO investigate this one and apply solution based on good practices
|
||||
userId: this.item.userId,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
creationIndex() {
|
||||
const month = this.$d(new Date(this.item.contributionDate), 'month')
|
||||
return this.radioOptions.findIndex((obj) => {
|
||||
return obj.item.short === month
|
||||
})
|
||||
},
|
||||
selectedComputed() {
|
||||
return this.radioOptions[this.creationIndex].item
|
||||
},
|
||||
rangeMax() {
|
||||
return Number(this.creation[this.creationIndex]) + Number(this.item.amount)
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
selectedComputed() {
|
||||
this.selected = this.selectedComputed
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
submitCreation() {
|
||||
this.$apollo
|
||||
@ -143,24 +163,5 @@ export default {
|
||||
})
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
creationIndex() {
|
||||
const month = this.$d(new Date(this.item.contributionDate), 'month')
|
||||
return this.radioOptions.findIndex((obj) => {
|
||||
return obj.item.short === month
|
||||
})
|
||||
},
|
||||
selectedComputed() {
|
||||
return this.radioOptions[this.creationIndex].item
|
||||
},
|
||||
rangeMax() {
|
||||
return Number(this.creation[this.creationIndex]) + Number(this.item.amount)
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
selectedComputed() {
|
||||
this.selected = this.selectedComputed
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
</b-list-group-item>
|
||||
<b-list-group-item v-if="!item.foreign">
|
||||
<editable-group
|
||||
:allowEdit="$store.state.moderator.roles.includes('ADMIN')"
|
||||
:allow-edit="$store.state.moderator.roles.includes('ADMIN')"
|
||||
@save="handleUpdateHomeCommunity"
|
||||
@reset="resetHomeCommunityEditable"
|
||||
>
|
||||
@ -48,7 +48,7 @@
|
||||
<editable-groupable-label
|
||||
v-model="gmsApiKey"
|
||||
:label="$t('federation.gmsApiKey')"
|
||||
idName="home-community-api-key"
|
||||
id-name="home-community-api-key"
|
||||
/>
|
||||
<coordinates v-model="location" />
|
||||
</template>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="component-nabvar">
|
||||
<BNavbar toggleable="lg" variant="dark" v-b-color-mode="'light'">
|
||||
<BNavbar v-b-color-mode="'light'" toggleable="lg" variant="dark">
|
||||
<BNavbarBrand class="mb-2" to="/">
|
||||
<img src="/img/brand/gradido_logo_w.png" class="navbar-brand-img pl-2" alt="..." />
|
||||
</BNavbarBrand>
|
||||
|
||||
@ -1195,7 +1195,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'not-found',
|
||||
name: 'NotFound',
|
||||
data() {
|
||||
return {
|
||||
anime: {
|
||||
|
||||
@ -52,9 +52,10 @@
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'overlay',
|
||||
name: 'Overlay',
|
||||
props: {
|
||||
item: { type: Object, required: true },
|
||||
},
|
||||
emits: ['overlay-cancel'],
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -16,9 +16,10 @@ export default {
|
||||
name: 'RowDetails',
|
||||
props: {
|
||||
row: { required: true, type: Object },
|
||||
slotName: { requried: true, type: String },
|
||||
type: { requried: true, type: String },
|
||||
index: { requried: true, type: Number },
|
||||
slotName: { required: true, type: String },
|
||||
type: { required: true, type: String },
|
||||
index: { required: true, type: Number },
|
||||
},
|
||||
emits: ['row-toggle-details'],
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
<b-button
|
||||
variant="danger"
|
||||
size="md"
|
||||
@click="$emit('show-overlay', row.item, 'delete')"
|
||||
class="mr-2"
|
||||
@click="$emit('show-overlay', row.item, 'delete')"
|
||||
>
|
||||
<b-icon icon="trash" variant="light"></b-icon>
|
||||
</b-button>
|
||||
@ -38,8 +38,8 @@
|
||||
variant="info"
|
||||
size="md"
|
||||
:index="0"
|
||||
@click="rowToggleDetails(row, 0)"
|
||||
class="mr-2"
|
||||
@click="rowToggleDetails(row, 0)"
|
||||
>
|
||||
<b-icon :icon="row.detailsShowing ? 'x' : 'pencil-square'" aria-label="Help"></b-icon>
|
||||
</b-button>
|
||||
@ -69,8 +69,8 @@
|
||||
<b-button
|
||||
variant="warning"
|
||||
size="md"
|
||||
@click="$emit('show-overlay', row.item, 'deny')"
|
||||
class="mr-2"
|
||||
@click="$emit('show-overlay', row.item, 'deny')"
|
||||
>
|
||||
<b-icon icon="x" variant="light"></b-icon>
|
||||
</b-button>
|
||||
@ -81,8 +81,8 @@
|
||||
<b-button
|
||||
variant="success"
|
||||
size="md"
|
||||
@click="$emit('show-overlay', row.item, 'confirm')"
|
||||
class="mr-2"
|
||||
@click="$emit('show-overlay', row.item, 'confirm')"
|
||||
>
|
||||
<b-icon icon="check" scale="2" variant=""></b-icon>
|
||||
</b-button>
|
||||
@ -92,7 +92,7 @@
|
||||
<row-details
|
||||
:row="row"
|
||||
type="show-creation"
|
||||
slotName="show-creation"
|
||||
slot-name="show-creation"
|
||||
:index="0"
|
||||
@row-toggle-details="rowToggleDetails(row, 0)"
|
||||
>
|
||||
@ -102,18 +102,18 @@
|
||||
type="singleCreation"
|
||||
:item="row.item"
|
||||
:row="row"
|
||||
:creationUserData="creationUserData"
|
||||
:creation-user-data="creationUserData"
|
||||
@update-creation-data="$emit('update-contributions')"
|
||||
/>
|
||||
</div>
|
||||
<div v-else>
|
||||
<contribution-messages-list
|
||||
:contributionId="row.item.id"
|
||||
:contributionStatus="row.item.status"
|
||||
:contributionUserId="row.item.userId"
|
||||
:contributionMemo="row.item.memo"
|
||||
:resubmissionAt="row.item.resubmissionAt"
|
||||
:hideResubmission="hideResubmission"
|
||||
:contribution-id="row.item.id"
|
||||
:contribution-status="row.item.status"
|
||||
:contribution-user-id="row.item.userId"
|
||||
:contribution-memo="row.item.memo"
|
||||
:resubmission-at="row.item.resubmissionAt"
|
||||
:hide-resubmission="hideResubmission"
|
||||
@update-status="updateStatus"
|
||||
@reload-contribution="reloadContribution"
|
||||
@update-contributions="updateContributions"
|
||||
@ -142,12 +142,12 @@ const iconMap = {
|
||||
|
||||
export default {
|
||||
name: 'OpenCreationsTable',
|
||||
mixins: [toggleRowDetails],
|
||||
components: {
|
||||
EditCreationFormular,
|
||||
RowDetails,
|
||||
ContributionMessagesList,
|
||||
},
|
||||
mixins: [toggleRowDetails],
|
||||
props: {
|
||||
items: {
|
||||
type: Array,
|
||||
@ -166,6 +166,7 @@ export default {
|
||||
required: false,
|
||||
},
|
||||
},
|
||||
emits: ['update-contributions', 'reload-contribution', 'update-status', 'show-overlay'],
|
||||
methods: {
|
||||
myself(item) {
|
||||
return item.userId === this.$store.state.moderator.id
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
hover
|
||||
stacked="md"
|
||||
select-mode="single"
|
||||
selectableonRowSelected
|
||||
selectable-on-row-selected
|
||||
@row-clicked="onRowClicked"
|
||||
>
|
||||
<template #cell(creation)="data">
|
||||
@ -45,8 +45,8 @@
|
||||
:title="row.item.enabled ? $t('enabled') : $t('deleted')"
|
||||
/>
|
||||
<IPhCaretDown
|
||||
style="color: #212529"
|
||||
v-else
|
||||
style="color: #212529"
|
||||
:title="row.item.enabled ? $t('enabled') : $t('deleted')"
|
||||
/>
|
||||
</div>
|
||||
@ -54,14 +54,14 @@
|
||||
|
||||
<template #row-details="row">
|
||||
<BCard ref="rowDetails" class="shadow-lg pl-3 pr-3 mb-5 bg-white rounded">
|
||||
<BTabs contentClass="mt-3">
|
||||
<BTabs content-class="mt-3">
|
||||
<BTab :title="$t('creation')" active :disabled="row.item.deletedAt !== null">
|
||||
<creation-formular
|
||||
v-if="!row.item.deletedAt"
|
||||
pagetype="singleCreation"
|
||||
:creation="row.item.creation"
|
||||
:item="row.item"
|
||||
:creationUserData="creationUserData"
|
||||
:creation-user-data="creationUserData"
|
||||
@update-user-data="updateUserData"
|
||||
/>
|
||||
</BTab>
|
||||
@ -70,7 +70,7 @@
|
||||
v-if="!row.item.deletedAt"
|
||||
:checked="row.item.emailChecked"
|
||||
:email="row.item.email"
|
||||
:dateLastSend="
|
||||
:date-last-send="
|
||||
row.item.emailConfirmationSend
|
||||
? $d(new Date(row.item.emailConfirmationSend), 'long')
|
||||
: ''
|
||||
@ -78,16 +78,16 @@
|
||||
/>
|
||||
</BTab>
|
||||
<!-- <BTab :title="$t('creationList')" :disabled="row.item.deletedAt !== null">
|
||||
<creation-transaction-list v-if="!row.item.deletedAt" :userId="row.item.userId" />
|
||||
<creation-transaction-list v-if="!row.item.deletedAt" :user-id="row.item.userId" />
|
||||
</BTab>
|
||||
<BTab :title="$t('transactionlink.name')" :disabled="row.item.deletedAt !== null">
|
||||
<transaction-link-list v-if="!row.item.deletedAt" :userId="row.item.userId" />
|
||||
<transaction-link-list v-if="!row.item.deletedAt" :user-id="row.item.userId" />
|
||||
</BTab>
|
||||
<BTab :title="$t('userRole.tabTitle')">
|
||||
<change-user-role-formular :item="row.item" @updateRoles="updateRoles" />
|
||||
<change-user-role-formular :item="row.item" @update-roles="updateRoles" />
|
||||
</BTab> -->
|
||||
<!-- <BTab v-if="store.state.moderator.roles.includes('ADMIN')" :title="$t('delete_user')">
|
||||
<deleted-user-formular :item="row.item" @updateDeletedAt="updateDeletedAt" />
|
||||
<deleted-user-formular :item="row.item" @update-deleted-at="updateDeletedAt" />
|
||||
</BTab> -->
|
||||
</BTabs>
|
||||
</BCard>
|
||||
@ -100,10 +100,6 @@ import { ref, nextTick, onMounted, watch } from 'vue'
|
||||
import { BTable, BAvatar, BTab, BTabs, BCard } from 'bootstrap-vue-next'
|
||||
import CreationFormular from '../CreationFormular.vue'
|
||||
import ConfirmRegisterMailFormular from '../ConfirmRegisterMailFormular.vue'
|
||||
import CreationTransactionList from '../CreationTransactionList.vue'
|
||||
import TransactionLinkList from '../TransactionLinkList.vue'
|
||||
import ChangeUserRoleFormular from '../ChangeUserRoleFormular.vue'
|
||||
import DeletedUserFormular from '../DeletedUserFormular.vue'
|
||||
|
||||
const props = defineProps({
|
||||
items: {
|
||||
@ -116,7 +112,7 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(['updateRoles', 'updateDeletedAt'])
|
||||
// const emit = defineEmits(['update-roles', 'update-deleted-at'])
|
||||
const myItems = ref()
|
||||
const creationUserData = ref({})
|
||||
const rowDetails = ref()
|
||||
@ -127,7 +123,7 @@ onMounted(() => {
|
||||
return { ...item, _showDetails: false }
|
||||
})
|
||||
|
||||
myItems.value
|
||||
// myItems.value
|
||||
}, 500)
|
||||
})
|
||||
|
||||
@ -135,13 +131,13 @@ const updateUserData = (rowItem, newCreation) => {
|
||||
rowItem.creation = newCreation
|
||||
}
|
||||
|
||||
const updateRoles = ({ userId, roles }) => {
|
||||
emit('updateRoles', userId, roles)
|
||||
}
|
||||
|
||||
const updateDeletedAt = ({ userId, deletedAt }) => {
|
||||
emit('updateDeletedAt', userId, deletedAt)
|
||||
}
|
||||
// const updateRoles = ({ userId, roles }) => {
|
||||
// emit('update-roles', userId, roles)
|
||||
// }
|
||||
//
|
||||
// const updateDeletedAt = ({ userId, deletedAt }) => {
|
||||
// emit('update-deleted-at', userId, deletedAt)
|
||||
// }
|
||||
|
||||
const onRowClicked = async (item) => {
|
||||
const status = myItems.value.find((obj) => {
|
||||
|
||||
@ -5,9 +5,9 @@
|
||||
<b-table striped hover :fields="fields" :items="items"></b-table>
|
||||
</div>
|
||||
<b-pagination
|
||||
v-model="currentPage"
|
||||
pills
|
||||
size="lg"
|
||||
v-model="currentPage"
|
||||
:per-page="perPage"
|
||||
:total-rows="rows"
|
||||
align="center"
|
||||
@ -30,26 +30,6 @@ export default {
|
||||
perPage: 5,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getListTransactionLinks() {
|
||||
this.$apollo
|
||||
.query({
|
||||
query: listTransactionLinksAdmin,
|
||||
variables: {
|
||||
currentPage: this.currentPage,
|
||||
pageSize: this.perPage,
|
||||
userId: this.userId,
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
this.rows = result.data.listTransactionLinksAdmin.count
|
||||
this.items = result.data.listTransactionLinksAdmin.links
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toastError(error.message)
|
||||
})
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
fields() {
|
||||
return [
|
||||
@ -94,13 +74,33 @@ export default {
|
||||
]
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getListTransactionLinks()
|
||||
},
|
||||
watch: {
|
||||
currentPage() {
|
||||
this.getListTransactionLinks()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getListTransactionLinks()
|
||||
},
|
||||
methods: {
|
||||
getListTransactionLinks() {
|
||||
this.$apollo
|
||||
.query({
|
||||
query: listTransactionLinksAdmin,
|
||||
variables: {
|
||||
currentPage: this.currentPage,
|
||||
pageSize: this.perPage,
|
||||
userId: this.userId,
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
this.rows = result.data.listTransactionLinksAdmin.count
|
||||
this.items = result.data.listTransactionLinksAdmin.links
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toastError(error.message)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
<div>
|
||||
<div class="d-flex">
|
||||
<BFormInput
|
||||
v-model="currentValue"
|
||||
type="text"
|
||||
class="test-input-criteria"
|
||||
v-model="currentValue"
|
||||
:placeholder="placeholderText"
|
||||
/>
|
||||
<div append class="test-click-clear-criteria" @click="onClear">
|
||||
|
||||
@ -11,24 +11,24 @@
|
||||
:description="$t('geo-coordinates.latitude-longitude-smart.describe')"
|
||||
>
|
||||
<b-form-input
|
||||
v-model="locationString"
|
||||
id="home-community-latitude-longitude-smart"
|
||||
v-model="locationString"
|
||||
type="text"
|
||||
@input="splitCoordinates"
|
||||
/>
|
||||
</b-form-group>
|
||||
<b-form-group :label="$t('latitude')" label-for="home-community-latitude">
|
||||
<b-form-input
|
||||
v-model="inputValue.latitude"
|
||||
id="home-community-latitude"
|
||||
v-model="inputValue.latitude"
|
||||
type="text"
|
||||
@input="valueUpdated"
|
||||
/>
|
||||
</b-form-group>
|
||||
<b-form-group :label="$t('longitude')" label-for="home-community-longitude">
|
||||
<b-form-input
|
||||
v-model="inputValue.longitude"
|
||||
id="home-community-longitude"
|
||||
v-model="inputValue.longitude"
|
||||
type="text"
|
||||
@input="valueUpdated"
|
||||
/>
|
||||
@ -41,9 +41,12 @@
|
||||
export default {
|
||||
name: 'Coordinates',
|
||||
props: {
|
||||
value: Object,
|
||||
default: null,
|
||||
value: {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
emits: ['input'],
|
||||
data() {
|
||||
return {
|
||||
inputValue: this.value,
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<div>
|
||||
<slot v-if="!isEditing" v-bind:isEditing="isEditing" name="view"></slot>
|
||||
<slot v-else v-bind:isEditing="isEditing" name="edit" @input="valueChanged"></slot>
|
||||
<slot v-if="!isEditing" :is-editing="isEditing" name="view"></slot>
|
||||
<slot v-else :is-editing="isEditing" name="edit" @input="valueChanged"></slot>
|
||||
<b-form-group v-if="allowEdit && !isEditing">
|
||||
<b-button @click="enableEdit" :variant="variant">
|
||||
<b-button :variant="variant" @click="enableEdit">
|
||||
<b-icon icon="pencil-fill">{{ $t('edit') }}</b-icon>
|
||||
</b-button>
|
||||
</b-form-group>
|
||||
<b-form-group v-else-if="allowEdit && isEditing">
|
||||
<b-button @click="save" :variant="variant" :disabled="!isValueChanged" class="save-button">
|
||||
<b-button :variant="variant" :disabled="!isValueChanged" class="save-button" @click="save">
|
||||
{{ $t('save') }}
|
||||
</b-button>
|
||||
<b-button @click="close" variant="secondary" class="close-button">
|
||||
<b-button variant="secondary" class="close-button" @click="close">
|
||||
{{ $t('close') }}
|
||||
</b-button>
|
||||
</b-form-group>
|
||||
@ -27,6 +27,7 @@ export default {
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['save', 'reset'],
|
||||
data() {
|
||||
return {
|
||||
isEditing: false,
|
||||
|
||||
@ -22,6 +22,7 @@ export default {
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
emits: ['input'],
|
||||
data() {
|
||||
return {
|
||||
inputValue: this.value,
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<input
|
||||
type="text"
|
||||
v-model="timeValue"
|
||||
type="text"
|
||||
placeholder="hh:mm"
|
||||
@input="updateValues"
|
||||
@blur="validateAndCorrect"
|
||||
placeholder="hh:mm"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@ -20,6 +20,7 @@ export default {
|
||||
default: '00:00',
|
||||
},
|
||||
},
|
||||
emits: ['input'],
|
||||
data() {
|
||||
return {
|
||||
timeValue: this.value,
|
||||
|
||||
@ -2,6 +2,7 @@ import { ref, computed, watch } from 'vue'
|
||||
import { adminOpenCreations } from '../graphql/adminOpenCreations'
|
||||
import { useQuery } from '@vue/apollo-composable'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import toast from 'bootstrap/js/src/toast'
|
||||
|
||||
export default () => {
|
||||
const { d } = useI18n()
|
||||
|
||||
@ -45,7 +45,8 @@ const debug = {
|
||||
}
|
||||
|
||||
// Check config version
|
||||
constants.CONFIG_VERSION.CURRENT = import.meta.env.CONFIG_VERSION ?? constants.CONFIG_VERSION.DEFAULT
|
||||
constants.CONFIG_VERSION.CURRENT =
|
||||
import.meta.env.CONFIG_VERSION ?? constants.CONFIG_VERSION.DEFAULT
|
||||
if (
|
||||
![constants.CONFIG_VERSION.EXPECTED, constants.CONFIG_VERSION.DEFAULT].includes(
|
||||
constants.CONFIG_VERSION.CURRENT,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { createI18n } from 'vue-i18n'
|
||||
import de from "./locales/de.json"
|
||||
import en from "./locales/en.json"
|
||||
import de from './locales/de.json'
|
||||
import en from './locales/en.json'
|
||||
|
||||
const numberFormats = {
|
||||
en: {
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
import NavBar from '@/components/NavBar'
|
||||
import ContentFooter from '@/components/ContentFooter'
|
||||
export default {
|
||||
name: 'defaultLayout',
|
||||
name: 'DefaultLayout',
|
||||
components: {
|
||||
NavBar,
|
||||
ContentFooter,
|
||||
|
||||
@ -22,6 +22,9 @@ export default {
|
||||
count: 0,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getContributionLinks()
|
||||
},
|
||||
methods: {
|
||||
getContributionLinks() {
|
||||
this.$apollo
|
||||
@ -38,8 +41,5 @@ export default {
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getContributionLinks()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
<!-- eslint-disable @intlify/vue-i18n/no-dynamic-keys -->
|
||||
<template>
|
||||
<div class="creation-confirm">
|
||||
<user-query class="mb-2 mt-2" v-model="query" :placeholder="$t('user_memo_search')" />
|
||||
<user-query v-model="query" class="mb-2 mt-2" :placeholder="$t('user_memo_search')" />
|
||||
<p class="mb-2">
|
||||
<input type="checkbox" class="noHashtag" v-model="noHashtag" />
|
||||
<span class="ml-2" v-b-tooltip="$t('no_hashtag_tooltip')">{{ $t('no_hashtag') }}</span>
|
||||
<input v-model="noHashtag" type="checkbox" class="noHashtag" />
|
||||
<span v-b-tooltip="$t('no_hashtag_tooltip')" class="ml-2">{{ $t('no_hashtag') }}</span>
|
||||
</p>
|
||||
<p class="mb-4" v-if="showResubmissionCheckbox">
|
||||
<input type="checkbox" class="hideResubmission" v-model="hideResubmissionModel" />
|
||||
<span class="ml-2" v-b-tooltip="$t('hide_resubmission_tooltip')">
|
||||
<p v-if="showResubmissionCheckbox" class="mb-4">
|
||||
<input v-model="hideResubmissionModel" type="checkbox" class="hideResubmission" />
|
||||
<span v-b-tooltip="$t('hide_resubmission_tooltip')" class="ml-2">
|
||||
{{ $t('hide_resubmission') }}
|
||||
</span>
|
||||
</p>
|
||||
@ -53,7 +53,7 @@
|
||||
class="mt-4"
|
||||
:items="items"
|
||||
:fields="fields"
|
||||
:hideResubmission="hideResubmission"
|
||||
:hide-resubmission="hideResubmission"
|
||||
@show-overlay="showOverlay"
|
||||
@update-status="updateStatus"
|
||||
@reload-contribution="reloadContribution"
|
||||
@ -61,9 +61,9 @@
|
||||
/>
|
||||
|
||||
<b-pagination
|
||||
v-model="currentPage"
|
||||
pills
|
||||
size="lg"
|
||||
v-model="currentPage"
|
||||
:per-page="pageSize"
|
||||
:total-rows="rows"
|
||||
align="center"
|
||||
@ -82,12 +82,7 @@
|
||||
<p>{{ $t(overlayQuestion) }}</p>
|
||||
</template>
|
||||
<template #submit-btn>
|
||||
<b-button
|
||||
size="md"
|
||||
v-bind:variant="overlayIcon"
|
||||
class="m-3 text-right"
|
||||
@click="overlayEvent"
|
||||
>
|
||||
<b-button size="md" :variant="overlayIcon" class="m-3 text-right" @click="overlayEvent">
|
||||
{{ $t(overlayBtnText) }}
|
||||
</b-button>
|
||||
</template>
|
||||
@ -135,99 +130,6 @@ export default {
|
||||
hideResubmissionModel: true,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tabIndex() {
|
||||
this.currentPage = 1
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
reloadContribution(id) {
|
||||
this.$apollo
|
||||
.query({ query: getContribution, variables: { id } })
|
||||
.then((result) => {
|
||||
const contribution = result.data.contribution
|
||||
this.$set(
|
||||
this.items,
|
||||
this.items.findIndex((obj) => obj.id === contribution.id),
|
||||
contribution,
|
||||
)
|
||||
})
|
||||
.catch((error) => {
|
||||
this.overlay = false
|
||||
this.toastError(error.message)
|
||||
})
|
||||
},
|
||||
deleteCreation() {
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: adminDeleteContribution,
|
||||
variables: {
|
||||
id: this.item.id,
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
this.overlay = false
|
||||
this.updatePendingCreations(this.item.id)
|
||||
this.toastSuccess(this.$t('creation_form.toasted_delete'))
|
||||
})
|
||||
.catch((error) => {
|
||||
this.overlay = false
|
||||
this.toastError(error.message)
|
||||
})
|
||||
},
|
||||
denyCreation() {
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: denyContribution,
|
||||
variables: {
|
||||
id: this.item.id,
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
this.overlay = false
|
||||
this.updatePendingCreations(this.item.id)
|
||||
this.toastSuccess(this.$t('creation_form.toasted_denied'))
|
||||
})
|
||||
.catch((error) => {
|
||||
this.overlay = false
|
||||
this.toastError(error.message)
|
||||
})
|
||||
},
|
||||
confirmCreation() {
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: confirmContribution,
|
||||
variables: {
|
||||
id: this.item.id,
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
this.overlay = false
|
||||
this.updatePendingCreations(this.item.id)
|
||||
this.toastSuccess(this.$t('creation_form.toasted_created'))
|
||||
})
|
||||
.catch((error) => {
|
||||
this.overlay = false
|
||||
this.toastError(error.message)
|
||||
})
|
||||
},
|
||||
updatePendingCreations(id) {
|
||||
this.items = this.items.filter((obj) => obj.id !== id)
|
||||
this.$store.commit('openCreationsMinus', 1)
|
||||
},
|
||||
showOverlay(item, variant) {
|
||||
this.overlay = true
|
||||
this.item = item
|
||||
this.variant = variant
|
||||
},
|
||||
updateStatus(id) {
|
||||
this.items.find((obj) => obj.id === id).messagesCount++
|
||||
this.items.find((obj) => obj.id === id).status = 'IN_PROGRESS'
|
||||
},
|
||||
formatDateOrDash(value) {
|
||||
return value ? this.$d(new Date(value), 'short') : '—'
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
fields() {
|
||||
return [
|
||||
@ -440,6 +342,99 @@ export default {
|
||||
return this.showResubmissionCheckbox ? this.hideResubmissionModel : false
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
tabIndex() {
|
||||
this.currentPage = 1
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
reloadContribution(id) {
|
||||
this.$apollo
|
||||
.query({ query: getContribution, variables: { id } })
|
||||
.then((result) => {
|
||||
const contribution = result.data.contribution
|
||||
this.$set(
|
||||
this.items,
|
||||
this.items.findIndex((obj) => obj.id === contribution.id),
|
||||
contribution,
|
||||
)
|
||||
})
|
||||
.catch((error) => {
|
||||
this.overlay = false
|
||||
this.toastError(error.message)
|
||||
})
|
||||
},
|
||||
deleteCreation() {
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: adminDeleteContribution,
|
||||
variables: {
|
||||
id: this.item.id,
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
this.overlay = false
|
||||
this.updatePendingCreations(this.item.id)
|
||||
this.toastSuccess(this.$t('creation_form.toasted_delete'))
|
||||
})
|
||||
.catch((error) => {
|
||||
this.overlay = false
|
||||
this.toastError(error.message)
|
||||
})
|
||||
},
|
||||
denyCreation() {
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: denyContribution,
|
||||
variables: {
|
||||
id: this.item.id,
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
this.overlay = false
|
||||
this.updatePendingCreations(this.item.id)
|
||||
this.toastSuccess(this.$t('creation_form.toasted_denied'))
|
||||
})
|
||||
.catch((error) => {
|
||||
this.overlay = false
|
||||
this.toastError(error.message)
|
||||
})
|
||||
},
|
||||
confirmCreation() {
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: confirmContribution,
|
||||
variables: {
|
||||
id: this.item.id,
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
this.overlay = false
|
||||
this.updatePendingCreations(this.item.id)
|
||||
this.toastSuccess(this.$t('creation_form.toasted_created'))
|
||||
})
|
||||
.catch((error) => {
|
||||
this.overlay = false
|
||||
this.toastError(error.message)
|
||||
})
|
||||
},
|
||||
updatePendingCreations(id) {
|
||||
this.items = this.items.filter((obj) => obj.id !== id)
|
||||
this.$store.commit('openCreationsMinus', 1)
|
||||
},
|
||||
showOverlay(item, variant) {
|
||||
this.overlay = true
|
||||
this.item = item
|
||||
this.variant = variant
|
||||
},
|
||||
updateStatus(id) {
|
||||
this.items.find((obj) => obj.id === id).messagesCount++
|
||||
this.items.find((obj) => obj.id === id).status = 'IN_PROGRESS'
|
||||
},
|
||||
formatDateOrDash(value) {
|
||||
return value ? this.$d(new Date(value), 'short') : '—'
|
||||
},
|
||||
},
|
||||
apollo: {
|
||||
ListAllContributions: {
|
||||
query() {
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
icon="arrow-clockwise"
|
||||
font-scale="2"
|
||||
:animation="animation"
|
||||
@click="$apollo.queries.allCommunities.refresh()"
|
||||
data-test="federation-communities-refresh-btn"
|
||||
@click="$apollo.queries.allCommunities.refresh()"
|
||||
></b-icon>
|
||||
</b-button>
|
||||
</div>
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
filters.byActivated === null
|
||||
? $t('all_emails')
|
||||
: filters.byActivated === false
|
||||
? $t('unregistered_emails')
|
||||
: ''
|
||||
? $t('unregistered_emails')
|
||||
: ''
|
||||
}}
|
||||
</BButton>
|
||||
<BButton class="deletedUserSearch" variant="light" @click="deletedUserSearch">
|
||||
@ -17,19 +17,19 @@
|
||||
filters.byDeleted === null
|
||||
? $t('all_emails')
|
||||
: filters.byDeleted === true
|
||||
? $t('deleted_user')
|
||||
: ''
|
||||
? $t('deleted_user')
|
||||
: ''
|
||||
}}
|
||||
</BButton>
|
||||
</div>
|
||||
<label>{{ $t('user_search') }}</label>
|
||||
<UserQuery class="mb-4 mt-2" v-model="criteria" />
|
||||
<UserQuery v-model="criteria" class="mb-4 mt-2" />
|
||||
<SearchUserTable
|
||||
type="PageUserSearch"
|
||||
:items="searchResult"
|
||||
:fields="fields"
|
||||
@updateRoles="updateRoles"
|
||||
@updateDeletedAt="updateDeletedAt"
|
||||
@update-roles="updateRoles"
|
||||
@update-deleted-at="updateDeletedAt"
|
||||
/>
|
||||
<BPagination
|
||||
v-model="currentPage"
|
||||
|
||||
@ -10,6 +10,7 @@ const path = require('path')
|
||||
export default defineConfig({
|
||||
base: '/admin/',
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 8080,
|
||||
},
|
||||
resolve: {
|
||||
@ -37,7 +38,9 @@ export default defineConfig({
|
||||
Icons({
|
||||
compiler: 'vue3',
|
||||
}),
|
||||
,
|
||||
commonjs(),
|
||||
],
|
||||
build: {
|
||||
outDir: 'build',
|
||||
},
|
||||
})
|
||||
|
||||
5418
admin/yarn.lock
5418
admin/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user