inventory-item-details.html

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
I've added checking the right.

I've added checking the right.

Done.

Done.

I've added the right name.

I've added the right name.

I know that, but if we pass undefined as both programId and facilityId it will still treated as checking only for the right name.

I know that, but if we pass undefined as both programId and facilityId it will still treated as checking only for the right name.

I've added if - else, because for 'Add equipment' button we check whether the user has that right, no matter what program and facility are associated.

I've added if - else, because for 'Add equipment' button we check whether the user has that right, no matter what program and facility are associated.

This should be enough. You can remove the if - else.

This should be enough. You can remove the if - else.

What right?

What right?

OLMIS-3333: Updated edit buttons to be hidden if user does not have CCE_INVENTORY_EDIT right for inventory item's program and facility

  1. … 7 more files in changeset.
Please fix bug with editing functional status when user does not have edit inventory item right

Please fix bug with editing functional status when user does not have edit inventory item right

It would be good to create ticket (if necessary) and link here

It would be good to create ticket (if necessary) and link here

I'm marking this as resolved. Implementing it will require a new ticket anyway, so there is no point in holding this one.

I'm marking this as resolved. Implementing it will require a new ticket anyway, so there is no point in holding this one.

I know that this is how we do it everywhere, however this feels like a DRY violation. I would propose introducing a "restrictedTo" directive that would take a right name and, optionally, any of th...

I know that this is how we do it everywhere, however this feels like a DRY violation.

I would propose introducing a "restrictedTo" directive that would take a right name and, optionally, any of the following - program, warehouse and supervisory note. That directive would then ask the authorizationService if the user has the required permissions and show or hide the element accordingly. What do you think about it Nick Reid?

I'm marking this as unresolved until then.

OLMIS-3333: Fixed edit button to be hidden when user does not have right
OLMIS-3333: Fixed edit button to be hidden when user does not have right
OLMIS-3333: Fixed edit button to be hidden when user does not have right

  1. … 3 more files in changeset.
Nick Reid Mateusz Kwiatkowski So what do we want to do? Do want to add the LocalDatabase or leave it as it is?

Nick Reid Mateusz Kwiatkowski So what do we want to do? Do want to add the LocalDatabase or leave it as it is?

OLMIS-3296: added getting facility by id while creating inventory item

  1. … 4 more files in changeset.
We will be keeping them in the memory regardless, because we need to parse those permission strings and facilities to get proper set of data. There will never be 1000 programs, just a couple, facil...

We will be keeping them in the memory regardless, because we need to parse those permission strings and facilities to get proper set of data.
There will never be 1000 programs, just a couple, facilities have only id and name (in Malawi there are 700).

Overall this looks great – I do think there is a concern about how these data caches are stored to memory // but I think the search structure has become simpler – and I think it will be hard to imp...

Overall this looks great – I do think there is a concern about how these data caches are stored to memory // but I think the search structure has become simpler – and I think it will be hard to improve more with out running a profiler against it when there is performance data involved.

This does worry me – regardless of how big the dataset really gets.... Questions: (A) How much of this data can we create and save at login? (so it can be quickly loaded) (B) Loading and throwing ...

This does worry me – regardless of how big the dataset really gets....

Questions:
(A) How much of this data can we create and save at login? (so it can be quickly loaded)
(B) Loading and throwing away permissions data is ok // and should be data collected immedately if done in a promise
(C) Does this service really need to be a service? Could it just be a factory that gets instantiated? Ideally that will remove any data created in this screen from memory once the $scope is destroyed

If we can make small-ish data structures, and save them in localStorage (which is a super fast read/write) that would be best...

Overall, I think the best thing to do here, is figure out how to test it against the old version.... and make follow up tickets (IMHO, we have made this a step better, and perfect is something that never really happens)

With this and performance data we're basically keeping 10000 facilities and 1000 programs in the memory (+ the permission strings) is it really a good idea Nick Reid?

With this and performance data we're basically keeping 10000 facilities and 1000 programs in the memory (+ the permission strings) is it really a good idea Nick Reid?

Yea, I wasn't sure what we want to return if module did not register rights to this service.... so I'm just using all, as it was before. I could change it to return empty list if you want.

Yea, I wasn't sure what we want to return if module did not register rights to this service.... so I'm just using all, as it was before. I could change it to return empty list if you want.

Those variables contain all data retrieved from localStorage.... I mean when loadData method is called it loads it here, I'm not sure if it's OK to keep it in memory after starting the page...... I...

Those variables contain all data retrieved from localStorage.... I mean when loadData method is called it loads it here, I'm not sure if it's OK to keep it in memory after starting the page...... I could remake this to call localStorage directly, but the problem is that we will be calling localStorage (later db) on each program change.....

So, I'm a little lost with this review – and am going to get back to it on Sunday I played with the functionality and it seems right – so I'd be happy if this went through QA (assuming nikodem's e...

So, I'm a little lost with this review – and am going to get back to it on Sunday

I played with the functionality and it seems right – so I'd be happy if this went through QA (assuming nikodem's edits get made)

I guess we no longer need the init flag here.

I guess we no longer need the init flag here.

This is just awesome.

This is just awesome.