Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Purchased and Favorite attributes #12

Open
atherdon opened this issue Mar 15, 2018 · 6 comments
Open

Purchased and Favorite attributes #12

atherdon opened this issue Mar 15, 2018 · 6 comments

Comments

@atherdon
Copy link
Contributor

atherdon commented Mar 15, 2018

GroceriStar/groceristar#103 Undo this for the next release

  • Purchased and Ing list merge into one ID list

  • add to purchased flow

@atherdon atherdon changed the title Purchased and Favorite attirbutes Purchased and Favorite attributes Mar 15, 2018
@atherdon
Copy link
Contributor Author

Move favs and user groceries to sub-models, because we have them

Description/Steps to reproduce

https://github.com/atherdon/loopback-fb-login/blob/master/server/models/grocery.js#L209


// var UserGrocery = Grocery.app.models.userGrocery;

		// UserGrocery.find({
		// 	where: {userId: userId}
		// }).then(function(model){

		// 	console.log(model);
		// 	var groceriesArray = [];

		// 	// if (typeof model.groceryIds !== 'undefined'){
		// 		// groceriesArray = model.groceryIds;
		// 	// }

		// 	// console.log(groceriesArray);

		// 	// groceriesArray.push(groceryId);
		// 	// console.log(groceriesArray);
			
		// 	// model.updateAttribute('groceryIds', groceriesArray);
		// 	// console.log(model);

		// });


@atherdon
Copy link
Contributor Author

atherdon commented Mar 15, 2018

think about adding model for favorites

think about embed many for user grocery, user favs

https://loopback.io/doc/en/lb3/Embedded-models-and-relations.html#embedsmany

@atherdon
Copy link
Contributor Author

  • Purchased one item
  • Purchased few items
  • think about creating inner things based on HTML from Jim template
  • Qty field to add on ingredients field or add an additional model for this stuff
  • Qty field addition? only rounded values(1+3, 1+1) if we have 2 ingredients with similar ingredient id

@atherdon
Copy link
Contributor Author

#15

@atherdon
Copy link
Contributor Author

Purchased with Item model and GL bind Ingredients within (blocked)

  • Update CRUD purchased ids
    high priority

@atherdon
Copy link
Contributor Author

Need to decide flow for purchased items.
They must be shown as another list with ingredients. but only after making them purchased from main list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant