mirror of
				https://github.com/aclindsa/moneygo.git
				synced 2025-11-03 18:13:27 -05:00 
			
		
		
		
	account_register.js: Add ability to add splits
This commit is contained in:
		@@ -181,6 +181,13 @@ const AddEditTransactionModal = React.createClass({
 | 
				
			|||||||
			});
 | 
								});
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
						handleAddSplit: function() {
 | 
				
			||||||
 | 
							this.setState({
 | 
				
			||||||
 | 
								transaction: React.addons.update(this.state.transaction, {
 | 
				
			||||||
 | 
									Splits: {$push: [new Split()]}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							});
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
	handleDeleteSplit: function(split) {
 | 
						handleDeleteSplit: function(split) {
 | 
				
			||||||
		this.setState({
 | 
							this.setState({
 | 
				
			||||||
			transaction: React.addons.update(this.state.transaction, {
 | 
								transaction: React.addons.update(this.state.transaction, {
 | 
				
			||||||
@@ -354,6 +361,12 @@ const AddEditTransactionModal = React.createClass({
 | 
				
			|||||||
					<span className="split-header col-xs-2">Amount</span>
 | 
										<span className="split-header col-xs-2">Amount</span>
 | 
				
			||||||
					</Row>
 | 
										</Row>
 | 
				
			||||||
					{splits}
 | 
										{splits}
 | 
				
			||||||
 | 
										<Row>
 | 
				
			||||||
 | 
											<span className="col-xs-11"></span>
 | 
				
			||||||
 | 
											<Col xs={1}><Button onClick={this.handleAddSplit}
 | 
				
			||||||
 | 
													bsStyle="success">
 | 
				
			||||||
 | 
													<Glyphicon glyph='plus-sign' /></Button></Col>
 | 
				
			||||||
 | 
										</Row>
 | 
				
			||||||
					</Grid>
 | 
										</Grid>
 | 
				
			||||||
				</form>
 | 
									</form>
 | 
				
			||||||
				</Modal.Body>
 | 
									</Modal.Body>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user