Merge branch 'development' into master
This commit is contained in:
commit
2d8c7780a4
@ -1,3 +1,4 @@
|
||||
import initialValues from 'client/stores/CalculationStore/config/initialValues';
|
||||
import { IQuote } from 'core/services/CrmService/types/entities';
|
||||
import { ValuesNames } from 'core/types/Calculation/Store/values';
|
||||
|
||||
@ -103,7 +104,10 @@ export function getValuesFromKP(quote: IQuote) {
|
||||
return Object.keys(mapKPtoValues).reduce((acc, kpProp) => {
|
||||
const valueName = mapKPtoValues[kpProp];
|
||||
if (valueName) {
|
||||
const value = quote[kpProp];
|
||||
let value = quote[kpProp];
|
||||
if (value === undefined || value === null) {
|
||||
value = initialValues[valueName];
|
||||
}
|
||||
acc[valueName] = value;
|
||||
}
|
||||
return acc;
|
||||
|
||||
Reference in New Issue
Block a user