refactor review from claus-peter

This commit is contained in:
ogerly 2022-06-15 22:32:53 +02:00
parent e550d7ebbf
commit 5374b41905
5 changed files with 30 additions and 29 deletions

View File

@ -39,7 +39,7 @@ module.exports = {
{ {
src: './src', src: './src',
extensions: ['.js', '.vue'], extensions: ['.js', '.vue'],
ignores: ['contributionLink.options.maxPerCycle.null'], ignores: [],
enableFix: false, enableFix: false,
}, },
], ],

View File

@ -42,6 +42,7 @@
type="text" type="text"
placeholder="Name" placeholder="Name"
required required
maxlength="80"
></b-form-input> ></b-form-input>
</b-form-group> </b-form-group>
<!-- Desc --> <!-- Desc -->
@ -51,6 +52,7 @@
size="lg" size="lg"
:placeholder="$t('contributionLink.memo')" :placeholder="$t('contributionLink.memo')"
required required
maxlength="255"
></b-form-textarea> ></b-form-textarea>
</b-form-group> </b-form-group>
<!-- Amount --> <!-- Amount -->
@ -145,7 +147,6 @@ export default {
{ value: 'yearly', text: this.$t('contributionLink.options.cycle.yearly') }, { value: 'yearly', text: this.$t('contributionLink.options.cycle.yearly') },
], ],
maxPerCycle: [ maxPerCycle: [
{ value: null, text: this.$t('contributionLink.options.maxPerCycle.null') },
{ value: '1', text: '1 x' }, { value: '1', text: '1 x' },
{ value: '2', text: '2 x' }, { value: '2', text: '2 x' },
{ value: '3', text: '3 x' }, { value: '3', text: '3 x' },

View File

@ -57,10 +57,10 @@ export default {
'name', 'name',
'memo', 'memo',
'amount', 'amount',
{ key: 'cycle', label: 'Zyklus' }, { key: 'cycle', label: this.$t('contributionLink.cycle') },
{ key: 'maxPerCycle', label: 'Wiederholung' }, { key: 'maxPerCycle', label: this.$t('contributionLink.maxPerCycle') },
{ key: 'validFrom', label: 'Start' }, { key: 'validFrom', label: this.$t('contributionLink.validFrom') },
{ key: 'validTo', label: 'Ende' }, { key: 'validTo', label: this.$t('contributionLink.validTo') },
'delete', 'delete',
'edit', 'edit',
'show', 'show',
@ -71,24 +71,22 @@ export default {
}, },
methods: { methods: {
deleteContributionLink() { deleteContributionLink() {
this.$bvModal this.$bvModal.msgBoxConfirm(this.$t('contributionLink.deleteNow')).then(async (value) => {
.msgBoxConfirm('Automatische Creations wirklich löschen?') if (value)
.then(async (value) => { await this.$apollo
if (value) .mutate({
await this.$apollo mutation: deleteContributionLink,
.mutate({ variables: {
mutation: deleteContributionLink, id: this.id,
variables: { },
id: this.id, })
}, .then(() => {
}) this.toastSuccess('TODO: request message deleted ')
.then(() => { })
this.toastSuccess('TODO: request message deleted ') .catch((err) => {
}) this.toastError(err.message)
.catch((err) => { })
this.toastError(err.message) })
})
})
}, },
editContributionLink(row) { editContributionLink(row) {
this.$emit('editContributionLinkData', row) this.$emit('editContributionLinkData', row)

View File

@ -8,7 +8,7 @@
"create": "Anlegen", "create": "Anlegen",
"cycle": "Zyklus", "cycle": "Zyklus",
"maximumAmount": "maximaler Betrag", "maximumAmount": "maximaler Betrag",
"maxPerCycle": "Wiederholung", "maxPerCycle": "Wiederholungen",
"memo": "Nachricht", "memo": "Nachricht",
"name": "Name", "name": "Name",
"newContributionLink": "Neuer Beitragslink", "newContributionLink": "Neuer Beitragslink",
@ -30,7 +30,8 @@
} }
}, },
"validFrom": "Startdatum", "validFrom": "Startdatum",
"validTo": "Enddatum" "validTo": "Enddatum",
"deleteNow":"Automatische Creations wirklich löschen?"
}, },
"creation": "Schöpfung", "creation": "Schöpfung",
"creationList": "Schöpfungsliste", "creationList": "Schöpfungsliste",

View File

@ -12,7 +12,7 @@
"memo": "Memo", "memo": "Memo",
"name": "Name", "name": "Name",
"newContributionLink": "New contribution link", "newContributionLink": "New contribution link",
"noContributionLinks": "No contribution links have been created.", "noContributionLinks": "No contribution link has been created.",
"noDateSelected": "No date selected", "noDateSelected": "No date selected",
"noEndDate": "No end-date", "noEndDate": "No end-date",
"noStartDate": "No start-date", "noStartDate": "No start-date",
@ -21,7 +21,7 @@
"daily": "daily", "daily": "daily",
"hourly": "hourly", "hourly": "hourly",
"monthly": "monthly", "monthly": "monthly",
"once": "unique", "once": "once",
"weekly": "weekly", "weekly": "weekly",
"yearly": "yearly" "yearly": "yearly"
}, },
@ -30,7 +30,8 @@
} }
}, },
"validFrom": "Start-date", "validFrom": "Start-date",
"validTo": "End-Date" "validTo": "End-Date",
"deleteNow":"Do you really delete automatic creations?"
}, },
"creation": "Creation", "creation": "Creation",
"creationList": "Creation list", "creationList": "Creation list",