19
19
<SummaryCard Title =" Investments" Value =" 35000" Change =" -0.8" />
20
20
21
21
<UICard Title =" Savings"
22
- SubTitle =" @Savings.ToString(" c2 " )"
23
- ColSpanOnLargeScreen =" 6"
24
- ColSpanOnMediumScreen =" 6"
25
- ContentClass =" k-justify-content-between"
26
- ContentGap =" 3" >
22
+ SubTitle =" @Savings.ToString(" c2 " )"
23
+ ColSpanOnLargeScreen =" 6"
24
+ ColSpanOnMediumScreen =" 6"
25
+ ContentClass =" k-justify-content-between"
26
+ ContentGap =" 3" >
27
27
<div class =" progressbar-wrapper" >
28
28
<div class =" k-d-flex k-justify-content-between" >
29
29
<span >Education</span >
@@ -72,8 +72,8 @@ ContentGap="3">
72
72
</UICard >
73
73
74
74
<UICard Title =" Budget Utilization"
75
- SubTitle =" @( $" {(UsedBudget / TotalBudget).ToString( " P0" )} of the Budget used " )"
76
- ColSpanOnMediumScreen =" 6" ColSpanOnLargeScreen =" 6" TitleGap =" 11" ContentGap =" 11" >
75
+ SubTitle =" @( $" {(UsedBudget / TotalBudget).ToString( " P0" )} of the Budget used " )"
76
+ ColSpanOnMediumScreen =" 6" ColSpanOnLargeScreen =" 6" TitleGap =" 11" ContentGap =" 11" >
77
77
<TelerikArcGauge Width =" 260px" Height =" 140px" Class =" k-ml-auto k-mr-auto" >
78
78
<ArcGaugePointers >
79
79
<ArcGaugePointer Value =" 50" Size =" 12" Color =" var(--kendo-color-series-b)" />
@@ -99,64 +99,64 @@ ColSpanOnMediumScreen="6" ColSpanOnLargeScreen="6" TitleGap="11" ContentGap="11"
99
99
100
100
<UICard Title =" Transactions" >
101
101
<TelerikGrid Data =" @GridData"
102
- TItem =" @Transaction"
103
- FilterMode =" GridFilterMode.FilterMenu"
104
- Groupable =" true"
105
- Height =" 570px"
106
- Navigable =" true"
107
- OnStateInit =" @OnGridStateInit"
108
- Pageable =" true"
109
- SelectionMode =" @GridSelectionMode.Multiple"
110
- @bind-SelectedItems =" @GridSelectedItems"
111
- ShowColumnMenu =" true"
112
- Sortable =" true" >
102
+ TItem =" @Transaction"
103
+ FilterMode =" GridFilterMode.FilterMenu"
104
+ Groupable =" true"
105
+ Height =" 570px"
106
+ Navigable =" true"
107
+ OnStateInit =" @OnGridStateInit"
108
+ Pageable =" true"
109
+ SelectionMode =" @GridSelectionMode.Multiple"
110
+ @bind-SelectedItems =" @GridSelectedItems"
111
+ ShowColumnMenu =" true"
112
+ Sortable =" true" >
113
113
<GridToolBar >
114
114
<GridToolBarExcelExportTool >Export to Excel</GridToolBarExcelExportTool >
115
115
<GridToolBarPdfExportTool >Export to PDF</GridToolBarPdfExportTool >
116
116
</GridToolBar >
117
117
<GridSettings >
118
118
<GridExcelExport AllPages =" true"
119
- FileName =" blazor-financial-dashboard"
120
- OnBeforeExport =" @OnGridBeforeExcelExport" />
119
+ FileName =" blazor-financial-dashboard"
120
+ OnBeforeExport =" @OnGridBeforeExcelExport" />
121
121
<GridPdfExport AllPages =" true"
122
- FileName =" blazor-financial-dashboard"
123
- OnBeforeExport =" @OnGridBeforePdfExport"
124
- PageOrientation =" @GridPdfExportPageOrientation.Landscape" />
122
+ FileName =" blazor-financial-dashboard"
123
+ OnBeforeExport =" @OnGridBeforePdfExport"
124
+ PageOrientation =" @GridPdfExportPageOrientation.Landscape" />
125
125
</GridSettings >
126
126
<GridColumns >
127
127
<GridCheckboxColumn SelectAll =" true" SelectAllMode =" @GridSelectAllMode.All" ShowColumnMenu =" false" />
128
128
<GridColumn Field =" @nameof(Transaction.Date)"
129
- DisplayFormat =" {0:d}" />
129
+ DisplayFormat =" {0:d}" />
130
130
<GridColumn Field =" @nameof(Transaction.Amount)"
131
- DisplayFormat =" {0:c2}"
132
- HeaderClass =" right-header"
133
- TextAlign =" @ColumnTextAlign.Right" />
131
+ DisplayFormat =" {0:c2}"
132
+ HeaderClass =" right-header"
133
+ TextAlign =" @ColumnTextAlign.Right" />
134
134
<GridColumn Field =" @nameof(Transaction.Merchant)"
135
- HeaderClass =" centered-header"
136
- TextAlign =" @ColumnTextAlign.Center"
137
- Visible =" @IsMediumOrLargeScreen" />
135
+ HeaderClass =" centered-header"
136
+ TextAlign =" @ColumnTextAlign.Center"
137
+ Visible =" @IsMediumOrLargeScreen" />
138
138
<GridColumn Field =" @nameof(Transaction.Category)"
139
- HeaderClass =" centered-header"
140
- TextAlign =" @ColumnTextAlign.Center"
141
- Visible =" @IsLargeScreen" />
139
+ HeaderClass =" centered-header"
140
+ TextAlign =" @ColumnTextAlign.Center"
141
+ Visible =" @IsLargeScreen" />
142
142
<GridColumn Field =" @nameof(Transaction.PaymentMethodId)"
143
- HeaderClass =" centered-header"
144
- TextAlign =" @ColumnTextAlign.Center"
145
- Visible =" @IsLargeScreen" >
143
+ HeaderClass =" centered-header"
144
+ TextAlign =" @ColumnTextAlign.Center"
145
+ Visible =" @IsLargeScreen" >
146
146
<Template >
147
147
@{ var dataItem = (Transaction )context ; }
148
148
@PaymentMethods.FirstOrDefault(x => x.Id == dataItem.PaymentMethodId)?.Name
149
149
</Template >
150
150
</GridColumn >
151
151
<GridColumn Field =" @nameof(Transaction.Status)"
152
- HeaderClass =" centered-header"
153
- TextAlign =" @ColumnTextAlign.Center" >
152
+ HeaderClass =" centered-header"
153
+ TextAlign =" @ColumnTextAlign.Center" >
154
154
<Template >
155
155
@{ var dataItem = (Transaction )context ; }
156
156
<TelerikBadge ThemeColor =" @dataItem.GetStatusThemeColor()"
157
- Rounded =" @ThemeConstants.Badge.Rounded.Large"
158
- Size =" @ThemeConstants.Badge.Size.Large"
159
- Class =" inline-badge" >
157
+ Rounded =" @ThemeConstants.Badge.Rounded.Large"
158
+ Size =" @ThemeConstants.Badge.Size.Large"
159
+ Class =" inline-badge" >
160
160
@dataItem.Status.ToString()
161
161
</TelerikBadge >
162
162
</Template >
@@ -189,27 +189,33 @@ ColSpanOnMediumScreen="6" ColSpanOnLargeScreen="6" TitleGap="11" ContentGap="11"
189
189
{
190
190
args .GridState .SortDescriptors .Add (new ()
191
191
{
192
- Member = nameof (Transaction .Date ),
193
- SortDirection = ListSortDirection .Descending
192
+ Member = nameof (Transaction .Date ),
193
+ SortDirection = ListSortDirection .Descending
194
194
});
195
195
}
196
196
197
197
private void OnGridBeforeExcelExport (GridBeforeExcelExportEventArgs args )
198
198
{
199
199
args .Columns .First (x => x .Field == nameof (Transaction .Date )).Width = " 180px" ;
200
200
args .Columns .First (x => x .Field == nameof (Transaction .Amount )).Width = " 100px" ;
201
- args .Columns .First (x => x .Field == nameof (Transaction .Category )).Width = " 120px" ;
202
- args .Columns .First (x => x .Field == nameof (Transaction .PaymentMethodId )).Width = " 100px" ;
201
+ if (IsLargeScreen )
202
+ {
203
+ args .Columns .First (x => x .Field == nameof (Transaction .Category )).Width = " 120px" ;
204
+ args .Columns .First (x => x .Field == nameof (Transaction .PaymentMethodId )).Width = " 100px" ;
205
+ }
203
206
args .Columns .First (x => x .Field == nameof (Transaction .Merchant )).Width = " 140px" ;
204
207
args .Columns .First (x => x .Field == nameof (Transaction .Status )).Width = " 100px" ;
205
208
}
206
209
207
210
private void OnGridBeforePdfExport (GridBeforePdfExportEventArgs args )
208
211
{
209
212
args .Columns .First (x => x .Field == nameof (Transaction .Date )).Width = " 180px" ;
210
- args .Columns .First (x => x .Field == nameof (Transaction .Amount )).Width = " 100px" ;
211
- args .Columns .First (x => x .Field == nameof (Transaction .Category )).Width = " 120px" ;
212
- args .Columns .First (x => x .Field == nameof (Transaction .PaymentMethodId )).Width = " 100px" ;
213
+ args .Columns .First (x => x .Field == nameof (Transaction .Amount )).Width = " 100px" ;
214
+ if (IsLargeScreen )
215
+ {
216
+ args .Columns .First (x => x .Field == nameof (Transaction .Category )).Width = " 120px" ;
217
+ args .Columns .First (x => x .Field == nameof (Transaction .PaymentMethodId )).Width = " 100px" ;
218
+ }
213
219
args .Columns .First (x => x .Field == nameof (Transaction .Merchant )).Width = " 140px" ;
214
220
args .Columns .First (x => x .Field == nameof (Transaction .Status )).Width = " 100px" ;
215
221
}
0 commit comments