Skip to content

Commit

Permalink
circulation: display pickup location name when transit for pickup
Browse files Browse the repository at this point in the history
* Displays pickup location name when the item is in transit for pickup.
* Highlights items with action needed in checkin form.
* Closes rero/rero-ils#770.

Co-Authored-by: Alicia Zangger <alicia.zangger@rero.ch>
  • Loading branch information
Alicia Zangger committed Feb 25, 2020
1 parent 528ea19 commit 09df092
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 3 additions & 2 deletions projects/admin/src/app/circulation/item/item.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
 along with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<div [ngClass]="{'border-danger': patronLoan && (item.status === 'in_transit' || item.pending_loans || totalAmountOfFee > 0),
<div [ngClass]="{'border-danger': item.status === 'in_transit' || item.pending_loans || totalAmountOfFee > 0,
'text-secondary': item.status !== 'on_loan'}"
class="row p-2 mb-1 border rounded align-middle"
*ngIf="item">
Expand All @@ -40,7 +40,8 @@
<li *ngSwitchCase="'in_transit'">{{ item.status | translate }}
<ng-container *ngIf="getTransitLocationPid(item) | getRecord: 'locations' | async as location">
({{ 'to' | translate }}
{{ location.metadata.library.pid | getRecord: 'libraries' : 'field' : 'name' | async }})
{{ location.metadata.library.pid | getRecord: 'libraries' : 'field' : 'name' | async }}
<ng-container *ngIf="item.loan.state === 'ITEM_IN_TRANSIT_FOR_PICKUP'"> - {{ location.metadata.pickup_name }}</ng-container>)
</ng-container>
</li>
<li *ngSwitchCase="'on_shelf'">{{ item.status | translate }}</li>
Expand Down
5 changes: 0 additions & 5 deletions projects/admin/src/app/circulation/item/item.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ export class ItemComponent implements OnInit {
return total;
}

/** Check if current item is a patron loan */
get patronLoan(): boolean {
return this.item.status !== 'on_loan' && this.patron;
}

/** Get transit location pid
* @param item: current item
* @return: transit location pid
Expand Down

0 comments on commit 09df092

Please sign in to comment.