2022-07-06 20:49:46 +03:00

23 lines
517 B
JavaScript

import { computed } from 'mobx';
import { useStore } from 'stores/hooks';
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();
const status = computed(() => $tables.payments.getStatus(index)).get();
return status;
}