Open chaitak-gorai opened 1 year ago
RolesController
for the backend logicAdd Role
Form and Existing Roles
Section in Roles.vue
web.php
@muarachmann, I have updated the changes you suggested in the earlier commit. In a later commit, I added the Laratrust Seeder, which will assign 'c,r,u,d' permissions to each module's role.
In config/laratrust_seeder.php
I have done this :
Can you please REVIEW these access and suggest to me the changes we need to make??
I will review the roles/module in details later this week
@muarachmann, I have updated some changes here I m listing for your review.
Help Required
Removing old roles completely giving too many redirects. I can't find anywhere the old roles are used. If there is, can you please help me out where these are used?LaratrustSeeder.php
scroll
there.Screenshot of update Roles.vue UI
Can you please REVIEW these changes and suggest to me the changes we need to make??
@muarachmann, I have updated your suggested reviews. Also, I have created the Add Users
UI form page with the fields;
I have added all necessary form fields. I have a doubt whether the name can be in a single Full Name
field or in parts.
Please review it and suggest changes if required.
I ll then implement the functions
We should stick with separate fields.
… But I find it an interesting thought experiment to consider the implications of one name field as better internationally. Search is fast and easy these days, so finding patients would not be an issue.
Sharing data externally would; in the USA, as healthcare businesses are all stuck in old models.
Tony
On Fri, Jul 7, 2023 at 5:56 PM Chaitak Gorai @.***> wrote:
Update:
@muarachmann https://github.com/muarachmann, I have updated your suggested reviews. Also, I have created the Add Users UI form page with the fields; I have added all necessary form fields. I have a doubt whether the name can be in a single Full Name field or in parts. Please review it and suggest changes if required.
I ll then implement the functions
[image: image] https://user-images.githubusercontent.com/77141674/251884447-4283a838-75db-4878-aa4c-63fd8d108006.png
— Reply to this email directly, view it on GitHub https://github.com/LibreHealthIO/lh-ehr-laravel/pull/43#issuecomment-1626399181, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACFZC324C54XWM3WP4KX4LXPCV2BANCNFSM6AAAAAAZA67IAQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- https://thinkstorm.net 503-330-2239
The users name as a single field would work , if we ONLY used it for user identification purpose, however we use the provider’s user account on external forms that require separate fields, including title.
On Sat, Jul 8, 2023 at 9:05 AM Tony McCormick @.***> wrote:
We should stick with separate fields.
… But I find it an interesting thought experiment to consider the implications of one name field as better internationally. Search is fast and easy these days, so finding patients would not be an issue.
Sharing data externally would; in the USA, as healthcare businesses are all stuck in old models.
Tony
On Fri, Jul 7, 2023 at 5:56 PM Chaitak Gorai @.***> wrote:
Update:
@muarachmann https://github.com/muarachmann, I have updated your suggested reviews. Also, I have created the Add Users UI form page with the fields; I have added all necessary form fields. I have a doubt whether the name can be in a single Full Name field or in parts. Please review it and suggest changes if required.
I ll then implement the functions
[image: image] https://user-images.githubusercontent.com/77141674/251884447-4283a838-75db-4878-aa4c-63fd8d108006.png
— Reply to this email directly, view it on GitHub https://github.com/LibreHealthIO/lh-ehr-laravel/pull/43#issuecomment-1626399181, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACFZC324C54XWM3WP4KX4LXPCV2BANCNFSM6AAAAAAZA67IAQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- https://thinkstorm.net 503-330-2239
-- https://thinkstorm.net 503-330-2239
The users name as a single field would work , if we ONLY used it for user identification purpose, however we use the provider’s user account on external forms that require separate fields, including title. On Sat, Jul 8, 2023 at 9:05 AM Tony McCormick @.> wrote: We should stick with separate fields. … But I find it an interesting thought experiment to consider the implications of one name field as better internationally. Search is fast and easy these days, so finding patients would not be an issue. Sharing data externally would; in the USA, as healthcare businesses are all stuck in old models. Tony On Fri, Jul 7, 2023 at 5:56 PM Chaitak Gorai @.> wrote: > Update: > > @muarachmann https://github.com/muarachmann, I have updated your > suggested reviews. Also, I have created the Add Users UI form page with > the fields; > I have added all necessary form fields. I have a doubt whether the name > can be in a single Full Name field or in parts. > Please review it and suggest changes if required. > > I ll then implement the functions > > [image: image] > https://user-images.githubusercontent.com/77141674/251884447-4283a838-75db-4878-aa4c-63fd8d108006.png > > — > Reply to this email directly, view it on GitHub > <#43 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AACFZC324C54XWM3WP4KX4LXPCV2BANCNFSM6AAAAAAZA67IAQ > . > You are receiving this because you are subscribed to this thread.Message > ID: @.***> > -- https://thinkstorm.net 503-330-2239 -- https://thinkstorm.net 503-330-2239
so as of now can we move forward with a single user name field? I think it will be an efficient way to store the name.
No, The provider data is used on claim forms that require separate fields. Wish it was otherwise. Mua, what do you think?
Tony
On Sat, Jul 8, 2023 at 9:16 AM Chaitak Gorai @.***> wrote:
The users name as a single field would work , if we ONLY used it for user identification purpose, however we use the provider’s user account on external forms that require separate fields, including title. On Sat, Jul 8, 2023 at 9:05 AM Tony McCormick @. > wrote: We should stick with separate fields. … But I find it an interesting thought experiment to consider the implications of one name field as better internationally. Search is fast and easy these days, so finding patients would not be an issue. Sharing data externally would; in the USA, as healthcare businesses are all stuck in old models. Tony On Fri, Jul 7, 2023 at 5:56 PM Chaitak Gorai @.> wrote: > Update: > > @muarachmann https://github.com/muarachmann https://github.com/muarachmann, I have updated your > suggested reviews. Also, I have created the Add Users UI form page with > the fields; > I have added all necessary form fields. I have a doubt whether the name > can be in a single Full Name field or in parts. > Please review it and suggest changes if required. > > I ll then implement the functions > > [image: image] > https://user-images.githubusercontent.com/77141674/251884447-4283a838-75db-4878-aa4c-63fd8d108006.png
— > Reply to this email directly, view it on GitHub > <#43 (comment) https://github.com/LibreHealthIO/lh-ehr-laravel/pull/43#issuecomment-1626399181>, or unsubscribe > https://github.com/notifications/unsubscribe-auth/AACFZC324C54XWM3WP4KX4LXPCV2BANCNFSM6AAAAAAZA67IAQ . > You are receiving this because you are subscribed to this thread.Message > ID: @.***> > -- https://thinkstorm.net 503-330-2239 -- https://thinkstorm.net 503-330-2239
so as of now can we move forward with a single user name field? I think it will be an efficient way to store the name.
— Reply to this email directly, view it on GitHub https://github.com/LibreHealthIO/lh-ehr-laravel/pull/43#issuecomment-1627391990, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACFZCYVHONB3LULTEXV7ZLXPGBTRANCNFSM6AAAAAAZA67IAQ . You are receiving this because you commented.Message ID: @.***>
-- https://thinkstorm.net 503-330-2239
Thanks @tmccormi for your inputs, lets separate it at least to given name
& surname
. That is the norm I see other wise we can keep the old format.
Thanks @tmccormi for your inputs, lets separate it at least to
given name
&surname
. That is the norm I see other wise we can keep the old format.
ok i ll update it to first name and last name
@chaitak-gorai we need to equally work on the invitation module. This when a user is created should send an email to them to accept the invite
With this we can then focus on the restrictions of the users -roles / permissions
@chaitak-gorai we need to equally work on the invitation module. This when a user is created should send an email to them to accept the invite
yes @muarachmann i am going through it. But cant figure out how to properly implement that. Can we have a call today or tomorrow for a short discussion on this ??
@chaitak-gorai we need to equally work on the invitation module. This when a user is created should send an email to them to accept the invite
yes @muarachmann i am going through it. But cant figure out how to properly implement that. Can we have a call today or tomorrow for a short discussion on this ??
Yes @chaitak-gorai let's have a call tomorrow 1PM GMT + 1
@chaitak-gorai we need to equally work on the invitation module. This when a user is created should send an email to them to accept the invite
yes @muarachmann i am going through it. But cant figure out how to properly implement that. Can we have a call today or tomorrow for a short discussion on this ??
Yes @chaitak-gorai let's have a call tomorrow 1PM GMT
okk thank you
@muarachmann I have added the functionality of adding a user via Mail invitation. After admin add a user, the user will get a mail in his email and a link to set a password. There is a token which is valid for 7 days. If it gets expired the user cant add a password. Here are the changes i have made
Add users
form updated for the name fields Add Password
form where the user will provide a new password.Task Left To be done:
Hi @chaitak-gorai ,
This is no where close to what I asked you to do please consider the architecture where invitations are managed separately see - https://github.com/junaidnasir/larainvite
Also please user mailhog
/ mailpit
for testing emails locally rather than using your gmail.
regards. MR
Hi @chaitak-gorai ,
This is no where close to what I asked you to do please consider the architecture where invitations are managed separately see - https://github.com/junaidnasir/larainvite
Also please user
mailhog
/mailpit
for testing emails locally rather than using your gmail.regards. MR
Thank you for correcting me. I went through the suggested code and I got the idea where I am wrong. Will be updating the changes in a new commit.
hey @muarachmann, I have updated the code with a separate invitation class to handle all invitation-related logic.
Also, I have added two tables user_invitations
which will keep the details about the invitation, and users_invited
which will keep the user form data that will be used to create the real user when the invite is accepted.
Also, update the login in the Invitation accepting URL. Based on the status of the invitation the URL will be shown.
Please review whether this approach is correct or not and suggest me changes if required. After this, I will be working on the dashboard to show all the invitations with their status.
Hi @chaitak-gorai this looks like it, no need for another model UserInvite
let's create them as User
model and attach it. Also we can rename the table to invitations
. Also the invitatation should be facility specific, You can use morphs for this to handle even the invitee
@muarachmann yes i have kept the invite in the User Model only in my last approach.
But I thought it will be better if we keep them separate as the user can reject an invitation or it can expire. In that case, the created user will be null and void. So creating the user only after the invitation is accepted and a password is set .
Should i revert this and keep a single table? I will be updating the suggested changes then.
Yes please keep a single table. If a user rejects, just mark the user as deleted, inactive
On Wed, Jul 26, 2023 at 1:55 AM Chaitak Gorai @.***> wrote:
@muarachmann https://github.com/muarachmann yes i have kept the invite in the User Model only in my last approach.
But I thought it will be better if we keep them separate as the user can reject an invitation or it can expire. In that case, the created user will be null and void. So creating the user only after the invitation is accepted and a password is set .
Should i revert this and keep a single table? I will be updating the suggested changes then.
— Reply to this email directly, view it on GitHub https://github.com/LibreHealthIO/lh-ehr-laravel/pull/43#issuecomment-1650804296, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD4X4XURLBI5437ZOTGVN7TXSBTGNANCNFSM6AAAAAAZA67IAQ . You are receiving this because you were mentioned.Message ID: @.***>
--
MUA N. LAURENT: Head of Engineering WASPITO https://waspito.com/ @.*** Bonamoussadi Denver, Douala
#HealthWithoutAStep
@muarachmann, I have updated the suggested changes.
user_invited
table. Only single table for User
. and renamed the user_inviations
into Invitation
.token
instead of code
[Help Required] I have used Axios to send some requests where JSON response is needed. I can't figure out how to implement it with Inertia
. Can you help me with this?
Update :
@muarachmann, I have updated the suggested changes.
- Drop the
user_invited
table. Only single table forUser
. and renamed theuser_inviations
intoInvitation
.- used
token
instead ofcode
[Help Required] I have used Axios to send some requests where JSON response is needed. I can't figure out how to implement it with
Inertia
. Can you help me with this?
Why do you need a json response in those routes ? That is the first question you should be asking yourself. You don't need a separate route for the inivitation status, if it has expired show it in the view that it has expired.
With regards to the invitations table.
Emails are unique for these kind of stuffs and we can have the facility that invited the user. What I suggest is using Morph
relationship to know the invitee
, invitor
and facility
in the invitations table and also that will help isolate the for_user
used in the users table which has no need. In the end you will have a powerful module that will manage users invitations accross the app. If you are worried about roles and permissions, You are free to store it in the invitations table column say invite_params
as a json object where when accepted you can assign the user these roles. So a user can be created with basic user access role.
Let me know if you need a call for this Regards, MR
Update :
@muarachmann, I have updated the suggested changes.
- Drop the
user_invited
table. Only single table forUser
. and renamed theuser_inviations
intoInvitation
.- used
token
instead ofcode
[Help Required] I have used Axios to send some requests where JSON response is needed. I can't figure out how to implement it with
Inertia
. Can you help me with this?Why do you need a json response in those routes ? That is the first question you should be asking yourself. You don't need a separate route for the inivitation status, if it has expired show it in the view that it has expired.
With regards to the invitations table.
Emails are unique for these kind of stuffs and we can have the facility that invited the user. What I suggest is using
Morph
relationship to know theinvitee
,invitor
andfacility
in the invitations table and also that will help isolate thefor_user
used in the users table which has no need. In the end you will have a powerful module that will manage users invitations accross the app. If you are worried about roles and permissions, You are free to store it in the invitations table column sayinvite_params
as a json object where when accepted you can assign the user these roles. So a user can be created with basic user access role.Let me know if you need a call for this Regards, MR
Yes, it will be better to discuss this on a call. Are you free tomorrow ??
Tomorrow 1 pm WAT is fine with me.
On Thu, 27 Jul 2023 at 12:08 Chaitak Gorai @.***> wrote:
Update :
@muarachmann https://github.com/muarachmann, I have updated the suggested changes.
- Drop the user_invited table. Only single table for User. and renamed the user_inviations into Invitation.
- used token instead of code
[Help Required] I have used Axios to send some requests where JSON response is needed. I can't figure out how to implement it with Inertia. Can you help me with this?
Why do you need a json response in those routes ? That is the first question you should be asking yourself. You don't need a separate route for the inivitation status, if it has expired show it in the view that it has expired.
With regards to the invitations table.
Emails are unique for these kind of stuffs and we can have the facility that invited the user. What I suggest is using Morph relationship to know the invitee, invitor and facility in the invitations table and also that will help isolate the for_user used in the users table which has no need. In the end you will have a powerful module that will manage users invitations accross the app. If you are worried about roles and permissions, You are free to store it in the invitations table column say invite_params as a json object where when accepted you can assign the user these roles. So a user can be created with basic user access role.
Let me know if you need a call for this Regards, MR
Yes, it will be better to discuss this on a call. Are you free tomorrow ??
— Reply to this email directly, view it on GitHub https://github.com/LibreHealthIO/lh-ehr-laravel/pull/43#issuecomment-1653399957, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD4X4XWTW2UVNSDWEAL46N3XSJD2DANCNFSM6AAAAAAZA67IAQ . You are receiving this because you were mentioned.Message ID: @.***>
Tomorrow 1 pm WAT is fine with me. … On Thu, 27 Jul 2023 at 12:08 Chaitak Gorai @.> wrote: Update : @muarachmann https://github.com/muarachmann, I have updated the suggested changes. - Drop the user_invited table. Only single table for User. and renamed the user_inviations into Invitation. - used token instead of code [Help Required] I have used Axios to send some requests where JSON response is needed. I can't figure out how to implement it with Inertia. Can you help me with this? Why do you need a json response in those routes ? That is the first question you should be asking yourself. You don't need a separate route for the inivitation status, if it has expired show it in the view that it has expired. With regards to the invitations table. Emails are unique for these kind of stuffs and we can have the facility that invited the user. What I suggest is using Morph relationship to know the invitee, invitor and facility in the invitations table and also that will help isolate the for_user used in the users table which has no need. In the end you will have a powerful module that will manage users invitations accross the app. If you are worried about roles and permissions, You are free to store it in the invitations table column say invite_params as a json object where when accepted you can assign the user these roles. So a user can be created with basic user access role. Let me know if you need a call for this Regards, MR Yes, it will be better to discuss this on a call. Are you free tomorrow ?? — Reply to this email directly, view it on GitHub <#43 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD4X4XWTW2UVNSDWEAL46N3XSJD2DANCNFSM6AAAAAAZA67IAQ . You are receiving this because you were mentioned.Message ID: @.> Hey @muarachmann I got some urgent family commitments today. Can it be rescheduled for tomorrow at 1 PM?
users
and invitations
table. User details can be extracted by email only./invitations/join/token
@chaitak-gorai cool we are getting there... left some reviews
@muarachmann I have updated the suggested changes
UserInvitationController
into just InvitationController
UserController
which is now done inside the Invite
Class only.Str::mask
to create the mask email.SetupAccount
for showing AddUsers
as you asked forHey @muarachmann, I have created the dashboard UI to show the list of Invitations sent to the Users.
Name
, Email
of the User, facility
, role
, and status
of the invitaiton.facility
here is the Screenshot. Please give it a review and suggest me changes if required.
@muarachmann, I have updated the reviewed changes.
data-table
to show the invitations table.facility
on the server side.Please review and suggest to me if further updates are required.
@chaitak-gorai good job... good progress so far. Now ensure everything in invitations is under the users folder (frontend). Also ensure you extend the layouts from the dashboard layout and the accept/reject from the auth layout. With that just a few polishing we can work on the headers and access by roles now
Thank You @muarachmann for the reviews. I have a great learning curve so far in this project.
Users
Folder and Roles and Permissions related pages inside AccessControl
Folder. Dashboard Layout
and Auth Layout
for the respective pagesUser Profile
Page with the current details from the Add-User
form. As more fields are added we can update it.This is how it looks:
Update
- Create a
User Profile
Page with the current details from theAdd-User
form. As more fields are added we can update it.- Linked this in the invitations list for each User.
This is how it looks:
Nice @chaitak-gorai. Please add buttons to edit profile and roles. Also add breadcrumbs like the other screens so it looks better.
Hey @muarachmann i have a query about the value provided in the active link of Breadcrumb component as like in dashboard page it is set to
activeLink: i18n.t('general.dashboard'),
how it is set like we just give a name of the page or it is dynamically calculated? I have a confusion here.
Similarly for the users page will we just pass "userProfile" in this function?
Edit User
button on top right of User Profile Page.Add User
form and Created a Edit User form from it which will show the user data and roles.Hey @muarachmann i have a query about the value provided in the active link of Breadcrumb component as like in dashboard page it is set to
activeLink: i18n.t('general.dashboard'),
how it is set like we just give a name of the page or it is dynamically calculated? I have a confusion here. Similarly for the users page will we just pass "userProfile" in this function?
Good question, look at the patient profile component in the codebase.
Thank you for the reviews. I will update them ASAP.
users
related functions.
store
functions of user controller.Setup Account
controller. It can be done inside create
of User Controller.Users/Invitations->Full Name->Edit
or Users/Invitations->Add
AddUsers.vue
into Users/Add.vue
EditUsers.vue
into Users/Edit.vue
UsersProfile.vue
into Users/Profile.vue
@muarachmann these are the bunch of changes I have updated based on your reviews. Please give it a review and suggest how to proceed further.
@muarachmann i have added a multiselect input type in EhrInput
and replaced the old select dropdown for permission with this component in Roles.vue
page.
Please review this and suggest me changes if required.
Hi @chaitak-gorai please use this - MultiSelect component in the project
Hi @chaitak-gorai please use this - MultiSelect component in the project
I looked for the component in the project but couldn't able to find it. Can you please tell me where it is located. Do you mean by the vue-multiselect
package?
@chaitak-gorai do not forget to list the users in the datatable as well. Regards
@muarachmann i have added these changes
header-fix
branch for the updated menu link.sAdministration
menu link for Invitations
, Users
and ACL
for roles.Laratrust
where we can use both permission and role-based access for the routes.I haven't hide the menu link in frontend. It will be better if we show them a Acess Denied
Page instead . Any thought?
Hi @chaitak-gorai will be reviewing this this weekend for a merge. Anything you have to polish?
Hi @chaitak-gorai will be reviewing this this weekend for a merge. Anything you have to polish?
Hey @muarachmann, thank you for the update. I'll look into it and do the necessary polishing by the weekend. There are some validations left i guess. I'll update the changes if any. Regards, Chaitak Gorai
Hey @muarachmann, i have added the validation for the Add-User
form which was left. As of now, i have done with polishing the PR. You can suggest me any further polishing if required. Thank you.
Description
This PR is for the Google Summer of Code Project : Migrate EHR to Laravel: Users and Roles Module .
Workflow
*All the commits will be added to this for the final merge to the codebase