1import{r as f,k as e,c8 as re,bo as Ce}from"./vendor-frozen-BjHTscMc.js";import{p as le,c as De,L as z,q as w,$ as y,ag as I,bt as J,bu as de,bv as ce,r as N,b7 as H,bb as me,B as Pe,bw as Ae,bx as Be,W as Ne,by as Ie,y as Je,bz as Oe,bA as Ee,bB as Re,bC as Fe,bD as ke,bE as Le,af as We,bF as $e,bG as Me,bH as ze,bI as _e,bJ as He,bK as Ve,bL as Ge,bM as Ue,bN as _,Z as Ke,M as qe}from"./index-BXLY1or4.js";import{u as Ye}from"./jobsites-BV77SW7I.js";import{s as Ze,b as Qe,c as Xe,r as X,j as et,a as tt,d as at,J as $,e as st,g as it,f as nt,h as ee,i as ot,k as F,l as rt,m as te,n as lt,o as ae,p as se,q as dt}from"./jobPriceSummary.utils-BlczmVVQ.js";import{D as k}from"./DetailFrame-CW3_R3qb.js";import{F as ct}from"./FeedbackEmbeddableIcon-CNvz91Qn.js";import{w as mt}from"./JobsitesRequired-EZnq15Qn.js";import{B as ut}from"./BTIconCaretSmallUp-D5qMwK38.js";import{P as pt}from"./PercentageDisplayBar-X3LDSFSQ.js";import{g as xt,a as ft,A as bt,b as jt,c as gt,r as L,d as ht,J as wt,e as Tt,f as ie,s as vt,h as yt,i as St}from"./JobPriceSummaryPrint-DAx7TAFU.js";import{J as Ct,a as W}from"./JpsHeaderCompact-CQx1ggDK.js";import{J as Dt,a as Pt}from"./JobFinancialsErrorState-VvOKfbeT.js";import{f as V,F as At}from"./FinancialCollapsibleRow-BEliQMeg.js";import{F as Bt}from"./FinancialSummaryCells-B9_vKEYB.js";import"./Frame-7YfHlRN6.js";import"./BTListLayout-PDZ-rk4J.js";import"./BTListLayoutHeader-DxE2ImO9.js";import"./ListActionBar-CQ4wWgLG.js";import"./Filter-DcoGlmeB.js";import"./PercentageDisplay-Ii1mvGVI.js";import"./index-CNBJtp5i.js";import"./print-CU-rhGZW.js";import"./PrintDisplayOptions-DSFtugKP.js";import"./PrintDivider-CEXt4wQ2.js";import"./PrintHide-PQOG1-Vt.js";import"./PrintHeader-DkrB0Gsz.js";import"./PrintInfo-3ZLp_99i.js";import"./PrintTable-BXbN9hPC.js";import"./types-BylyRWAG.js";import"./allowanceCompletionStatus-CYKeHeGc.js";import"./SelectionStatusTag-BMm2Dg6C.js";import"./types-De2OHx3j.js";import"./ButtonEmbedded-DpqmUxrb.js";import"./IconArrowsClockwise-gSGOUbnB.js";import"./Collapsible-D1shdguE.js";const ue=f.createContext({isItemExpanded:()=>!1,setItemExpanded:()=>{},registerItem:()=>()=>{},toggleExpandAll:()=>{},allExpanded:!1}),Nt=({children:t})=>{const[s,o]=f.useState(new Map),a=f.useCallback(l=>(o(m=>{if(m.has(l))return m;const d=new Map(m);return d.set(l,!1),d}),()=>{o(m=>{if(!m.has(l))return m;const d=new Map(m);return d.delete(l),d})}),[]),i=f.useCallback((l,m)=>{o(d=>{if(d.get(l)===m)return d;const v=new Map(d);return v.set(l,m),v})},[]),n=f.useCallback(l=>s.get(l)??!1,[s]),c=f.useMemo(()=>s.size>0&&Array.from(s.values()).every(l=>l),[s]),p=f.useCallback(()=>{o(l=>{if(l.size===0)return l;const m=!Array.from(l.values()).every(v=>v),d=new Map;return l.forEach((v,g)=>d.set(g,m)),d})},[]),b=f.useMemo(()=>({isItemExpanded:n,setItemExpanded:i,registerItem:a,toggleExpandAll:p,allExpanded:c}),[n,i,a,p,c]);return e.jsx(ue.Provider,{value:b,children:t})},pe=()=>f.useContext(ue),It=t=>{const{isItemExpanded:s,setItemExpanded:o,registerItem:a}=pe();f.useEffect(()=>a(t),[t,a]);const i=f.useCallback(n=>o(t,n),[t,o]);return{isExpanded:s(t),setExpanded:i}},Jt=({"data-testid":t="expandAllToggle",className:s})=>{const{allExpanded:o,toggleExpandAll:a}=pe();return e.jsx(le,{"data-testid":t,type:"secondary",className:s,icon:o?e.jsx(ut,{}):e.jsx(De,{}),onClick:a,children:o?"Collapse all":"Expand all"})};function Ot({title:t,amounts:s,isWorksheetBudgeted:o,rows:a}){const i="SimplifiedJobFinancialsCard",n=a.find(c=>c.title?.toLowerCase().includes("tax"));return e.jsxs("div",{id:i+"-wrapper","data-testid":i+"-wrapper",children:[e.jsxs(z,{"data-testid":i+"-PrimaryCard",id:i+"-PrimaryCard",className:"JobFinancialsCard",bodyStyle:{width:"100%"},children:[e.jsx("div",{className:"flex flex-row",children:e.jsxs("div",{"data-testid":i+"-col",className:"flex flex-col gap-1 grow",children:[e.jsx("div",{children:e.jsx(w,{testid:i+"-PrimaryTitle",size:"heavy-sm",text:t,style:{width:"100%"}})}),e.jsx(w,{testid:i+"-PrimaryValue",size:"heavy-sm",text:e.jsx(y,{value:o?s.revisedPriceTotal:s.originalPriceTotal})})]})}),n&&e.jsxs("div",{className:"flex flex-row gap-2 justify-between","data-testid":n.title,children:[e.jsxs("div",{className:"LabelWrapper",children:[n.optionalDisplay,e.jsx(w,{size:"normal-md",text:n.title,testid:n.title+"-testid",className:I("Card-text",{TitleWithToolTip:!!n.infoDisplay})}),n.infoDisplay]}),e.jsx("div",{className:"DottedDiv"}),e.jsx(w,{size:"normal-md",text:e.jsx(y,{value:n.columnValue}),testid:`${n.title}-value`})]},n.title)]}),o&&e.jsxs("div",{id:i+"-subWrapper","data-testid":i+"-subWrapper",className:"SubCardsWrapper",children:[e.jsx(z,{"data-testid":i+"-secondaryCard",id:i+"-secondaryCard",className:"JobFinancialsCard",bodyStyle:{width:"100%"},children:e.jsx("div",{className:"flex flex-row",children:e.jsxs("div",{"data-testid":i+"-SecondaryCol",className:"flex flex-col gap-1 grow",children:[e.jsx("div",{className:i+"-SecondaryLabelWrapper",children:e.jsx(w,{testid:i+"-SecondaryTitle",size:"distinct-sm",text:"Original price",style:{width:"100%"}})}),e.jsx(w,{testid:i+"-SecondaryValue",size:"distinct-sm",text:e.jsx(y,{value:s.originalPriceTotal})})]})})}
1),e.jsx(z,{"data-testid":i+"-DifferenceCard",id:i+"-DifferenceCard",className:"JobFinancialsCard",bodyStyle:{width:"100%"},children:e.jsx("div",{className:"flex flex-row",children:e.jsxs("div",{"data-testid":i+"-DifferenceCol",className:"flex flex-col gap-1 grow",children:[e.jsx("div",{className:i+"-DifferenceLabelWrapper",children:e.jsx(w,{testid:i+"-DifferenceTitle",size:"distinct-sm",text:"Price difference",style:{width:"100%"}})}),e.jsx(w,{testid:i+"-DifferenceValue",size:"distinct-sm",text:e.jsx(y,{value:s.difference})})]})})})]})]})}const ne=new Date(0),Et=(t,s)=>re(t.approvalDate??ne,s.approvalDate??ne);function Rt({selectionOptions:t,jobId:s,isWorksheetBudgeted:o,sortState:a,onSortChange:i}){const n=f.useMemo(()=>({title:(j,T)=>de(j.title,T.title),approvalDate:Et,originalTotalWithTax:(j,T)=>J(j.originalTotalWithTax??0,T.originalTotalWithTax??0),totalWithTax:(j,T)=>J(j.totalWithTax,T.totalWithTax),contractImpact:(j,T)=>J(j.contractImpact??0,T.contractImpact??0)}),[]);if(!t?.length)return null;const c=Ze(t),p=Qe({isWorksheetBudgeted:o,showTax:c,renderTitle:(j,T)=>e.jsx(ce,{"data-testid":`selectionOptionTitle-${T.id}`,to:N.selectionOptions.getDetailsLink(T.id,s,"View",0,!0),children:j}),sortPropsFor:j=>({sorter:n[j],defaultSortOrder:a?.field===j?a.order:void 0})}),{originalTotal:b,revisedTotal:l,impactTotal:m,subtotalTotal:d,originalSubtotalTotal:v,taxTotal:g,contractImpactTotal:E}=Xe(t,o),h=j=>e.jsx("span",{className:"font-medium",children:e.jsx(y,{value:j})});let A;c&&o?A=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-medium",children:"Total"}),e.jsx("span",{}),h(v),h(d),h(g),h(l),e.jsx("span",{className:"font-medium",children:X(E)})]}):c?A=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-medium",children:"Total"}),e.jsx("span",{}),h(d),h(g),h(l)]}):A=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-medium",children:"Total"}),e.jsx("span",{}),h(b),o&&h(l),o&&e.jsx("span",{className:"font-medium",children:X(m)})]});const M=`srSelectionOptionsTable-${a?.field??"default"}-${a?.order??"default"}`;return e.jsxs("div",{"data-testid":"selectionOptionsSection",className:"flex flex-col gap-2 mt-10",children:[e.jsx(w,{text:"Selections",size:"distinct-md"}),e.jsx("div",{className:V,children:e.jsx(H,{striped:!1,pagination:!1,columns:p,dataSource:t,rowKey:j=>j.id,tableFooter:A,footerClass:"bg-gray-5",scroll:{x:"min-content"},onChange:(j,T,C)=>{!C||Array.isArray(C)||!i||i({field:String(C.field??""),order:C.order??void 0})}},M)})]})}const oe=new Date(0),Ft={title:(t,s)=>de(t.title,s.title),approvalDate:(t,s)=>re(t.approvalDate??oe,s.approvalDate??oe),subtotal:(t,s)=>J(t.subtotal,s.subtotal),tax:(t,s)=>J(t.tax,s.tax),totalWithTax:(t,s)=>J(t.totalWithTax,s.totalWithTax)},kt=(t,s,o)=>{const a=p=>({sorter:Ft[p],defaultSortOrder:s?.field===p?s.order:void 0}),i={title:"Title",dataIndex:"title",width:"40%",render:(p,b)=>e.jsx(ce,{"data-testid":`srAllowanceLineItemTitleLink-${b.id}`,to:N.selectionOptions.getDetailsLink(b.id,t,"View",0,!0),children:p}),...a("title")},n={title:"Approved date",dataIndex:"approvalDate",width:"18%",render:ht("srAllowanceLineItemDate"),...a("approvalDate")},c=o?[{title:"Subtotal",dataIndex:"subtotal",align:"right",render:L("srAllowanceLineItemSubtotal"),...a("subtotal")},{title:"Tax",dataIndex:"tax",align:"right",render:L("srAllowanceLineItemTax"),...a("tax")},{title:"Total price",dataIndex:"totalWithTax",align:"right",render:L("srAllowanceLineItemPrice"),...a("totalWithTax")}]:[{title:"Price",dataIndex:"totalWithTax",align:"right",render:L("srAllowanceLineItemPrice"),...a("totalWithTax")}];return[i,n,...c]},Lt=(t,s)=>{if(!s){const n=t.options.reduce((c,p)=>c+p.totalWithTax,0);return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-medium",children:"Total"}),e.jsx("span",{}),e.jsx(y,{value:n,className:"font-medium","data-testid":`srAllowanceLineItemTotal-${t.id}`})]})}const{subtotalTotal:o,taxTotal:a,totalPriceTotal:i}=t.options.reduce((n,c)=>({subtotalTotal:n.subtotalTotal+c.subtotal,taxTotal:n.taxTotal+c.tax,totalPriceTotal:n.totalPriceTotal+c.totalWithTax}),{subtotalTotal:0,taxTotal:0,totalPriceTotal:0});return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-medium",children:"Total"}),e.jsx("span",{}),e.jsx(y,{value:o,className:"font-medium","data-testid":`srAllowanceLineItemSubtotalTotal-${t.id}`}),e.jsx(y,{value:a,className:"font-medium","data-testid":`srAllowanceLineItemTaxTotal-${t.id}`}),e.jsx(y,{value:i,className:"font-medium","data-testid":`srAllowanceLineItemTotal-${t.id}`})]})},Wt=({allowance:t,jobId:s,showTax:o,sortState:a,onSortChange:i})=>{const{isExpanded:n,setExpanded:c}=It(t.id),p=f.useMemo(()=>kt(s,a,o),[s,a,o]),b=`srAllowanceTable-${t.id}-${a?.field??"default"}-${a?.order??"default"}`;return e.jsx(At,{id:t.id,title:t.title,summary:e.jsx(Bt,{cells:gt(t)}),isExpanded:n,onExpandChange:c,"data-testid":`srAllowanceRow-${t.id}`,children:e.jsx(H,{striped:!1,pagination:!1,columns:p,dataSource:t.options,rowKey:l=>l.id,scroll:{x:"min-content"},tableFooter:Lt(t,o),footerClass:"bg-gray-5",onChange:(l,m,d)=>
1{!d||Array.isArray(d)||!i||i({field:String(d.field??""),order:d.order??void 0})}},b)})},$t=(t,s,o,a,i)=>t.options.length===0?e.jsx(jt,{allowance:t,"data-testid":`srAllowanceRow-${t.id}`,className:I(V,"px-4 py-3")},t.id):e.jsx(Wt,{allowance:t,jobId:s,showTax:o,sortState:a?.[t.id],onSortChange:i?n=>i(t.id,n):void 0},t.id),Mt=({allowances:t,jobId:s,className:o,"data-testid":a="srAllowancesSection",sortStates:i,onSortChange:n,titleAction:c})=>{const p=f.useContext(me)?.flags.jpsFinancialOverviewRevamp??!1,b=f.useMemo(()=>xt(t),[t]),l=f.useMemo(()=>ft(t),[t]);return e.jsxs("div",{"data-testid":a,className:I("flex flex-col gap-2",o),children:[e.jsxs("div",{className:"flex flex-col gap-1 mb-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(w,{text:"Allowances",size:"distinct-md"}),c]}),p&&e.jsx(w,{text:et,size:"normal-sm",testid:"jpsAllowancesHelperText"})]}),b.map(m=>e.jsxs("div",{"data-testid":`srAllowancesGroup-${m.status}`,className:"flex flex-col gap-2",children:[e.jsx(w,{text:m.label,size:"distinct-sm",testid:`srAllowancesGroupHeader-${m.status}`}),m.allowances.map(d=>$t(d,s,l,i,n)),e.jsx(bt,{allowances:m.allowances,testIdPrefix:"srAllowancesGroupTotal",status:m.status,className:"px-4"})]},m.status))]})},zt=(t,s)=>e.jsx("span",{"data-testid":`jpsBudgetDifferenceTitle-${s.costCodeId??""}`,children:t}),_t=(t,s)=>e.jsx(y,{value:t??0,"data-testid":`jpsBudgetDifferenceAmount-${s.costCodeId??""}`}),Ht=t=>tt({renderTitle:zt,renderDifference:_t,sortPropsFor:s=>({sorter:st[s],defaultSortOrder:t?.field===s?t.order:void 0})}),Vt=t=>e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-medium",children:"Total"}),e.jsx(y,{value:t,className:"font-medium","data-testid":"jpsBudgetDifferenceTotal"})]});function Gt({budgetDifferences:t,displayType:s,showsClientBudgetDifference:o=!1,"data-testid":a="jpsBudgetDifferenceSection",sortState:i,onSortChange:n,jobId:c}){const p=f.useMemo(()=>Ht(i),[i]);if(!t?.length)return null;const b=t.reduce((d,v)=>d+(v.difference??0),0),l=o?"Your client can currently see the budget difference.":"Your client can't currently see the budget difference.",m=`jpsBudgetDifferenceTable-${i?.field??"default"}-${i?.order??"default"}`;return e.jsxs("div",{"data-testid":a,className:"flex flex-col gap-2 mt-10",children:[e.jsx(w,{text:"Budget difference",size:"distinct-md"}),e.jsxs(w,{size:"normal-sm",testid:"jpsBudgetDifferenceNote",children:[at,s===$.Builder&&e.jsxs(e.Fragment,{children:[" ",e.jsx("span",{"data-testid":"jpsBudgetDifferenceVisibilityText",children:l})," ","Manage it in this job's"," ",e.jsx(Pe,{to:Ae.link({jobId:c,defaultTab:Be.Owner}),children:"client permissions."})]})]}),e.jsx("div",{className:V,children:e.jsx(H,{striped:!1,pagination:!1,columns:p,dataSource:t,rowKey:d=>d.costCodeId??0,tableFooter:Vt(b),footerClass:"bg-gray-5",scroll:{x:"min-content"},onChange:(d,v,g)=>{!g||Array.isArray(g)||!n||n({field:String(g.field??""),order:g.order??void 0})}},m)})]})}function Ut({...t}){const s=f.useContext(me),o=f.useContext(Ie),[a,i]=f.useState({}),[n,c]=f.useState({selections:void 0,changeOrders:void 0,payments:void 0,srAllowances:void 0,selectionOptions:void 0,budgetDifference:void 0}),p=t.jobIds?.[0],{data:b,isLoading:l,isError:m,error:d,refetch:v}=Ye({jobId:p});if(f.useEffect(()=>{b?.data.shouldUseOldJps?i({jobId:p,oldData:new wt(b.data.oldJpsResponse),useNewData:!1,showEmptyState:b.data.shouldShowEmptyState}):i({jobId:p,newData:b?.data,useNewData:!0,showEmptyState:b?.data.shouldShowEmptyState})},[b,p]),m){let u,x=!0,S;return d instanceof Ke&&(x=!1,u="You do not have access to this page. This may be due to permission changes.",S=e.jsx(qe,{size:"4xl",testid:"errorStateIcon",className:"ErrorStateIcon"})),e.jsx(Dt,{message:u,showButtons:x,icon:S})}if(l||!a.newData&&!a.oldData)return e.jsx(Je,{});const g=Oe({builder:!0})?$.Builder:$.Client,E=it(a.newData?.displayOption?.showTotalTax),h=s?.flags.jpsFinancialOverviewRevamp??!1,A=a.useNewData,M=u=>{let x=[];return u.isWorksheetBudgeted?x=ae(u,g,h):x=dt(u,g,h),x??[]},j=()=>e.jsx("div",{className:"Divider",children:e.jsx(Ce,{})}),T=u=>lt(u),C=()=>{const{customerInvoiceAmountPaidTotal:u,appliedCreditMemosTotal:x,revisedPriceTotal:S,originalPriceTotal:ve,isWorksheetBudgeted:ye}=a.newData,O=(ye?S:ve)??0,Z=O===0?0:(u??0)/O*100,Q=O===0?0:(x??0)/O*100,Se=100-(Z+Q);return e.jsx(pt,{className:"Divider Percent",percentageSections:[new _({color:"blue",isOutstanding:!1,label:"",percentage:Z}),new _({color:"navy",isOutstanding:!1,label:"",percentage:Q}),new _({color:"dark-blue",isOutstanding:!1,label:"",percentage:Se,striped:!0})],placement:"bottom",totalValue:O,readonly:!0,hideTooltip:!0,shouldPreventTextOverlap:!0,show
1Footer:!0,hidePercentage:!0})},{newData:r,oldData:G}=a,xe=e.jsx(Ee.TextArea,{id:"jps-item-header-title","data-testid":"jps-item-header-title",onChange:()=>{},onBlur:()=>{},value:"Job Price Summary",readOnly:!0,minRows:1,maxRows:1}),fe=()=>t.history.goBack(),be=e.jsx(le,{id:"printButton",value:"Print",onClick:()=>{const u=Ue(n).toString(),x=`${N.appBase}${N.job.getPrintLink(a.jobId,!0)}${u?`?${u}`:""}`;window.open(x,"_blank","noreferrer noopener")},"data-testid":"printButton",type:"secondary",hotkey:"print",children:"Print"},"printButton"),je=e.jsx(ct,{feedbackTarget:Re.JobPriceSummary,testid:"jpsFeedbackButton",displayType:"secondary",tooltip:"Give feedback",feedbackText:"How is the Job Price Summary working for you?",extraInfo:JSON.stringify({jobId:a.jobId,jpsFinancialOverviewRevamp:h,isSelectionsReimaginedJob:r?.isSelectionsReimaginedJob??!1})},"jpsFeedbackButton"),ge=e.jsx(k.ActionButtons,{testid:"jps-item-header-action-buttons",backLinkOnClick:fe,secondaryActions:[{node:je,pinned:!0},be]}),he=e.jsx(Fe.Item,{testid:"jps-job-link",children:e.jsx(ke,{"data-testid":"bdslink-jps-job-link","aria-label":"Link to job",isUnderline:!1,to:N.jobPicker.selectJobLink(a.jobId,N.landingPage.getLinkForLoginType(o?.loginType??Le.BUILDER,!1)),children:(a.useNewData?r?.jobName:G?.jobName)??""})}),B=a.useNewData&&a.newData&&T(r),U=a.useNewData?Tt(a.newData):[],K=U.length>0&&a.jobId!=null,q=a.useNewData&&a.jobId!=null&&ie(r?.displayOption),we=r?.isSelectionsReimaginedJob??!1;let D;K?D="allowancesSection":q?D="selectionOptionsSection":!we&&(r?.displayOption?.showSelections??!1)?D="approvedSelections":D="none";const Y=g===$.Builder&&!!r?.budgetDifferences?.length,R=new Map;r?.displayOption?.showChangeOrders&&R.set(nt,ee),D!=="none"&&R.set(ot,F),Y&&R.set(rt,te);function Te(){const u=a.newData?.isSelectionsReimaginedJob??!1;if(h)return e.jsxs("div",{className:I("flex flex-row","JobFinancialsCardWrapper","JobFinancials"),children:[e.jsx("div",{children:e.jsx(Ct,{data:r,displayType:g,rowAnchors:R})}),B&&e.jsx("div",{children:e.jsx(W,{id:"remainingBalanceCard",title:"Remaining to pay",amount:r?.remainingBalanceTotal??0,divider:C(),rows:B})})]});if(u){const x=r&&r.isWorksheetBudgeted?ae(r,g,h)??[]:[];return e.jsxs("div",{className:I("flex flex-row","JobFinancialsCardWrapper","JobFinancials"),children:[e.jsx("div",{children:e.jsx(Ot,{title:r?.isWorksheetBudgeted?E:se,amounts:{revisedPriceTotal:r?.revisedPriceTotal??0,originalPriceTotal:r?.originalPriceTotal??0,difference:r?.priceTotalDifference??0},isWorksheetBudgeted:r?.isWorksheetBudgeted,rows:x})}),B&&e.jsx("div",{children:e.jsx(W,{id:"remainingBalanceCard",title:"Remaining to pay",amount:r?.remainingBalanceTotal??0,divider:C(),rows:B})})]})}return e.jsxs("div",{className:I("flex flex-row","JobFinancialsCardWrapper","JobFinancials"),children:[e.jsx(W,{id:"clientPriceCard",title:r?.isWorksheetBudgeted?E:se,amount:(r?.isWorksheetBudgeted?r?.revisedPriceTotal:r?.originalPriceTotal)??0,divider:j(),rows:M(r)}),B&&e.jsx(W,{id:"remainingBalanceCard",title:"Remaining to pay",amount:r?.remainingBalanceTotal??0,divider:C(),rows:B})]})}const P={beforeClose:async()=>{const{history:u,match:x}=t;u.replace(x.url),v()},parentRoute:t.match.url};return e.jsxs(e.Fragment,{children:[e.jsx(We,{title:"Job Price Summary"}),e.jsxs(k,{"data-testid":"JobPriceSummary",actionBar:ge,children:[e.jsx(k.Title,{testid:"jps-item-header",ariaLabel:"Job Price Summary Header",breadcrumbTestid:"jps-nav-breadcrumb",breadcrumbSlot:he,children:xe}),e.jsxs(k.Content,{"data-testid":"jpsContent",className:"JobFinancials",children:[A&&Te(),a.showEmptyState&&e.jsx(Pt,{isNewJPS:a.useNewData??!1})||e.jsxs(Nt,{children:[K&&e.jsx("div",{id:D==="allowancesSection"?F:void 0,children:e.jsx(Mt,{allowances:U,jobId:a.jobId,sortStates:n.srAllowances,onSortChange:(u,x)=>c(S=>({...S,srAllowances:{...S.srAllowances,[u]:x}})),titleAction:e.jsx(Jt,{})})}),q&&e.jsx("div",{id:D==="selectionOptionsSection"?F:void 0,children:e.jsx(Rt,{selectionOptions:r?.selectionOptions,jobId:a.jobId,isWorksheetBudgeted:r?.isWorksheetBudgeted??!1,sortState:n.selectionOptions,onSortChange:u=>c(x=>({...x,selectionOptions:u}))})}),a.useNewData&&h&&e.jsx("div",{id:Y?te:void 0,children:e.jsx(Gt,{budgetDifferences:r?.budgetDifferences,sortState:n.budgetDifference,onSortChange:u=>c(x=>({...x,budgetDifference:u})),displayType:g,showsClientBudgetDifference:r?.showsClientBudgetDifference,jobId:a.jobId})}),a.useNewData&&e.jsxs(e.Fragment,{children:[!vt(r)&&e.jsx(w,{text:"Price breakdown",size:"distinct-lg",testid:"breakdownTitle",className:"BreakdownTitle"}),e.jsx(yt,{jpsData:a.newData,isAllowanceVisible:r?.displayOption?.showAllowances??!1,isSelectionsVisible:r?.displayOption?.showSelections??!1,isInvoicesVisible:r?.displayOption?.showCustomerInvoices??!1,isSelectionOptionsVisible:ie(r?.displayOption),isChangeOrdersVisible:r?.displayOption?.showChangeOrders??!1,sectionAnchors:{changeOrders:ee,selectionsAllowances:D==="approvedSelections"?F:void 0},builderInfo:s,jobId:a.jobId,tableSortStates:n,onTableSortChange:(u,x)=>c(S=>({...S,[u]:x}))})]}),!a.useNewData&&e.jsx(St,{data:G,printOnLoad:!1,printOnUpdate:!1,shouldUseNewData:!1})]})]})]}),e.jsx($e,{modalConfig:P}),e.jsx(Me,{modalConfig:P}),e.jsx(ze,{modalConfig:P}),e.jsx(_e,{modalConfig:P}),e.jsx(He,{modalConfig:P}),e.jsx(Ve,{modalConfig:P}),e.jsx(Ge,{modalConfig:P})]})}const Kt=mt("Job Price Summary")(Ut),Ia=Ne(t=>e.jsx(Kt,{...t,requireSingleJob:!0}))("Could not load the Job Price Summary");export{Ia as JobFinancials,Ia as default}; 2//# sourceMappingURL=JobFinancials-BbbAie--.js.map
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.