jadnco / plum Goto Github PK
View Code? Open in Web Editor NEWA stock portfolio simulator written with Node, Express, Mongo and Ember.
A stock portfolio simulator written with Node, Express, Mongo and Ember.
Modal component views are blurry on devices without a Retina display.
Most likely has to do with the transform
property.
When a user creates or deletes a portfolio and then navigates to the main portfolios
route, the Ember template renders old content.
This is unexpected behaviour as the new portfolio is visible in the Ember Data Inspector. It just doesn't get rendered until a manual refresh.
When new transactions are made in quick succession, duplicates are made for both the transaction
and holding
records.
Steps to re-create:
These are now the holdings after making only one purchase for each of AAPL
, TSLA
, MSFT
and FB
:
When a new portfolio is created, the initial deposit gets saved as a new transaction
. This data shows correctly in the browser at first, but disappears as soon as a refresh occurs. The transaction is not being persisted to the database.
var record = store.createRecord('portfolio', {
name: newPortfolio.name,
cash: parseFloat(newPortfolio.cash),
owner: owner
}),
transaction = store.createRecord('transaction', {
type: 'deposit',
ticker: null,
shares: null,
price: null,
value: parseFloat(newPortfolio.cash)
});
// New deposit is pushed
record.get('transactions').pushObject(transaction);
// Portfolio is saved, but new transaction isn't
record.save();
I believe the issue has to do with the asynchronous call of functions. record.save()
happens before the new transaction is pushed. Calling the save
method within a promise was suggested online, but doing so yields errors:
record.get('transactions').then(function(transactions) {
transactions.pushObject(transaction);
record.save();
});
// Uncaught TypeError: record.get(...).then is not a function
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.