Information shows to different users

Dear All,

I am new to Adalo. I would like to set an app to calculate the wage of staff. As such, one’s wage should be only seen by himself, i.e. other users are not allowed seeing his wage.

How can I set the visibility, thank you.

Here is my Database



Hi @shine,

Welcome to the forum!

I’m not sure reg. the correctness of you DB setup. I assume “Pending orders” is the table used to calculate wages? Then why there is many-to-many connection with Users collection - how come that one Pending Order can have multiple Users?

Best,
Victor

Best regards, Victor.

Hi Victor,

  Thanks for your reply. The mindset is that
  1. an user (client) create an order (DB: create orders), those orders can only be seen by this user →
  2. at the meantime, those orders can be shown to all other users (cat.: worker) →
  3. a worker takes an order, which automatically creates as “Pending orders” and is only seen by this worker →
  4. finally, after inputting the working time, it will generate the wage. The wage will be shown in the page “My Earnings”

I would like different information to show to different workers.
e.g. John can get information of his wage; Mary can get her wage.

Am I make some simple mistakes?

Thank you very much

Hi @shine,

As I pointed out, there is many-to-many relation of Pending orders with Users. That’s why you can’t calculate individual wage.
If you have 1:many relation (a pending order belongs only to one User-Worker), then you will be able to isolate its view and have the wage displayed only to this user.

Also, I wonder why did you decide to split Orders and Pending orders. Does the business logic imply that for one Order there could be several jobs delivered?

Best regards, Victor.

Hi Victor,

Thanks for your points, as I reorganize my DB, my problem has been solve. However, I come across another problem.

I test my app on desktop, the client cannot be alerted even though his order was taken. However, I check it on “Preview”, the order can be seen.

It is different between “Preview” mode and the link (Accompany King)

You can login as client: client@gmail.com, PW: 123; worker: ap@gmail.com, PW: 123

Thanks you very much

Hi @shine,

From what I can see you’ve set up the list of “Orders taken by” incorrectly.

Also, the whole flow is a bit cumbersome, and the buttons in the lists doesn’t always do what you expect to see.

The biggest question though is why did you decide to separate “Create Order” and “Pending Order” collections. If an order can be executed only once (an as I understand this is a transportation of the patient from point A to point B), why would you have 2 separate collections? Such solution may be needed only if you have several “providers” fulfilling one order, which seems not to be the case.

Just my 2 cents

Best,
Victor.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.