Chore: Renamed the Ledger Model to Account Chore: Renamed LedgerType to AccountType Chore: Renamed all properties of Account table to lowercase with underscores Feature: Starred Accounts and their entries do not delete during a rebase. Info: Starred Vouchers still delete. They can be starred, but have no effect.
60 lines
2.7 KiB
HTML
60 lines
2.7 KiB
HTML
<div fxLayout="row" fxFlex="50%" fxLayoutAlign="space-around center" class="example-card">
|
|
<mat-card fxFlex>
|
|
<mat-card-title-group>
|
|
<mat-card-title>Account</mat-card-title>
|
|
<mat-icon matSuffix (click)="item.isStarred = !item.isStarred" class="pointer" [class.gold]="item.isStarred">
|
|
{{ item.isStarred ? 'star' : 'star_border' }}
|
|
</mat-icon>
|
|
</mat-card-title-group>
|
|
<mat-card-content>
|
|
<form [formGroup]="form" fxLayout="column">
|
|
<div fxLayout="row" fxLayoutAlign="space-around start" fxLayout.lt-md="column" fxLayoutGap="20px"
|
|
fxLayoutGap.lt-md="0px">
|
|
<mat-form-field fxFlex>
|
|
<mat-label>Code</mat-label>
|
|
<input matInput placeholder="Code" formControlName="code">
|
|
</mat-form-field>
|
|
</div>
|
|
<div fxLayout="row" fxLayoutAlign="space-around start" fxLayout.lt-md="column" fxLayoutGap="20px"
|
|
fxLayoutGap.lt-md="0px">
|
|
<mat-form-field fxFlex>
|
|
<mat-label>Name</mat-label>
|
|
<input matInput #nameElement placeholder="Name" formControlName="name">
|
|
</mat-form-field>
|
|
</div>
|
|
<div fxLayout="row" fxLayoutAlign="space-around start" fxLayout.lt-md="column" fxLayoutGap="20px"
|
|
fxLayoutGap.lt-md="0px">
|
|
<mat-form-field fxFlex>
|
|
<mat-label>Account Type</mat-label>
|
|
<mat-select placeholder="Account Type" formControlName="type">
|
|
<mat-option *ngFor="let at of accountTypes" [value]="at.id">
|
|
{{ at.name }}
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
</div>
|
|
<div fxLayout="row" fxLayoutAlign="space-around start" fxLayout.lt-md="column" fxLayoutGap="20px"
|
|
fxLayoutGap.lt-md="0px">
|
|
<mat-checkbox formControlName="isActive">Is Active?</mat-checkbox>
|
|
<mat-checkbox formControlName="isReconcilable">Is Reconcilable?</mat-checkbox>
|
|
</div>
|
|
<div fxLayout="row" fxLayoutAlign="space-around start" fxLayout.lt-md="column" fxLayoutGap="20px"
|
|
fxLayoutGap.lt-md="0px">
|
|
<mat-form-field fxFlex>
|
|
<mat-label>Cost Centre</mat-label>
|
|
<mat-select placeholder="Cost Centre" formControlName="costCentre">
|
|
<mat-option *ngFor="let cs of costCentres" [value]="cs.id">
|
|
{{ cs.name }}
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
</div>
|
|
</form>
|
|
</mat-card-content>
|
|
<mat-card-actions>
|
|
<button mat-raised-button color="primary" (click)="save()">Save</button>
|
|
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="!!item.id">Delete</button>
|
|
</mat-card-actions>
|
|
</mat-card>
|
|
</div>
|