linter fixes

This commit is contained in:
Kamila 2024-08-09 08:14:18 +02:00
parent 7fb86f6f87
commit c80745fb1a
15 changed files with 60 additions and 66 deletions

View File

@ -84,6 +84,7 @@ declare module 'vue' {
IBiArrowUpCircle: typeof import('~icons/bi/arrow-up-circle')['default']
IBiBellFill: typeof import('~icons/bi/bell-fill')['default']
IBiCaretDownFill: typeof import('~icons/bi/caret-down-fill')['default']
IBiCash: typeof import('~icons/bi/cash')['default']
IBiChatDots: typeof import('~icons/bi/chat-dots')['default']
IBiCheck: typeof import('~icons/bi/check')['default']
IBiEye: typeof import('~icons/bi/eye')['default']
@ -92,6 +93,7 @@ declare module 'vue' {
IBiPencil: typeof import('~icons/bi/pencil')['default']
IBiPeople: typeof import('~icons/bi/people')['default']
IBiQuestion: typeof import('~icons/bi/question')['default']
IBiShieldCheck: typeof import('~icons/bi/shield-check')['default']
IBiTrash: typeof import('~icons/bi/trash')['default']
IBiXCircle: typeof import('~icons/bi/x-circle')['default']
InputAmount: typeof import('./src/components/Inputs/InputAmount.vue')['default']

View File

@ -5,10 +5,10 @@
<BForm @submit.prevent="onSubmit" @reset="onReset">
<BFormTextarea
id="textarea"
@update:model-value="form.text = $event"
:model-value="form.text"
:placeholder="$t('form.memo')"
rows="3"
@update:model-value="form.text = $event"
></BFormTextarea>
<BRow class="mt-4 mb-4">
<BCol>

View File

@ -16,7 +16,8 @@
</template>
<script>
const LINK_REGEX_PATTERN = /(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*))/i
const LINK_REGEX_PATTERN =
/(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*))/i
export default {
name: 'ParseMessage',

View File

@ -9,7 +9,6 @@
<BFormInput
id="contribution-date"
:model-value="date"
@update:model-value="date = $event"
:state="dataFieldMeta.valid"
:locale="$i18n.locale"
:max="getMaximalDate"
@ -20,6 +19,7 @@
required
:no-flip="true"
type="date"
@update:model-value="date = $event"
>
<template #nav-prev-year><span></span></template>
<template #nav-next-year><span></span></template>

View File

@ -31,8 +31,7 @@ describe('ContributionList', () => {
{
id: 2,
date: '05/04/2022',
memo:
'Ich habe 50 Stunden den Nachbarkindern bei ihren Hausaufgaben geholfen und Nachhilfeunterricht gegeben.',
memo: 'Ich habe 50 Stunden den Nachbarkindern bei ihren Hausaufgaben geholfen und Nachhilfeunterricht gegeben.',
amount: '1000',
},
],

View File

@ -113,8 +113,7 @@ describe('GddTransactionList', () => {
balance: '31.76099091058520945292',
previousBalance: '30.76',
balanceDate: '2022-02-28T13:55:47',
memo:
'Um den Kessel schlingt den Reihn, Werft die Eingeweid hinein. Kröte du, die Nacht und Tag Unterm kalten Steine lag,',
memo: 'Um den Kessel schlingt den Reihn, Werft die Eingeweid hinein. Kröte du, die Nacht und Tag Unterm kalten Steine lag,',
linkedUser: {
firstName: 'Bibi',
lastName: 'Bloxberg',
@ -133,8 +132,7 @@ describe('GddTransactionList', () => {
balance: '10',
previousBalance: '31.75',
balanceDate: '2022-02-23T10:55:30',
memo:
'Monatlanges Gift sog ein, In den Topf zuerst hinein… (William Shakespeare, Die Hexen aus Macbeth)',
memo: 'Monatlanges Gift sog ein, In den Topf zuerst hinein… (William Shakespeare, Die Hexen aus Macbeth)',
linkedUser: {
firstName: 'Bibi',
lastName: 'Bloxberg',

View File

@ -55,8 +55,7 @@ describe('TransactionLinkSummary', () => {
createdAt: '2022-03-16T14:22:40.000Z',
holdAvailableAmount: '5.13109484759482747111',
id: 86,
memo:
'Hokuspokus Haselnuss, Vogelbein und Fliegenfuß, damit der Trick gelingen muss!',
memo: 'Hokuspokus Haselnuss, Vogelbein und Fliegenfuß, damit der Trick gelingen muss!',
redeemedAt: null,
validUntil: '2022-03-30T14:22:40.000Z',
},
@ -76,8 +75,7 @@ describe('TransactionLinkSummary', () => {
createdAt: '2022-03-16T14:22:40.000Z',
holdAvailableAmount: '5.13109484759482747111',
id: 92,
memo:
'Abrakadabra 1,2,3, die Sonne kommt herbei. Schweinepups und Spuckebrei, der Regen ist vorbei.',
memo: 'Abrakadabra 1,2,3, die Sonne kommt herbei. Schweinepups und Spuckebrei, der Regen ist vorbei.',
redeemedAt: null,
validUntil: '2022-03-30T14:22:40.000Z',
},
@ -87,8 +85,7 @@ describe('TransactionLinkSummary', () => {
createdAt: '2022-03-16T14:22:40.000Z',
holdAvailableAmount: '5.13109484759482747111',
id: 16,
memo:
'Abrakadabra 1,2,3 was verschwunden ist komme herbei.Wieseldreck und Schweinemist, zaubern das ist keine List.',
memo: 'Abrakadabra 1,2,3 was verschwunden ist komme herbei.Wieseldreck und Schweinemist, zaubern das ist keine List.',
redeemedAt: null,
validUntil: '2022-03-30T14:22:40.000Z',
},
@ -176,8 +173,7 @@ describe('TransactionLinkSummary', () => {
createdAt: '2022-03-16T14:22:40.000Z',
holdAvailableAmount: '5.13109484759482747111',
id: 87,
memo:
'Hat jemand die Nummer von der Hexe aus Schneewittchen? Ich bräuchte mal ein paar Äpfel.',
memo: 'Hat jemand die Nummer von der Hexe aus Schneewittchen? Ich bräuchte mal ein paar Äpfel.',
redeemedAt: null,
validUntil: '2022-03-30T14:22:40.000Z',
},
@ -187,8 +183,7 @@ describe('TransactionLinkSummary', () => {
createdAt: '2022-03-16T14:22:40.000Z',
holdAvailableAmount: '5.13109484759482747111',
id: 108,
memo:
'Die Windfahn´ krächzt am Dach, Der Uhu im Geklüfte; Was wispert wie ein Ach Verhallend in die Lüfte?',
memo: 'Die Windfahn´ krächzt am Dach, Der Uhu im Geklüfte; Was wispert wie ein Ach Verhallend in die Lüfte?',
redeemedAt: null,
validUntil: '2022-03-30T14:22:40.000Z',
},
@ -198,8 +193,7 @@ describe('TransactionLinkSummary', () => {
createdAt: '2022-03-16T14:22:40.000Z',
holdAvailableAmount: '5.13109484759482747111',
id: 93,
memo:
'Verschlafen kräht der Hahn, Ein Blitz noch, und ein trüber, Umwölbter Tag bricht an Walpurgisnacht vorüber!',
memo: 'Verschlafen kräht der Hahn, Ein Blitz noch, und ein trüber, Umwölbter Tag bricht an Walpurgisnacht vorüber!',
redeemedAt: null,
validUntil: '2022-03-30T14:22:40.000Z',
},

View File

@ -13,19 +13,19 @@ export const unsubscribeNewsletter = gql`
`
export const setPassword = gql`
mutation($code: String!, $password: String!) {
mutation ($code: String!, $password: String!) {
setPassword(code: $code, password: $password)
}
`
export const forgotPassword = gql`
mutation($email: String!) {
mutation ($email: String!) {
forgotPassword(email: $email)
}
`
export const updateUserInfos = gql`
mutation(
mutation (
$firstName: String
$lastName: String
$alias: String
@ -61,7 +61,7 @@ export const updateUserInfos = gql`
`
export const createUser = gql`
mutation(
mutation (
$firstName: String!
$lastName: String!
$email: String!
@ -83,7 +83,7 @@ export const createUser = gql`
`
export const sendCoins = gql`
mutation(
mutation (
$recipientCommunityIdentifier: String!
$recipientIdentifier: String!
$amount: Decimal!
@ -99,7 +99,7 @@ export const sendCoins = gql`
`
export const createTransactionLink = gql`
mutation($amount: Decimal!, $memo: String!) {
mutation ($amount: Decimal!, $memo: String!) {
createTransactionLink(amount: $amount, memo: $memo) {
link
amount
@ -110,19 +110,19 @@ export const createTransactionLink = gql`
`
export const deleteTransactionLink = gql`
mutation($id: Int!) {
mutation ($id: Int!) {
deleteTransactionLink(id: $id)
}
`
export const redeemTransactionLink = gql`
mutation($code: String!) {
mutation ($code: String!) {
redeemTransactionLink(code: $code)
}
`
export const createContribution = gql`
mutation($creationDate: String!, $memo: String!, $amount: Decimal!) {
mutation ($creationDate: String!, $memo: String!, $amount: Decimal!) {
createContribution(creationDate: $creationDate, memo: $memo, amount: $amount) {
amount
memo
@ -131,7 +131,7 @@ export const createContribution = gql`
`
export const updateContribution = gql`
mutation($contributionId: Int!, $amount: Decimal!, $memo: String!, $creationDate: String!) {
mutation ($contributionId: Int!, $amount: Decimal!, $memo: String!, $creationDate: String!) {
updateContribution(
contributionId: $contributionId
amount: $amount
@ -146,13 +146,13 @@ export const updateContribution = gql`
`
export const deleteContribution = gql`
mutation($id: Int!) {
mutation ($id: Int!) {
deleteContribution(id: $id)
}
`
export const createContributionMessage = gql`
mutation($contributionId: Int!, $message: String!) {
mutation ($contributionId: Int!, $message: String!) {
createContributionMessage(contributionId: $contributionId, message: $message) {
id
message
@ -166,7 +166,7 @@ export const createContributionMessage = gql`
`
export const login = gql`
mutation($email: String!, $password: String!, $publisherId: Int) {
mutation ($email: String!, $password: String!, $publisherId: Int) {
login(email: $email, password: $password, publisherId: $publisherId) {
gradidoID
alias

View File

@ -35,7 +35,7 @@ export const authenticateHumhubAutoLogin = gql`
`
export const transactionsQuery = gql`
query($currentPage: Int = 1, $pageSize: Int = 25, $order: Order = DESC) {
query ($currentPage: Int = 1, $pageSize: Int = 25, $order: Order = DESC) {
transactionList(currentPage: $currentPage, pageSize: $pageSize, order: $order) {
balance {
balance
@ -72,7 +72,7 @@ export const transactionsQuery = gql`
`
export const listGDTEntriesQuery = gql`
query($currentPage: Int!, $pageSize: Int!) {
query ($currentPage: Int!, $pageSize: Int!) {
listGDTEntries(currentPage: $currentPage, pageSize: $pageSize) {
count
gdtEntries {
@ -101,19 +101,19 @@ export const selectCommunities = gql`
`
export const queryOptIn = gql`
query($optIn: String!) {
query ($optIn: String!) {
queryOptIn(optIn: $optIn)
}
`
export const checkUsername = gql`
query($username: String!) {
query ($username: String!) {
checkUsername(username: $username)
}
`
export const queryTransactionLink = gql`
query($code: String!) {
query ($code: String!) {
queryTransactionLink(code: $code) {
... on TransactionLink {
id
@ -148,7 +148,7 @@ export const queryTransactionLink = gql`
`
export const listTransactionLinks = gql`
query($currentPage: Int = 1, $pageSize: Int = 5) {
query ($currentPage: Int = 1, $pageSize: Int = 5) {
listTransactionLinks(currentPage: $currentPage, pageSize: $pageSize) {
links {
id
@ -165,7 +165,7 @@ export const listTransactionLinks = gql`
`
export const listContributionLinks = gql`
query($currentPage: Int = 1, $pageSize: Int = 25, $order: Order = DESC) {
query ($currentPage: Int = 1, $pageSize: Int = 25, $order: Order = DESC) {
listContributionLinks(currentPage: $currentPage, pageSize: $pageSize, order: $order) {
links {
id
@ -185,7 +185,7 @@ export const listContributionLinks = gql`
`
export const listContributions = gql`
query(
query (
$currentPage: Int = 1
$pageSize: Int = 25
$order: Order = DESC
@ -220,7 +220,7 @@ export const listContributions = gql`
`
export const listAllContributions = gql`
query($currentPage: Int = 1, $pageSize: Int = 25, $order: Order = DESC) {
query ($currentPage: Int = 1, $pageSize: Int = 25, $order: Order = DESC) {
listAllContributions(currentPage: $currentPage, pageSize: $pageSize, order: $order) {
contributionCount
contributionList {
@ -266,7 +266,7 @@ export const searchAdminUsers = gql`
`
export const listContributionMessages = gql`
query($contributionId: Int!, $pageSize: Int = 25, $currentPage: Int = 1, $order: Order = ASC) {
query ($contributionId: Int!, $pageSize: Int = 25, $currentPage: Int = 1, $order: Order = ASC) {
listContributionMessages(
contributionId: $contributionId
pageSize: $pageSize
@ -299,7 +299,7 @@ export const openCreations = gql`
`
export const user = gql`
query($identifier: String!, $communityIdentifier: String!) {
query ($identifier: String!, $communityIdentifier: String!) {
user(identifier: $identifier, communityIdentifier: $communityIdentifier) {
firstName
lastName

View File

@ -86,14 +86,14 @@ const humhubUri = ref('')
const humhubAllowed = computed(() => store.state.humhubAllowed)
const { refetch: refetchAuthenticateHumhub, onResult, onError } = useQuery(
authenticateHumhubAutoLogin,
null,
{
fetchPolicy: 'network-only',
enabled: false,
},
)
const {
refetch: refetchAuthenticateHumhub,
onResult,
onError,
} = useQuery(authenticateHumhubAutoLogin, null, {
fetchPolicy: 'network-only',
enabled: false,
})
onResult(({ data }) => {
if (data) {

View File

@ -10,8 +10,8 @@
/>
<div class="mb-3"></div>
<contribution-form
:model-value="form"
:key="computedKeyFromForm"
:model-value="form"
:is-this-month="isThisMonth"
:minimal-date="minimalDate"
:max-gdd-last-month="maxForMonths[0]"
@ -415,7 +415,6 @@ onOpenCreationsResult(({ data }) => {
})
onListAllContributionsResult(({ data }) => {
console.count('RESULT?!')
if (data) {
contributionCountAll.value = data.listAllContributions.contributionCount
itemsAll.value.length = 0

View File

@ -47,9 +47,8 @@ const supportMail = CONFIG.COMMUNITY_SUPPORT_MAIL
const admins = computed(() => itemsAdminUser.value.filter((item) => item.role === 'ADMIN'))
const moderators = computed(() => itemsAdminUser.value.filter((item) => item.role === 'MODERATOR'))
const { onResult: onContributionLinksResult, onError: onContributionLinksError } = useQuery(
listContributionLinks,
)
const { onResult: onContributionLinksResult, onError: onContributionLinksError } =
useQuery(listContributionLinks)
const { onResult: onAdminUsersResult, onError: onAdminUsersError } = useQuery(searchAdminUsers)
onContributionLinksResult(({ data }) => {

View File

@ -233,8 +233,7 @@ describe('TransactionLink', () => {
__typename: 'TransactionLink',
id: 92,
amount: '22',
memo:
'Abrakadabra drei, vier, fünf, sechs, hier steht jetzt ein Memotext! Hex hex ',
memo: 'Abrakadabra drei, vier, fünf, sechs, hier steht jetzt ein Memotext! Hex hex ',
createdAt: '2022-03-17T16:10:28.000Z',
validUntil: transactionLinkValidExpireDate(),
redeemedAt: null,
@ -269,8 +268,7 @@ describe('TransactionLink', () => {
__typename: 'TransactionLink',
id: 92,
amount: '22',
memo:
'Abrakadabra drei, vier, fünf, sechs, hier steht jetzt ein Memotext! Hex hex ',
memo: 'Abrakadabra drei, vier, fünf, sechs, hier steht jetzt ein Memotext! Hex hex ',
createdAt: '2022-03-17T16:10:28.000Z',
validUntil: transactionLinkValidExpireDate(),
redeemedAt: null,
@ -345,8 +343,7 @@ describe('TransactionLink', () => {
__typename: 'TransactionLink',
id: 92,
amount: '22',
memo:
'Abrakadabra drei, vier, fünf, sechs, hier steht jetzt ein Memotext! Hex hex ',
memo: 'Abrakadabra drei, vier, fünf, sechs, hier steht jetzt ein Memotext! Hex hex ',
createdAt: '2022-03-17T16:10:28.000Z',
validUntil: transactionLinkValidExpireDate(),
redeemedAt: null,

View File

@ -137,7 +137,11 @@ const variables = ref({
pageSize: pageSize.value,
})
const { load: loadGdt, onResult, onError } = useLazyQuery(listGDTEntriesQuery, variables, {
const {
load: loadGdt,
onResult,
onError,
} = useLazyQuery(listGDTEntriesQuery, variables, {
fetchPolicy: 'network-only',
})

View File

@ -191,7 +191,8 @@ import nl from '@vee-validate/i18n/dist/locale/nl.json'
import tr from '@vee-validate/i18n/dist/locale/tr.json'
// Email and username regex patterns remain the same
const EMAIL_REGEX = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
const EMAIL_REGEX =
/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
const USERNAME_REGEX = /^(?=.{3,20}$)[a-zA-Z0-9]+(?:[_-][a-zA-Z0-9]+?)*$/
export const loadAllRules = (i18nCallback, apollo) => {