PageSourceSearch

https://online.cuttingedgefcu.org/en/js/bannoweb-ach-batch-recipients-page-C4iTrhCY.js

js cuttingedgefcu.org collected 2026-09-25 03:21:42 UTC 10,632 bytes, 1 lines download raw bytes

1import{E as e,_ as t,v as n,x as r}from"./institution-DyFDvNu6.js";import{n as i}from"./ach-current-user-Tgr43UaV.js";import{t as a}from"./problem-BVr8cfRd.js";import{a as o,f as s,m as c}from"./batches-DWCL5hLB.js";import{n as l}from"./events-BU-7Cs1t.js";import{a as u,i as d,r as f}from"./button-BoQCzBK8.js";import"./input-search-3Hp41irX.js";import"./notification-DQX8J8Ai.js";import"./icon-DAnbZEvu.js";import{a as p,n as m,o as h,r as g}from"./format-uLkpw51e.js";import"./table-2IcqvciT.js";import"./bannoweb-ach-card-header-D1vC_hEQ.js";import{n as _,t as v}from"./ach-page-base-UIjDIEkA.js";import"./icon-circle-chevron-right-C9L0mN0U.js";import"./icon-checkmark-Apyd0pTN.js";var y=404,b=200,x=1e3,S=8,C=e=>e.status===`hold`,w=(e,t)=>Number(e)-Number(t),T={recipient:(e,t)=>e.recipientName.localeCompare(t.recipientName),account:(e,t)=>e.recipientAccountNumber.localeCompare(t.recipientAccountNumber),direction:(e,t)=>e.recipientTransactionType.localeCompare(t.recipientTransactionType),amount:(e,t)=>Number(e.recipientAmount.value)-Number(t.recipientAmount.value),hold:(e,t)=>w(C(e),C(t)),prenote:(e,t)=>w(e.preNote,t.preNote)},E=e=>e.reduce((e,t)=>{let n=Number(t.recipientAmount.value)||0;return t.recipientTransactionType===`debit`?e.debits+=n:e.credits+=n,C(t)&&(e.onHold+=1),e},{credits:0,debits:0,onHold:0}),D=e=>[e.recipientName,e.recipientId??``,e.recipientAccountNumber,e.recipientRoutingNumber].join(` `).toLowerCase(),O=class extends t{constructor(...e){super(...e),this.currentUser=null,this.transactions=[],this.loading=!0,this.error=null,this.notFound=!1,this.total=0,this.truncated=!1,this.search=``,this.sortColumn=null,this.sortDirection=`none`,this.offset=0,this.flash=null,this.#e=0,this.#s=e=>{this.search=l(e),this.offset=0},this.#c=()=>{this.search=``,this.offset=0}}#e;static{this.styles=e`:host{display:block}jh-notification{margin-block-end:var(--jh-dimension-500)}.toolbar{align-items:flex-end;gap:var(--jh-dimension-400);justify-content:space-between;padding-block-end:var(--jh-dimension-400);display:flex}jh-input-search{flex:1;max-inline-size:20rem}.shown{color:var(--jh-color-content-secondary-enabled);white-space:nowrap}.stacked{display:grid}.primary{font-weight:600}.secondary{color:var(--jh-color-content-secondary-enabled);font-size:var(--jh-font-size-200)}.numeric{font-variant-numeric:tabular-nums}.check{color:var(--jh-color-content-positive-enabled,#1c7c3f)}.sr-only{clip-path:inset(50%);white-space:nowrap;block-size:1px;inline-size:1px;position:absolute;overflow:hidden}.footer{align-items:center;gap:var(--jh-dimension-400,1rem);padding-inline:var(--jh-dimension-500);flex-wrap:wrap;justify-content:space-between;display:flex}.totals{color:var(--jh-color-content-secondary-enabled);align-items:center;gap:var(--jh-dimension-200,.5rem);flex-wrap:wrap;display:flex}.totals strong{color:var(--jh-color-content-primary-enabled);font-variant-numeric:tabular-nums}.totals .credits{color:var(--jh-color-content-positive-enabled,#1c7c3f)}.totals .debits{color:var(--jh-color-content-caution-enabled,#a25c00)}.dot{color:var(--jh-color-content-tertiary-enabled,#9aa0a6)}.paging{align-items:center;gap:var(--jh-dimension-200,.5rem);display:flex}.range{color:var(--jh-color-content-secondary-enabled);font-variant-numeric:tabular-nums;white-space:nowrap}.empty{color:var(--jh-color-content-secondary-enabled);padding:var(--jh-dimension-500,1.25rem) 0;text-align:center}.error{color:var(--jh-color-content-negative-enabled,#b00020)}.notice{color:var(--jh-color-content-secondary-enabled);margin-block:0 var(--jh-dimension-400)}`}connectedCallback(){super.connectedCallback(),this.flash=c()}updated(e){(e.has(`batchId`)||e.has(`institutionId`)||e.has(`currentUser`))&&this.#n()}get#t(){return this.institutionId||this.currentUser?.institutionId}async#n(){if(!this.batchId){this.loading=!1,this.error=`No batch id was provided.`;return}let e=++this.#e;this.loading=!0,this.error=null,this.notFound=!1;try{let{transactions:t,total:n}=await this.#r(this.batchId);if(e!==this.#e)return;this.transactions=t,this.total=n,this.truncated=t.length<n,this.offset=0}catch(t){if(e!==this.#e)return;this.transactions=[],this.total=0,t.statusCode===y?this.notFound=!0:this.error=a(t,`Failed to load recipients`)}finally{e===this.#e&&(this.loading=!1)}}async#r(e){let t={institutionId:this.#t},n=[],r,i;do{let a=Math.min(b,x-n.length),s=await o(e,{offset:n.length,count:a},t),c=s.data.transactions;r=Number(s.data.paging.total),n.push(...c),i=c.length>=a}while(i&&n.length<x&&(!Number.isFinite(r)||n.length<r));return{transactions:n,total:Number.isFinite(r)?r:n.length}}get#i(){let e=this.search.trim().toLowerCase(),t=e?this.transactions.filter(t=>D(t).includes(e)):this.transactions;if(!this.sortColumn||this.sortDirection===`none`)return t;let n=T[this.sortColumn],r=this.sortDirection===`descending`?-1:1;return[...t].sort((e,t)=>
1n(e,t)*r)}#a(e){return this.sortColumn===e?this.sortDirection:`none`}#o(e,t){let{sorted:n}=t.detail.reference;this.sortColumn=n===`none`?null:e,this.sortDirection=n,this.offset=0}#s;#c;#l(e,t){return r`<jh-table-header-cell sortable .sorted="${this.#a(e)}" aria-sort="${this.#a(e)}" @jh-sort="${t=>{this.#o(e,t)}}">${t}</jh-table-header-cell>`}#u(e){if(this.transactions.length===0)return null;let{credits:t,debits:n,onHold:i}=E(this.transactions),a=this.offset+1,o=Math.min(this.offset+S,e.length),s=e.length>S;return r`<div class="footer" slot="jh-table-pagination"> <div class="totals"> <span><strong>${this.total}</strong> ${this.total===1?`recipient`:`recipients`}</span> <span aria-hidden="true" class="dot">·</span> <span>Credits <strong class="credits">${g(t)}</strong></span> <span aria-hidden="true" class="dot">·</span> <span>Debits <strong class="debits">${g(n)}</strong></span> <span aria-hidden="true" class="dot">·</span> <span>Net <strong>${g(t-n)}</strong></span> ${i>0?r`<span aria-hidden="true" class="dot">·</span> <span><strong>${i}</strong> on hold</span>`:null} </div> ${s?r`<div class="paging"> <span class="range">${a}–${o} of ${e.length}</span> <jh-button appearance="tertiary" accessible-label="${`Previous page`}" ?disabled="${this.offset===0}" @click="${()=>{this.offset=Math.max(0,this.offset-S)}}"><jh-icon slot="jh-button-icon-left"><jh-icon-circle-chevron-left></jh-icon-circle-chevron-left></jh-icon></jh-button> <jh-button appearance="tertiary" accessible-label="${`Next page`}" ?disabled="${o>=e.length}" @click="${()=>{this.offset+=S}}"><jh-icon slot="jh-button-icon-left"><jh-icon-circle-chevron-right></jh-icon-circle-chevron-right></jh-icon></jh-button> </div>`:null} </div>`}#d(e,t){return r`<jh-table-data-cell class="flag"> ${e?r`<jh-icon size="small" class="check"><jh-icon-checkmark></jh-icon-checkmark></jh-icon>`:null} <span class="sr-only">${e?t:`Not ${t.toLowerCase()}`}</span> </jh-table-data-cell>`}#f(e){return r`<jh-table-row> <jh-table-data-cell> <div class="stacked"> <span class="primary">${e.recipientName}</span> <span class="secondary">${p(e.recipientAccountType)}</span> </div> </jh-table-data-cell> <jh-table-data-cell> <div class="stacked numeric"> <span>${h(e.recipientAccountNumber)}</span> <span class="secondary">${e.recipientRoutingNumber}</span> </div> </jh-table-data-cell> <jh-table-data-cell> ${p(e.recipientTransactionType)} </jh-table-data-cell> <jh-table-data-cell class="numeric"> ${m(e.recipientAmount.value)} </jh-table-data-cell> ${this.#d(C(e),`On hold`)} ${this.#d(e.preNote,`Prenote`)} </jh-table-row>`}#p(){if(this.notFound)return r`<p role="alert"> That batch no longer exists, or you cannot view it. </p>`;if(this.error)return r`<p class="error" role="alert">${this.error}</p>`;if(this.loading&&this.transactions.length===0)return r`<p>${`Loading`}…</p>`;let e=this.#i,t=e.slice(this.offset,this.offset+S);return r`${this.truncated?r`<p class="notice" role="status"> Showing the first ${x} recipients in this batch. Search to narrow the list. </p>`:null} <div class="toolbar"> <jh-input-search label="${`Search recipients`}" show-clear-button accessible-label-clear-button="${`Clear search`}" @jh-input="${this.#s}" @jh-input:clear-button-click="${this.#c}"></jh-input-search> <span class="shown" role="status">${t.length} of ${this.total} shown</span> </div> <jh-table scrollable sticky-header accessible-label="Batch recipients"> <jh-table-row slot="jh-table-header"> ${this.#l(`recipient`,`Recipient`)} ${this.#l(`account`,`Account`)} ${this.#l(`direction`,`Credit/debit`)} ${this.#l(`amount`,`Amount`)} ${this.#l(`hold`,`On hold`)} ${this.#l(`prenote`,`Prenote`)} </jh-table-row> ${t.map(e=>this.#f(e))} ${this.#u(e)} </jh-table> ${e.length===0?r`<p class="empty"> ${this.search?`No recipients match this search.`:`This batch has no recipients yet.`} </p>`:null}`}render(){return r`${this.flash?r`<jh-notification appearance="${this.flash.appearance}" role="status" dismiss-button-accessible-label="${`Dismiss`}" @jh-dismiss="${()=>{this.flash=null}}"> ${this.flash.message} </jh-notification>`:n} ${this.#p()}`}};s([d({attribute:`batch-id`})],O.prototype,`batchId`,void 0),s([d({attribute:!1})],O.prototype,`currentUser`,void 0),s([d({attribute:`institution-id`})],O.prototype,`institutionId`,void 0),s([f()],O.prototype,`transactions`,void 0),s([f()],O.prototype,`loading`,void 0),s([f()],O.prototype,`error`,void 0),s([f()],O.prototype,`notFound`,void 0),s([f()],O.prototype,`total`,void 0),s([f()],O.prototype,`truncated`,void 0),s([f()],O.prototype,`search`,void 0),s([f()],O.prototype,`sortColumn`,void 0),s([f()],O.prototype,`sortDirection`,void 0),s([f()],O.prototype,`offset`,void 0),s([f()],O.prototype,`flash`,void 0),O=s([u(`jh-ach-batch-recipients`)],O),window.BannowebAchBatchRecipientsPageElement=class extends v{static get is(){return`bannoweb-ach-batch-recipients-page`}get loadsBatchStatus(){return!0}async routeEnter(e,t,n,r){return this.trackPage(`Recipients`,n,r),super.routeEnter(e,t,n,r)}
1render(){return r`<bannoweb-page-container allow-overflow-y> <jh-card class="fadeinup"> <bannoweb-ach-card-header slot="jh-card-header" href="${this.batchId?i.batchDetail(this.batchId):i.dashboard}" heading="${`Recipients`}"> ${_(this.batchStatus)?r`<jh-button slot="action" href="${i.batchRecipientsEdit(this.batchId)}" size="small" label="${`Edit`}"></jh-button>`:``} </bannoweb-ach-card-header> ${this.entitled?r`<jh-ach-batch-recipients batch-id="${this.batchId}" .currentUser="${this.achCurrentUser}"></jh-ach-batch-recipients>`:``} </jh-card> </bannoweb-page-container>`}},customElements.define(window.BannowebAchBatchRecipientsPageElement.is,window.BannowebAchBatchRecipientsPageElement);var k=window.BannowebAchBatchRecipientsPageElement;export{k as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.