Initial cut - untested.

This commit is contained in:
2025-09-25 09:31:02 -07:00
parent 7a0666cc6c
commit 3775522265
33 changed files with 351 additions and 346 deletions

View File

@@ -53,9 +53,9 @@ const AddAssets = ({assetTypes}) => {
backgroundColor: selectedAssetType === assetType ? '#EECFA6' : 'white'
}
}
const addAsset = () => {
const addAsset = async () => {
//TODO: Check the inputs.
Meteor.call("assets.add", selectedAssetType._id, assetId, serial, condition, conditionDetails);
await Meteor.callAsync("assets.add", selectedAssetType._id, assetId, serial, condition, conditionDetails);
setAssetId("")
setSerial("")
}
@@ -122,8 +122,8 @@ const AddAssets = ({assetTypes}) => {
export default () => {
Meteor.subscribe('assetTypes');
const {assetTypes} = useTracker(() => {
const assetTypes = AssetTypes.find({}, {sort: {year: -1}}).fetch();
const {assetTypes} = useTracker(async () => {
const assetTypes = await AssetTypes.find({}, {sort: {year: -1}}).fetchAsync();
return {
assetTypes