Dev/v1.2 (#4)
Build Docker Image / build-backend (push) Successful in 1m56s
Build Docker Image / build-frontend (push) Successful in 1m55s

Co-authored-by: ISMAIL MASSERAN <topaz@Mac.dlinkrouter.local>
Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
2026-07-06 12:50:55 +08:00
parent e77712105c
commit d06c4701a4
190 changed files with 5365 additions and 26981 deletions
@@ -0,0 +1,48 @@
import { computed, ref } from 'vue'
import { dummyExternalSystems } from '../data/dummy-external-systems'
import {
externalSystemStatusLabel,
getExternalSystemStatus,
} from '../utils/external-system.utils'
import type { ExternalSystem } from '../types/external-system.types'
export function useExternalSystemList() {
const search = ref('')
const loading = ref(false)
const systems = computed(() => {
const query = search.value.trim().toLowerCase()
if (!query) {
return dummyExternalSystems
}
return dummyExternalSystems.filter((system) => {
const haystack = [
system.name,
system.code,
system.description,
externalSystemStatusLabel(getExternalSystemStatus(system)),
]
.join(' ')
.toLowerCase()
return haystack.includes(query)
})
})
const availableCount = computed(
() => systems.value.filter((system) => getExternalSystemStatus(system) === 'available').length,
)
function getSystemById(id: string): ExternalSystem | undefined {
return dummyExternalSystems.find((system) => system.id === id)
}
return {
systems,
search,
loading,
availableCount,
getSystemById,
}
}