Skip to content

Commit

Permalink
Merge pull request #528 from odisha-muktasoft/UAT-FIX-8
Browse files Browse the repository at this point in the history
[UCEM-358, UCEM-375, UCEM-350] : changes in the view statement style,…
  • Loading branch information
Tulika-eGov authored Jul 11, 2024
2 parents 565e5ea + 33da23c commit a3cef83
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const data = (statementDetails, rawData, oldData) => {
: statementDetails?.basicSorDetails.filter((ob) => ob?.type === "M").length != 0
? statementDetails?.basicSorDetails.filter((ob) => ob?.type === "M")[0]?.amount.toFixed(2)
: parseFloat(0).toFixed(2),
amountStyle:{maxWidth:"12%",textAlign:"end"}
},
{
key: "STATEMENT_LABOUR",
Expand All @@ -50,6 +51,7 @@ export const data = (statementDetails, rawData, oldData) => {
: statementDetails?.basicSorDetails.filter((ob) => ob?.type === "L").length != 0
? statementDetails?.basicSorDetails.filter((ob) => ob?.type === "L")[0]?.amount.toFixed(2)
: parseFloat(0).toFixed(2),
amountStyle:{maxWidth:"12%",textAlign:"end"}
},
{
key: "STATEMENT_MACHINERY",
Expand All @@ -58,6 +60,7 @@ export const data = (statementDetails, rawData, oldData) => {
: statementDetails?.basicSorDetails.filter((ob) => ob?.type === "E").length != 0
? statementDetails?.basicSorDetails.filter((ob) => ob?.type === "E")[0]?.amount.toFixed(2)
: parseFloat(0).toFixed(2),
amountStyle:{maxWidth:"12%",textAlign:"end"}
},
{

Expand All @@ -67,6 +70,7 @@ export const data = (statementDetails, rawData, oldData) => {
return acc + (ob?.additionalDetails?.labourCessAmount || 0);
}, 0) || 0
).toFixed(2),
amountStyle:{maxWidth:"12%",textAlign:"end"}
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ const ViewAnalysisStatement = ({ formData, ...props }) => {
success={showToast?.success}
label={t(showToast?.label)}
isDleteBtn={true}
style={{ width: "100%", display: "flex", justifyContent: "space-between", whiteSpace: "nowrap" }}
style={{ width: "100%", display: "flex", justifyContent: "space-between" }}
onClose={() => setShowToast(false)}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,15 +445,15 @@ const ViewAnalysisStatement = () => {
// },
// };

let InfoCardData = {
"Info": "STATEMENT_ANALYSIS_INFO_LABEL",
"reasons": [
"STATEMENT_ANALYSIS_INFO_1",
"STATEMENT_ANALYSIS_INFO_2",
"STATEMENT_ANALYSIS_INFO_3",
"STATEMENT_ANALYSIS_INFO_4"
]
}
// let InfoCardData = {
// "Info": "STATEMENT_ANALYSIS_INFO_LABEL",
// "reasons": [
// "STATEMENT_ANALYSIS_INFO_1",
// "STATEMENT_ANALYSIS_INFO_2",
// "STATEMENT_ANALYSIS_INFO_3",
// "STATEMENT_ANALYSIS_INFO_4"
// ]
// }

const config = data(statement?.[0],statement,oldData);

Expand All @@ -468,13 +468,7 @@ let InfoCardData = {
{ downloadStatus&&<MultiLink onHeadClick={() => HandleDownloadPdf()} downloadBtnClassName={"employee-download-btn-className"} label={t("CS_COMMON_DOWNLOAD")} /> }
</div>
<div>
<CitizenInfoLabel textType={"Componenet"} style={{margin:"0px", maxWidth:"99%", marginBottom:"20px"}} info={t("CS_INFO")} text={<div style={{display:"block"}}>
<p>{t(InfoCardData?.Info)}</p>
{InfoCardData?.reasons.map((reason, index) => (
<p key={index}>{t(reason)}</p>
))}
</div>}
/>
<CitizenInfoLabel textType={"Componenet"} style={{margin:"0px", maxWidth:"99%", marginBottom:"20px"}} info={t("CS_INFO")} text={t("STATEMENT_ANALYSIS_INFO_RATE")} />
</div>
<ViewComposer data={config} isLoading={false} />
{toast?.show && <Toast label={toast?.label} error={toast?.error} isDleteBtn={true} onClose={handleToastClose}></Toast>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const data = (statementDetails, rawData,oldData) => {
: statementDetails?.basicSorDetails.filter((ob) => ob?.type === "M").length != 0
? statementDetails?.basicSorDetails.filter((ob) => ob?.type === "M")[0]?.amount.toFixed(2)
: parseFloat(0).toFixed(2),
amountStyle:{maxWidth:"12%",textAlign:"end"}
},
{
key: "STATEMENT_LABOUR",
Expand All @@ -48,6 +49,7 @@ export const data = (statementDetails, rawData,oldData) => {
: statementDetails?.basicSorDetails.filter((ob) => ob?.type === "L").length != 0
? statementDetails?.basicSorDetails.filter((ob) => ob?.type === "L")[0]?.amount.toFixed(2)
: parseFloat(0).toFixed(2),
amountStyle:{maxWidth:"12%",textAlign:"end"}
},
{
key: "STATEMENT_MACHINERY",
Expand All @@ -56,6 +58,7 @@ export const data = (statementDetails, rawData,oldData) => {
: statementDetails?.basicSorDetails.filter((ob) => ob?.type === "E").length != 0
? statementDetails?.basicSorDetails.filter((ob) => ob?.type === "E")[0]?.amount.toFixed(2)
: parseFloat(0).toFixed(2),
amountStyle:{maxWidth:"12%",textAlign:"end"}
},
{

Expand All @@ -65,6 +68,7 @@ export const data = (statementDetails, rawData,oldData) => {
return acc + (ob?.additionalDetails?.labourCessAmount || 0);
}, 0) || 0
).toFixed(2),
amountStyle:{maxWidth:"12%",textAlign:"end"}
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,15 +418,15 @@ const ViewUtilization = () => {

const config = data(statement?.[0], statement,oldData);

let InfoCardData = {
"Info": "STATEMENT_UTILIZATION_INFO_LABEL",
"reasons": [
"STATEMENT_UTILIZATION_INFO_1",
"STATEMENT_UTILIZATION_INFO_2",
"STATEMENT_UTILIZATION_INFO_3",
"STATEMENT_UTILIZATION_INFO_4"
]
}
// let InfoCardData = {
// "Info": "STATEMENT_UTILIZATION_INFO_LABEL",
// "reasons": [
// "STATEMENT_UTILIZATION_INFO_1",
// "STATEMENT_UTILIZATION_INFO_2",
// "STATEMENT_UTILIZATION_INFO_3",
// "STATEMENT_UTILIZATION_INFO_4"
// ]
// }

//if (isProjectLoading || isDetailedEstimateLoading | isDetailedEstimatesLoading) return <Loader />;
const HandleDownloadPdf = () => {
Expand All @@ -446,13 +446,7 @@ const ViewUtilization = () => {
{downloadStatus&&<MultiLink onHeadClick={() => HandleDownloadPdf()} downloadBtnClassName={"employee-download-btn-className"} label={t("CS_COMMON_DOWNLOAD")} />}
</div>
<div>
<CitizenInfoLabel textType={"Componenet"} style={{margin:"0px", maxWidth:"99%", marginBottom:"20px"}} info={t("CS_INFO")} text={<div style={{display:"block"}}>
<p>{t(InfoCardData?.Info)}</p>
{InfoCardData?.reasons.map((reason, index) => (
<p key={index}>{t(reason)}</p>
))}
</div>}
/>
<CitizenInfoLabel textType={"Componenet"} style={{margin:"0px", maxWidth:"99%", marginBottom:"20px"}} info={t("CS_INFO")} text={t("STATEMENT_UTILIZATION_INFO_RATE")} />
</div>
<ViewComposer data={config} isLoading={false} />
{toast?.show && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const SORDetailsTemplate = (props) => {
const errorContainerStyles = { display: "block", height: "1rem", overflow: "hidden" };

const columns = [
{ label: t("RA_SNO"), key: "sno" },
//{ label: t("RA_SNO"), key: "sno" },
{ label: t("RA_CODE"), key: "sorCode" },
{ label: t("RA_NAME"), key: "description" },
{ label: t("RA_UOM"), key: "uom" },
Expand Down Expand Up @@ -126,19 +126,19 @@ const SORDetailsTemplate = (props) => {
const getStyles = (index) => {
let obj = {};
switch (index) {
// case 1:
// obj = { width: "1rem" };
// break;
case 1:
obj = { width: "1rem" };
break;
case 2:
obj = { width: "8rem" };
break;
case 3:
case 2:
obj = { width: "70rem" };
break;
case 4:
case 3:
obj = { width: "10rem" };
break;
case 5:
case 4:
obj = pageType === "VIEW" ? { width: "15rem", textAlign: "right" } : { width: "15rem" };
break;
case 6:
Expand Down Expand Up @@ -198,7 +198,7 @@ const SORDetailsTemplate = (props) => {
</div>
)}
</div>
<table className="reports-table sub-work-table">
<table className="reports-table sub-work-table" style={{width:"104%"}}>
<thead>
<tr>
{/*SORDetails?.filter((ob) => ob?.sorType === props?.config?.sorType).length > 0 &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ export const RenderDataSection = ({ section }) => {
/* privacy object set to the Row Component */
privacy={row?.value?.privacy}
rowContainerStyle={{}}
textStyle={row?.textStyle}
textStyle={{}}
labelStyle={{}}
amountStyle={{}}
amountStyle={row?.amountStyle || {}}
/>
);
})}
Expand Down

0 comments on commit a3cef83

Please sign in to comment.