Skip to content

Commit

Permalink
feat: stable version
Browse files Browse the repository at this point in the history
  • Loading branch information
cassiossantos committed Sep 23, 2024
1 parent b88fd0c commit 6733ac0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
Binary file added screenshots/acme-dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/acme-login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/acme-update.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
<span>Acme</span>
</div>
<div>
<button mat-fab [matMenuTriggerFor]="menu">
<!-- TODO: <button mat-fab [matMenuTriggerFor]="menu">
<img src="https://material.angular.io/assets/img/examples/shiba1.jpg" />
</button>
<mat-menu #menu="matMenu">
</button> -->
<button (click)="onLogout()" mat-flat-button>Sair</button>
<!-- <mat-menu #menu="matMenu">
<button (click)="onLogout()" mat-menu-item>Sair</button>
</mat-menu>
</mat-menu> -->
</div>
</mat-toolbar-row>
</mat-toolbar>
Expand Down
24 changes: 14 additions & 10 deletions src/app/features/dashboard/containers/cash-flow.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,11 @@ export class CashFlowContainerComponent implements OnInit {
type: transaction.type,
user: transaction.user,
});

console.log(transaction, this.transactionId);
}
public onCancel() {
this.isEditMode = false;
this.transactionId = undefined;
this.form.patchValue({
description: '',
amount: '',
category: '',
type: '',
user: '',
});
this.form.clearValidators();
this.resetForm();
}

public onDelete(id: string) {
Expand All @@ -97,14 +88,27 @@ export class CashFlowContainerComponent implements OnInit {
return;
}
this.transactionId = undefined;
this.isEditMode = false;
this.store.dispatch(
createTransaction({
transaction: Object.assign({}, this.form.value, { createdAt: new Date() }),
}),
);
this.resetForm();
}

public onLogout() {
this.store.dispatch(logout());
}

protected resetForm() {
this.form.patchValue({
description: '',
amount: '',
category: '',
type: '',
user: '',
});
this.form.clearValidators();
}
}

0 comments on commit 6733ac0

Please sign in to comment.