phosmobile-technologies / credit-business-management-app-api

API for the springverse investment app.
0 stars 1 forks source link

Wrap Up [Admin staff query] #150

Open davidubanyi opened 4 years ago

davidubanyi commented 4 years ago

As each loan is tied to a loanofficer (adminstaff) we need a way to query the loans tied to that admin staff account so that staff can be followed up with for collections.

Also the admin staff are also marketers and they handle customer registration we need to know which customers are tied to which admin staff

The admin staff query can return loans[] loans that have the loan officer id is same as the admin staff id users[] users whose account administrator id is the admin staff id

omadoyeabraham commented 4 years ago

@davidubanyi @victorraji

The following fields have been added to the UserModel

  1. loansManagedByAdminStaff
  2. userProfilesManagedByAdminStaff

Use the GetUserById query, but when it's for admin staff you can also add the two fields listed above. They will return null for regular customers but will return an array of loans and user profiles (which contain a link to the user) when queried with the id of an admin user

Please test and ascertain correctness

victorraji commented 4 years ago

Please I couldn't find this particular query GetUserById

and I also still didn't find any query that had those two fields listed as filters.

pls reconfirm/clarify and verify the exact query so I can test it

@omadoyeabraham @davidubanyi