-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lifetime calculation in days not months #5226
Merged
bors
merged 10 commits into
Third-Culture-Software:refactor-stock-management
from
jniles:5185-fix-lifetime-calculation-in-days-not-months
Feb 3, 2021
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2192169
chore(deps): bump delay from 4.4.1 to 5.0.0
dependabot-preview[bot] 28f9923
chore(deps-dev): bump karma from 6.0.3 to 6.0.4
dependabot-preview[bot] 57d34f9
chore(deps): bump angular-ui-grid from 4.9.1 to 4.10.0
dependabot-preview[bot] 7f2444a
fix(stock): coloration of stock lots registry
jniles 1a4ca71
feat(stock): better key on stock lots registry
jniles bc1cd44
chore: move lot flag calculations to server
jniles 98272ea
chore(stock): clean up risk calculations
jniles f7cee77
test(stock): update tests for consumption schedule
jniles 338c7ac
chore(stock): typo fixes in comments
jniles c1083b8
chore(lots): remove registry columns
jniles File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
client/src/modules/stock/lots/templates/in_risk_of_expiration.html
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div class="ui-grid-cell-contents text-right"> | ||
<span ng-if="row.entity.hasExpirationDate"> | ||
{{ row.entity.lifetime }} <span translate>FORM.LABELS.MONTH</span> | ||
<span ng-if="row.entity.hasExpirationDate && !row.entity.flags.expired"> | ||
{{ row.entity.lifetime }} <span translate>FORM.LABELS.DAYS</span> | ||
</span> | ||
</div> |
4 changes: 2 additions & 2 deletions
4
client/src/modules/stock/lots/templates/lot_lifetime.cell.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div class="ui-grid-cell-contents text-right"> | ||
<span ng-if="row.entity.hasExpirationDate"> | ||
{{ row.entity.S_LOT_LIFETIME }} <span translate>FORM.LABELS.MONTH</span> | ||
<span ng-if="row.entity.lifetime_lot"> | ||
{{ row.entity.lifetime_lot}} <span translate>FORM.LABELS.DAYS</span> | ||
</span> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div class="ui-grid-cell-contents text-right" ng-class="{'text-danger': row.entity.S_RISK < 0, 'text-success': row.entity.S_RISK >= 0}"> | ||
<span ng-if="row.entity.hasExpirationDate"> | ||
{{ row.entity.S_RISK }} <span translate>FORM.LABELS.MONTH</span> | ||
<div class="ui-grid-cell-contents text-right" ng-class="{'text-danger': row.entity.S_RISK > 0}"> | ||
<span ng-if="row.entity.hasExpirationDate && !row.entity.flags.expired && row.entity.avg_consumption > 0"> | ||
{{ row.entity.S_RISK }} <span translate>FORM.LABELS.DAYS</span> | ||
</span> | ||
</div> |
4 changes: 2 additions & 2 deletions
4
client/src/modules/stock/lots/templates/risk_quantity.cell.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<div class="ui-grid-cell-contents text-right" ng-class="{'text-danger': row.entity.S_RISK < 0, 'text-success': row.entity.S_RISK >= 0}"> | ||
<div class="ui-grid-cell-contents text-right" ng-class="{'text-danger': row.entity.S_RISK > 0}"> | ||
{{ row.entity.S_RISK_QUANTITY }} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏽