|
@@ -695,11 +695,14 @@ const isLocationMatchedByFilters = (loc: LocationResourceDataVO) => {
|
|
|
.toUpperCase()
|
|
.toUpperCase()
|
|
|
.includes(normalizedLocGroupKeyword)
|
|
.includes(normalizedLocGroupKeyword)
|
|
|
const normalizedLocationIdKeyword = appliedLocationIdKeyword.value.trim().toUpperCase()
|
|
const normalizedLocationIdKeyword = appliedLocationIdKeyword.value.trim().toUpperCase()
|
|
|
|
|
+ const normalizedLocationIdKeywords = splitLocationIdKeywords(normalizedLocationIdKeyword)
|
|
|
const matchedLocationId =
|
|
const matchedLocationId =
|
|
|
!normalizedLocationIdKeyword ||
|
|
!normalizedLocationIdKeyword ||
|
|
|
- String(loc.locationId || '')
|
|
|
|
|
- .toUpperCase()
|
|
|
|
|
- .includes(normalizedLocationIdKeyword)
|
|
|
|
|
|
|
+ normalizedLocationIdKeywords.some((keyword) =>
|
|
|
|
|
+ String(loc.locationId || '')
|
|
|
|
|
+ .toUpperCase()
|
|
|
|
|
+ .includes(keyword)
|
|
|
|
|
+ )
|
|
|
const normalizedWcsLocationIdKeyword = appliedWcsLocationIdKeyword.value.trim().toUpperCase()
|
|
const normalizedWcsLocationIdKeyword = appliedWcsLocationIdKeyword.value.trim().toUpperCase()
|
|
|
const matchedWcsLocationId =
|
|
const matchedWcsLocationId =
|
|
|
!normalizedWcsLocationIdKeyword ||
|
|
!normalizedWcsLocationIdKeyword ||
|
|
@@ -954,6 +957,15 @@ const handleTitleTokenCopy = async () => {
|
|
|
|
|
|
|
|
const countHyphen = (text: string) => text.split('-').length - 1
|
|
const countHyphen = (text: string) => text.split('-').length - 1
|
|
|
|
|
|
|
|
|
|
+const splitLocationIdKeywords = (keyword: string) =>
|
|
|
|
|
+ keyword
|
|
|
|
|
+ .split(',')
|
|
|
|
|
+ .map((item) => item.trim())
|
|
|
|
|
+ .filter(Boolean)
|
|
|
|
|
+
|
|
|
|
|
+const isLocationIdKeyword = (keyword: string) =>
|
|
|
|
|
+ splitLocationIdKeywords(keyword).every((item) => countHyphen(item) === 3)
|
|
|
|
|
+
|
|
|
const applyLocationKeywordFilter = () => {
|
|
const applyLocationKeywordFilter = () => {
|
|
|
const keyword = locationKeywordInput.value.trim()
|
|
const keyword = locationKeywordInput.value.trim()
|
|
|
const hyphenCount = countHyphen(keyword)
|
|
const hyphenCount = countHyphen(keyword)
|
|
@@ -963,7 +975,7 @@ const applyLocationKeywordFilter = () => {
|
|
|
appliedLocGroupKeyword.value = ''
|
|
appliedLocGroupKeyword.value = ''
|
|
|
appliedLocationIdKeyword.value = ''
|
|
appliedLocationIdKeyword.value = ''
|
|
|
appliedWcsLocationIdKeyword.value = ''
|
|
appliedWcsLocationIdKeyword.value = ''
|
|
|
- } else if (hyphenCount === 3) {
|
|
|
|
|
|
|
+ } else if (isLocationIdKeyword(keyword)) {
|
|
|
appliedLocationIdKeyword.value = keyword
|
|
appliedLocationIdKeyword.value = keyword
|
|
|
appliedLocGroupKeyword.value = ''
|
|
appliedLocGroupKeyword.value = ''
|
|
|
appliedWcsLocationIdKeyword.value = ''
|
|
appliedWcsLocationIdKeyword.value = ''
|