2023-02-06 12:19:39 +03:00

21 lines
493 B
JavaScript

import { useStore } from '@/stores/hooks';
import { computed } from 'mobx';
export function useRowValue(index) {
const { $tables } = useStore();
const storeValue = computed(() => $tables.payments.getValue(index)).get();
function setStoreValue(value) {
$tables.payments.setValue(index, value);
}
return [storeValue, setStoreValue];
}
export function useRowStatus(index) {
const { $tables } = useStore();
return computed(() => $tables.payments.getStatus(index)).get();
}