Created
June 4, 2013 15:28
-
-
Save ToJans/5706806 to your computer and use it in GitHub Desktop.
exploring how I would design a simple MEF with angularjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function BOM($scope) { | |
$scope.Materials = [ | |
{ "id": "MAT/TOMATOSOUP", | |
"name": "Tomato soup", | |
"unit": "L", | |
"Precision": 0.01 | |
}, { | |
"id": "MAT/ONION", | |
"name": "Onion", | |
"unit": "PCS", | |
"Precision": 1 | |
}]; | |
$scope.Recipies = [ | |
{ "id": "REC/TOMATOSOUP", | |
"produces": "MAT/TOMATOSOUP", | |
"unit": "PCS", | |
"Quantity": "1000", | |
"Steps": [ | |
"BOM": [ | |
{ "id": "REC/TOMATO", "Quantity": 0.5 }, | |
{ "id": "REC/ONION", "Quantity": 4 } | |
], | |
"BOR": [ | |
{ "id": "RES/MACHINE1", "Quantity": 1 }, | |
{ "id": "RES/MACHINE2", "Quantity": 2 } | |
] | |
] | |
}]; | |
$scope.Units = [ | |
{ "id": "L", "Name": "Liters", }, | |
{ "id": "PCS", "Name": "Pieces", }, | |
{ "id": "H","Name":"Hours","Precision":1/6} | |
]; | |
$scope.Resources = [ | |
{ "id": "RES/MACHINE1", "Name":"Line 1","Precision": 1 }, | |
{ "id": "RES/MACHINE2", "Name": "Line 1", "Precision": 1 } | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment