We need just one, maybe two decisions:
(1) When somebody activates the employees feature toggle in the BO, should the system create {Employee}s for suspended {Merchant}s? Yes or No? Notes (a) I want to make it clear that all {Employee}s are shown in the table in the backend - no exceptions. This can not be changed. (b) The assigned {Employee}s' assigned {Merchant}s are already filtered, meaning that a suspsend {Merchant} is NEVER shown as one of the assigned {Merchant}s. (2) Suppose the employees feature toggle is already activated and somebody suspends one of the {Organization}'s {Merchant}s. What should happen?
@annet Let's do the following:
(1) Yes. Why? It's already implemented. Also the alternative would be far more complicated. It's true, that deleting {Employee}s who are in fact assigned to suspended {Merchant}s can fail in unexpected ways at the moment (i.e. you can't a {Merchant}'s last {Resource} even if this {Merchant} is suspended). However, this issue can be easily fixed if we remove the requirement to have at least one {Resource} for each {Merchant}.
This goes hand in hand with removing the "default resources" we have already
discussed in the past few days. To fix this bug, would not (yet) remove the
default {Resource}s completely, but we would remove the requirement for
{Merchant}s to have at least one {Resource}.
As side benefit, this would also simplify the API a bit and even the
behavior of the entire new employees UI be better:
(a) You could delete all {Employee}s without restrictions. The requirement
that specific {Employee}s can't be deleted would be gone (right now,
it's sometimes not allowed to delete a particular {Employee}).
(b) You can change the assigned {Merchant}s for any all {Employee}s without
restrictions (right now, it's sometimes not allowed to assigned a
particular {Merchant}).
Just example for one of the problems we would fix like this:
https://jira.shore.com/browse/MA-82
Read the comments. Even our developments don't understand the requirement
of "at least one {Resource}". This problem would be gone, if all {Employee}s
can be deleted.
(2) This is not an issue if we decide answer (1) with Yes.