Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Upcoming Version (WIP)
==================
* [OLMIS-8201](https://openlmis.atlassian.net/browse/OLMIS-8201): Add CCE status NEEDS_ATTENTION

1.1.8 / 2025-11-27
==================
Expand Down
5 changes: 5 additions & 0 deletions src/cce-inventory-item-status/_status.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@
&.is-awaiting-repair::before {
color: $red;
}

&.is-unserviceable::before {
color: $gray;
}

&.is-needs-attention::before {
color: yellow;
}
}

.cce-inventory-item-update-status {
Expand Down
10 changes: 8 additions & 2 deletions src/cce-inventory-item-status/functional-status.constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@
FUNCTIONING: 'FUNCTIONING',
AWAITING_REPAIR: 'AWAITING_REPAIR',
UNSERVICEABLE: 'UNSERVICEABLE',
NEEDS_ATTENTION: 'NEEDS_ATTENTION',
getLabel: getLabel,
getStatuses: getStatuses,
getClass: getClass
},
labels = {
FUNCTIONING: 'cceInventoryItemStatus.functioning',
AWAITING_REPAIR: 'cceInventoryItemStatus.awaitingRepair',
UNSERVICEABLE: 'cceInventoryItemStatus.unserviceable'
UNSERVICEABLE: 'cceInventoryItemStatus.unserviceable',
NEEDS_ATTENTION: 'cceInventoryItemStatus.needsAttention'
};

return FUNCTIONAL_STATUS;
Expand Down Expand Up @@ -80,7 +82,8 @@
return [
FUNCTIONAL_STATUS.FUNCTIONING,
FUNCTIONAL_STATUS.AWAITING_REPAIR,
FUNCTIONAL_STATUS.UNSERVICEABLE
FUNCTIONAL_STATUS.UNSERVICEABLE,
FUNCTIONAL_STATUS.NEEDS_ATTENTION
];
}

Expand Down Expand Up @@ -108,6 +111,9 @@
case FUNCTIONAL_STATUS.UNSERVICEABLE:
statusClass = 'is-unserviceable';
break;
case FUNCTIONAL_STATUS.NEEDS_ATTENTION:
statusClass = 'is-needs-attention';
break;
default:
throw 'Invalid status';
}
Expand Down
1 change: 1 addition & 0 deletions src/cce-inventory-item-status/messages_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"cceInventoryItemStatus.functionalityStatus": "Functionality Status",
"cceInventoryItemStatus.awaitingRepair": "Awaiting Repair",
"cceInventoryItemStatus.unserviceable": "Unserviceable",
"cceInventoryItemStatus.needsAttention": "Needs attention",
"cceInventoryItemStatus.notInUse": "Not in use",
"cceInventoryItemStatus.decommissioned": "Decommissioned",
"cceInventoryItemStatus.rtmAlerts.title": "RTM Alerts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ describe('StatusUpdateModalController', function() {
it('should return false for status that is other than FUNCTIONING', function() {
expect(vm.isFunctioning(FUNCTIONAL_STATUS.UNSERVICEABLE)).toBe(false);
expect(vm.isFunctioning(FUNCTIONAL_STATUS.AWAITING_REPAIR)).toBe(false);
expect(vm.isFunctioning(FUNCTIONAL_STATUS.NEEDS_ATTENTION)).toBe(false);
});

});
Expand All @@ -164,6 +165,7 @@ describe('StatusUpdateModalController', function() {
it('should return false for statuses other than UNSERVICEABLE', function() {
expect(vm.isUnserviceable(FUNCTIONAL_STATUS.FUNCTIONING)).toBe(false);
expect(vm.isUnserviceable(FUNCTIONAL_STATUS.AWAITING_REPAIR)).toBe(false);
expect(vm.isUnserviceable(FUNCTIONAL_STATUS.NEEDS_ATTENTION)).toBe(false);
});

});
Expand Down
Loading
Loading