-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: reorder form fields; add spacing b/w each
- Loading branch information
1 parent
b1541cc
commit 7b74495
Showing
1 changed file
with
71 additions
and
73 deletions.
There are no files selected for viewing
144 changes: 71 additions & 73 deletions
144
src/app/reports/feature/dashboard/reports-form/dashboard-form.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,76 @@ | ||
<div class="flex justify-center"> | ||
<form> | ||
<mat-form-field> | ||
<mat-label>Chart Type</mat-label> | ||
<mat-select [formControl]="chartType"> | ||
@for (group of chartTypeGroups; track group) { | ||
<mat-optgroup [label]="group.name"> | ||
@for (chartType of group.chartTypes; track chartType) { | ||
<mat-option [value]="chartType.value">{{ chartType.name }}</mat-option> | ||
} | ||
</mat-optgroup> | ||
} | ||
</mat-select> | ||
</mat-form-field> | ||
|
||
<mat-form-field> | ||
<mat-label>Enter a date range</mat-label> | ||
<mat-date-range-input | ||
[formGroup]="range" | ||
[rangePicker]="picker" | ||
[min]="minDate$ | async" | ||
[max]="maxDate" | ||
> | ||
<input matStartDate placeholder="Start date" formControlName="start" /> | ||
<input matEndDate placeholder="End date" formControlName="end" /> | ||
</mat-date-range-input> | ||
<mat-hint>MM/DD/YYYY – MM/DD/YYYY</mat-hint> | ||
<mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle> | ||
<mat-date-range-picker #picker> | ||
<mat-date-range-picker-actions> | ||
<button mat-button matDateRangePickerCancel>Cancel</button> | ||
<button mat-raised-button color="primary" matDateRangePickerApply>Apply</button> | ||
</mat-date-range-picker-actions> | ||
</mat-date-range-picker> | ||
</mat-form-field> | ||
<form class="flex justify-center space-x-8"> | ||
<mat-form-field> | ||
<mat-label>Chart Type</mat-label> | ||
<mat-select [formControl]="chartType"> | ||
@for (group of chartTypeGroups; track group) { | ||
<mat-optgroup [label]="group.name"> | ||
@for (chartType of group.chartTypes; track chartType) { | ||
<mat-option [value]="chartType.value">{{ chartType.name }}</mat-option> | ||
} | ||
</mat-optgroup> | ||
} | ||
</mat-select> | ||
</mat-form-field> | ||
|
||
<mat-form-field> | ||
<mat-label>Sorting</mat-label> | ||
<mat-select [formControl]="sort"> | ||
<mat-option>None</mat-option> | ||
<mat-option value="desc">Descending</mat-option> | ||
<mat-option value="asc">Ascending</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
<mat-form-field> | ||
<mat-label>Enter a date range</mat-label> | ||
<mat-date-range-input | ||
[formGroup]="range" | ||
[rangePicker]="picker" | ||
[min]="minDate$ | async" | ||
[max]="maxDate" | ||
> | ||
<input matStartDate placeholder="Start date" formControlName="start" /> | ||
<input matEndDate placeholder="End date" formControlName="end" /> | ||
</mat-date-range-input> | ||
<mat-hint>MM/DD/YYYY – MM/DD/YYYY</mat-hint> | ||
<mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle> | ||
<mat-date-range-picker #picker> | ||
<mat-date-range-picker-actions> | ||
<button mat-button matDateRangePickerCancel>Cancel</button> | ||
<button mat-raised-button color="primary" matDateRangePickerApply>Apply</button> | ||
</mat-date-range-picker-actions> | ||
</mat-date-range-picker> | ||
</mat-form-field> | ||
|
||
<mat-form-field> | ||
<mat-label>Accounts</mat-label> | ||
<mat-select [formControl]="account" multiple> | ||
<mat-select-trigger> | ||
@if (account.value?.length === (accounts$ | async)?.length) { | ||
<span>All Accounts</span> | ||
} @else { | ||
<span>Some Accounts</span> | ||
} | ||
</mat-select-trigger> | ||
@for (account of accounts$ | async; track account.id) { | ||
<mat-option [value]="account.id">{{ account.name }}</mat-option> | ||
<mat-form-field> | ||
<mat-label>Accounts</mat-label> | ||
<mat-select [formControl]="account" multiple> | ||
<mat-select-trigger> | ||
@if (account.value?.length === (accounts$ | async)?.length) { | ||
<span>All Accounts</span> | ||
} @else { | ||
<span>Some Accounts</span> | ||
} | ||
</mat-select> | ||
</mat-form-field> | ||
</mat-select-trigger> | ||
@for (account of accounts$ | async; track account.id) { | ||
<mat-option [value]="account.id">{{ account.name }}</mat-option> | ||
} | ||
</mat-select> | ||
</mat-form-field> | ||
|
||
<mat-form-field> | ||
<mat-label>Categories</mat-label> | ||
<mat-select [formControl]="category" multiple> | ||
<mat-select-trigger> | ||
@if (category.value?.length === (categories$ | async)?.length) { | ||
<span>All categories</span> | ||
} @else { | ||
<span>Some categories</span> | ||
} | ||
</mat-select-trigger> | ||
@for (category of categories$ | async; track category?.id) { | ||
<mat-option [value]="category?.id">{{ category?.name }}</mat-option> | ||
<mat-form-field> | ||
<mat-label>Categories</mat-label> | ||
<mat-select [formControl]="category" multiple> | ||
<mat-select-trigger> | ||
@if (category.value?.length === (categories$ | async)?.length) { | ||
<span>All categories</span> | ||
} @else { | ||
<span>Some categories</span> | ||
} | ||
</mat-select> | ||
</mat-form-field> | ||
</form> | ||
</div> | ||
</mat-select-trigger> | ||
@for (category of categories$ | async; track category?.id) { | ||
<mat-option [value]="category?.id">{{ category?.name }}</mat-option> | ||
} | ||
</mat-select> | ||
</mat-form-field> | ||
|
||
<mat-form-field> | ||
<mat-label>Sorting</mat-label> | ||
<mat-select [formControl]="sort"> | ||
<mat-option>None</mat-option> | ||
<mat-option value="desc">Descending</mat-option> | ||
<mat-option value="asc">Ascending</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
</form> |