Skip to content
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

OLMIS-7902: Change the requisition tab's names when the Patient(s) #48

Merged
merged 3 commits into from
Mar 14, 2024
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
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
Loading