Clone
 

chongsun ahn <cahn922@yahoo.com> in openlmis-cce-ui

Bump ui-components to 7.1.0-SNAPSHOT

Dependency has changed its version.

Move cleanup further down the pipeline

Remove node_modules folder after build

To try to cut down disk usage on build server.

OLMIS-4944 Fix last modified date to use correct date filter

We don't use short format anywhere else.

OLMIS-5354 Update referencedata-ui to 5.5.0-SNAPSHOT

OLMIS-4197 Put button on its own line

Based on code review feedback. It makes more sense since in the view, the button is on a separate line.

OLMIS-4197 Add view alert history to CCE update functionality status

This adds a button to show the view alert history PDF.

OLMIS-4105 Define CCE alert default locale in controller

Instead of replacing hyphen with underscore for locale, just define it in the controller. This avoids any incorrect manipulation of the model.

    • -14
    • +0
    /src/cce-alert/cce-alert.factory.js
    • -30
    • +0
    /src/cce-alert/cce-alert.factory.spec.js
OLMIS-4129 Fix minor issues from code review feedback

    • -5
    • +5
    /src/cce-alert/cce-alert.factory.spec.js
Fix sonar quality issues

Tech debt/code smells.

    • -1
    • +1
    /src/cce-alert/cce-alert-repository.js
OLMIS-4105 Fix UI getting status message

The UI needs to look for the locale key that is a correct locale string. The approach here is done by replacing hyphens that come from the APIs, with underscores that match what the HTML is expecting. This is done because it is unclear how to use Angular interpolation with JavaScript object bracket notation ({{ obj['key'] }})?

    • -1
    • +16
    /src/cce-alert/cce-alert.factory.js
    • -1
    • +32
    /src/cce-alert/cce-alert.factory.spec.js
OLMIS-4129 Add button to dismiss alerts

The only issue here is that the alert service does not seem to pop up when the save fails.

OLMIS-4129 Add saving an alert to CCE alert factory

Even though this code is just a pass-through for the repository, it seems worth doing in case this part might be reused in a different context.

    • -1
    • +1
    /src/cce-alert/cce-alert-data-builder.js
    • -1
    • +20
    /src/cce-alert/cce-alert.factory.js
    • -1
    • +37
    /src/cce-alert/cce-alert.factory.spec.js
OLMIS-4125 Add message for only inactive alerts

Show RTM Alerts section if only inactive alerts, with a message indicating there are no active alerts.

OLMIS-4125 Minor code changes from code review

* Remove factory, as method already exists in functional status constant.

* Use constant method instead.

* Create hasActiveAlerts helper function.

OLMIS-4125 Change function call to factory out of controller

Make controller code leaner and do DRY.

OLMIS-4125 Add popover with CCE inventory items

Add popover for facility's CCE status, showing each inventory item's status and any CCE alert icons. A new factory created for a helper method.

Also add logic to show an overall alert icon next to the facility's CCE status.

    • -1
    • +2
    /src/facility-cce-status/messages_en.json
OLMIS-4127 Use date filter on start_ts

For status update modal.

OLMIS-4127 Change start_ts format to something more readable

Use UI's default datetime format. The only issue here is that since we do not specify a timezone offset, it defaults to the browser's, which is not correct. This will be addressed in a future ticket.

OLMIS-4127 Fix sonar issue

    • -1
    • +0
    /src/cce-alert/cce-alert-repository.js
OLMIS-4127 Change CCE alert service to repository impl

To match v7 UI architecture.

    • -2
    • +7
    /src/cce-alert/cce-alert-data-builder.js
    • -0
    • +92
    /src/cce-alert/cce-alert-repository-impl.js
    • -0
    • +122
    /src/cce-alert/cce-alert-repository-impl.spec.js
    • -0
    • +88
    /src/cce-alert/cce-alert-repository.js
    • -0
    • +112
    /src/cce-alert/cce-alert-repository.spec.js
    • -7
    • +13
    /src/cce-alert/cce-alert.factory.spec.js
    • -80
    • +0
    /src/cce-alert/cce-alert.service.js
    • -120
    • +0
    /src/cce-alert/cce-alert.service.spec.js
OLMIS-4127 Minor code changes

Based on review feedback.

OLMIS-4127 CCE alert start and end timestamps now ISO date

From Unix epoch in milliseconds.

    • -1
    • +1
    /src/cce-alert/cce-alert-data-builder.js
OLMIS-4127 Refactor CCE alerts to return all alerts

Return all alerts, not just active ones. Decided to change it so that we have the option to not show an alert icon if there are no alerts at all.

    • -7
    • +12
    /src/cce-alert/cce-alert.factory.js
    • -20
    • +23
    /src/cce-alert/cce-alert.factory.spec.js
OLMIS-4127 Improve HTML semantics

OLMIS-4127 Remove CCE Alert class

Since it doesn't really have any methods in it.

    • -11
    • +11
    /src/cce-alert/cce-alert-data-builder.js
OLMIS-4127 Code changes based on review feedback

* Use ngIf to determine whether to show popovers.

* Use dateUtils to convert date.

OLMIS-4127 Changes after code review feedback

* CCE alert data builder

* More tests

* Move messages

    • -0
    • +101
    /src/cce-alert/cce-alert-data-builder.js
    • -52
    • +65
    /src/cce-alert/cce-alert.factory.spec.js
    • -0
    • +64
    /src/cce-alert/cce-alert.js
    • -0
    • +120
    /src/cce-alert/cce-alert.service.spec.js
    • -0
    • +1
    /src/cce-inventory-list/messages_en.json
OLMIS-4127 Add viewing RTM alerts in status update modal

To be able to view any active RTM alerts in the modal to update inventory functional status.

OLMIS-4127 Add missing documentation