Overhaul The User Management Dashboard

How to set pass for user that I am creating?

You register the user first (by hand sadly) and then set it as admin :slight_smile: What I mean, is go to the registration page and fill out the form

You got it?

thanks, understand.

And it works :slight_smile:

But when I’m trying to open localhost:3000/user-dashboard, it shows 404, maybe I must setup ID Dashboard routing?

1 Like

Yeah you might have to import the app reference from ID dashboard so that it’s added to the routes.

in my module, I have

is it not enough? Or I must include my module somewhere manually?

Did you add your module to the list of modules to load? Order doesn’t matter.

no, just added. Then restart docker?

@dmytro.trifonov, actually you need to run this locally –

cp app/conf.example.js app/conf.js ; docker-compose stop web ; docker-compose up -d mailcatcher mongodb (last step shouldn’t be necessary right now)

Add your module to the userModules list and save

Then node app/app

Are there any way to resolve dependencies for all user-modules automatically? or I must go to each folder, and execute ‘npm i’ there?

git submodule foreach npm install – that’s why I made them submodules :slight_smile:

1 Like

Awesome! :slight_smile:

Random things I learned while stumbling – I REALLLLLLLLLLLLLLLLY know git.

it WORKS! Thanks for your huge support, now I can integrate users data to our User Dashboard :slight_smile:

1 Like

No problem – I tried to set this up so that it’s easy if you run it inside docker or outside of docker. For some weird reason, I could never get OpenLDAP to install on my system
not sure WHY

I’ve got yet one error, associated with babel compiling.

Let me explain. The problem is that when we using user-dashboard as a ID module, and trying to include some code from ID dashboard, it includes modules from openmrs-contrib-id/node_modules (such as express, mongoose, and others)

but our webpack configured for only one node_modules folder, and when we include something from id-dashboard, we have TWO node_modules folder, and there are such errors as:

ERROR in ./~/glob/sync.js Module not found: Error: Cannot resolve module 'fs' in /home/invercity/projects/webstorm/openmrs-contrib-id/node_modules/glob @ ./~/glob/sync.js 4:9-22

etc


So, we need to configure webpack for 2 node_modules folders, but as for now, our configuration is not working, I am still trying to fix it. Maybe someone who have more experience with webpack and babel could help? Here is our current configuration:

How do I trigger this?

I pushed code to separate branch:

checkout it, and then launch app with node app/app. You’ll see the error logs from webpack

1 Like

Okay
 give me a few

We need to play with webpack.config options, to probably set multiple node_modules folders