package devopsdistilled.operp.client.context;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import devopsdistilled.operp.client.account.AccountMgmtPane;
import devopsdistilled.operp.client.business.sales.SalesMgmtPane;
import devopsdistilled.operp.client.items.ItemMgmtPane;
import devopsdistilled.operp.client.main.NavigationPane;
import devopsdistilled.operp.client.main.NavigationTree;
import devopsdistilled.operp.client.party.PartyMgmtPane;
import devopsdistilled.operp.client.stock.StockMgmtPane;

@Configuration
public class NavigationContext {

	@Bean
	public PartyMgmtPane partyMgmtPane() {
		return new PartyMgmtPane();
	}

	@Bean
	public ItemMgmtPane itemMgmtPane() {
		return new ItemMgmtPane();
	}

	@Bean
	public StockMgmtPane stockMgmtPane() {
		return new StockMgmtPane();
	}

	@Bean
	public SalesMgmtPane salesMgmtPane() {
		return new SalesMgmtPane();
	}

	@Bean
	public AccountMgmtPane accountMgmtPane() {
		return new AccountMgmtPane();
	}

	@Bean
	public NavigationTree navigationTree() {
		NavigationTree navTree = new NavigationTree();
		navTree.addNode(partyMgmtPane());
		navTree.addNode(itemMgmtPane());
		navTree.addNode(stockMgmtPane());
		navTree.addNode(salesMgmtPane());
		navTree.addNode(accountMgmtPane());

		return navTree;
	}

	@Bean
	public NavigationPane navigationPane() {
		return new NavigationPane();
	}

}

@@ -207,32 +207,106 @@
 ccountMgmtPane;%0A
+import devopsdistilled.operp.client.business.purchases.PurchasesMgmtPane;%0A
 import devopsdis
@@ -1002,32 +1002,125 @@
 MgmtPane();%0A%09%7D%0A%0A
+%09@Bean%0A%09public PurchasesMgmtPane purchasesMgmtPane() %7B%0A%09%09return new PurchasesMgmtPane();%0A%09%7D%0A%0A
 %09@Bean%0A%09public A
@@ -1423,32 +1423,72 @@
 lesMgmtPane());%0A
+%09%09navTree.addNode(purchasesMgmtPane());%0A
 %09%09navTree.addNod

Add Purchases to Navigation