diff --git a/src/formDesigner/components/ReportCard/CreateEditReportCard.js b/src/formDesigner/components/ReportCard/CreateEditReportCard.js index d6676f13e..b900adac5 100644 --- a/src/formDesigner/components/ReportCard/CreateEditReportCard.js +++ b/src/formDesigner/components/ReportCard/CreateEditReportCard.js @@ -134,11 +134,7 @@ export const CreateEditReportCard = ({ edit, ...props }) => { ]); isValid = false; } - if ( - !isStandardReportCard && - nested && - (count < MinimumNumberOfNestedCards || count > MaximumNumberOfNestedCards) - ) { + if (!isStandardReportCard && nested && (count < MinimumNumberOfNestedCards || count > MaximumNumberOfNestedCards)) { setError([ ...error, { @@ -181,9 +177,7 @@ export const CreateEditReportCard = ({ edit, ...props }) => { setError([ { key: "SERVER_ERROR", - message: `${get(error, "response.data") || - get(error, "message") || - "error while saving card"}` + message: `${get(error, "response.data") || get(error, "message") || "error while saving card"}` } ]); }); @@ -237,14 +231,18 @@ export const CreateEditReportCard = ({ edit, ...props }) => { toolTipKey={"APP_DESIGNER_CARD_DESCRIPTION"} />

- - dispatch({ type: "color", payload: color })} - /> - {getErrorByKey(error, "EMPTY_COLOR")} + {!isStandardReportCard && ( + + + dispatch({ type: "color", payload: color })} + /> + {getErrorByKey(error, "EMPTY_COLOR")} + + )}

{ payload: { nested: card.nested, count: event.target.value } }) } - options={Array.from({ length: MaximumNumberOfNestedCards }, (_, i) => i + 1).map( - (num, index) => ( - - {num} - - ) - )} + options={Array.from({ length: MaximumNumberOfNestedCards }, (_, i) => i + 1).map((num, index) => ( + + {num} + + ))} toolTipKey={"APP_DESIGNER_CARD_COUNT"} /> )} diff --git a/src/formDesigner/components/ReportCard/ReportCardList.js b/src/formDesigner/components/ReportCard/ReportCardList.js index a70ea74e9..60a0992ae 100644 --- a/src/formDesigner/components/ReportCard/ReportCardList.js +++ b/src/formDesigner/components/ReportCard/ReportCardList.js @@ -7,8 +7,7 @@ import { Privilege } from "openchs-models"; const columns = [ { title: "Name", - render: rowData => - !rowData.voided && {rowData.name} + render: rowData => !rowData.voided && {rowData.name} }, { title: "Description", diff --git a/src/formDesigner/components/ReportCard/ReportCardShow.js b/src/formDesigner/components/ReportCard/ReportCardShow.js index 677c07226..359b81848 100644 --- a/src/formDesigner/components/ReportCard/ReportCardShow.js +++ b/src/formDesigner/components/ReportCard/ReportCardShow.js @@ -43,11 +43,13 @@ const ReportCardShow = props => {

-

- {"Colour"} -
- -
+ {!isStandardReportCard && ( + + {"Colour"} +
+ +
+ )}

{!isStandardReportCard && ( @@ -70,10 +72,7 @@ const ReportCardShow = props => {

{isStandardReportCard && ( - +

)}