Chore: Renamed the Ledger Table to Account

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.
This commit is contained in:
tanshu
2018-07-07 16:31:44 +05:30
parent 739c872815
commit 9f4eb334d7
49 changed files with 791 additions and 455 deletions

View File

@ -0,0 +1,7 @@
.gold {
color: gold;
}
.pointer {
cursor: pointer;
}

View File

@ -2,6 +2,9 @@
<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">

View File

@ -0,0 +1,3 @@
.gold {
color: gold;
}

View File

@ -20,7 +20,13 @@
<!-- Name Column -->
<ng-container matColumnDef="name">
<mat-header-cell *matHeaderCellDef mat-sort-header>Name</mat-header-cell>
<mat-cell *matCellDef="let row"><a [routerLink]="['/Account', row.id]">{{row.name}}</a></mat-cell>
<mat-cell *matCellDef="let row">
<a [routerLink]="['/Account', row.id]">
<mat-icon matSuffix *ngIf="row.isStarred" class="gold">star
</mat-icon>
{{row.name}}
</a>
</mat-cell>
</ng-container>
<!-- Type Column -->

View File

@ -9,6 +9,7 @@ export class Account {
type: AccountType;
isActive: boolean;
isReconcilable: boolean;
isStarred: boolean;
isFixture: boolean;
costCentre: CostCentre;

View File

@ -125,8 +125,8 @@ export class EmployeeDetailComponent implements OnInit, AfterViewInit {
const formModel = this.form.value;
this.item.name = formModel.name;
this.item.designation = formModel.designation;
this.item.salary = formModel.salary;
this.item.points = formModel.points;
this.item.salary = +formModel.salary;
this.item.points = +formModel.points;
this.item.isActive = formModel.isActive;
this.item.costCentre.id = formModel.costCentre;
this.item.joiningDate = moment(formModel.joiningDate).format('DD-MMM-YYYY');

View File

@ -34,3 +34,11 @@
mat-form-field.mat-form-field {
font-size: 1.25em;
}
.gold {
color: gold;
}
.pointer {
cursor: pointer;
}

View File

@ -1,6 +1,10 @@
<mat-card>
<mat-card-title-group>
<mat-card-title>Journal</mat-card-title>
<mat-icon matSuffix (click)="voucher.isStarred = !voucher.isStarred" class="pointer"
[class.gold]="voucher.isStarred">
{{ voucher.isStarred ? 'star' : 'star_border' }}
</mat-icon>
</mat-card-title-group>
<mat-card-content>
<form [formGroup]="form" fxLayout="column">

View File

@ -18,6 +18,7 @@ export class Voucher {
creationDate: string;
lastEditDate: string;
user: User;
isStarred: boolean;
poster: string;
reconcileDate: string;
}

View File

@ -34,3 +34,11 @@
mat-form-field.mat-form-field {
font-size: 1.25em;
}
.gold {
color: gold;
}
.pointer {
cursor: pointer;
}

View File

@ -1,6 +1,10 @@
<mat-card>
<mat-card-title-group>
<mat-card-title>Payment</mat-card-title>
<mat-icon matSuffix (click)="voucher.isStarred = !voucher.isStarred" class="pointer"
[class.gold]="voucher.isStarred">
{{ voucher.isStarred ? 'star' : 'star_border' }}
</mat-icon>
</mat-card-title-group>
<mat-card-content>
<form [formGroup]="form" fxLayout="column">

View File

@ -34,3 +34,11 @@
mat-form-field.mat-form-field {
font-size: 1.25em;
}
.gold {
color: gold;
}
.pointer {
cursor: pointer;
}

View File

@ -1,6 +1,10 @@
<mat-card>
<mat-card-title-group>
<mat-card-title>Purchase Return</mat-card-title>
<mat-icon matSuffix (click)="voucher.isStarred = !voucher.isStarred" class="pointer"
[class.gold]="voucher.isStarred">
{{ voucher.isStarred ? 'star' : 'star_border' }}
</mat-icon>
</mat-card-title-group>
<mat-card-content>
<form [formGroup]="form" fxLayout="column">

View File

@ -34,3 +34,11 @@
mat-form-field.mat-form-field {
font-size: 1.25em;
}
.gold {
color: gold;
}
.pointer {
cursor: pointer;
}

View File

@ -1,6 +1,10 @@
<mat-card>
<mat-card-title-group>
<mat-card-title>Purchase</mat-card-title>
<mat-icon matSuffix (click)="voucher.isStarred = !voucher.isStarred" class="pointer"
[class.gold]="voucher.isStarred">
{{ voucher.isStarred ? 'star' : 'star_border' }}
</mat-icon>
</mat-card-title-group>
<mat-card-content>
<form [formGroup]="form" fxLayout="column">

View File

@ -34,3 +34,11 @@
mat-form-field.mat-form-field {
font-size: 1.25em;
}
.gold {
color: gold;
}
.pointer {
cursor: pointer;
}

View File

@ -1,6 +1,10 @@
<mat-card>
<mat-card-title-group>
<mat-card-title>Receipt</mat-card-title>
<mat-icon matSuffix (click)="voucher.isStarred = !voucher.isStarred" class="pointer"
[class.gold]="voucher.isStarred">
{{ voucher.isStarred ? 'star' : 'star_border' }}
</mat-icon>
</mat-card-title-group>
<mat-card-content>
<form [formGroup]="form" fxLayout="column">