drfaustusfade / ngm-reportDesk

The workdesk for ReportHub
0 stars 1 forks source link

Clusters contact list page #36

Closed drfaustusfade closed 3 years ago

drfaustusfade commented 3 years ago

Requirements

fakhrihawari commented 3 years ago

what is cluster/wg ?? Can you explain this page purpose?

fakhrihawari commented 3 years ago

Mockup

Screen Shot 2021-01-19 at 10 57 28
drfaustusfade commented 3 years ago

Can you explain this page purpose?

Clusters are groups of humanitarian organizations, both UN and non-UN, in each of the main sectors of humanitarian action (water, health, shelter, logistics, etc.). They have clear responsibilities for coordination. Each cluster has cluster members.

In the case of ReportHub: Users with Cluster role are cluster accounts (data consumers) Users with User, Org are cluster member accounts (data producers).

The purpose of the page is to provide to cluster member cluster contacts.

chrome_5n5V0FoZwn

fakhrihawari commented 3 years ago

so in the contac list is user with role CLUSTER right? and for point 5,6 what kind update is that ?

drfaustusfade commented 3 years ago

so in the contac list is user with role CLUSTER right? and for point 5,6 what kind update is that ?

I was thinking more like cluster profiles, cluster themselves update their current contact information, hence that includes 5,6 point, but maybe a better idea that we can just add for CLUSTER users on profile additional property cluster contact and show it in a table like for the team page

fakhrihawari commented 3 years ago

so just like organization profile? for now, I just put table with user with CLUSTER role in it like in the mockup above

drfaustusfade commented 3 years ago

Maybe, I think it is alright like you did plus adding cluster column name, but just adding checkbox on user profile contact and filtering additional attribute to specify if any Cluster or Country Admin user is Cluster Contact

fakhrihawari commented 3 years ago

make checkbox like this?

Screen Shot 2021-01-19 at 14 39 53
drfaustusfade commented 3 years ago

I think checkbox on contact labelled section would be suitable if that will look ok

fakhrihawari commented 3 years ago

who will be the one to check and uncheck this checkbox?

drfaustusfade commented 3 years ago

users themselves, or on behalf of them other admins with corresponding permissions

fakhrihawari commented 3 years ago
Screen Shot 2021-01-19 at 16 13 21

so this checkbox only appear on user with role 'CLUSTER' and 'COUNTRY_ADMIN'?

drfaustusfade commented 3 years ago

of the same country scope for users having roles CLUSTER, COUNTRY, COUNTRY_ADMIN user with CLUSTER role can set/unset to be a cluster contact user with CLUSTER role of the same cluster can set/unset Cluster Contact (case when cluster admin changed) user with COUNTRY_ADMIN can set/unset CLUSTER, COUNTRY, COUNTRY_ADMIN users (case when cluster admin changed)

fakhrihawari commented 3 years ago

Updated: https://github.com/fakhrihawari/ngm-reportEngine/tree/pwd-update https://github.com/fakhrihawari/ngm-reportHub/tree/contact-list-page

if you okay i will make PR

drfaustusfade commented 3 years ago
fakhrihawari commented 3 years ago
Screen Shot 2021-01-20 at 13 38 37

Btw do we need to filter country too?

drfaustusfade commented 3 years ago

alright, i think checkbox visually looks a bit off as it is left-aligned, anyway

by country yes, that's by default, as database tenancy is by country

fakhrihawari commented 3 years ago
Screen Shot 2021-01-20 at 15 55 05

Put it here?

drfaustusfade commented 3 years ago

alright, let's name CLUSTER CONTACTS let's restructure and put like that in a separate commit, I think there will be a better place Under CONTACTS menu

TECHNICAL CONTACTS CLUSTER CONTACTS ORGANIZATION CONTACTS

fakhrihawari commented 3 years ago

alright, let's name CLUSTER CONTACTS let's restructure and put like that in a separate commit, I think there will be a better place Under CONTACTS menu

TECHNICAL CONTACTS CLUSTER CONTACTS ORGANIZATION CONTACTS

i will make another PR for menu,

and this is for contact list page: https://github.com/drfaustusfade/ngm-reportHub/pull/73 https://github.com/drfaustusfade/ngm-reportEngine/pull/18

drfaustusfade commented 3 years ago

ok, but the country filter is just for roles above country admin, otherwise the default of user's country remove in subtitle trailing Cluster suffix as for example MPC is a working group, or could be sector are users filtered by cluster_contact condition?

fakhrihawari commented 3 years ago

the users that show in the list is a user with cluster_contact = true,

Updated : country filter only for country admin above

drfaustusfade commented 3 years ago

alright, if it is a specialized function please just rename function to something like getClusterContactUsers to understand better the function purpose

drfaustusfade commented 3 years ago

not a big deal but, for future refactoring would having an additional filter on query not be better if there is no indexing on cluster_contact? so that not to run electricity to fetch the records

fakhrihawari commented 3 years ago

not a big deal but, for future refactoring would having an additional filter on query not be better if there is no indexing on cluster_contact? so that not to run electricity to fetch the records

Sorry? what do you mean?

drfaustusfade commented 3 years ago

i mean why not to put into the filter, but not an issue on that scale

User
      .find()
      .where(filterAdmin0pcode)
      .where(filterClusterId)
                                      <== 
      .exec(function (err, user) {

        // return error
        if (err) return res.negotiate(err);

        if (user && user.length){
          user = _.filter(user,function(u){
            return u.cluster_contact; <==
          })
        };
        if (r
fakhrihawari commented 3 years ago

i mean why not to put into the filter, but not an issue on that scale

User
      .find()
      .where(filterAdmin0pcode)
      .where(filterClusterId)
                                      <== 
      .exec(function (err, user) {

        // return error
        if (err) return res.negotiate(err);

        if (user && user.length){
          user = _.filter(user,function(u){
            return u.cluster_contact; <==
          })
        };
        if (r

Updated

drfaustusfade commented 3 years ago

ok, testing with COUNTRY ADMIN cluster user cannot be set to Cluster Conact on profile as checkbox is disabled

fakhrihawari commented 3 years ago

ok, testing with COUNTRY ADMIN cluster user cannot be set to Cluster Conact on profile as checkbox is disabled what the role user that u want to set as cluster contact

drfaustusfade commented 3 years ago

cluster role

fakhrihawari commented 3 years ago

cluster role what your role? hmm it s weird i can set user with my role as country admin, try hard refresh?

drfaustusfade commented 3 years ago

ok that's because I have both country and country admin roles and the have the same level, should be updated in a separate commit

fakhrihawari commented 3 years ago

alright, let's name CLUSTER CONTACTS let's restructure and put like that in a separate commit, I think there will be a better place Under CONTACTS menu

TECHNICAL CONTACTS CLUSTER CONTACTS ORGANIZATION CONTACTS

Screen Shot 2021-01-22 at 08 05 18

PR For restructure contacts https://github.com/drfaustusfade/ngm-reportHub/pull/76