1
0

chore: format

This commit is contained in:
kolaente 2024-03-05 18:57:11 +01:00
parent 9ed93b181d
commit 356399f853
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B

View File

@ -2,9 +2,9 @@
import {computed, nextTick, ref, watch} from 'vue' import {computed, nextTick, ref, watch} from 'vue'
import {useAutoHeightTextarea} from '@/composables/useAutoHeightTextarea' import {useAutoHeightTextarea} from '@/composables/useAutoHeightTextarea'
import DatepickerWithValues from '@/components/date/datepickerWithValues.vue' import DatepickerWithValues from '@/components/date/datepickerWithValues.vue'
import UserService from "@/services/user"; import UserService from '@/services/user'
import {getAvatarUrl, getDisplayName} from "@/models/user"; import {getAvatarUrl, getDisplayName} from '@/models/user'
import {createRandomID} from "@/helpers/randomId"; import {createRandomID} from '@/helpers/randomId'
const { const {
modelValue, modelValue,
@ -84,14 +84,14 @@ function unEscapeHtml(unsafe: string): string {
.replace(/&lt;/g, '<') .replace(/&lt;/g, '<')
.replace(/&gt;/g, '>') .replace(/&gt;/g, '>')
.replace(/&quot/g, '"') .replace(/&quot/g, '"')
.replace(/&#039;/g, "'") .replace(/&#039;/g, '\'')
} }
const highlightedFilterQuery = computed(() => { const highlightedFilterQuery = computed(() => {
let highlighted = escapeHtml(filterQuery.value) let highlighted = escapeHtml(filterQuery.value)
dateFields dateFields
.forEach(o => { .forEach(o => {
const pattern = new RegExp(o + '(\\s*)(&lt;|&gt;|&lt;=|&gt;=|=|!=)(\\s*)([\'"]?)([^\'"\\s]+\\1?)?', 'ig'); const pattern = new RegExp(o + '(\\s*)(&lt;|&gt;|&lt;=|&gt;=|=|!=)(\\s*)([\'"]?)([^\'"\\s]+\\1?)?', 'ig')
highlighted = highlighted.replaceAll(pattern, (match, spacesBefore, token, spacesAfter, start, value, position) => { highlighted = highlighted.replaceAll(pattern, (match, spacesBefore, token, spacesAfter, start, value, position) => {
if (typeof value === 'undefined') { if (typeof value === 'undefined') {
value = '' value = ''
@ -102,7 +102,7 @@ const highlightedFilterQuery = computed(() => {
}) })
assigneeFields assigneeFields
.forEach(f => { .forEach(f => {
const pattern = new RegExp(f + '\\s*(&lt;|&gt;|&lt;=|&gt;=|=|!=)\\s*([\'"]?)([^\'"\\s]+\\1?)?', 'ig'); const pattern = new RegExp(f + '\\s*(&lt;|&gt;|&lt;=|&gt;=|=|!=)\\s*([\'"]?)([^\'"\\s]+\\1?)?', 'ig')
highlighted = highlighted.replaceAll(pattern, (match, token, start, value) => { highlighted = highlighted.replaceAll(pattern, (match, token, start, value) => {
if (typeof value === 'undefined') { if (typeof value === 'undefined') {
value = '' value = ''
@ -175,7 +175,7 @@ watch(
}) })
}) })
}, },
{immediate: true} {immediate: true},
) )
function updateDateInQuery(newDate: string) { function updateDateInQuery(newDate: string) {