Initial cut - untested.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user