Skip to content

Commit

Permalink
feat(front): replace Save flat button onto FAB
Browse files Browse the repository at this point in the history
  • Loading branch information
rednez committed Jan 21, 2023
1 parent 936da85 commit 81993f6
Showing 1 changed file with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@
[errorText]="'Failed data' | translate"
></ispent-loadable-widget>

<button
*ngIf="form?.dirty && !isSaving"
mat-fab
color="primary"
style="position: fixed; bottom: 30px; right: 30px"
(click)="onSaveForm()"
[matTooltip]="'Save' | translate"
matTooltipClass="text-sm"
>
<mat-icon>save</mat-icon>
</button>

<ng-template #contentState>
<ng-container *ngIf="form">
<button
mat-flat-button
color="primary"
[disabled]="form.pristine || isSaving"
(click)="onSaveForm()"
>
{{ 'Save' | translate }}
</button>

<ng-container
*ngIf="currencies.controls.length; else emptyState"
[formGroup]="form"
Expand Down

0 comments on commit 81993f6

Please sign in to comment.