SangeethKarunaratne / building-sat-

0 stars 0 forks source link

Landfill and salvage - ISSUE 2 #12

Closed Dilshi830 closed 2 years ago

Dilshi830 commented 2 years ago

Describe the bug Landfill and salvage calculation functions according to equations and tallies with the manual calculations. However, if the user goes back and changes the quantity of a certain material and saves it , the landfill and salvage material entry remains unchanged. The user HAS to come back and reenter or readjust the salvage % for the calculation to be rerun automatically.

To Reproduce Steps to reproduce the behavior:

  1. Go to Landfill and salvage
  2. Fill in the entry
  3. Go back to the original entry where the quantity of the material was entered in the construction phase and change the quantity of the material
  4. Return back to Landfill and salvage and notice that the values remain unchanged. Only when the user re enters the salvage% the calculation is rerun and values are adjusted.

Expected behavior This should not be the case. If the user decides to go back and change a material quantity, then the landfill and salvage quantity entry for that material entry should be modified accordingly by re - running the backend calculations for that entry again. Suggested solution- If the user decides to go back and change the quantity of the material, then in the landfill and salvage section, return that respective entry to the unfilled stage. So, intuitively the user will reenter the salvage % and the calculations will be rerun.

Screenshots https://drive.google.com/file/d/1JgdvYakNCO8qOHzsYnNu-c8ptxHBcgnM/view?usp=drive_web

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

SangeethKarunaratne commented 2 years ago

Calculations concerning landfill cannot be re-run at the point where the user decides to change the material data. The only solution is to reset the landfill entry as per suggestion, this is fixed now

Dilshi830 commented 2 years ago

This is perfect. However, is it possible that when the landfill entry is reset, the landfill percentage % can be set to 100. and then the user can edit.

SangeethKarunaratne commented 2 years ago

The value can be set but it will not trigger the calculation image

Dilshi830 commented 2 years ago

Yes. that is fine. The calculation can be triggered only when user enters the salvage %

SangeethKarunaratne commented 2 years ago

Fixed