Skip to content
Permalink
Browse files
Merge pull request #46 from markvanveen/develop
Upgrade to latest angular/material
  • Loading branch information
markvanveen committed Oct 13, 2017
2 parents 21ab3ba + 28a4910 commit 8d2afbe1e07b140a1b29f4856667b8bd62a69949
Show file tree
Hide file tree
Showing 174 changed files with 2,370 additions and 2,299 deletions.
@@ -32,19 +32,19 @@
"Mark van Veen <mvanveen@mifos.org>"
],
"dependencies": {
"@angular/animations": "4.3.4",
"@angular/cdk": "2.0.0-beta.8",
"@angular/common": "4.3.4",
"@angular/compiler": "4.3.4",
"@angular/core": "4.3.4",
"@angular/forms": "4.3.4",
"@angular/http": "4.3.4",
"@angular/material": "2.0.0-beta.8",
"@angular/platform-browser": "4.3.4",
"@angular/platform-browser-dynamic": "4.3.4",
"@angular/platform-server": "4.3.4",
"@angular/router": "4.3.4",
"@covalent/core": "1.0.0-beta.6",
"@angular/animations": "4.4.5",
"@angular/cdk": "2.0.0-beta.12",
"@angular/common": "4.4.5",
"@angular/compiler": "4.4.5",
"@angular/core": "4.4.5",
"@angular/forms": "4.4.5",
"@angular/http": "4.4.5",
"@angular/material": "2.0.0-beta.12",
"@angular/platform-browser": "4.4.5",
"@angular/platform-browser-dynamic": "4.4.5",
"@angular/platform-server": "4.4.5",
"@angular/router": "4.4.5",
"@covalent/core": "1.0.0-beta.8-1",
"@ngrx/core": "1.2.0",
"@ngrx/effects": "2.0.3",
"@ngrx/store": "2.2.2",
@@ -60,16 +60,16 @@
"rxjs": "5.4.1",
"showdown": "1.6.4",
"text-mask-addons": "^3.6.0",
"zone.js": "0.8.12"
"zone.js": "0.8.17"
},
"devDependencies": {
"@angular/cli": "1.3.0",
"@angular/compiler-cli": "4.3.4",
"@angular/cli": "1.4.2",
"@angular/compiler-cli": "4.4.5",
"@types/hammerjs": "2.0.30",
"@types/jasmine": "2.5.38",
"@types/node": "6.0.78",
"@types/selenium-webdriver": "2.53.36",
"codelyzer": "2.0.0",
"codelyzer": "3.0.0",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "3.2.0",
"karma": "1.4.1",
@@ -83,7 +83,7 @@
"phantomjs-prebuilt": "2.1.7",
"protractor": "5.1.0",
"ts-node": "3.0.6",
"tslint": "4.5.1",
"tslint": "5.2.0",
"typescript": "2.3.4",
"webpack-bundle-analyzer": "^2.3.1"
}
@@ -58,16 +58,16 @@ import {ChartOfAccountTableComponent} from './chartOfAccounts/chart-of-account-t
import {SubLedgerListComponent} from './subLedger/sub-ledger.list.component';
import {TranslateModule} from '@ngx-translate/core';
import {
MdAutocompleteModule,
MdButtonModule,
MdCardModule,
MdCheckboxModule,
MdIconModule,
MdInputModule,
MdListModule,
MdOptionModule,
MdRadioModule,
MdToolbarModule
MatAutocompleteModule,
MatButtonModule,
MatCardModule,
MatCheckboxModule,
MatIconModule,
MatInputModule,
MatListModule,
MatOptionModule,
MatRadioModule,
MatToolbarModule
} from '@angular/material';
import {CommonModule} from '@angular/common';
import {CovalentDataTableModule, CovalentStepsModule} from '@covalent/core';
@@ -102,16 +102,16 @@ import {FinancialConditionComponent} from './financialCondition/financial-condit
CommonModule,
FormsModule,
ReactiveFormsModule,
MdCardModule,
MdIconModule,
MdListModule,
MdToolbarModule,
MdInputModule,
MdButtonModule,
MdRadioModule,
MdCheckboxModule,
MdAutocompleteModule,
MdOptionModule,
MatCardModule,
MatIconModule,
MatListModule,
MatToolbarModule,
MatInputModule,
MatButtonModule,
MatRadioModule,
MatCheckboxModule,
MatAutocompleteModule,
MatOptionModule,
CovalentDataTableModule,
CovalentStepsModule,

@@ -16,46 +16,46 @@

<fims-layout-card-over title="{{'Account with value' | translate:{ value: account.identifier } }}" [subTitle]="account.name" [navigateBackTo]="['../../../ledgers/detail', account.ledger]">
<fims-layout-card-over-header-menu>
<button md-icon-button (click)="deleteAccount()" title="{{'Delete this account' | translate}}" *ngIf="canDelete$ | async"><md-icon>delete</md-icon></button>
<button mat-icon-button (click)="deleteAccount()" title="{{'Delete this account' | translate}}" *ngIf="canDelete$ | async"><mat-icon>delete</mat-icon></button>
</fims-layout-card-over-header-menu>
<fims-two-column-layout>
<md-nav-list left>
<h3 md-subheader translate>Management</h3>
<a md-list-item [routerLink]="['./entries']">
<md-icon md-list-avatar>assignment</md-icon>
<h3 md-line translate>Account entries</h3>
<p md-line translate>Account entries</p>
<mat-nav-list left>
<h3 mat-subheader translate>Management</h3>
<a mat-list-item [routerLink]="['./entries']">
<mat-icon matListAvatar>assignment</mat-icon>
<h3 matLine translate>Account entries</h3>
<p matLine translate>Account entries</p>
</a>
<a md-list-item [routerLink]="['./tasks']">
<md-icon md-list-avatar>playlist_add_check</md-icon>
<h3 md-line translate>Tasks</h3>
<p md-line translate>Change the status of this account</p>
<a mat-list-item [routerLink]="['./tasks']">
<mat-icon matListAvatar>playlist_add_check</mat-icon>
<h3 matLine translate>Tasks</h3>
<p matLine translate>Change the status of this account</p>
</a>
<a md-list-item [routerLink]="['./activities']">
<md-icon md-list-avatar>event</md-icon>
<h3 md-line translate>Activities</h3>
<p md-line translate>Recent activities</p>
<a mat-list-item [routerLink]="['./activities']">
<mat-icon matListAvatar>event</mat-icon>
<h3 matLine translate>Activities</h3>
<p matLine translate>Recent activities</p>
</a>
<a *ngIf="account.referenceAccount" md-list-item [routerLink]="['../', account.referenceAccount]">
<md-icon md-list-avatar>view_module</md-icon>
<h3 md-line translate>Reference account</h3>
<p md-line translate>Navigate to reference account</p>
<a *ngIf="account.referenceAccount" mat-list-item [routerLink]="['../', account.referenceAccount]">
<mat-icon matListAvatar>view_module</mat-icon>
<h3 matLine translate>Reference account</h3>
<p matLine translate>Navigate to reference account</p>
</a>
</md-nav-list>
<md-list right>
<h3 md-subheader translate>Current status</h3>
</mat-nav-list>
<mat-list right>
<h3 mat-subheader translate>Current status</h3>
<fims-state-display [state]="account.state"></fims-state-display>
<md-list-item>
<md-icon md-list-avatar>account_balance</md-icon>
<h3 md-line translate>Type</h3>
<p md-line>{{account.type}}</p>
</md-list-item>
<md-list-item>
<md-icon md-list-avatar>payment</md-icon>
<h3 md-line translate>Balance</h3>
<p md-line>{{account.balance | number}}</p>
</md-list-item>
</md-list>
<mat-list-item>
<mat-icon matListAvatar>account_balance</mat-icon>
<h3 matLine translate>Type</h3>
<p matLine>{{account.type}}</p>
</mat-list-item>
<mat-list-item>
<mat-icon matListAvatar>payment</mat-icon>
<h3 matLine translate>Balance</h3>
<p matLine>{{account.balance | number}}</p>
</mat-list-item>
</mat-list>
</fims-two-column-layout>
</fims-layout-card-over>
<fims-fab-button title="{{'Edit account' | translate}}" icon="mode_edit" [link]="['edit']" [permission]="{ id: 'accounting_accounts', accessLevel: 'CHANGE'}"></fims-fab-button>
@@ -19,15 +19,15 @@
[navigateBackTo]="['../']"
*ngIf="account$ | async as account">
<form [formGroup]="form">
<md-input-container layout-margin>
<input mdInput type="date" placeholder="{{'Start date' | translate}}" formControlName="startDate">
</md-input-container>
<md-input-container layout-margin>
<input mdInput type="date" placeholder="{{'End date' | translate}}" formControlName="endDate">
<md-error *ngIf="form.hasError('rangeInvalid')" class="tc-red-600" translate>Invalid date range</md-error>
</md-input-container>
<button layout-margin md-button md-icon-button (click)="fetchAccountsEntries(account.identifier)" [disabled]="!form.valid">
<md-icon>search</md-icon>
<mat-form-field layout-margin>
<input matInput type="date" placeholder="{{'Start date' | translate}}" formControlName="startDate">
</mat-form-field>
<mat-form-field layout-margin>
<input matInput type="date" placeholder="{{'End date' | translate}}" formControlName="endDate">
<mat-error *ngIf="form.hasError('rangeInvalid')" class="tc-red-600" translate>Invalid date range</mat-error>
</mat-form-field>
<button layout-margin mat-button mat-icon-button (click)="fetchAccountsEntries(account.identifier)" [disabled]="!form.valid">
<mat-icon>search</mat-icon>
</button>
</form>
<fims-data-table flex
@@ -17,11 +17,11 @@
<td-steps mode="'vertical'">
<td-step #detailsStep label="{{'Account details' | translate}}" [state]="">
<form [formGroup]="form" layout="column">
<md-radio-group formControlName="type">
<md-radio-button *ngFor="let type of accountTypeOptions" [value]="type.type" layout-margin>
<mat-radio-group formControlName="type">
<mat-radio-button *ngFor="let type of accountTypeOptions" [value]="type.type" layout-margin>
{{type.label}}
</md-radio-button>
</md-radio-group>
</mat-radio-button>
</mat-radio-group>
<fims-id-input flex [form]="form" controlName="identifier" [readonly]="editMode"></fims-id-input>
<fims-text-input [form]="form" controlName="name" placeholder="{{'Name' | translate}}"></fims-text-input>
<fims-text-input type="number" [form]="form" controlName="balance" placeholder="{{'Balance' | translate}}"></fims-text-input>
@@ -21,7 +21,7 @@ import {Account} from '../../../services/accounting/domain/account.model';
import {TranslateModule} from '@ngx-translate/core';
import {ReactiveFormsModule} from '@angular/forms';
import {FimsSharedModule} from '../../../common/common.module';
import {MdCheckboxModule, MdInputModule, MdRadioModule} from '@angular/material';
import {MatCheckboxModule, MatInputModule, MatRadioModule} from '@angular/material';
import {CovalentStepsModule} from '@covalent/core';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';

@@ -35,9 +35,9 @@ describe('Test account form', () => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot(),
MdCheckboxModule,
MdRadioModule,
MdInputModule,
MatCheckboxModule,
MatRadioModule,
MatInputModule,
CovalentStepsModule,
FimsSharedModule,
ReactiveFormsModule,
@@ -57,15 +57,15 @@ describe('Test account form', () => {
});

it('should trigger save event', () => {
const button: DebugElement = fixture.debugElement.query(By.css('button[md-raised-button]'));
const button: DebugElement = fixture.debugElement.query(By.css('button[mat-raised-button]'));

button.nativeElement.click();

expect(testComponent.savedAccount).toEqual(testComponent.account);
});

it('should trigger cancel event', () => {
const button: DebugElement = fixture.debugElement.query(By.css('button[md-button]'));
const button: DebugElement = fixture.debugElement.query(By.css('button[mat-button]'));

button.nativeElement.click();

@@ -76,7 +76,7 @@ describe('Test account form', () => {

@Component({
template: `
<fims-account-form-component
<fims-account-form-component
(onSave)="onSave($event)"
(onCancel)="onCancel($event)"
[account]="account"