mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
linter fixes
This commit is contained in:
parent
6a5869fd3e
commit
0de05680b6
@ -16,8 +16,7 @@
|
||||
</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',
|
||||
|
||||
@ -31,7 +31,8 @@ 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',
|
||||
},
|
||||
],
|
||||
|
||||
@ -113,7 +113,8 @@ 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',
|
||||
@ -132,7 +133,8 @@ 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',
|
||||
|
||||
@ -55,7 +55,8 @@ 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',
|
||||
},
|
||||
@ -75,7 +76,8 @@ 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',
|
||||
},
|
||||
@ -85,7 +87,8 @@ 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',
|
||||
},
|
||||
@ -173,7 +176,8 @@ 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',
|
||||
},
|
||||
@ -183,7 +187,8 @@ 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',
|
||||
},
|
||||
@ -193,7 +198,8 @@ 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',
|
||||
},
|
||||
|
||||
@ -26,7 +26,7 @@ import { useAppToast } from '@/composables/useToast'
|
||||
|
||||
const { t } = useI18n()
|
||||
const store = useStore()
|
||||
const { toastError } = useAppToast()
|
||||
const { toastSuccess, toastError } = useAppToast()
|
||||
|
||||
const props = defineProps({
|
||||
initialValue: { type: String, default: 'PUBLISH_NAME_ALIAS_OR_INITALS' },
|
||||
|
||||
@ -10,17 +10,17 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { useStore } from 'vuex'
|
||||
import { ref } from 'vue'
|
||||
import { updateUserInfos } from '@/graphql/mutations'
|
||||
import { useMutation } from '@vue/apollo-composable'
|
||||
import { BFormCheckbox } from 'bootstrap-vue-next'
|
||||
import { useAppToast } from '@/composables/useToast'
|
||||
|
||||
const store = useStore()
|
||||
const { toastError } = useAppToast()
|
||||
const { toastSuccess, toastError } = useAppToast()
|
||||
|
||||
defineProps({
|
||||
const props = defineProps({
|
||||
initialValue: { type: Boolean, default: false },
|
||||
attrName: { type: String },
|
||||
enabledText: { type: String },
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -434,7 +434,7 @@ const setVisible = (bool) => {
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background-image: url("/img/svg/Gradido_Blaetter_Mainpage.svg") !important;
|
||||
background-image: url('/img/svg/Gradido_Blaetter_Mainpage.svg') !important;
|
||||
}
|
||||
|
||||
.b-right {
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -47,8 +47,9 @@ 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 }) => {
|
||||
|
||||
@ -233,7 +233,8 @@ 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,
|
||||
@ -268,7 +269,8 @@ 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,
|
||||
@ -343,7 +345,8 @@ 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,
|
||||
|
||||
@ -137,11 +137,7 @@ 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',
|
||||
})
|
||||
|
||||
|
||||
@ -191,8 +191,7 @@ 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) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user