A seed repo for hackathons
- Install Visual Studio Code
- Install node and npm
git clone https://github.com/joeldenning/openmrs-esm-patient-dashboard.git
. Github link: https://github.com/joeldenning/openmrs-esm-patient-dashboard- Fork https://github.com/joeldenning/openmrs-esm-hackathon-seed. Clone your fork.
npm install
inside of both repos- Inside of patient-dashboard, modify dashboard-widgets.tsx and add the following to the
patientDashboardParcels
array:() => System.import('@openmrs/my-dashboard-widget')
. You should name your widget something besidesmy-dashboard-widget
. - Inside of patient-dashboard,
npm start -- --https --no-inline --port 8081
- Inside of hackathon-seed, modify the file
set-public-path.tsx
to have the correct name for your dashboard widget. - In a new terminal, run the following inside of hackathon-seed:
npm start -- --https --no-inline --port 8082
- Go to https://openmrs-spa.org/openmrs/spa/login in a browser.
- Now trust all insecure localhost requests.
- Open up the browser console and run the following commands:
importMapOverrides.addOverride('@hackathon/patient-dashboard', 'https://localhost:8081/patient-dashboard.js');
importMapOverrides.addOverride('@openmrs/my-dashboard-widget', 'https://localhost:8082/hackathon-seed.js');
- Refresh the page.
- Login with username
admin
and passwordadmin123
. - Search for the patient called "hornblower". Click on the row in the table.
- You should now see a widget that says "hackathon seed is working!"
- Inside of hackathon-seed repo, modify the text inside of
root.component.tsx
. - In the browser, refresh the page. You should see your code modified.