Skip to content

Commit

Permalink
Migrate rescript components to typescript; uninstall ReScript (#8316)
Browse files Browse the repository at this point in the history
* upgrade eslint and prettier packages

* run project wide format

* use prettier for tailwind lint rules

* Rewrite component to typescript (Authored-by: Shivank @skks1212)

* fix unused classname

* unplug rescript

* add critical care index page

* fix issue with dropdown clipping in popup modal

* adds icons for daily round sections

* fix nested `p` tag error

* fix pain chart not working for updates

* fix range form field's text input being able to go beyond range

* fix checbox not working

* fix range form field unable to parse strings as floats

* fix neurological monitoring sending incorrect values for some options

* fix nursing care layout

* add translations to editor index

* fix pressure sore not working

* replace gray shade with secondary

* fix cypress

* fix log update sections not compliant with vite hmr update rules

* fix bunch of issues with range form field

* Fix issues with "Nursing Care" section

* Fix issues with "Dialysis" section

* Fix issues with "Bloog Sugar" section

* Fix issues with "Dialysis" section

* Fix issues with "ABG Analaysis" section

* Fix issues with "IO Balance" section

* Fix issues with "Pupil Size" component

* Fix issues with "Neurological Monitoring" section and RadioFormFIeld

* fix uncontrolled input error in range form field

* Added support for IV and NIV Respiratory Support and fix issues with Resp. support section

* improve type definitions for Human Body component and Pressure Sore

* Fix issues with "Pressure Sore" section

* Visual improvements to Human Chart component

* Fix issues with "Pain Chart" in Vitals section

* Update preview componets in Consultation Dashboard to use newer components

* Check for linked ventilators when filing resp. support section

* update cypress tests

* fix prine position padding and LOC layout

* update LOC choices

* update vertical spacing of radio form field

* Nursing Care: reduced vertical spacing

* Fix I/O Balance select menu not functional

* ABG Analaysis: Correct pH value slider range to max 10 instead of 14

* Respiratory Support: Adds missing range value description for tidal volume

* remove unused field `consciousness_level_detail`

* Fix showig constricted when cannot be assessed selected

* Fixes issue when right pupil's checkbox label causes to toggle left pupil's checbox value to change due to same id

* Reduce spacing in Glasgow Coma Scale

* Fix whitespace breaks in neurological monitoring preview: LOC

* Adds missing support for progress note round type sections

* Fix spacing between title of pressure sore and pain scale preview tabs

* Fix size and spacing of Range Form Field's numeric input and unit selector

* Fix pain scale and pressure sore popup not closing on clicking save button

* Show Dialog Modal for mobile screens for Pressure sore and Pain scale region editors

* ensure consistent colors for pressure sore and painscale buttons and body regions based on score

* fix lint issues

* prettify files that are not pretty

* improve i18n support and code quality refactor

* Critical Care details page part 1 (5 of 11 sections)

* Resp. support section preview

* Pressure Sore section preview

* Nursing Care section preview

* I/O balance section preview

* Vitals section preview

* submit BP mean to backend

* add success notifications for completing

* fix pressure sore colors

* remove unused dependencies

* Revert "remove unused dependencies"

This reverts commit c0e6d5c.
  • Loading branch information
rithviknishad authored Aug 14, 2024
1 parent e118453 commit 7ed9d47
Show file tree
Hide file tree
Showing 235 changed files with 5,194 additions and 13,033 deletions.
14 changes: 3 additions & 11 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:i18next/recommended",
"plugin:tailwindcss/recommended",
"plugin:prettier/recommended",
"plugin:storybook/recommended"
],
"overrides": [
Expand Down Expand Up @@ -46,10 +46,6 @@
"i18next"
],
"rules": {
"quotes": [
"error",
"double"
],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
Expand All @@ -59,6 +55,7 @@
"caughtErrorsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-explicit-any": "warn",
"react/react-in-jsx-scope": "off",
"i18next/no-literal-string": [
"warn",
Expand All @@ -81,12 +78,7 @@
]
}
}
],
"tailwindcss/no-custom-classname": "off",
"tailwindcss/migration-from-tailwind-2": "error",
"tailwindcss/classnames-order": "off",
"tailwindcss/enforces-shorthand": "off",
"tailwindcss/no-contradicting-classname": "error"
]
},
"ignorePatterns": [
"dist",
Expand Down
32 changes: 0 additions & 32 deletions bsconfig.json

This file was deleted.

8 changes: 4 additions & 4 deletions cypress/e2e/patient_spec/patient_logupdate.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.typeSpo2(patientSpo2);
patientLogupdate.selectRhythm(patientRhythmType);
patientLogupdate.typeRhythm(patientRhythm);
cy.get("#consciousness_level-2").click();
cy.get("#consciousness_level-option-RESPONDS_TO_PAIN").click();
cy.submitButton("Save");
cy.verifyNotification("Telemedicine log created successfully");
});
Expand All @@ -82,7 +82,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.typeSpo2(patientSpo2);
patientLogupdate.selectRhythm(patientRhythmType);
patientLogupdate.typeRhythm(patientRhythm);
cy.get("#consciousness_level-2").click();
cy.get("#consciousness_level-option-RESPONDS_TO_PAIN").click();
cy.submitButton("Save");
cy.verifyNotification("Brief Update log created successfully");
cy.closeNotification();
Expand Down Expand Up @@ -137,7 +137,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.typeSpo2(patientSpo2);
patientLogupdate.selectRhythm(patientRhythmType);
patientLogupdate.typeRhythm(patientRhythm);
cy.get("#consciousness_level-2").click();
cy.get("#consciousness_level-option-RESPONDS_TO_PAIN").click();
cy.submitButton("Save");
cy.wait(2000);
cy.verifyNotification("Brief Update log created successfully");
Expand All @@ -161,7 +161,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.typePulse(patientPulse);
patientLogupdate.typeTemperature(patientTemperature);
patientLogupdate.typeRespiratory(patientRespiratory);
cy.get("#consciousness_level-2").click();
cy.get("#consciousness_level-option-RESPONDS_TO_PAIN").click();
cy.submitButton("Save");
cy.verifyNotification("Brief Update log created successfully");
cy.closeNotification();
Expand Down
6 changes: 3 additions & 3 deletions cypress/pageobject/Patient/PatientCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class PatientPage {
}

checkPhoneNumberIsEmergencyNumber() {
cy.get("#emergency_contact_checkbox > div > input").click();
cy.get("#emergency_contact_checkbox").click();
}

typePatientDateOfBirth(dateOfBirth: string) {
Expand Down Expand Up @@ -93,11 +93,11 @@ export class PatientPage {
}

clickPatientAntenatalStatusYes() {
cy.get("#is_antenatal-0").click();
cy.get("#is_antenatal-option-true").click();
}

clickPatientPostPartumStatusYes() {
cy.get("#is_postpartum-0").click();
cy.get("#is_postpartum-option-true").click();
}

clickCancelButton() {
Expand Down
Loading

0 comments on commit 7ed9d47

Please sign in to comment.