| Line 1... |
Line 1... |
| 1 |
package in.shop2020.hotspot.dashbaord.client.inbox;
|
1 |
package in.shop2020.hotspot.dashbaord.client.inbox;
|
| 2 |
|
2 |
|
| 3 |
import java.util.HashMap;
|
- |
|
| 4 |
import java.util.Map;
|
3 |
import java.util.Map;
|
| 5 |
import java.util.Map.Entry;
|
4 |
import java.util.Map.Entry;
|
| 6 |
|
5 |
|
| 7 |
import in.shop2020.hotspot.dashbaord.client.event.AddJacketNumberEvent;
|
6 |
import in.shop2020.hotspot.dashbaord.client.event.AddJacketNumberEvent;
|
| 8 |
import in.shop2020.hotspot.dashbaord.shared.actions.BillingType;
|
7 |
import in.shop2020.hotspot.dashbaord.shared.actions.BillingType;
|
| Line 40... |
Line 39... |
| 40 |
|
39 |
|
| 41 |
|
40 |
|
| 42 |
private Button submitbutton = new Button("Submit");
|
41 |
private Button submitbutton = new Button("Submit");
|
| 43 |
private VerticalPanel vpanel = new VerticalPanel();
|
42 |
private VerticalPanel vpanel = new VerticalPanel();
|
| 44 |
|
43 |
|
| 45 |
private Map<Long, String> vendors = new HashMap<Long, String>();
|
- |
|
| 46 |
|
44 |
|
| 47 |
public JacketInfoBox(final EventBus eventBus, final Order order, final String user, final BillingType billingType){
|
45 |
public JacketInfoBox(final EventBus eventBus, final Order order, final String user, final BillingType billingType, Map<Long, String> vendors){
|
| 48 |
vpanel.add(errorLabel);
|
46 |
vpanel.add(errorLabel);
|
| 49 |
vpanel.add(getHorizontalPanel(jacketNumberLabel, jacketNumberBox)); //Ask for the jacket number
|
47 |
vpanel.add(getHorizontalPanel(jacketNumberLabel, jacketNumberBox)); //Ask for the jacket number
|
| 50 |
if(billingType == BillingType.OURS){
|
48 |
if(billingType == BillingType.OURS){
|
| 51 |
vpanel.add(getHorizontalPanel(itemNumberLabel, itemNumberBox)); //Ask for the item number
|
49 |
vpanel.add(getHorizontalPanel(itemNumberLabel, itemNumberBox)); //Ask for the item number
|
| 52 |
if("Handsets".equalsIgnoreCase(order.getProductGroup())) {
|
50 |
if("Handsets".equalsIgnoreCase(order.getProductGroup())) {
|
| 53 |
vpanel.add(getHorizontalPanel(imeiNumberLabel, imeiNumberBox)); //Ask for IMEI only in case of Handsets
|
51 |
vpanel.add(getHorizontalPanel(imeiNumberLabel, imeiNumberBox)); //Ask for IMEI only in case of Handsets
|
| 54 |
}
|
52 |
}
|
| 55 |
}
|
53 |
}
|
| 56 |
|
54 |
|
| 57 |
//FIXME Hardcoded for vendor
|
- |
|
| 58 |
// vendors.put(2L, "Tulip Tech Products");
|
- |
|
| 59 |
vendors.put(3L, "Sarvottam Telecare");
|
- |
|
| 60 |
vendors.put(4L, "Indira Switch");
|
- |
|
| 61 |
vendors.put(5L, "S Mobility");
|
- |
|
| 62 |
|
- |
|
| 63 |
for(Entry<Long, String> vendor: vendors.entrySet()){
|
55 |
for(Entry<Long, String> vendor: vendors.entrySet()){
|
| 64 |
vendorBox.addItem(vendor.getValue(), vendor.getKey()+"");
|
56 |
vendorBox.addItem(vendor.getValue(), vendor.getKey()+"");
|
| 65 |
}
|
57 |
}
|
| 66 |
vpanel.add(getHorizontalPanel(vendorLabel, vendorBox));
|
58 |
vpanel.add(getHorizontalPanel(vendorLabel, vendorBox));
|
| 67 |
|
59 |
|