mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
refactor: filter functions as composable
This commit is contained in:
@ -52,6 +52,9 @@ import { computed, PropType, Ref, ref } from 'vue';
|
||||
import { NUMBER, FLOAT } from 'common/fieldTypes';
|
||||
import { FunctionInfos, RoutineInfos } from 'common/interfaces/antares';
|
||||
import ConfirmModal from '@/components/BaseConfirmModal.vue';
|
||||
import { useFilters } from '@/composables/useFilters';
|
||||
|
||||
const { wrapNumber } = useFilters();
|
||||
|
||||
const props = defineProps({
|
||||
localRoutine: Object as PropType<RoutineInfos | FunctionInfos>,
|
||||
@ -106,11 +109,6 @@ const onKey = (e: KeyboardEvent) => {
|
||||
closeModal();
|
||||
};
|
||||
|
||||
const wrapNumber = (num: number) => {
|
||||
if (!num) return '';
|
||||
return `(${num})`;
|
||||
};
|
||||
|
||||
window.addEventListener('keydown', onKey);
|
||||
|
||||
setTimeout(() => {
|
||||
|
Reference in New Issue
Block a user