Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeshanxviii committed Sep 6, 2024
1 parent 0593c33 commit e81118d
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 66 deletions.
2 changes: 1 addition & 1 deletion cypress/pageobject/Asset/AssetFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export class AssetFilters {
facilityName: string,
assetStatus: string,
assetClass: string,
assetLocation: string
assetLocation: string,
) {
cy.contains("Advanced Filters").click();
cy.get("input[name='Facilities']")
Expand Down
4 changes: 2 additions & 2 deletions cypress/pageobject/Asset/AssetSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class AssetSearchPage {
verifyBadgeContent(expectedText: string) {
cy.get("[data-testid='Name/Serial No./QR ID']").should(
"contain",
expectedText
expectedText,
);
}

Expand Down Expand Up @@ -54,7 +54,7 @@ export class AssetSearchPage {
verifyAssetListContains(dummyCameraText: string) {
cy.get("[data-testid='created-asset-list']").should(
"contain",
dummyCameraText
dummyCameraText,
);
}
}
2 changes: 1 addition & 1 deletion cypress/pageobject/Patient/PatientInsurance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class PatientInsurance {
typePatientInsuranceDetail(
containerId: string,
fieldId: string,
value: string
value: string,
) {
cy.get(`#${containerId}`).within(() => {
cy.get(`#${fieldId}`).click().type(value);
Expand Down
4 changes: 2 additions & 2 deletions cypress/pageobject/Patient/PatientMedicalHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PatientMedicalHistory {
patientSymptoms4,
patientSymptoms5,
patientSymptoms6,
patientSymptoms7
patientSymptoms7,
) {
cy.get("[data-testid=patient-details]").then(($dashboard) => {
cy.url().should("include", "/facility/");
Expand All @@ -51,7 +51,7 @@ class PatientMedicalHistory {
verifyNoSymptosPresent(patientSymptoms1: string) {
cy.get("[data-testid=patient-details]").should(
"not.contain",
patientSymptoms1
patientSymptoms1,
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-build-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ fs.writeFile(
return console.log(err);
}
return null;
}
},
);
7 changes: 5 additions & 2 deletions src/CAREUI/misc/PrintPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type Props = {
title: string;
};


export default function PrintPreview(props: Props) {
return (
<Page title={props.title}>
Expand All @@ -26,7 +25,11 @@ export default function PrintPreview(props: Props) {
<div className="bg-white p-10 text-sm shadow-2xl transition-all duration-200 ease-in-out print:p-2 print:text-sm print:shadow-none">
<div
id="section-to-print"
className={classNames("w-full", props.className, "print:w-full print:inset-x-0 print:absolute")}
className={classNames(
"w-full",
props.className,
"print:absolute print:inset-x-0 print:w-full",
)}
>
{props.children}
</div>
Expand Down
116 changes: 60 additions & 56 deletions src/Components/Facility/Investigations/InvestigationTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,62 +121,66 @@ export const InvestigationTable = ({
/>
<br />
<div className="print:w-full">
<div className="overflow-x-scroll border-b border-secondary-200 shadow sm:rounded-lg print:overflow-visible print:border-none print:shadow-none">
<table className="min-w-full divide-y divide-secondary-200 print:min-w-0 print:divide-none">
<thead className="bg-secondary-50 print:bg-white">
<tr>
{["Name", "Value", "Unit", "Min", "Max", "Ideal"].map((heading) => (
<th
key={heading}
scope="col"
className="px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider text-secondary-800 print:text-sm print:font-normal print:tracking-normal print:text-black"
>
{heading}
</th>
))}
</tr>
</thead>
<tbody className="print:divide-none">
{filterTests.length > 0 ? (
filterTests.map((t: any, i) => {
const value =
changedFields[t.id]?.notes ?? changedFields[t.id]?.value ?? null;
const isChanged = changedFields[t.id]?.initialValue !== value;
return (
<TestRow
data={t}
key={t.id}
i={i}
showForm={showForm}
value={value}
isChanged={isChanged}
onChange={(e: any) => {
const { target, value } =
t?.investigation_object?.investigation_type === "Float"
? {
target: `${t.id}.value`,
value: Number(e.value) || null,
}
: {
target: `${t.id}.notes`,
value: e.value,
};
handleValueChange(value, target);
}}
className="print:text-black"
/>
);
})
) : (
<tr className="text-center text-secondary-500 print:text-black">
<td className="col-span-6">No tests taken</td>
</tr>
)}
</tbody>
</table>
</div>
</div>

<div className="overflow-x-scroll border-b border-secondary-200 shadow sm:rounded-lg print:overflow-visible print:border-none print:shadow-none">
<table className="min-w-full divide-y divide-secondary-200 print:min-w-0 print:divide-none">
<thead className="bg-secondary-50 print:bg-white">
<tr>
{["Name", "Value", "Unit", "Min", "Max", "Ideal"].map(
(heading) => (
<th
key={heading}
scope="col"
className="px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider text-secondary-800 print:text-sm print:font-normal print:tracking-normal print:text-black"
>
{heading}
</th>
),
)}
</tr>
</thead>
<tbody className="print:divide-none">
{filterTests.length > 0 ? (
filterTests.map((t: any, i) => {
const value =
changedFields[t.id]?.notes ??
changedFields[t.id]?.value ??
null;
const isChanged = changedFields[t.id]?.initialValue !== value;
return (
<TestRow
data={t}
key={t.id}
i={i}
showForm={showForm}
value={value}
isChanged={isChanged}
onChange={(e: any) => {
const { target, value } =
t?.investigation_object?.investigation_type ===
"Float"
? {
target: `${t.id}.value`,
value: Number(e.value) || null,
}
: {
target: `${t.id}.notes`,
value: e.value,
};
handleValueChange(value, target);
}}
className="print:text-black"
/>
);
})
) : (
<tr className="text-center text-secondary-500 print:text-black">
<td className="col-span-6">No tests taken</td>
</tr>
)}
</tbody>
</table>
</div>
</div>
</div>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/Routers/routes/ConsultationRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,4 @@ export default {
tab={tab}
/>
),
};
};

0 comments on commit e81118d

Please sign in to comment.