Vikron
Vikron
MCMeteor Community
Created by Vikron on 3/16/2023 in #general-help
Astronomy : TypeError, Cannot read property 'prototype' of undefined
Thanks in advance for the help 🥲
5 replies
MCMeteor Community
Created by Vikron on 3/16/2023 in #general-help
Astronomy : TypeError, Cannot read property 'prototype' of undefined
OrderStatus
const OrderStatus = Enum.create({
name: 'OrderStatus',
identifiers: ['PENDING', 'PREPARED', 'DELIVERED']
});

export default OrderStatus;
const OrderStatus = Enum.create({
name: 'OrderStatus',
identifiers: ['PENDING', 'PREPARED', 'DELIVERED']
});

export default OrderStatus;
5 replies
MCMeteor Community
Created by Vikron on 3/16/2023 in #general-help
Astronomy : TypeError, Cannot read property 'prototype' of undefined
Menu.js
export const Menus = new Mongo.Collection('menus');

const Menu = Class.create({
name: 'Menu',
collection: Menus,
typeField: '_type',
secured: false,
fields: {
title: {
type: String,
},
price : Number,
createdAt: Date,
},
meteorMethods: {

}
});

export default Menu;
export const Menus = new Mongo.Collection('menus');

const Menu = Class.create({
name: 'Menu',
collection: Menus,
typeField: '_type',
secured: false,
fields: {
title: {
type: String,
},
price : Number,
createdAt: Date,
},
meteorMethods: {

}
});

export default Menu;
5 replies
MCMeteor Community
Created by Vikron on 3/16/2023 in #general-help
Astronomy : TypeError, Cannot read property 'prototype' of undefined
Order.js
export const Orders = new Mongo.Collection('orders');

const Order = Class.create({
name: 'Order',
collection: Orders,
typeField: '_type',
secured: false,
fields: {
menu : Menu,
status : {
type : OrderStatus,
default : function(){
return 0;
}
},
payed : Boolean,
createdAt: Date,
}
});

export default Order;
export const Orders = new Mongo.Collection('orders');

const Order = Class.create({
name: 'Order',
collection: Orders,
typeField: '_type',
secured: false,
fields: {
menu : Menu,
status : {
type : OrderStatus,
default : function(){
return 0;
}
},
payed : Boolean,
createdAt: Date,
}
});

export default Order;
5 replies