resolved PR feedback

This commit is contained in:
lotte
2018-11-20 15:53:40 +01:00
parent 54dad64ab4
commit 5cbe8ffb88
5 changed files with 33 additions and 46 deletions

View File

@@ -25,7 +25,7 @@
"prebuild:prod": "yarn run prebuild",
"build": "webpack --progress --mode development",
"build:aot": "webpack --env.aot --env.server --mode development && webpack --env.aot --env.client --mode development",
"build:prod": "webpack --env.aot --env.server --env.production && webpack --env.aot --env.client --env.production",
"build:prod": "webpack --env.aot --env.server --mode production && webpack --env.aot --env.client --mode production",
"postbuild:prod": "yarn run rollup",
"rollup": "rollup -c rollup.config.js",
"prestart": "yarn run build:prod",

View File

@@ -140,7 +140,7 @@ export class ErrorResponse extends RestResponse {
constructor(error: RequestError) {
super(false, error.statusText);
// console.error(error);
console.error(error);
this.errorMessage = error.message;
}
}

View File

@@ -37,25 +37,8 @@ export abstract class ComColDataService<TNormalized extends NormalizedObject, TD
tap((href: string) => {
const request = new FindByIDRequest(this.requestService.generateRequestId(), href, options.scopeID);
this.requestService.configure(request);
}),);
}));
// return scopeCommunityHrefObs.pipe(
// mergeMap((href: string) => this.responseCache.get(href)),
// map((entry: ResponseCacheEntry) => entry.response),
// mergeMap((response) => {
// if (response.isSuccessful) {
// const community$: Observable<NormalizedCommunity> = this.objectCache.getByUUID(scopeID);
// return community$.pipe(
// map((community) => community._links[this.linkPath]),
// filter((href) => isNotEmpty(href)),
// distinctUntilChanged()
// );
// } else if (!response.isSuccessful) {
// return observableThrowError(new Error(`The Community with scope ${scopeID} couldn't be retrieved`))
// }
// }),
// distinctUntilChanged()
// );
const responses = scopeCommunityHrefObs.pipe(
mergeMap((href: string) => this.responseCache.get(href)),
map((entry: ResponseCacheEntry) => entry.response));

View File

@@ -2,7 +2,11 @@ import { Store, StoreModule } from '@ngrx/store';
import { async, inject, TestBed } from '@angular/core/testing';
import { AbstractControl, FormControl, FormGroup, Validators } from '@angular/forms';
import { DynamicFormControlModel, DynamicInputModel } from '@ng-dynamic-forms/core';
import {
DynamicFormControlModel,
DynamicFormGroupModel,
DynamicInputModel
} from '@ng-dynamic-forms/core';
import { FormService } from './form.service';
import { FormBuilderService } from './builder/form-builder.service';
@@ -37,30 +41,30 @@ describe('FormService test suite', () => {
}),
new DynamicInputModel({ id: 'date' }),
new DynamicInputModel({ id: 'description' }),
// new DynamicFormGroupModel({
//
// id: 'addressLocation',
// group: [
// new DynamicInputModel({
//
// id: 'zipCode',
// label: 'Zip Code',
// placeholder: 'ZIP'
// }),
// new DynamicInputModel({
//
// id: 'state',
// label: 'State',
// placeholder: 'State'
// }),
// new DynamicInputModel({
//
// id: 'city',
// label: 'City',
// placeholder: 'City'
// })
// ]
// }),
new DynamicFormGroupModel({
id: 'addressLocation',
group: [
new DynamicInputModel({
id: 'zipCode',
label: 'Zip Code',
placeholder: 'ZIP'
}),
new DynamicInputModel({
id: 'state',
label: 'State',
placeholder: 'State'
}),
new DynamicInputModel({
id: 'city',
label: 'City',
placeholder: 'City'
})
]
}),
];
let controls;

View File

@@ -27,7 +27,7 @@ module.exports = function(env, options) {
getAotPlugin('client', !!env.aot)
]
});
if (env.production) {
if (options.mode === 'production') {
serverConfig = webpackMerge({}, serverConfig, prodPartial);
clientConfig = webpackMerge({}, clientConfig, prodPartial);
}