This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
newTrade2.cmp
88 lines (71 loc) · 3.49 KB
/
newTrade2.cmp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<aura:component implements="force:appHostable" controller="NewTradeController">
<aura:handler name="init" action="{!c.init}" value="{!this}"/>
<lightning:navigation aura:id="navService"/>
<aura:attribute name="trade" type="Trade__c"/>
<lightning:card class="slds-size_x-large slds-align_absolute-center">
<lightning:layout>
<lightning:layoutItem size="12">
<h3 class="slds-section-title--divider">New Trade</h3>
</lightning:layoutItem>
</lightning:layout>
<lightning:layout>
<lightning:layoutItem size="3">
<lightning:select label="Sell Currency"
value="{!v.trade.Sell_Currency__c}"
onchange="{!c.onChangeCurrency}"
required="true">
<option value="USD">USD</option>
<option value="EUR">EUR</option>
<option value="GBP">GBP</option>
</lightning:select>
</lightning:layoutItem>
<lightning:layoutItem size="2">
<lightning:icon iconName="utility:chevronright" class="slds-align_absolute-center"/>
</lightning:layoutItem>
<lightning:layoutItem size="2">
<lightning:input label="Rate"
disabled="true"
value="{!v.trade.Rate__c}"/>
</lightning:layoutItem>
<lightning:layoutItem size="2">
<lightning:icon iconName="utility:chevronright" class="slds-align_absolute-center"/>
</lightning:layoutItem>
<lightning:layoutItem size="3" class="slds-m-right--medium">
<lightning:select label="Buy Currency"
value="{!v.trade.Buy_Currency__c}"
onchange="{!c.onChangeCurrency}"
required="true">
<option value="USD">USD</option>
<option value="EUR">EUR</option>
<option value="GBP">GBP</option>
</lightning:select>
</lightning:layoutItem>
</lightning:layout>
<lightning:layout>
<lightning:layoutItem size="3">
<lightning:input label="Sell Amount"
required="true"
value="{!v.trade.Sell_Amount__c}"/>
</lightning:layoutItem>
<lightning:layoutItem size="6"/>
<lightning:layoutItem size="3" class="slds-m-right--medium">
<lightning:input label="Buy Amount"
disabled="true"
value="{!v.trade.Buy_Amount__c}"/>
</lightning:layoutItem>
</lightning:layout>
<lightning:layout>
<lightning:layoutItem size="2" class="slds-p-top--medium">
<lightning:buttonGroup>
<lightning:button label="Cancel" onclick="{!c.handleCancel}"/>
</lightning:buttonGroup>
</lightning:layoutItem>
<lightning:layoutItem size="8"/>
<lightning:layoutItem size="2" class="slds-p-top--medium">
<lightning:buttonGroup>
<lightning:button label="Create" onclick="{!c.onCreateTrade}"/>
</lightning:buttonGroup>
</lightning:layoutItem>
</lightning:layout>
</lightning:card>
</aura:component>