Untitled

mail@pastecode.io avatar
unknown
plain_text
22 days ago
1.2 kB
7
Indexable
Never
const response = {
        transactionDetails: {
            effectiveDate: transactionDetails.effectiveDate,
        },
        feesAndTaxes: feesAndTaxes,
        mandatoryCovers: mandatoryCovers.map((element: any) => {
            return {
                coverCode: element.coverCode,
                coverIncluded: element.coverIncluded,
                coverageLimit: element.coverageLimit,
            }
        }),
        listedItems: listedItems.map((element: any) => {
            return {
                coverDescription: element.coverDescription,
                coverIncluded: element.coverIncluded,
                coverageLimit: element.coverageLimit,
                mandatoryCoverCode: element.mandatoryCoverCode,
            }
        }),
        buildingDetails: {
            ..._.omit(buildingDetails, ['ownershipStatus']),
            ownershipCode: buildingDetails.ownershipStatus,
            ownership: 'TODO-FROM BAWABA'
        },
        underWritingQuestions: underWritingQuestions,
        stage,
        error,
    };

    return plainToClass(HomeInsuranceFormBody, response, { enableImplicitConversion: true });
Leave a Comment