Skip to content

Commit

Permalink
UCEM-727+react-component-error-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamalesh-egov committed Sep 4, 2024
1 parent f234eea commit 2b4029a
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@egovernments/digit-ui-module-estimate": "0.4.5",
"@egovernments/digit-ui-module-masters": "0.4.5",
"@egovernments/digit-ui-module-project": "0.4.1",
"@egovernments/digit-ui-module-expenditure": "0.4.1",
"@egovernments/digit-ui-module-expenditure": "0.4.2",
"@egovernments/digit-ui-customisation-mukta": "0.2.1",
"@egovernments/digit-ui-module-rate-analysis": "0.4.0",
"http-proxy-middleware": "^1.0.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"name": "@egovernments/digit-ui-module-expenditure",
"version": "0.4.1",
"description": "Expenditure Management Module UI",
"main": "dist/index.js",
"module": "dist/index.modern.js",
"source": "src/Module.js",
"files": [
"dist"
],
"scripts": {
"start": "microbundle-crl watch --no-compress --format modern,cjs",
"build": "microbundle-crl --compress --no-sourcemap --format cjs",
"prepublish": "yarn build"
},
"peerDependencies": {
"react": "17.0.2",
"react-router-dom": "5.3.0"
},
"dependencies": {
"@egovernments/digit-ui-react-components": "^1.5.0",
"lodash": "^4.17.21",
"react": "17.0.2",
"react-date-range": "^1.4.0",
"react-dom": "17.0.2",
"react-hook-form": "6.15.8",
"react-i18next": "11.16.2",
"react-query": "3.6.1",
"react-router-dom": "5.3.0"
},
"author": "",
"license": "MIT"
}
"name": "@egovernments/digit-ui-module-expenditure",
"version": "0.4.2",
"description": "Expenditure Management Module UI",
"main": "dist/index.js",
"module": "dist/index.modern.js",
"source": "src/Module.js",
"files": [
"dist"
],
"scripts": {
"start": "microbundle-crl watch --no-compress --format modern,cjs",
"build": "microbundle-crl --compress --no-sourcemap --format cjs",
"prepublish": "yarn build"
},
"peerDependencies": {
"react": "17.0.2",
"react-router-dom": "5.3.0"
},
"dependencies": {
"@egovernments/digit-ui-react-components": "^1.5.0",
"lodash": "^4.17.21",
"react": "17.0.2",
"react-date-range": "^1.4.0",
"react-dom": "17.0.2",
"react-hook-form": "6.15.8",
"react-i18next": "11.16.2",
"react-query": "3.6.1",
"react-router-dom": "5.3.0"
},
"author": "",
"license": "MIT"
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,28 @@ const CreatePurchaseBillForm = ({
setValue("billDetails_billAmt", parseInt(formData.invoiceDetails_materialCost)+parseInt(gstAmount));
}

if(difference?.invoiceDetails_organisationType)
{
if (formData?.invoiceDetails_organisationType?.code === "CBO") {
setValue("invoiceDetails_vendor", contract.additionalDetails?.cboName);
setValue("invoiceDetails_vendorId", contract.additionalDetails?.cboOrgNumber);
// Disabling and converting the field to text input
createPurchaseBillConfig.form[2].body[1].disable = true;
createPurchaseBillConfig.form[2].body[1].type = "text";
createPurchaseBillConfig.form[2].body[1].populators.customClass = "disabled-text-field";
} else {
setValue("invoiceDetails_vendor", '');
setValue("invoiceDetails_vendorId", undefined);
setValue("invoiceDetails_vendorId", '');
// Enabling and converting the field to dropdown
createPurchaseBillConfig.form[2].body[1].disable = false;
createPurchaseBillConfig.form[2].body[1].type = "dropdown";
createPurchaseBillConfig.form[2].body[1].populators.customClass = undefined;
}

// if(difference?.invoiceDetails_organisationType)
// {
// setValue("invoiceDetails_vendor", '');
// setValue("invoiceDetails_vendorId", undefined);
// }

if(formData.billDetails_billAmt) {
let gstAmount = formData.invoiceDetails_gst ? formData.invoiceDetails_gst : 0;
let value = parseFloat(formData.invoiceDetails_materialCost)+ parseFloat(gstAmount);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const CitizenInfoLabel = (props) => {
const showInfo = props?.showInfo ? props?.showInfo : true;

return (
<div className={`info-banner-wrap ${props?.className ?? ""}`} style={props?.style}>
<div className={`info-banner-wrap ${props?.className ? "":""}`} style={props?.style}>
{showInfo && (
<div>
<InfoBannerIcon fill={props?.fill} />
Expand Down
2 changes: 1 addition & 1 deletion frontend/micro-ui/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@egovernments/digit-ui-module-estimate": "0.4.5",
"@egovernments/digit-ui-module-masters": "0.4.5",
"@egovernments/digit-ui-module-project": "0.4.1",
"@egovernments/digit-ui-module-expenditure": "0.4.1",
"@egovernments/digit-ui-module-expenditure": "0.4.2",
"@egovernments/digit-ui-customisation-mukta": "0.2.1",
"@egovernments/digit-ui-module-rate-analysis": "0.4.0",
"babel-loader": "8.1.0",
Expand Down

0 comments on commit 2b4029a

Please sign in to comment.