diff --git a/app/controllers/test.controller.js b/app/controllers/test.controller.js index 627f970..fe4afb0 100644 --- a/app/controllers/test.controller.js +++ b/app/controllers/test.controller.js @@ -1,4 +1,4 @@ -const { sequelize,Test,GeneralSection ,FundRequirement , DetailsOfKeyShareHolder , BreifOfBusiness , FinancialInformation , PropertyInformationn , FinalRemarks , OfficerDetails , Photograph , InstitutionDetail , ProductInformation} = require('../models') +const { sequelize, Test , GeneralSection ,FundRequirement , DetailsOfKeyShareHolder , BreifOfBusiness , FinancialInformation , PropertyInformation , FinalRemarks , OfficerDetails , Photograph , InstitutionDetail , ProductInformation} = require('../models') const { logMsg } = require('../services/logger.js'); @@ -38,11 +38,11 @@ exports.SalesPd = async (req, res) => if (keys == 'section3') { Object.assign(values, { pd_id: storeId.pd_id }); await DetailsOfKeyShareHolder.create( values) }; if (keys == 'section4') { Object.assign(values, { pd_id: storeId.pd_id }); await BreifOfBusiness.create( values) }; if (keys == 'section5') { Object.assign(values, { pd_id: storeId.pd_id }); await FinancialInformation.create( values) }; - if (keys == 'section6') { Object.assign(values, { pd_id: storeId.pd_id }); await PropertyInformationn.create( values) }; + if (keys == 'section6') { Object.assign(values, { pd_id: storeId.pd_id }); await PropertyInformation.create( values) }; if (keys == 'section7') { Object.assign(values, { pd_id: storeId.pd_id }); await FinalRemarks.create( values) }; if (keys == 'section8') { Object.assign(values, { pd_id: storeId.pd_id }); await OfficerDetails.create( values) }; // if (keys == 'section9') { Object.assign(values, { pd_id: storeId.pd_id }); await Photograph.create( values) }; - if (keys == 'section10') { Object.assign(values, { pd_id: storeId.pd_id }); await InstitutionDetail.create( values) }; + if (keys == 'section10') { Object.assign(values, { pd_id: storeId.pd_id }); await InstitutionDetail.create( values) }; if (keys == 'section11') { Object.assign(values, { pd_id: storeId.pd_id }); await ProductInformation.create( values) }; }); } @@ -53,17 +53,17 @@ exports.SalesPd = async (req, res) => if (keys == 'section3') { Object.assign(values, { pd_id: storeId.pd_id }); await DetailsOfKeyShareHolder.create( values) }; if (keys == 'section4') { Object.assign(values, { pd_id: storeId.pd_id }); await BreifOfBusiness.create( values) }; if (keys == 'section5') { Object.assign(values, { pd_id: storeId.pd_id }); await FinancialInformation.create( values) }; - if (keys == 'section6') { Object.assign(values, { pd_id: storeId.pd_id }); await PropertyInformationn.create( values) }; + if (keys == 'section6') { Object.assign(values, { pd_id: storeId.pd_id }); await PropertyInformation.create( values) }; if (keys == 'section7') { Object.assign(values, { pd_id: storeId.pd_id }); await FinalRemarks.create( values) }; if (keys == 'section8') { Object.assign(values, { pd_id: storeId.pd_id }); await OfficerDetails.create( values) }; // if (keys == 'section9') { Object.assign(values, { pd_id: storeId.pd_id }); await Photograph.create( values) }; - if (keys == 'section10') { Object.assign(values, { pd_id: storeId.pd_id }); await InstitutionDetail.create( values) }; + if (keys == 'section10') { Object.assign(values, { pd_id: storeId.pd_id }); await InstitutionDetail.create( values) }; if (keys == 'section11') { Object.assign(values, { pd_id: storeId.pd_id }); await ProductInformation.create( values) }; } if (len == count - 1 ) { var resData = await GeneralSection.findAll({ where : { pd_id : storeId.pd_id , is_active : 1 }, - include : [ {model: FundRequirement }, {model: DetailsOfKeyShareHolder }, {model: DetailsOfKeyShareHolder }, {model: BreifOfBusiness }, {model: FinancialInformation }, {model: PropertyInformationn }, {model: FinalRemarks }, {model: OfficerDetails }, {model: Photograph }, {model: InstitutionDetail }, {model: ProductInformation }] + include : [ {model: FundRequirement }, {model: DetailsOfKeyShareHolder }, {model: DetailsOfKeyShareHolder }, {model: BreifOfBusiness }, {model: FinancialInformation }, {model: PropertyInformation }, {model: FinalRemarks }, {model: OfficerDetails }, {model: Photograph }, {model: InstitutionDetail }, {model: ProductInformation }] }) res.send(resData) }