Skip to content

Commit

Permalink
Disable shipment select drop-down if there are no shipments available
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcameron committed Apr 25, 2022
1 parent 7c3c862 commit d59a03f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/src/i18n/en/shipment.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"DELETED": "Shipment successfully deleted",
"DELIVERY_EXPECTED_ON": "Delivery expected on",
"DESTINATION_DEPOT": "Destination depot",
"DOES_SHIPMENT_EXIST": "Do you have a ready shipment?",
"DOES_SHIPMENT_EXIST_HELP": "Please provide the reference of a ready shipment",
"DOES_SHIPMENT_EXIST": "Do you have a shipment ready?",
"DOES_SHIPMENT_EXIST_HELP": "Please provide the reference of a shipment that is ready to ship.",
"EDIT": "Edit",
"ENTER_SHIPMENT_PROGRESS": "Please enter the shipment progress status",
"ENTER_SHIPMENT_PROGRESS_HELP_TEXT": "Ex. RECEPTION - IMA GOMA WAREHOUSE, GOMA",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ui-select name="shipment_uuid"
ng-required ="$ctrl.required"
ng-model="$ctrl.shipmentUuid"
ng-disabled="$ctrl.disabled"
ng-disabled="$ctrl.shipments.length === 0"
on-select="$ctrl.onSelect($item, $model)">
<ui-select-match placeholder="{{ 'FORM.SELECT.REFERENCE_SHIPMENT' | translate }}"><span>{{$select.selected.reference}}</span></ui-select-match>
<ui-select-choices ui-select-focus-patch repeat="shipment.uuid as shipment in $ctrl.shipments | filter: { 'reference': $select.search }">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ angular.module('bhima.components')
required : '@?',
ready : '@?',
label : '@?',
disabled : '<?',
},
});

Expand Down

0 comments on commit d59a03f

Please sign in to comment.