1import{a as X,b as Se}from"./chunk-BISWGJBQ.js";import{a as t,b as Fe}from"./chunk-G5HTGV5S.js";import"./chunk-P4MBS77X.js";import{a as K,b as ve}from"./chunk-5LWZPV6G.js";import{k as Y,l as Te,q as G,r as Ce}from"./chunk-2YUUR5ZI.js";import"./chunk-WARI343W.js";import"./chunk-XOUL7NTD.js";import"./chunk-PNNSSUDF.js";import"./chunk-NT3MOXJJ.js";import"./chunk-DMZIXPXE.js";import"./chunk-2OMZOR5B.js";import"./chunk-2X6Q6S3S.js";import{a as Q,b as ge}from"./chunk-OLJSXGS4.js";import{a as q,b as ye}from"./chunk-ZPJSFYRY.js";import{bd as H,cd as he}from"./chunk-LGT5LD5V.js";import"./chunk-RMKGVQWA.js";import"./chunk-SUCGRBRC.js";import"./chunk-ZO4IH2QB.js";import"./chunk-FPWW7MI4.js";import"./chunk-L2MCTHKM.js";import"./chunk-IPVKXYCL.js";import"./chunk-5HR5JVTM.js";import"./chunk-QMSTDAIN.js";import"./chunk-DBTMM27E.js";import"./chunk-DJFZVWOY.js";import"./chunk-DEBWDWXL.js";import"./chunk-HDQH4JQZ.js";import"./chunk-D6R35AUP.js";import"./chunk-QCHMIJOK.js";import"./chunk-ZEQQPOPI.js";import"./chunk-HYCYFZRA.js";import"./chunk-S6FNSG2B.js";import"./chunk-LO5G4E2N.js";import"./chunk-EL2KCZF4.js";import"./chunk-PAYXMP4F.js";import"./chunk-NHEKNCRD.js";import"./chunk-6UCCLOH7.js";import"./chunk-GQIUTPRT.js";import"./chunk-WP7EDVBL.js";import"./chunk-SHKQJMA3.js";import"./chunk-GXYI3HTT.js";import"./chunk-A7AOT6O2.js";import"./chunk-6JGV6J2Q.js";import"./chunk-VL2YACEO.js";import"./chunk-SLC3EWKD.js";import"./chunk-23RLZPU5.js";import"./chunk-XS4PDHDH.js";import"./chunk-TO2BHCJB.js";import"./chunk-HX4UHESS.js";import"./chunk-EZ2LFIIP.js";import"./chunk-6TKUOPIF.js";import"./chunk-3FT4RHQ4.js";import"./chunk-KUL4NNUN.js";import"./chunk-J7JIBOVZ.js";import"./chunk-XSLC6WFY.js";import{a as $,b as pe}from"./chunk-DT4TN35R.js";import"./chunk-6IO735VS.js";import"./chunk-WURSCF5N.js";import"./chunk-SEZCQ2P7.js";import"./chunk-LP75U3KI.js";import"./chunk-RXW5JZ7E.js";import"./chunk-VAFKFYPX.js";import{a as V,b as fe}from"./chunk-BSG3FEKY.js";import"./chunk-2NOTWZJJ.js";import"./chunk-JJGG5MCZ.js";import{e as J,f as De}from"./chunk-W7XCRJO5.js";import"./chunk-BGLKCJ2U.js";import"./chunk-HNO4PSXC.js";import"./chunk-LEU4X4J6.js";import{F as U,G as me,m as c,o as de}from"./chunk-WWF6WCLV.js";import{c as j,d as ue}from"./chunk-W6OHYDG3.js";import"./chunk-CHVDANRK.js";import"./chunk-7GDBENI5.js";import"./chunk-LR4C2AR5.js";import{a as z,b as le}from"./chunk-VJUVTJOX.js";import"./chunk-I2HE5ZRP.js";import"./chunk-LKVBLA3Z.js";import{a as S,b as ae,c as b,d as re,e as x,f as ce}from"./chunk-6HRHW75L.js";import{E as se,w as M}from"./chunk-XICV2U4I.js";import{D as E,m as B,w as _}from"./chunk-4ATU7KJI.js";import{Lb as I,Nb as k,S as L,Sb as p,Sc as D,Tb as d,Tc as f,Ub as m,Vb as l,W as te,Xc as O,ac as T,db as u,e as A,ec as C,gc as F,ka as y,la as g,o as N,pb as r,q as h,qc as W,qd as oe,ub as P,vc as v,zb as w}from"./chunk-3C63H7YH.js";import{f as ne,j as R}from"./chunk-26GNMCNR.js";function be(a,Z){if(a&1){let e=T();d(0,"a",7),C("click",function(){y(e);let n=F();return g(n.openCreateTdrTransactionModal())}),l(1,"icon",8),v(2," Create New Transaction "),m()}}function Re(a,Z){if(a&1){let e=T();d(0,"div",5)(1,"button",9),C("click",function(){y(e);let n=F();return g(n.downloadFullDatabase())}),l(2,"icon",10),v(3," Download Full Database "),m()()}}var Ae,Ne,Xe,Le=ne(()=>{E();ge();fe();Ce();he();ye();te();De();de();Fe();Se();re();ae();le();oe();ve();Te();me();ue();se();pe();ce();E();Ae=[c.MOUPartner,c.StateLands,c.Power,c.Admin],Ne=[c.Power,c.Admin],Xe=(()=>{class a{constructor(e,i,n,o,s,ee,ie){this.tdrTransactionService=e,this.utilityFunctions=i,this.authenticationService=n,this.dialogService=o,this.router=s,this.confirmService=ee,this.alertService=ie,this.cmsContentTypeID=q.DevelopmentRightTransactionsList,this.defaultColDef={sortable:!0,filter:!0,resizable:!0,wrapHeaderText:!0,autoHeaderHeight:!0},this.refresh$=new A(void 0)}ngOnInit(){this.columnDefs=this.createColumnDefs(),this.transactions$=this.refresh$.pipe(L(()=>this.tdrTransactionService.listTdrTransaction())),this.canCreate$=this.authenticationService.getCurrentUser().pipe(h(e=>e!=null&&Ae.includes(e.ParcelTrackerRoleID))),this.canDownloadFullDatabase$=this.authenticationService.getCurrentUser().pipe(h(e=>e!=null&&Ne.includes(e.ParcelTrackerRoleID)))}downloadFullDatabase(){this.utilityFunctions.downloadFileFromApi(`${z.mainAppApiUrl}/tdr-transactions/full-details-excel-download`)}confirmDelete(e){this.confirmService.confirm({title:"Delete Transaction",message:`Are you sure you want to delete Transaction ${e.TransactionNumber}? This action cannot be undone.`,buttonTextYes:"Delete",buttonTextNo:"Cancel",buttonClassYes:"btn-primary"}).then(i=>R(this,null,function*(){if(i)try{yield N(this.tdrTransactionService.deleteTdrTransactionTdrTransaction(e.TdrTransactionID)),this.alertService.pushAlert(new b(`Transaction ${e.TransactionNumber} deleted.`,S.Success,!0)),this.refresh$.next()}
1catch(n){let o=n?.error,s=(typeof o=="string"?o:o?.message)||"Failed to delete transaction.";this.alertService.pushAlert(new b(s,S.Danger,!0))}}))}getEditRouteForTransactionType(e){return{[t.Allocation]:"edit-allocation",[t.AllocationAssignment]:"edit-allocation-assignment",[t.Conversion]:"edit-conversion",[t.ConversionWithTransfer]:"edit-conversion-with-transfer",[t.ECMRetirement]:"edit-ecm-retirement",[t.LandBankAcquisition]:"edit-land-bank-acquisition",[t.LandBankTransfer]:"edit-land-bank-transfer",[t.Transfer]:"edit-transfer",[t.ShorezoneAllocation]:"edit-shorezone-allocation"}[e]??"edit-transfer"}openCreateTdrTransactionModal(){this.dialogService.open(X,{size:"lg",data:{parcelID:0,parcelNumber:""}}).afterClosed$.subscribe(i=>{if(i){let n=this.getNewRouteForTransactionType(i.TransactionTypeID),o={leadAgencyID:i.LeadAgencyID,commodityID:i.CommodityID};i.SendingParcelNumber&&(o.sendingParcelNumber=i.SendingParcelNumber),i.ReceivingParcelNumber&&(o.receivingParcelNumber=i.ReceivingParcelNumber),i.ConversionParcelNumber&&(o.conversionParcelNumber=i.ConversionParcelNumber),i.SendingLandBankID&&(o.sendingLandBankID=i.SendingLandBankID),i.SendingCommodityPoolID&&(o.sendingCommodityPoolID=i.SendingCommodityPoolID),this.router.navigate(["/tdr-transactions",n],{queryParams:o})}})}getNewRouteForTransactionType(e){return{[t.Allocation]:"new-allocation",[t.Conversion]:"new-conversion",[t.ECMRetirement]:"new-ecm-retirement",[t.LandBankAcquisition]:"new-land-bank-acquisition",[t.Transfer]:"new-transfer",[t.AllocationAssignment]:"new-allocation-assignment",[t.ConversionWithTransfer]:"new-conversion-with-transfer",[t.LandBankTransfer]:"new-land-bank-transfer",[t.ShorezoneAllocation]:"new-shorezone-allocation"}[e]??"new-transfer"}createColumnDefs(){let e=J;return[this.utilityFunctions.createActionsColumnDef(i=>{let n=i.data;if(!n)return[];let o=[];return n.CanEdit&&o.push({ActionName:"Edit",ActionIcon:"fa fa-edit",ActionHandler:()=>{let s=this.getEditRouteForTransactionType(n.TransactionTypeID);this.router.navigate(["/tdr-transactions",n.TdrTransactionID,s])}}),n.CanDelete&&o.push({ActionName:"Delete",ActionIcon:"fa fa-trash text-danger",ActionHandler:()=>this.confirmDelete(n)}),o}),this.utilityFunctions.createLinkColumnDef("Transaction","TransactionNumber","TdrTransactionID",{InRouterLink:"/tdr-transactions/",Width:150}),this.utilityFunctions.createLinkColumnDef("Lead Agency","LeadAgencyOrganizationName","LeadAgencyOrganizationID",{FieldDefinitionType:e[e.LeadAgency],InRouterLink:"/organizations/",CustomDropdownFilterField:"LeadAgencyOrganizationName",Width:220}),this.utilityFunctions.createBasicColumnDef("Transaction Status","TransactionStateDisplayName",{FieldDefinitionType:e[e.TransactionStatus],CustomDropdownFilterField:"TransactionStateDisplayName",Width:130}),this.utilityFunctions.createBasicColumnDef("Transaction Type","TransactionTypeDisplayName",{FieldDefinitionType:e[e.TransactionType],CustomDropdownFilterField:"TransactionTypeDisplayName",Width:160}),this.utilityFunctions.createBasicColumnDef("Development Right","CommodityDisplayName",{FieldDefinitionType:e[e.DevelopmentRight],FieldDefinitionLabelOverride:"Development Right",CustomDropdownFilterField:"CommodityDisplayName",Width:220}),this.utilityFunctions.createDecimalColumnDef("Quantity","Quantity",{MaxDecimalPlacesToDisplay:0,Width:100}),this.utilityFunctions.createLinkColumnDef("File or Case #","AccelaRecordID","AccelaRecordID",{FieldDefinitionType:e[e.FileOrCaseNumber],InRouterLink:"/accela-cap-records/",Width:180}),this.utilityFunctions.createDateColumnDef("Project Approval Date","ApprovalDate","M/d/yyyy",{FieldDefinitionType:e[e.ProjectApprovalDate],Width:150}),this.utilityFunctions.createDateColumnDef("Expiration Date","TransactionExpirationDate","M/d/yyyy",{FieldDefinitionType:e[e.TransactionExpirationDate],Width:130}),this.utilityFunctions.createBasicColumnDef("Updated By","LastUpdatePersonFullName",{Width:130}),this.utilityFunctions.createDateColumnDef("Updated","LastUpdateDate","M/d/yyyy h:mm a",{Sort:"desc",Width:160}),this.utilityFunctions.createBasicColumnDef("Jurisdiction Project Number","ProjectNumber",{FieldDefinitionType:e[e.JurisdictionProjectNumber],Width:160}),this.utilityFunctions.createLinkColumnDef("Residential Allocation Number","ResidentialAllocationNumber","ResidentialAllocationNumber",{FieldDefinitionType:e[e.ResidentialAllocationNumber],InRouterLink:"/residential-allocations/",Width:200}),this.utilityFunctions.createLinkColumnDef("Sending","SendingParcelNumber","SendingParcelNumber",{FieldDefinitionType:e[e.SendingParcelAPN],FieldDefinitionLabelOverride:"Sending",InRouterLink:"/parcels/",Width:110}),this.utilityFunctions.createBasicColumnDef("Sending Parcel Nickname","SendingParcelNickname",{FieldDefinitionType:e[e.ParcelNickname],FieldDefinitionLabelOverride:"Sending Parcel Nickname",Width:160}),this.utilityFunctions.createBasicColumnDef("Sending Owner Name","SendingOwnerName",{FieldDefinitionType:e[e.OwnerName],FieldDefinitionLabelOverride:"Sending Owner Name",Width:180}),this.utilityFunctions.createBasicColumnDef("Sending Parcel Address","SendingParcelAddress",{FieldDefinitionType:e[e.ParcelAddress],FieldDefinitionLabelOverride:"Sending Parcel Address",Width:220}),this.utilityFunctions.createLinkColumnDef("Sending Jurisdiction","SendingJurisdictionName","SendingJurisdictionOrganizationID",{FieldDefinitionType:e[e.SendingJurisdiction],InRouterLink:"/organizations/",CustomDropdownFilterField:"SendingJurisdictionName",Width:160}),this.utilityFunctions.createBasicColumnDef("Sending Land Capability","SendingLandCapability",{FieldDefinitionType:e[e.LandCapability],FieldDefinitionLabelOverride:"Sending Land Capability",CustomDropdownFilterField:"SendingLandCapability",Width:150}),this.utilityFunctions.createBasicColumnDef("Sending IPES Score","SendingIPESScore",{FieldDefinitionType:e[e.SendingIPESScore],Width:130}),this.utilityFunctions.createLinkColumnDef("Sending Allocation Pool","SendingAllocationPoolName","SendingAllocationPoolID",{FieldDefinitionType:e[e.AllocationPool],FieldDefinitionLabelOverride:"Sending Allocation Pool",InRouterLink:"/manage/commodity-pools/",CustomDropdownFilterField:"SendingAllocationPoolName",Width:180}),this.utilityFunctions.createLinkColumnDef("Receiving","ReceivingParcelNumber","ReceivingParcelNumber",{FieldDefinitionType:e[e.ReceivingParcelAPN],FieldDefinitionLabelOverride:"Receiving",InRouterLink:"/parcels/",Width:110}),this.utilityFunctions.createBasicColumnDef("Receiving Parcel Nickname","ReceivingParcelNickname",{FieldDefinitionType:e[e.ParcelNickname],FieldDefinitionLabelOverride:"Receiving Parcel Nickname",Width:160}),this.utilityFunctions.createBasicColumnDef("Receiving Owner Name","ReceivingOwnerName",{FieldDefinitionType:e[e.OwnerName],FieldDefinitionLabelOverride:"Receiving Owner Name",Width:180}),this.utilityFunctions.createBasicColumnDef("Receiving Parcel Address","ReceivingParcelAddress",{FieldDefinitionType:e[e.ParcelAddress],FieldDefinitionLabelOverride:"Receiving Parcel Address",Width:220}),this.utilityFunctions.createLinkColumnDef("Receiving Jurisdiction","ReceivingJurisdictionName","ReceivingJurisdictionOrganizationID",{FieldDefinitionType:e[e.ReceivingJurisdiction],InRouterLink:"/organizations/",CustomDropdownFilterField:"ReceivingJurisdictionName",Width:160}),this.utilityFunctions.createBasicColumnDef("Receiving Land Capability","ReceivingLandCapability",{FieldDefinitionType:e[e.LandCapability],FieldDefinitionLabelOverride:"Receiving Land Capability",CustomDropdownFilterField:"ReceivingLandCapability",Width:150}),this.utilityFunctions.createBasicColumnDef("Receiving IPES Score","ReceivingIPESScore",{FieldDefinitionType:e[e.ReceivingIPESScore],Width:130}),this.utilityFunctions.createBasicColumnDef("Residential Use","ResidentialAllocationUseTypeDisplayName",{FieldDefinitionType:e[e.ResidentialUse],CustomDropdownFilterField:"ResidentialAllocationUseTypeDisplayName",Width:140}),this.utilityFunctions.createBasicColumnDef("Comments","Comments",{Width:280})]}static{this.\u0275fac=function(i){return new(i||a)(r(K),r(Y),r(U),r(j),r(M),r($),r(x))}}static{this.\u0275cmp=P({type:a,selectors:[["development-right-transactions"]],decls:11,vars:14,consts:[["createButton",""],["pageTitle","Development Right Transactions",3,"templateRight"],[1,"mb-4"],[3,"customRichTextTypeID","showInfoIcon"],[1,"page-body"],[1,"flex-end","mb-2"],["downloadFileName","development-right-transactions",3,"rowData","columnDefs","defaultColDef","height"],[1,"btn","btn-primary","btn-sm",3,"click"],["icon","Add"],["type","button","title","Download the full database as an Excel workbook, one tab per transaction type",1,"btn","btn-primary","btn-sm",3,"click"],["icon","Download"]],template:function(i,n){if(i&1&&(l(0,"page-header",1),D(1,"async"),w(2,be,3,0,"ng-template",null,0,O),d(4,"div",2),l(5,"custom-rich-text",3),m(),d(6,"div",4),I(7,Re,4,0,"div",5),D(8,"async"),l(9,"ltinfo-grid",6),D(10,"async"),m()),i&2){let o=W(3);p("templateRight",f(1,8,n.canCreate$)?o:null),u(5),p("customRichTextTypeID",n.cmsContentTypeID)("showInfoIcon",!1),u(2),k(f(8,10,n.canDownloadFullDatabase$)?7:-1),u(2),p("rowData",f(10,12,n.transactions$))("columnDefs",n.columnDefs)("defaultColDef",n.defaultColDef)("height","400px")}},dependencies:[_,Q,V,G,H,B],encapsulation:2})}}return a})()});Le();
1export{Xe as DevelopmentRightTransactionsComponent};
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.