Skip to content
Permalink
Browse files
fixed all but one problem due to upgrade
  • Loading branch information
pembemiriam committed Jun 23, 2018
1 parent fe740b0 commit c11405f785652fc5670ff383e708501c2b10312f
Showing 12 changed files with 1,958 additions and 2,429 deletions.

Large diffs are not rendered by default.

@@ -24,9 +24,8 @@
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"@covalent/core": "^1.0.1",
"@ngrx/core": "^1.2.0",
"@ngrx/effects": "^2.0.5",
"@ngrx/store": "^2.2.3",
"@ngrx/effects": "^5.2.0",
"@ngrx/store": "^5.2.0",
"@ngx-translate/core": "^10.0.2",
"@ngx-translate/http-loader": "0.1.0",
"core-js": "^2.4.1",
@@ -1,10 +1,10 @@
import { BrowserModule } from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { RouterModule, Routes} from '@angular/router';
import {HttpModule,Http} from '@angular/http';
import {CommonModule} from '@angular/common';
import {TranslateModule, TranslateStore} from '@ngx-translate/core';
import { RouterModule, Routes } from '@angular/router';
import { HttpModule, Http } from '@angular/http';
import { CommonModule } from '@angular/common';
import { TranslateModule, TranslateStore } from '@ngx-translate/core';
import {CovalentLoadingModule} from '@covalent/core';

import {
@@ -41,14 +41,14 @@ import {
MatTabsModule,
MatStepperModule

} from '@angular/material';

} from '@angular/material';

import {LOCALE_ID, NgModule } from '@angular/core';

import { LOCALE_ID, NgModule } from '@angular/core';


import { AppComponent } from './app.component';
import {LoginComponent} from './login/login.component';
import { LoginComponent } from './login/login.component';
import { NavbarComponent } from './navbar/navbar.component';
import { DashboardComponent } from './dashboard/dashboard.component';
import { AccountingComponent } from './accounting/accounting.component';
@@ -72,39 +72,39 @@ import { AccountPayableComponent } from './accounting/account-payable/account-pa
import { AddChequeComponent } from './accounting/add-cheque/add-cheque.component';
import { AddPayrollComponent } from './accounting/add-payroll/add-payroll.component';

import {HttpClients} from './sevices/http/http.service';
import {IdentityService} from './sevices/identity/identity.service';
import {OfficeService} from './sevices/office/office.service';
import {CustomerService} from './sevices/customer/customer.service';
import {AuthenticationService} from './sevices/security/authn/authentication.service';
import {CatalogService} from './sevices/catalog/catalog.service';
import {AccountingService} from './sevices/accounting/accounting.service';
import {PortfolioService} from './sevices/portfolio/portfolio.service';
import {TranslateLoader, TranslateService} from '@ngx-translate/core';
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
import {PermittableGroupIdMapper} from './sevices/security/authz/permittable-group-id-mapper';
import {reducer} from './store';
import {StoreModule} from '@ngrx/store';
import {EffectsModule} from '@ngrx/effects';
import {NotificationService} from './sevices/notification/notification.service';
import {OfficeSearchApiEffects} from './store/office/effects/service.effects';
import {EmployeeSearchApiEffects} from './store/employee/effects/service.effects';
import {RoleSearchApiEffects} from './store/role/effects/service.effects';
import {CustomerSearchApiEffects} from './store/customer/effects/service.effects';
import {AccountSearchApiEffects} from './store/account/effects/service.effects';
import {SecurityRouteEffects} from './store/security/effects/route.effects';
import {SecurityApiEffects} from './store/security/effects/service.effects';
import {SecurityNotificationEffects} from './store/security/effects/notification.effects';
import {LedgerSearchApiEffects} from './store/ledger/effects/service.effects';
import { HttpClients } from './sevices/http/http.service';
import { IdentityService } from './sevices/identity/identity.service';
import { OfficeService } from './sevices/office/office.service';
import { CustomerService } from './sevices/customer/customer.service';
import { AuthenticationService } from './sevices/security/authn/authentication.service';
import { CatalogService } from './sevices/catalog/catalog.service';
import { AccountingService } from './sevices/accounting/accounting.service';
import { PortfolioService } from './sevices/portfolio/portfolio.service';
import { TranslateLoader, TranslateService } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { PermittableGroupIdMapper } from './sevices/security/authz/permittable-group-id-mapper';
import { reducer } from './store';
import { StoreModule } from '@ngrx/store';
import { EffectsModule } from '@ngrx/effects';
import { NotificationService } from './sevices/notification/notification.service';
import { OfficeSearchApiEffects } from './store/office/effects/service.effects';
import { EmployeeSearchApiEffects } from './store/employee/effects/service.effects';
import { RoleSearchApiEffects } from './store/role/effects/service.effects';
import { CustomerSearchApiEffects } from './store/customer/effects/service.effects';
import { AccountSearchApiEffects } from './store/account/effects/service.effects';
import { SecurityRouteEffects } from './store/security/effects/route.effects';
import { SecurityApiEffects } from './store/security/effects/service.effects';
import { SecurityNotificationEffects } from './store/security/effects/notification.effects';
import { LedgerSearchApiEffects } from './store/ledger/effects/service.effects';
//import {ExistsGuardService} from './common/guards/exists-guard';
import {ImageService} from './sevices/image/image.service';
import {DepositAccountService} from './sevices/depositAccount/deposit-account.service';
import {CurrencyService} from './sevices/currency/currency.service';
import {TellerService} from './sevices/teller/teller-service';
import {ReportingService} from './sevices/reporting/reporting.service';
import {getSelectedLanguage} from './common/i18n/translate';
import {ChequeService} from './sevices/cheque/cheque.service';
import {PayrollService} from './sevices/payroll/payroll.service';
import { ImageService } from './sevices/image/image.service';
import { DepositAccountService } from './sevices/depositAccount/deposit-account.service';
import { CurrencyService } from './sevices/currency/currency.service';
import { TellerService } from './sevices/teller/teller-service';
import { ReportingService } from './sevices/reporting/reporting.service';
import { getSelectedLanguage } from './common/i18n/translate';
import { ChequeService } from './sevices/cheque/cheque.service';
import { PayrollService } from './sevices/payroll/payroll.service';
import { CountryService } from './sevices/country/country.service';

export function HttpLoaderFactory(http: Http) {
@@ -114,72 +114,73 @@ export function HttpLoaderFactory(http: Http) {

const appRoutes: Routes = [
{ path: 'login', component: LoginComponent },
{ path: '', redirectTo: 'login', pathMatch:'full' },
{ path: '', redirectTo: 'login', pathMatch: 'full' },

{
path: 'navbar', component: NavbarComponent, children: [
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' },
{ path: 'dashboard', component: DashboardComponent },
{ path: 'accounting', component: AccountingComponent },
{ path: 'GL', component: GeneralLedgerComponent },
{ path: 'add_journal_entry', component: AddJournalEntryComponent },
{ path: 'payroll', component: PayrollsComponent },
{ path: 'chart_of_accounts', component: ChartOfAccountsComponent },
{ path: 'add_transaction_type', component: AddTransactionTypeComponent },
{ path: 'trial_balance', component: TrialBalanceComponent },
{ path: 'cheque_clearing', component: ChequeClearingComponent },
{ path: 'transaction_type', component: TransactionTypeComponent },
{ path: 'add_member', component: AddMemberComponent },
{ path: 'manage_members', component: ManageMembersComponent },
{ path: 'add_employee', component: AddEmployeeComponent },
{ path: 'manage_employees', component: ManageEmployeeComponent },
{ path: 'view_offices', component: ViewOfficesComponent },
{ path: 'add_office', component: AddOfficeComponent },
{ path: 'add_ledger', component: AddLedgerComponent },
{ path: 'account_payable', component: AccountPayableComponent },
{ path: 'add_cheque', component: AddChequeComponent },
{ path: 'add_payroll', component: AddPayrollComponent },
]
}
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' },
{ path: 'dashboard', component: DashboardComponent },
{ path: 'accounting', component: AccountingComponent },
{ path: 'GL', component: GeneralLedgerComponent },
{ path: 'add_journal_entry', component: AddJournalEntryComponent },
{ path: 'payroll', component: PayrollsComponent },
{ path: 'chart_of_accounts', component: ChartOfAccountsComponent },
{ path: 'add_transaction_type', component: AddTransactionTypeComponent },
{ path: 'trial_balance', component: TrialBalanceComponent },
{ path: 'cheque_clearing', component: ChequeClearingComponent },
{ path: 'transaction_type', component: TransactionTypeComponent },
{ path: 'add_member', component: AddMemberComponent },
{ path: 'manage_members', component: ManageMembersComponent },
{ path: 'add_employee', component: AddEmployeeComponent },
{ path: 'manage_employees', component: ManageEmployeeComponent },
{ path: 'view_offices', component: ViewOfficesComponent },
{ path: 'add_office', component: AddOfficeComponent },
{ path: 'add_ledger', component: AddLedgerComponent },
{ path: 'account_payable', component: AccountPayableComponent },
{ path: 'add_cheque', component: AddChequeComponent },
{ path: 'add_payroll', component: AddPayrollComponent },
]
}
];


@NgModule({
declarations: [
AppComponent,LoginComponent, NavbarComponent, DashboardComponent,
AccountingComponent, GeneralLedgerComponent, AddJournalEntryComponent,
PayrollsComponent, ChartOfAccountsComponent, AddTransactionTypeComponent,
TrialBalanceComponent, ChequeClearingComponent, TransactionTypeComponent,
AddMemberComponent, ManageMembersComponent, AddEmployeeComponent, ManageEmployeeComponent, AddOfficeComponent,
ViewOfficesComponent, AddLedgerComponent, AccountPayableComponent, AddChequeComponent, AddPayrollComponent,
AppComponent, LoginComponent, NavbarComponent, DashboardComponent,
AccountingComponent, GeneralLedgerComponent, AddJournalEntryComponent,
PayrollsComponent, ChartOfAccountsComponent, AddTransactionTypeComponent,
TrialBalanceComponent, ChequeClearingComponent, TransactionTypeComponent,
AddMemberComponent, ManageMembersComponent, AddEmployeeComponent, ManageEmployeeComponent, AddOfficeComponent,
ViewOfficesComponent, AddLedgerComponent, AccountPayableComponent, AddChequeComponent, AddPayrollComponent,

],
imports: [RouterModule.forRoot(appRoutes),
BrowserModule, BrowserAnimationsModule,
CommonModule, TranslateModule,CovalentLoadingModule,
FormsModule, ReactiveFormsModule,HttpModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps: [Http]
}
}),
StoreModule.provideStore(reducer),

/**
* Root effects
*/
EffectsModule.run(SecurityApiEffects),
EffectsModule.run(SecurityRouteEffects),
EffectsModule.run(SecurityNotificationEffects),

EffectsModule.run(OfficeSearchApiEffects),
EffectsModule.run(EmployeeSearchApiEffects),
EffectsModule.run(CustomerSearchApiEffects),
EffectsModule.run(AccountSearchApiEffects),
EffectsModule.run(RoleSearchApiEffects),
EffectsModule.run(LedgerSearchApiEffects),
CommonModule, TranslateModule, CovalentLoadingModule,
FormsModule, ReactiveFormsModule, HttpModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps: [Http]
}
}),
StoreModule.forRoot(reducer),

/**
* Root effects
*/
EffectsModule.forRoot([SecurityApiEffects,
SecurityRouteEffects,
SecurityNotificationEffects,

OfficeSearchApiEffects,
EmployeeSearchApiEffects,
CustomerSearchApiEffects,
AccountSearchApiEffects,
RoleSearchApiEffects,
LedgerSearchApiEffects
]),

MatAutocompleteModule,
MatButtonModule,
@@ -214,7 +215,7 @@ const appRoutes: Routes = [
MatTabsModule,
MatStepperModule
],
providers: [ HttpClients,
providers: [HttpClients,
AuthenticationService,
PermittableGroupIdMapper,
IdentityService,
@@ -232,13 +233,13 @@ const appRoutes: Routes = [
CurrencyService,
NotificationService,
TranslateService,
// ExistsGuardService,
// ...appRoutingProviders,

// ExistsGuardService,
// ...appRoutingProviders,
ImageService,
{
provide: LOCALE_ID, useFactory: getSelectedLanguage, deps: [TranslateService],
} ],
}],
bootstrap: [AppComponent]
})
export class AppModule { }
@@ -34,7 +34,7 @@ export const createFormReducer = (resource: string, reducer?: ActionReducer<Form
case `[${resource}] Create Fail`:
case `[${resource}] Update Fail`: {
return Object.assign({}, state, {
error: action.payload
// error: action.payload
});
}

@@ -63,7 +63,7 @@ export const createResourceReducer =

const identifier = (resource: any) => resource[identifierName];

return function (state: ResourceState = initialState, action: Action): ResourceState {
/* return function (state: ResourceState = initialState, action: Action): ResourceState {
switch (action.type) {
@@ -152,6 +152,7 @@ export const createResourceReducer =
}
}
};
*/
};

export const getResourceEntities = (cacheState: ResourceState) => cacheState.entities;
@@ -55,7 +55,7 @@ const initialState: SearchState = {
};

export const createSearchReducer = (entityName: string, reducer?: ActionReducer<SearchState>) => {
return function(state: SearchState = initialState, action: Action): SearchState {
/* return function(state: SearchState = initialState, action: Action): SearchState {
switch (action.type) {
@@ -89,6 +89,7 @@ export const createSearchReducer = (entityName: string, reducer?: ActionReducer<
}
}
};
*/
};

export const getSearchEntities = (state: SearchState) => state.entities;
@@ -26,7 +26,7 @@ import {Router} from '@angular/router';
@Injectable()
export class OfficeRouteEffects {

@Effect({ dispatch: false })
/* @Effect({ dispatch: false })
createOfficeSuccess$: Observable<Action> = this.actions$
.ofType(officeActions.CREATE_SUCCESS)
.map(action => action.payload)
@@ -57,4 +57,5 @@ export class OfficeRouteEffects {
});
constructor(private actions$: Actions, private router: Router) { }
*/
}
@@ -54,7 +54,7 @@ export const officeModuleReducer: ActionReducer<State> = createReducer(reducers)
export class OfficesStore extends Store<State> {}

export function officeStoreFactory(appStore: Store<fromRoot.State>) {
appStore.replaceReducer(officeModuleReducer);
//appStore.replaceReducer(officeModuleReducer);
return appStore;
}

@@ -26,13 +26,15 @@ import * as denominationActions from '../denomination.actions';
@Injectable()
export class TellerDenominationRouteEffects {

@Effect({ dispatch: false })
/* @Effect({ dispatch: false })
createDenominationSuccess$: Observable<Action> = this.actions$
.ofType(denominationActions.CREATE_DENOMINATION_SUCCESS)
.map(action => action.payload)
.do(payload => {
this.router.navigate(['../'], { relativeTo: payload.activatedRoute });
});
*/

constructor(private actions$: Actions, private router: Router) { }
}
@@ -42,7 +42,7 @@ export class TellerNotificationEffects {
message: 'Teller is going to be updated'
}));

@Effect({ dispatch: false })
/* @Effect({ dispatch: false })
openCommandFail$: Observable<Action> = this.actions$
.ofType(tellerActions.EXECUTE_COMMAND_FAIL)
.map(action => action.payload.command)
@@ -65,6 +65,7 @@ export class TellerNotificationEffects {
message: 'This teller requires a denomination before it can be closed.'
})
);
*/

constructor(private actions$: Actions, private notificationService: NotificationService) {
}
@@ -22,11 +22,12 @@ import {Actions, Effect} from '@ngrx/effects';
import {Observable} from 'rxjs/Observable';
import {Action} from '@ngrx/store';
import * as tellerActions from '../teller.actions';
import {Teller} from '/home/pembe/Desktop/fineract-cn-web-app/src/app/sevices/teller/domain/teller.model'

@Injectable()
export class TellerRouteEffects {

@Effect({ dispatch: false })
/* @Effect({ dispatch: false })
createTellerSuccess$: Observable<Action> = this.actions$
.ofType(tellerActions.CREATE_TELLER_SUCCESS, tellerActions.UPDATE_TELLER_SUCCESS)
.map(action => action.payload)
@@ -42,5 +43,7 @@ export class TellerRouteEffects {
this.router.navigate(['../'], { relativeTo: payload.activatedRoute });
});
*/

constructor(private actions$: Actions, private router: Router) { }
}

0 comments on commit c11405f

Please sign in to comment.