Skip to content

Commit

Permalink
Merge pull request #48 from OpenLMIS/OLMIS-7902
Browse files Browse the repository at this point in the history
OLMIS-7902: Change the requisition tab's names when the Patient(s)
  • Loading branch information
mdulko-soldevelo authored Mar 14, 2024
2 parents d017f2a + 471175a commit e5700fb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/requisition-view/messages_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
"requisitionView.delete.success": "Requisition has been deleted!",
"requisitionView.emergency": "Emergency",
"requisitionView.facility": "Facility",
"requisitionView.fullSupplyProducts": "Priority drugs and medical supplies",
"requisitionView.nonFullSupplyProducts": "Additional drugs and medical supplies",
"requisitionView.fullSupplyProducts": "Full supply product(s)",
"requisitionView.priorityDrugsAndMedicalSupplies": "Priority drugs and medical supplies",
"requisitionView.nonFullSupplyProducts": "Non full supply product(s)",
"requisitionView.additionalDrugsAndMedicalSupplies": "Additional drugs and medical supplies",
"requisitionView.operatedBy": "Operated by",
"requisitionView.patients": "Patient(s)",
"requisitionView.print": "Print",
Expand Down
11 changes: 11 additions & 0 deletions src/requisition-view/requisition-view.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,17 @@
*/
vm.displaySyncButton = undefined;

/**
* ngdoc property
* @propertyOf requisition-view.controller:RequisitionViewController
* @name patientsTabEnabled
* @type {Boolean}
*
* @description
* Flag to define requisition tab names whenever patientsTabEnabled is true or false.
*/
vm.patientsTabEnabled = vm.requisition.template.patientsTabEnabled;

// Functions
vm.$onInit = onInit;
vm.updateRequisition = updateRequisition;
Expand Down
6 changes: 4 additions & 2 deletions src/requisition-view/requisition-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ <h2>{{:: 'requisitionView.reportAndRequisitionFor' | message}} {{vm.program.name
<li ui-sref-active="active" role="presentation" ng-class="{'is-invalid': !vm.isFullSupplyTabValid()}"
openlmis-popover="{{vm.invalidFullSupply}}">
<a ui-sref="openlmis.requisitions.requisition.fullSupply">
{{:: 'requisitionView.fullSupplyProducts' | message}}
<span ng-if="vm.patientsTabEnabled">{{:: 'requisitionView.priorityDrugsAndMedicalSupplies' | message}}</span>
<span ng-if="!vm.patientsTabEnabled">{{:: 'requisitionView.fullSupplyProducts' | message}}</span>
</a>
</li>
<li ui-sref-active="active" ng-if="vm.program.showNonFullSupplyTab" role="presentation"
ng-class="{'is-invalid': !vm.isNonFullSupplyTabValid()}" openlmis-popover="{{vm.invalidNonFullSupply}}">
<a ui-sref="openlmis.requisitions.requisition.nonFullSupply">
{{:: 'requisitionView.nonFullSupplyProducts' | message}}
<span ng-if="vm.patientsTabEnabled"> {{:: 'requisitionView.additionalDrugsAndMedicalSupplies' | message}}</span>
<span ng-if="!vm.patientsTabEnabled"> {{:: 'requisitionView.nonFullSupplyProducts' | message}}</span>
</a>
</li>
</ul>
Expand Down

0 comments on commit e5700fb

Please sign in to comment.