chore: format
This commit is contained in:
parent
9ed93b181d
commit
356399f853
@ -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(/</g, '<')
|
.replace(/</g, '<')
|
||||||
.replace(/>/g, '>')
|
.replace(/>/g, '>')
|
||||||
.replace(/"/g, '"')
|
.replace(/"/g, '"')
|
||||||
.replace(/'/g, "'")
|
.replace(/'/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*)(<|>|<=|>=|=|!=)(\\s*)([\'"]?)([^\'"\\s]+\\1?)?', 'ig');
|
const pattern = new RegExp(o + '(\\s*)(<|>|<=|>=|=|!=)(\\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*(<|>|<=|>=|=|!=)\\s*([\'"]?)([^\'"\\s]+\\1?)?', 'ig');
|
const pattern = new RegExp(f + '\\s*(<|>|<=|>=|=|!=)\\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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user