All files / projects/requisition-management/src/app/pages/requisition-detail requisition-detail-page.component.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 1231x                                                                                                                                                                                                                                                    
<div *ngIf="view$ | async as view">
  <div class="float-right">
    <ul class="share-tools">
      <li>
        <a href="javascript:window.print();" class="link-print" rel="nofollow">
          <fa-icon [icon]="['fas', 'print']" />
          <span class="share-label">{{ 'account.orderdetails.print_link.text' | translate }}</span>
        </a>
      </li>
    </ul>
  </div>
 
  <h1>
    <ng-container *ngIf="view === 'approver'; else requisitionTitle">{{
      'approval.detailspage.approval.heading' | translate
    }}</ng-container>
    <ng-template #requisitionTitle>{{ 'approval.detailspage.requisition.heading' | translate }}</ng-template>
  </h1>
  <ish-error-message [error]="error$ | async" />
 
  <div
    *ngIf="requisition$ | async as requisition"
    class="section loading-container"
    data-testing-id="order-summary-info"
  >
    <ish-requisition-summary [requisition]="requisition" [view]="view" />
 
    <!-- display approval box in buyer view or for customer approvers only -->
    <ish-requisition-buyer-approval *ngIf="view === 'buyer'; else customerApprover" [requisition]="requisition" />
    <ng-template #customerApprover>
      <ish-requisition-buyer-approval *ishIsAuthorizedTo="'APP_B2B_ORDER_APPROVAL'" [requisition]="requisition" />
    </ng-template>
 
    <ish-requisition-cost-center-approval [requisition]="requisition" />
 
    <ng-container *ngTemplateOutlet="approvalButtonBar; context: { requisition: requisition }" />
 
    <h2>{{ 'approval.detailspage.order_details.heading' | translate }}</h2>
 
    <div *ngIf="'shipping.messageToMerchant' | ishServerSetting">
      <!-- MessageToMerchant-->
      <ish-basket-merchant-message-view [data]="requisition" />
    </div>
 
    <div class="row d-flex">
      <!-- Invoice Address -->
      <ish-info-box heading="checkout.widget.billing-address.heading" class="infobox-wrapper col-md-6">
        <ish-address [address]="requisition.invoiceToAddress" [displayEmail]="true" />
      </ish-info-box>
 
      <!-- Payment Method -->
      <ish-info-box heading="checkout.widget.payment_method.heading" class="infobox-wrapper col-md-6">
        <p>
          {{ requisition.payment?.displayName }}<br />{{ requisition.payment?.paymentInstrument?.accountIdentifier }}
          <ng-container
            *ngIf="!requisition.payment?.displayName && !requisition.payment?.paymentInstrument?.accountIdentifier"
          >
            {{ requisition.payment?.paymentInstrument }}
          </ng-container>
        </p>
      </ish-info-box>
    </div>
 
    <div class="row d-flex">
      <!-- Shipping Address -->
      <ish-info-box heading="checkout.widget.shipping-address.heading" class="infobox-wrapper col-md-6">
        <ish-address [address]="requisition.commonShipToAddress" />
      </ish-info-box>
 
      <!-- Shipping Method -->
      <ish-info-box heading="checkout.widget.shipping_method.heading" class="infobox-wrapper col-md-6">
        <ish-basket-shipping-method [data]="requisition" />
      </ish-info-box>
    </div>
 
    <!-- Line Items -->
    <ish-line-item-list
      *ngIf="requisition.lineItems?.length > 0"
      [lineItems]="requisition.lineItems"
      [editable]="false"
      lineItemViewType="simple"
    />
 
    <!-- order summary -->
    <div class="section row">
      <div class="col-12 col-md-6 offset-md-6">
        <div class="cost-summary">
          <h3>{{ 'checkout.order_summary.heading' | translate }}</h3>
          <ish-basket-cost-summary [totals]="requisition.totals" />
        </div>
      </div>
    </div>
 
    <ng-container *ngTemplateOutlet="approvalButtonBar; context: { requisition: requisition }" />
 
    <ng-template #approvalButtonBar let-requisition="requisition">
      <div *ngIf="requisition.approval?.statusCode === 'PENDING' && view === 'approver'" class="section text-right">
        <button (click)="approveRequisition()" type="button" class="btn btn-primary">
          {{ 'approval.detailspage.approve.button.label' | translate }}
        </button>
        <button (click)="rejectDialog.show()" type="button" class="btn btn-secondary">
          {{ 'approval.detailspage.reject.button.label' | translate }}
        </button>
      </div>
    </ng-template>
    <ish-requisition-reject-dialog #rejectDialog (submitRejectRequisition)="rejectRequisition($event)" />
 
    <div class="section d-flex d-flex justify-content-between">
      <a [routerLink]="['../../' + view, { status: requisition.approval.statusCode }]" class="no-print">
        <ng-container *ngIf="view === 'buyer'; else backToApprovals">
          {{ 'approval.detailspage.links.return_to_requisitions' | translate }}
        </ng-container>
        <ng-template #backToApprovals>{{ 'approval.detailspage.links.return_to_approvals' | translate }}</ng-template>
      </a>
      <a routerLink="/home" class="no-print" data-testing-id="home-link">{{
        'account.orderdetails.links.continue_shopping' | translate
      }}</a>
    </div>
 
    <ish-loading *ngIf="loading$ | async" />
  </div>
</div>