Implement category archiving

This commit is contained in:
William Brawner 2020-06-30 15:55:01 +00:00
parent 1b2cc1c699
commit 08718b6605
3 changed files with 5 additions and 1 deletions

View file

@ -14,6 +14,7 @@ import { MatRadioModule } from '@angular/material/radio';
import { MatSelectModule } from '@angular/material/select';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { AppComponent } from './app.component';
import { TransactionsComponent } from './transactions/transactions.component';
@ -99,6 +100,7 @@ export const CustomCurrencyMaskConfig: CurrencyMaskConfig = {
HttpClientModule,
CurrencyMaskModule,
ChartsModule,
MatCheckboxModule,
],
providers: [
{ provide: CURRENCY_MASK_CONFIG, useValue: CustomCurrencyMaskConfig },

View file

@ -12,6 +12,7 @@
<mat-radio-button [value]="true">Expense</mat-radio-button>
<mat-radio-button [value]="false">Income</mat-radio-button>
</mat-radio-group>
<mat-checkbox *ngIf="currentCategory.id" [(ngModel)]="currentCategory.archived">Archived</mat-checkbox>
<!--
<mat-form-field>
<input type="color" matInput [(ngModel)]="currentCategory.color" placeholder="Color">

View file

@ -34,7 +34,8 @@ export class AddEditCategoryComponent implements OnInit {
{
name: this.currentCategory.title,
amount: this.currentCategory.amount * 100,
expense: this.currentCategory.expense
expense: this.currentCategory.expense,
archived: this.currentCategory.archived
}
);
} else {