1
- < div fxLayout ="row " fxLayoutAlign ="space-evenly stretch ">
2
-
3
- <!--LEFT PANE-->
4
-
5
- <!--CAUSE-->
6
- < div class ="section " id ="left " fxFlex ="50 " fxLayout ="column " fxLayoutAlign ="space-around stretch "
7
- *ngIf ="showingCause ">
8
- < label class ="subtitle "> < b > Calcula...</ b > </ label >
9
- < label class ="text "> ¿Cuánto necesitas en total?</ label >
10
- < mat-slider
11
- thumbLabel
12
- class ="slider "
13
- min ="1000 " max ="10000000000 "
14
- color ="primary "
15
- [displayWith] ="formatLabel "
16
- (input) ="updateBudget($event) "> </ mat-slider >
17
-
18
- < div fxLayout ="row " fxLayoutAlign ="space-between center " >
19
- < div > 10.000</ div >
20
- < div > COP</ div >
21
- < div > 100.000.000.000</ div >
22
- </ div >
23
-
24
- < div fxFlex ="100 " fxLayout ="row " fxLayoutAlign ="space-between center " >
25
- < mat-form-field appearance ="fill ">
26
- < mat-label > Selecciona una causa</ mat-label >
27
- < mat-select >
28
- < mat-option value ="option "> Salvar una ballena</ mat-option >
29
- < mat-option value ="option "> Darle de comer a un niño</ mat-option >
30
- < mat-option value ="option "> Darle educacion a un niño</ mat-option >
31
- < mat-option value ="option "> Construir un colegio</ mat-option >
32
- < mat-option value ="option "> Acabar con el hambre mundial</ mat-option >
33
- </ mat-select >
34
- </ mat-form-field >
35
- < div >
36
- Agrega tu causa
37
- < button mat-flat-button (click) ="addCause() " style ="background-color: #20AD76; color: white; "> +</ button >
38
-
39
- </ div >
40
- </ div >
41
- < div fxLayout ="row " fxLayoutAlign ="end center " >
42
- < button mat-raised-button color ="primary " (click) ="showCommunity() "> Continuar > </ button >
43
- </ div >
1
+
2
+
3
+ < div fxLayout ="row " fxLayoutAlign ="space-evenly stretch " id ="main_div ">
4
+
5
+ <!--LEFT PANE-->
6
+
7
+ <!--CAUSE-->
8
+ < div class ="section " id ="left " fxFlex ="50 " fxLayout ="column " fxLayoutAlign ="start stretch "
9
+ *ngIf ="showingCause " >
10
+ < label class ="subtitle "> < b > Calcula...</ b > </ label >
11
+ < label class ="content "> ¿Cuánto necesitas en total?</ label >
12
+ < mat-slider
13
+ thumbLabel
14
+ id ="budget-slider "
15
+ [min] ="minMoney " [max] ="maxMoney "
16
+ color ="primary "
17
+ [(ngModel)] ="price "
18
+ [displayWith] ="formatLabel "
19
+ (input) ="updateBudget($event) "> </ mat-slider >
20
+
21
+ < div fxLayout ="row " fxLayoutAlign ="space-between center " class ="content ">
22
+ < div > {{minMoney | currency:' ' : 'symbol' : '1.0-0'}}</ div >
23
+ < div >
24
+ < mat-form-field >
25
+ < mat-label > {{selectedCurrency}}</ mat-label >
26
+ < mat-select >
27
+ < mat-option (click) ="changeCurrency('COP') " > COP</ mat-option >
28
+ < mat-option (click) ="changeCurrency('USD') " > USD</ mat-option >
29
+
30
+ </ mat-select >
31
+ </ mat-form-field >
32
+ </ div >
33
+ < div > {{maxMoney | currency:' ' : 'symbol' : '1.0-0'}}</ div >
44
34
</ div >
45
35
46
- <!--COMMUNITY-->
47
- < div class ="section " id ="left " fxFlex ="50 " fxLayout ="column " fxLayoutAlign ="space-around stretch " *ngIf ="!showingCause ">
48
- < label class ="subtitle "> < strong > Calcula...</ strong > </ label >
49
- < label class ="text "> ¿Cuántas personas necesitas en total?</ label >
50
- < label id ="example-radio-group-label "> Selecciona una Comunidad:</ label >
51
- < mat-radio-group
52
- aria-labelledby ="example-radio-group-label "
53
- class ="community-radio-group "
54
- [(ngModel)] ="chosenCommunity ">
55
- < mat-radio-button class ="community-radio-button " *ngFor ="let community of communities " [value] ="community ">
56
- {{community.name}}
57
- </ mat-radio-button >
58
- </ mat-radio-group >
59
- < div >
60
- Agrega tu Comunidad
61
- < button mat-flat-button (click) ="addCommunity() " style ="background-color: #20AD76; color: white; "> +</ button >
62
- </ div >
63
-
64
- < mat-slider
65
- thumbLabel
66
- class ="slider "
67
- min ="1 " max ="10000000000 "
68
- step ="10000 " value ="1 "
69
- color ="primary "
70
- [displayWith] ="formatLabel "
71
- (input) ="updatePopulation($event) "> </ mat-slider >
72
-
73
- < div fxLayout ="row " fxLayoutAlign ="space-between center " >
74
- < div > 1</ div >
75
- < div > Personas</ div >
76
- < div > 7.794.798.739</ div >
77
- </ div >
78
-
79
- < div fxFlex ="100 " fxLayout ="row " fxLayoutAlign ="space-between center " >
80
- < button mat-raised-button color ="primary " (click) ="showCauses() "> Regresar</ button >
81
- < button mat-raised-button color ="primary " (click) ="calculate() "> Calcular</ button >
82
- </ div >
83
36
37
+ < div fxLayout ="row " fxLayoutAlign ="space-between center " class ="content ">
38
+
39
+ < mat-form-field appearance ="fill ">
40
+ < mat-label > Selecciona una causa</ mat-label >
41
+ < mat-select >
42
+ < mat-option *ngFor ="let c of values " [value] ="c " (click) ="changeCause(c) " > {{c.name}}</ mat-option >
43
+ </ mat-select >
44
+ </ mat-form-field >
45
+
46
+ < div >
47
+ Agrega tu causa
48
+ < button mat-flat-button (click) ="addCause() " style ="background-color: #20AD76; color: white; "> +</ button >
49
+
50
+ </ div >
84
51
</ div >
85
52
86
- <!--RIGHT PANE-->
87
- < div class ="section " fxLayout ="column " fxFlex ="50 " fxLayoutAlign ="space-around center ">
88
- < p color ="accent " id ="display_value "> {{display | currency:' ' : 'symbol' : '1.0-0'}} </ p >
89
- < span > Alcanza para {{result(display!)}} </ span >
53
+ < div fxLayout ="row " fxLayoutAlign ="end center " >
54
+ < button mat-raised-button color ="primary " (click) ="showCommunity() "> Continuar > </ button >
90
55
</ div >
56
+ </ div >
57
+
58
+ <!--COMMUNITY-->
59
+ < div class ="section " id ="left " fxFlex ="50 " fxLayout ="column " fxLayoutAlign ="space-around stretch " *ngIf ="!showingCause ">
60
+ < label class ="subtitle "> < strong > Calcula...</ strong > </ label >
61
+ < label class ="text "> ¿Cuántas personas necesitas en total?</ label >
62
+ < label id ="example-radio-group-label "> Selecciona una Comunidad:</ label >
63
+ < mat-radio-group
64
+ aria-labelledby ="example-radio-group-label "
65
+ class ="community-radio-group "
66
+ [(ngModel)] ="chosenCommunity "
67
+ (change) ="handleCommunityChange($event) ">
68
+ < mat-radio-button class ="community-radio-button " *ngFor ="let community of communities " [value] ="community ">
69
+ {{community.name}}
70
+ </ mat-radio-button >
71
+ </ mat-radio-group >
72
+
73
+ < div >
74
+ Agrega tu Comunidad
75
+ < button mat-flat-button (click) ="addCommunity() " style ="background-color: #20AD76; color: white; "> +</ button >
76
+ </ div >
77
+
78
+ < mat-slider
79
+ thumbLabel
80
+ id ="budget-slider "
81
+ class ="slider "
82
+ min ="1 " max ="7794798739 "
83
+ value ="1 "
84
+ color ="primary "
85
+ [(ngModel)] ="people "
86
+ [displayWith] ="formatLabel "
87
+ (input) ="updatePopulation($event) "> </ mat-slider >
88
+
89
+ < div fxLayout ="row " fxLayoutAlign ="space-between center " >
90
+ < div > 1</ div >
91
+ < div > Personas</ div >
92
+ < div > 7.794.798.739</ div >
93
+ </ div >
94
+
95
+ < div fxFlex ="100 " fxLayout ="row " fxLayoutAlign ="space-between center " >
96
+ <!--TODO: quitar estos botones y hacerlo con carousel-->
97
+ < button mat-raised-button color ="primary " (click) ="showCauses() "> Regresar</ button >
98
+ < button mat-raised-button color ="primary " (click) ="calculate() "> Calcular</ button >
99
+ </ div >
100
+
101
+ </ div >
102
+
103
+ <!--RIGHT PANE-->
104
+ < div class ="section " fxLayout ="column " fxFlex ="50 " fxLayoutAlign ="space-around center ">
105
+ < p > < a color ="accent " id ="display_value "> {{displayMoney | currency:' ' : 'symbol' : '1.0-0'}} </ a > < a id ="display_currency "> {{selectedCurrency}}</ a > </ p >
106
+ < img [src] ="billsIllustrationPath " id ="bills ">
107
+ < div fxLayout ="row " fxLayoutAlign ="end center " id ="next_div ">
108
+ < button mat-raised-button color ="primary " (click) ="navigateToDetails() " *ngIf ="!showingCause "> Detalles</ button >
109
+ </ div >
110
+
111
+ < span > Alcanza para {{result(displayMoney!)}} </ span >
112
+ <!--TODO: quitar estas dos variables, solo es para visualizar y hacer pruebas
113
+ <span> Popsize = {{displayPopSize}}</span>
114
+ <span> people = {{people}}</span>
115
+ -->
116
+
117
+ </ div >
91
118
92
- </ div >
119
+ </ div >
0 commit comments