PageSourceSearch

https://xpl.xplanet.ru/chunk-BI4SGYPU.js

js xplanet.ru collected 2026-10-06 06:58:21 UTC 46,379 bytes, 2 lines download raw bytes

1import{a as ii,b as ni}from"./chunk-6UTMXE54.js";import{a as He}from"./chunk-EGRSATU2.js";import{a as tt}from"./chunk-APP2T5RX.js";import"./chunk-LFDYRQ2P.js";import{c as Me}from"./chunk-2E754ZUZ.js";import{v as ei}from"./chunk-MVPF3SRO.js";import{b as Ne,d as Be}from"./chunk-DIUEGGKB.js";import"./chunk-E4445FQM.js";import"./chunk-EVKQH7GU.js";import{a as $e,b as je}from"./chunk-Q5PTR65H.js";import"./chunk-O4UEIMUB.js";import{K as ht,M as Je,U as ti,v as Xe}from"./chunk-Z3JXKFIE.js";import{y as J}from"./chunk-LE7BXTGK.js";import"./chunk-V5KCJCWO.js";import"./chunk-GIELAZIX.js";import"./chunk-CQTAQO4J.js";import{a as ke,b as Ue}from"./chunk-STQM2GTG.js";import"./chunk-OJPRJAHI.js";import{a as Ge,b as qe}from"./chunk-I6A4FXBZ.js";import{a as Qe}from"./chunk-YMK7WIK7.js";import{b as ze,c as We}from"./chunk-QQC5AK7D.js";import"./chunk-OKB4TFWG.js";import{p as et}from"./chunk-K2U2AOJP.js";import"./chunk-F5M4HF5N.js";import"./chunk-54JTY2Q6.js";import{G as it,g as j,h as Ke,j as Ye,k as Ze}from"./chunk-QP7BYR4V.js";import"./chunk-OFWXZZMH.js";import"./chunk-QXSGANVZ.js";import"./chunk-BJRCLOKR.js";import{da as Pe,ic as De,la as Ee,pa as Oe,ta as Le,y as _t}from"./chunk-TUAJHIVL.js";import{Gi as ce,Oj as be,_j as xe,lj as ue,oj as de,wa as se,wj as Te}from"./chunk-OGMLZXFC.js";import"./chunk-ZE3HLFEJ.js";import{a as Ve,b as ft}from"./chunk-NMYKHGBO.js";import{$a as at,Ad as I,Ae as u,Cr as Ie,Da as M,Ea as W,Ef as pt,Eg as Xt,Ek as mt,Gm as pe,Hb as G,Ia as L,Ij as ie,Jj as ne,Kj as oe,Kq as ye,Lb as C,Lk as ae,Lq as ve,Ma as x,Mb as S,Mg as Jt,Ng as q,Nh as te,Ni as dt,Oa as P,Ob as Z,Of as Wt,Og as $,Oj as gt,Pg as ct,Pj as re,Qa as It,Qb as Nt,Qg as ut,Qi as ee,Ra as Ot,Rf as Qt,S as Et,Sa as Lt,Sd as qt,T as Rt,Ta as h,Tf as Kt,Ua as c,Va as d,Vb as Vt,Vd as $t,Wa as R,Wb as Bt,Wd as D,Wg as a,Xb as kt,_ as H,_a as rt,_b as Ut,ab as Q,b as bt,ba as T,bb as E,cb as b,da as m,db as s,ea as _,eb as Dt,fb as st,fq as Ce,gq as Se,hb as K,hg as Yt,i as xt,ib as k,ig as Zt,ja as Ft,jb as U,jo as ge,ka as y,kb as N,ko as me,lo as _e,mb as Y,mr as Ae,na as z,o as ot,oo as fe,or as Re,pb as F,pd as Gt,qr as Fe,rb as Mt,ro as he,rq as we,tf as jt,u as Pt,uf as Ht,vf as zt,w as At,wa as g,wd as X,xe as lt,yl as le}from"./chunk-2V33EXGU.js";import{a as r,b as p,e as B,i as vt}from"./chunk-FPO36RWJ.js";var Ct=vt(Jt());var oi=(i,f=[],t=[],n)=>{if(!i)return null;let e=Te(i.trailerTypeId,f)?.name||"",o=i?.specialRequirementIds?.map(v=>t.find(A=>A.id===v)).filter(v=>!!v)||[],l=be(i.cargoDangerClasses),w=i?.vehicleRestrictions?Object.entries(i.vehicleRestrictions).map(v=>v[0]!=="__typename"?v:["",null]):null;return{transfers:[{name:i.startEndpointSummary?.locationName,date:pt(i.startEndpointSummary?.plannedDate,"dd.MM.yy HH:mm")},{name:i.isRoundTrip?i.roundTripLocationName||"":i.finishEndpointSummary?.locationName,date:pt(i.finishEndpointSummary?.plannedDate,"dd.MM.yy HH:mm")}],isCircleRoute:i.isRoundTrip,waypointsCount:i.waypointsCount,info:p(r(p(r({id:i.id,tooltip:""},w&&{parameters:{tooltip:`${w.map(Kt).filter(v=>!!v).join(", ")}`}}),{options:{tooltip:Qt(o)},volume:jt(i.plannedCargoSummary?.volume),weight:Ht(i.plannedCargoSummary?.weight)}),l&&{dangerous:{content:l.slice(-1),tooltip:`<div><strong>\u041A\u043B\u0430\u0441\u0441 ${l.slice(-1)} \u043E\u043F\u0430\u0441\u043D\u044B\u0445 \u0433\u0440\u0443\u0437\u043E\u0432 \u043F\u043E \u0414\u041E\u041F\u041E\u0413</strong></div>
2            <div>${Gt[l]}</div>`}}),{transport:{content:e,tooltip:`<div>${(i.cargoLoadingMethods||[]).map((v,A)=>`${A?X[v]?.toLowerCase():X[v]} \u043F\u043E\u0433\u0440\u0443\u0437\u043A\u0430`).join(", ")}</div>`,loadingMethods:(i.cargoLoadingMethods||[]).map(v=>X[v]),twoDrivers:!!i?.specialRequirementIds?.includes(ce)},maxDimensions:i.maxDimensions?`${i.maxDimensions.length}x${i.maxDimensions.width}x${i.maxDimensions.height} \u043C`:""}),time:i.status===u.CANCELED?"Z":Wt(i.startEndpointSummary?.plannedDate?.split(":00+")?.[0]),timeTooltip:[u.NEGOTIATED,u.DRIVER_ASSIGNED].includes(i?.status)?"\u0412\u0440\u0435\u043C\u044F \u0434\u043E \u043F\u043E\u0433\u0440\u0443\u0437\u043A\u0438":"",isIn:!0,isMyOwn:!0,bet:n?"":zt(i.price),status:i.status,distance:i.plannedDistance?`${i.plannedDistance} \u043A\u043C`:"",cardPriceWithVatRate:i.priceWithVatRate}};var ri=[{id:"number",title:"\u041D\u043E\u043C\u0435\u0440 \u0437\u0430\u044F\u0432\u043A\u0438",filter:{input:{type:a.STRING}},sort:"string"},{id:"status",title:"\u0421\u0442\u0430\u0442\u0443\u0441",filter:{input:{type:a.SELECT,multiple:!0,variants:Ze()}},sort:"string"},{id:"customer",title:"\u0417\u0430\u043A\u0430\u0437\u0447\u0438\u043A",filter:{input:{type:a.STRING}},sort:"string"},{id:"externalNumber",title:"\u041F\u043E\u0440\u0443\u0447\u0435\u043D\u0438\u0435 (\u043A\u043B\u0438\u0435\u043D\u0442)",filter:{input:{type:a.STRING}},sort:"string"},{id:"isExternalCustomer",title:"\u0413\u0440\u0443\u0437 \u043E\u0442 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u0438\u043A\u0430",filter:{input:{type:a.SELECT,variants:j}}},{id:"hasSupervisorCustomer",title:"\u0421\u043E\u0437\u0434\u0430\u043D\u043E \u0434\u0440\u0443\u0433\u043E\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0435\u0439",headerStyle:{"white-space":"initial"},filter:{input:{type:a.SELECT,variants:j}}},{id:"hasManualCustomerPrice",title:"\u0422\u0430\u0440\u0438\u0444 \u0431\u044B\u043B \u0438\u0437\u043C\u0435\u043D\u0435\u043D",filter:{input:{type:a.SELECT,variants:j}}},{id:"firstPoint",title:"\u041D\u0430\u0447\u0430\u043B\u044C\u043D\u044B\u0439 \u043F\u0443\u043D\u043A\u0442",filter:{input:{type:a.STRING}},sort:"string"},{id:"lastPoint",title:"\u041A\u043E\u043D\u0435\u0447\u043D\u044B\u0439 \u043F\u0443\u043D\u043A\u0442",filter:{input:{type:a.STRING}},sort:"string"},{id:"firstLoadingPlan",title:"\u041F\u0435\u0440\u0432\u0430\u044F \u043F\u043E\u0433\u0440\u0443\u0437\u043A\u0430 (\u043F\u043B\u0430\u043D)",pipe:{type:"date"},filter:{input:{type:a.DATETIME}},sort:"string"},{id:"lastUnloadingPlan",title:"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u044F\u044F \u0432\u044B\u0433\u0440\u0443\u0437\u043A\u0430 (\u043F\u043B\u0430\u043D)",pipe:{type:"date"},filter:{input:{type:a.DATETIME}},sort:"string"},{id:"distancePlan",title:"\u0420\u0430\u0441\u0441\u0442\u043E\u044F\u043D\u0438\u0435",sort:"number",filter:{input:{type:a.NUMBER}},pipe:{type:"distance"}},{id:"itemCountPlan",title:"\u041A\u043E\u043B-\u0432\u043E \u043C\u0435\u0441\u0442",sort:"number",filter:{input:{type:a.NUMBER}}},{id:"volumePlan",title:"\u041E\u0431\u044A\u0451\u043C \u0433\u0440\u0443\u0437\u0430",sort:"number",pipe:{type:"volume"},filter:{input:{type:a.NUMBER}}},{id:"weightPlan",title:"\u0412\u0435\u0441 \u0433\u0440\u0443\u0437\u0430",pipe:{type:"weight"},sort:"number",filter:{input:{type:a.NUMBER}}},{id:"trailerType",title:"\u0422\u0438\u043F \u043A\u0443\u0437\u043E\u0432\u0430",filter:{input:{type:a.SELECT,multiple:!0,selectListType:re.trailerTypes}},sort:"string"},{id:"tariffType",title:"\u0422\u0438\u043F \u0442\u0430\u0440\u0438\u0444\u0430",filter:{input:{type:a.SELECT,variants:ae()}},sort:"string"},{id:"plannedTime",title:"\u041F\u043B\u0430\u043D\u043E\u0432\u043E\u0435 \u0432\u0440\u0435\u043C\u044F"},{id:"tariffMinTime",title:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F",filter:{input:{type:a.NUMBER}},sort:"number"},{id:"plannedCost",title:"\u041F\u043B\u0430\u043D\u043E\u0432\u0430\u044F \u0441\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C ",pipe:{type:"price"}},{id:"minCost",title:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0441\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C",pipe:{type:"price"}},{id:"customerPrice",title:"\u0426\u0435\u043D\u0430 \u0437\u0430\u043A\u0430\u0437\u0447\u0438\u043A\u0430",filter:{input:{type:a.NUMBER}},pipe:{type:"price"},sort:"number"},{id:"isPartnerships",title:"\u041F\u0430\u0440\u0442\u043D\u0435\u0440\u0441\u043A\u0430\u044F",filter:{input:{type:a.SELECT,variants:Ke}}},{id:"initiator",title:"\u0418\u043D\u0438\u0446\u0438\u0430\u0442\u043E\u0440",filter:{input:{type:a.STRING}},sort:"string"},{id:"initiatorPhone",title:"\u0418\u043D\u0438\u0446\u0438\u0430\u0442\u043E\u0440 (\u0442\u0435\u043B\u0435\u0444\u043E\u043D)",filter:{input:{type:a.STRING}},sort:"string"},{id:"initiatorEmail",title:"\u0418\u043D\u0438\u0446\u0438\u0430\u0442\u043E\u0440 (email)",filter:{input:{type:a.STRING}},sort:"string"},{id:"approver",title:"\u041A\u043E\u043D\u0442\u0440\u043E\u043B\u0451\u0440",filter:{input:{type:a.STRING}},sort:"string"},{id:"approverPhone",title:"\u041A\u043E\u043D\u0442\u0440\u043E\u043B\u0451\u0440 (\u0442\u0435\u043B\u0435\u0444\u043E\u043D)",filter:{input:{type:a.STRING}},sort:"string"},{id:"approverEmail",title:"\u041A\u043E\u043D\u0442\u0440\u043E\u043B\u0451\u0440 (email)",filter:{input:{type:a.STRING}},sort:"string"},{id:"firstLoadingFact",title:"\u041F\u0435\u0440\u0432\u0430\u044F \u043F\u043E\u0433\u0440\u0443\u0437\u043A\u0430 (\u0444\u0430\u043A\u0442)",pipe:{type:"date"},filter:{input:{type:a.DATETIME}},sort:"string"},{id:"lastUnloadingFact",title:"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u044F\u044F \u0432\u044B\u0433\u0440\u0443\u0437\u043A\u0430 (\u0444\u0430\u043A\u0442)",pipe:{type:"date"},filter:{input:{type:a.DATETIME}},sort:"string"},{id:"firstPointRegion",title:"\u041D\u0430\u0447\u0430\u043B\u044C\u043D\u044B\u0439 \u043F\u0443\u043D\u043A\u0442 (\u0440\u0435\u0433\u0438\u043E\u043D)",filter:{input:{type:a.SELECT,multiple:!0,variants:mt}},sort:"string"},{id:"lastPointRegion",title:"\u041A\u043E\u043D\u0435\u0447\u043D\u044B\u0439 \u043F\u0443\u043D\u043A\u0442 (\u0440\u0435\u0433\u0438\u043E\u043D)",filter:{input:{type:a.SELECT,multiple:!0,variants:mt}},sort:"string"},{id:"comment",title:"\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439",filter:{input:{type:a.STRING}},sort:"string"}
2,{id:"mobileApp",title:"\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435",filter:{input:{type:a.SELECT,variants:j}},sort:"string"},{id:"dueDate",title:"\u041F\u0440\u0435\u0434\u0435\u043B\u044C\u043D\u044B\u0439 \u0441\u0440\u043E\u043A",pipe:{type:"date"}},{id:"groupingDueDate",title:"\u0414\u0430\u0442\u0430 \u0432\u044B\u0445\u043E\u0434\u0430 \u043E\u0434\u0438\u043D\u043E\u0447\u043D\u043E\u0439 \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0430 \u0442\u043E\u0440\u0433\u0438",pipe:{type:"date"},filter:{input:{type:a.DATETIME}},sort:"string"},{id:"carrier",title:"\u041F\u0435\u0440\u0435\u0432\u043E\u0437\u0447\u0438\u043A",filter:{input:{type:a.STRING}},sort:"string"},{id:"payer",title:"\u041F\u043B\u0430\u0442\u0435\u043B\u044C\u0449\u0438\u043A",filter:{input:{type:a.STRING}},sort:"string"},{id:"customerInn",title:"\u0417\u0430\u043A\u0430\u0437\u0447\u0438\u043A (\u0418\u041D\u041D)",filter:{input:{type:a.STRING}},sort:"string"},{id:"customerKpp",title:"\u0417\u0430\u043A\u0430\u0437\u0447\u0438\u043A (\u041A\u041F\u041F)",filter:{input:{type:a.STRING}},sort:"string"},{id:"isBaggage",title:"\u0422\u0438\u043F \u043F\u0435\u0440\u0435\u0432\u043E\u0437\u043A\u0438",sort:"string",filter:{input:{type:a.SELECT,multiple:!1,variants:Ye}}}],fi=["number","status","customer","externalNumber","isExternalCustomer","hasSupervisorCustomer","hasManualCustomerPrice","firstPoint","lastPoint","firstLoadingPlan","lastUnloadingPlan","distancePlan","itemCountPlan","volumePlan","weightPlan","trailerType","tariffType","plannedTime","tariffMinTime","plannedCost","minCost","customerPrice","isPartnerships","initiator","initiatorPhone","initiatorEmail","approver","approverPhone","approverEmail","firstLoadingFact","lastUnloadingFact","firstPointRegion","lastPointRegion","comment","mobileApp","dueDate","groupingDueDate","carrier","payer","customerInn","customerKpp","isBaggage","isContract"],hi={number:166,status:193,customer:182,externalNumber:182,isExternalCustomer:172,hasSupervisorCustomer:140,hasManualCustomerPrice:140,firstPoint:180,lastPoint:180,firstLoadingPlan:308,lastUnloadingPlan:308,distancePlan:196,itemCountPlan:216,volumePlan:216,weightPlan:216,trailerType:172,tariffType:172,plannedTime:172,tariffMinTime:216,plannedCost:216,minCost:216,customerPrice:219,isPartnerships:172,initiator:204,initiatorPhone:204,initiatorEmail:204,approver:204,approverPhone:204,approverEmail:204,firstLoadingFact:308,lastUnloadingFact:308,firstPointRegion:224,lastPointRegion:224,comment:302,mobileApp:219,dueDate:219,groupingDueDate:308,carrier:284,payer:284,customerInn:164,customerKpp:164,isContract:219},ai={table:{displayFields:fi,widths:hi}},si={customerCompanyName:{filter:"customer",type:"SEARCH"},cityFromName:{filter:"firstPoint",type:"SEARCH"},cityToName:{filter:"lastPoint",type:"SEARCH"},loadingFrom:{filter:"firstLoadingPlanGTE"},loadingTo:{filter:"firstLoadingPlanLTE"},unloadingFrom:{filter:"lastUnloadingPlanGTE"},unloadingTo:{filter:"lastUnloadingPlanLTE"},corrPayerName:{filter:"payer",type:"SEARCH"}};var li=(()=>{class i{backofficeSettingsStoreService=T(it);applications;settings=null;filters={};sortBy=null;trailerTypes;total;paginator;rowSelected=new y;pageSelected=new y;resetFilters=new y;filterEvent=new y;sorted=new y;settingsChange=new y;generateExcelReport=new y;tableItems=[];tableFields=ri;defaultSettings=ai;firstSelect=!1;get filterValues(){return p(r({},this.filters),{status:Array.isArray(this.filters?.status)&&this.filters?.status?.length===1?this.filters.status[0]:this.filters.status})||{}}ngOnChanges(t){t.applications&&this.prepareItems(this.applications||[])}prepareItems(t){this.tableItems=xe(t,this.trailerTypes||[])}settingsChanged(t){this.backofficeSettingsStoreService.setSettings(et.APPLICATION_LIST,p(r({},this.settings),{table:t}))}selectRow(t,n){this.firstSelect=!0;let e=this.tableItems.find(l=>l.id===t)||null;if(!e)return;let o=this.applications?.find(l=>l.number===e.number?.value);o&&(n?this.pageSelected.emit(o.id.toString()):this.rowSelected.emit(o.id.toString()))}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=M({type:i,selectors:[["tlp-table-applications"]],inputs:{applications:"applications",settings:"settings",filters:"filters",sortBy:"sortBy",trailerTypes:"trailerTypes",total:"total",paginator:"paginator"},outputs:{rowSelected:"rowSelected",pageSelected:"pageSelected",resetFilters:"resetFilters",filterEvent:"filterEvent",sorted:"sorted",settingsChange:"settingsChange",generateExcelReport:"generateExcelReport"},standalone:!1,features:[z],decls:2,vars:10,consts:[["data-testid","powerTableTrancfers",1,"table"],[3,"rowClick","rowDblClick","
2settingsChange","sort","filterEvent","resetFilters","generateExcelReport","fields","items","settings","isResizable","showExcelMenu","isConfigurable","showResetFilters","hideConfigPanel","filterValues","sortBy"]],template:function(n,e){n&1&&(c(0,"div",0)(1,"tlp-power-table",1),b("rowClick",function(l){return e.selectRow(l)})("rowDblClick",function(l){return e.selectRow(l,!0)})("settingsChange",function(l){return e.settingsChanged(l)})("sort",function(l){return e.sorted.emit(l)})("filterEvent",function(l){return e.filterEvent.emit(l)})("resetFilters",function(){return e.resetFilters.emit()})("generateExcelReport",function(l){return e.generateExcelReport.emit(l)}),d()()),n&2&&(g(),h("fields",e.tableFields)("items",e.tableItems)("settings",(e.settings==null?null:e.settings.table)||e.defaultSettings.table||null)("isResizable",!0)("showExcelMenu",!1)("isConfigurable",!0)("showResetFilters",!0)("hideConfigPanel",!0)("filterValues",e.filterValues)("sortBy",e.sortBy))},dependencies:[Ie],styles:[".table[_ngcontent-%COMP%]{width:calc(100% - 20px);height:calc(100% - 50px);margin:0 10px}@media screen and (max-width:1279px){.table[_ngcontent-%COMP%]{height:calc(100vh - 140px)}}"],changeDetection:0})}return i})();var Ti=["detailApplication"],wi=["detailReports"],pi=["*","*"],ui=()=>[];function yi(i,f){if(i&1){let t=E();c(0,"div",7)(1,"div",15)(2,"tlp-search",16),b("search",function(e){m(t);let o=s();return _(o.onSearch(e))}),d()()()}if(i&2){let t=s();g(2),h("noExtraButtons",!0)("searchType",t.searchType)("searchString",t.searchFilters.searchLegString||"")("updateOnlyZeroSearchString",!0)("noAdditionalFilters",!0)("noShadow",!0)}}function vi(i,f){if(i&1){let t=E();c(0,"tlp-button",17),b("click",function(){m(t);let e=s();return _(e.onSettingsOpen())}),R(1,"svg-icon-sprite",18),d()}i&2&&h("isIconButton",!0)}function bi(i,f){i&1&&Q(0)}function xi(i,f){if(i&1&&L(0,bi,1,0,"ng-container",19),i&2){s();let t=N(16);h("ngTemplateOutlet",t)}}function Pi(i,f){i&1&&st(0,0,["*ngTemplateOutlet","gutter"])}function Ai(i,f){i&1&&Q(0)}function Ei(i,f){if(i&1){let t=E();c(0,"tlp-content-layout",11),rt(1,20),c(2,"tlp-search",21),b("search",function(e){m(t);let o=s();return _(o.onSearch(e))}),d(),c(3,"div",22)(4,"tlp-cards-list",23),b("clickItem",function(e){m(t);let o=s();return _(o.openDetail(e))})("dblClickItem",function(e){m(t);let o=s();return _(o.dblClick(e))}),d(),L(5,Pi,1,0,"ng-content",19),d(),at(),rt(6,24),L(7,Ai,1,0,"ng-container",19),at(),d()}if(i&2){let t=s(),n=N(14),e=N(18);h("withoutFilters",!0),g(2),h("searchFilters",t.filtersForSearch)("noAdditionalFilters",!t.isForwarder)("isForwarder",t.isForwarder),g(2),h("cards",t.shippingCards)("count",t.total)("label",t.getLabel()||"\u0412\u0441\u0435")("loading",t.isLoading)("packagingTypes",t.packagingTypes||G(13,ui))("tlpLoading",t.isLoading)("noMargin",!0),g(),h("ngTemplateOutlet",e),g(2),h("ngTemplateOutlet",n)}}function Ri(i,f){i&1&&Q(0)}function Fi(i,f){i&1&&st(0,1,["*ngTemplateOutlet","gutter"])}function Ii(i,f){if(i&1){let t=E();c(0,"div",12)(1,"tlp-table-applications",25),b("rowSelected",function(e){m(t);let o=s();return _(o.openDetailByRow(e))})("pageSelected",function(e){m(t);let o=s();return _(o.dblClick(e))})("filterEvent",function(e){m(t);let o=s();return _(o.changeTableFilters.emit(e))})("resetFilters",function(){m(t);let e=s();return _(e.resetFilters.emit())})("sorted",function(e){m(t);let o=s();return _(o.sorted.emit(e))})("generateExcelReport",function(e){m(t);let o=s();return _(o.generateTableReport(e))}),d(),c(2,"div",26),L(3,Ri,1,0,"ng-container",19),d(),L(4,Fi,1,0,"ng-content",19),d()}if(i&2){let t=s(),n=N(14),e=N(18);g(),h("applications",t.applications)("settings",t.settings)("sortBy",t.sortBy)("filters",t.searchFilters)("trailerTypes",t.trailerTypes),g(2),h("ngTemplateOutlet",n),g(),h("ngTemplateOutlet",e)}}function Oi(i,f){i&1&&(c(0,"span"),F(1,"\u041E\u0442\u0447\u0451\u0442\u043E\u0432 \u043D\u0435\u0442. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 \xAB\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043E\u0442\u0447\u0451\u0442\xBB, \u0447\u0442\u043E\u0431\u044B \u0441\u0444\u043E\u0440\u043C\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043D\u043E\u0432\u044B\u0439."),d())}function Li(i,f){if(i&1&&R(0,"tlp-report-notification",38),i&2){let t=f.$implicit;h("report",t)}}function Di(i,f){if(i&1){let t=E();c(0,"tlp-content-block",28)(1,"div",30)(2,"div",31)(3,"div",32)(4,"span",33),F(5,"\u041E\u0442\u0447\u0435\u0442\u044B"),d(),c(6,"button",34),b("click",function(){m(t);let e=s(2);return _(e.generateReport())}),R(7,"img",35),F(8," \u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043E\u0442\u0447\u0451\u0442 "),d()()(),c(9,"div",36)(10,"div",37),x(11,Oi,2,0,"span"),Ot(12,Li,1,1,"tlp-report-notification",38,It),d()()()()}if(i&2){let t=s(2);h("dialog",!0),g(9),h("tlpLoading",t.reportsLoading),g(2),P(t.reports!=null&&t.reports.length?-1:11),g(),Lt(t.reports)}}function Mi(i,f){i&1&&R(0,"tlp-activity-block",29),i&2&&h("sectionNotifications","applicationNotifications")}function Ni(i,f){if(i&1&&(c(0,"div",27),x(1,Di,14,3,"tlp-content-block",28),x(2,Mi,1,1,"tlp-activity-block",29),d()),i&2){let t=s();g(),P(t.sidebarShow==="reports"?1:-1),g(),P(t.sidebarShow==="notifications"?2:-1)}}function Vi(i,f){if(i&1){let t=E();
2c(0,"div",39)(1,"button",40),b("click",function(){m(t);let e=s();return _(e.toggleView(!1))}),c(2,"mat-icon",41),F(3,"list"),d()(),c(4,"button",42),b("click",function(){m(t);let e=s();return _(e.toggleView(!0))}),c(5,"mat-icon",41),F(6,"apps"),d()()()}if(i&2){let t=s();g(),Y("view-toggle__button--active",!t.isTableView),g(3),Y("view-toggle__button--active",t.isTableView)}}function Bi(i,f){if(i&1){let t=E();c(0,"button",50),b("click",function(){m(t);let e=s(3);return _(e.onResetFilters())}),c(1,"div",51),F(2,"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0432\u0441\u0435 \u0444\u0438\u043B\u044C\u0442\u0440\u044B"),d(),c(3,"mat-icon",52),F(4,"block"),d()()}}function ki(i,f){if(i&1){let t=E();c(0,"tlp-paginator",53),b("changePage",function(e){m(t);let o=s(3);return _(o.onChangePage(e))}),d()}if(i&2){let t=s(3);h("totalCount",t.total)("currentPage",t.paginator.currentPage)("itemsPerPage",t.paginator.itemsPerPage)("showText",!0)}}function Ui(i,f){if(i&1&&(c(0,"div",43)(1,"div",44)(2,"div",45)(3,"div",46),F(4),C(5,"whitespace"),d(),x(6,Bi,5,0,"button",47),d(),c(7,"div",48),x(8,ki,1,4,"tlp-paginator",49),d()()()),i&2){let t=s(2);g(4),Mt("\u0412\u0441\u0435\u0433\u043E:\xA0",S(5,3,t.total)),g(2),P(t.showResetFilters?6:-1),g(2),P(t.total>0?8:-1)}}function Gi(i,f){if(i&1&&x(0,Ui,9,5,"div",43),i&2){let t=s();P(t.showResetFilters||t.total>0?0:-1)}}var ci="applications_view",di=(()=>{class i{pageActionButtonsService=T(Ae);reportStoreService=T(J);localStorageService=T(Xt);powerTableActionsService=T(Fe);detailApplicationRef;sortingTypes=Object.keys(q).map(t=>({name:q[t],value:t}));sortedBy=Object.keys(q)[0];detailReports;applications;filters;isApprover;isInitiator;isLoading;listError;needApprove;packagingTypes;paginator;reports;reportsHasNew=!1;reportsLoading=!1;searchFilters;specialRequirements;stats;statusLinks;total;trailerTypes;userRole;userId;changeFilters=new y;changePage=new y;closeDetail=new y;logout=new y;openFullDetail=new y;updateFiltersInUrl=new y;layoutService=T(Ve);sidebarShow=this.layoutService.isSidebarShown.value?"notifications":!1;_statusLinks;shippingCards=[];filtersForSearch={};destroyed$=new bt;constructor(){this.layoutService.isSidebarShown.pipe(Rt(this.destroyed$)).subscribe(t=>{this.pageActionButtonsService.config.next(ft({reportActive:t&&this.sidebarShow==="reports",notificationActive:t&&this.sidebarShow==="notifications"},this.actionButtonCallback.bind(this),_t.applicationNotifications))})}get isForwarder(){return this.userRole===I.FORWARDER}ngOnDestroy(){this.destroyed$.next()}ngOnChanges(t){if(this.sortedBy=this.filters?.sort??Object.keys(q)[0],t.userRole&&this.setViewFromCache(),t.filters){let n=this.filters||{},{status:e}=n,o=B(n,["status"]);this.filtersForSearch=o}typeof t.reportsHasNew?.currentValue=="boolean"&&this.pageActionButtonsService.config.next(ft({reportActive:!1,notificationActive:this.layoutService.isSidebarShown.value},this.actionButtonCallback.bind(this),_t.applicationNotifications)),this.shippingCards=!this.applications||!Array.isArray(this.applications)?[]:this.applications.map(e=>r(r({},e),oi(e,this.trailerTypes||[],this.specialRequirements||[],!!this.needApprove))),(t.stats?.currentValue!==t.stats?.previousValue||t.statusLinks||!t.isInitiator?.firstChange||!t.isApprover?.firstChange)&&(this._statusLinks=this.statusLinks.map(e=>{if(!this.stats)return;if(Ct.isEqual(e.queryParams?.status,[u.SHIPPING,u.DRIVER_ASSIGNED]))return p(r({},e),{totalCount:this.stats.shipping+this.stats.driverAssigned});if(Ct.isEqual(e.queryParams?.status,[u.NEGOTIATING,u.ROUTING,u.ROUTED,u.CREATED,u.VALIDATED,u.PRICED]))return p(r({},e),{totalCount:this.stats.negotiating+this.stats.routing+this.stats.routed+this.stats.validated+this.stats.created+this.stats.priced});let o=["counterOffers"];if(!this.isApprover&&!this.isInitiator&&o.push("approving","revising"),!e.queryParams?.status)return p(r({},e),{totalCount:Object.keys(this.stats).filter(l=>!o.includes(l)).reduce((l,w)=>w!=="__typename"?(this.stats?.[w]||0)+l:l,0)});switch(e.queryParams?.status){case"COUNTER_OFFERS":return p(r({},e),{countOfNew:this.stats.counterOffers});case u.EXPIRED:return p(r({},e),{totalCount:this.stats.expired});case u.NEGOTIATED:return p(r({},e),{totalCount:this.stats.negotiated});case u.SHIPPED:return p(r({},e),{countOfNew:this.stats.shipped});case u.SHIPPED_AND_CONFIRMED:return p(r({},e),{totalCount:this.stats.shippedAndConfirmed});case u.CANCELED:return p(r({},e),{totalCount:this.stats.canceled});case u.CANCELED_FOR_EDITING:return p(r({},e),{countOfNew:this.stats.canceledForEditing});case u.APPROVING:return p(r({},e),{totalCount:this.isApprover?0:this.stats.approving,countOfNew:this.isApprover?this.stats.approving:0});case u.REVISING:return p(r({},e),{totalCount:!this.isApprover&&!this.isForwarder?0:this.stats.revising,countOfNew:this.isApprover||this.isForwarder?0:this.stats.revising});default:return e}}).filter(e=>!!e))}getLabel(){let t=this.filters?.status;return this.filters?.searchString?"\u041D\u0430\u0439\u0434\u0435\u043D\u043E \u0437\u0430\u044F\u0432\u043E\u043A":t&&(t.length===1||t.length===2)?$[t[0]]:"\u0412\u0441\u0435"}actionButtonCallback(t){switch(t.buttonName){case"notify":this.sidebarShow==="notifications"?this.layoutService.toggleSidebar():(this.sidebarShow="notifications",this.layoutService.toggleSidebar(!0));break;case"logout":this.logout.emit();break;case"report":this.sidebarShow==="reports"?this.layoutService.toggleSidebar():(this.sidebarShow="reports",this.layoutService.toggleSidebar(!0),this.reportStoreService.loadReports({paginator:{currentPage:1,itemsPerPage:30}}),this.reportStoreService.setReportsViewed());break}}onSearch(t){this.changeFilters.emit(r(r({},t||{}),this.isTableView?{searchLegString:t?.searchString,searchString:void 0}:{searchLegString:void 0}))}onSortBy(t){this.changeFilters.emit(p(r({},this.filters),{sort:t}))}openDetail(t){this.detailApplicationRef.open(t.id),this.changeFilters.emit(p(r(r({},this.filters),this.paginator),{id:t.id}))}openDetailById(t){this.detailApplicationRef.open(t)}onDetailClose(){this.closeDetail.emit()}onChangePage(t){(t.currentPage!==this.paginator.currentPage||t.itemsPerPage!==this.paginator.itemsPerPage)&&this.changePage.emit(t)}generateReport(){this.detailReports.open()}settings=null;sortBy=null;changeTableFilters=new y;sorted=new y;resetFilters=new y;isTableView=!1;toggleView(t,n){this.localStorageService.setItem(ci+this.userRole,t?"table":"list"),this.sidebarShow=t?!1:"notifications",this.isTableView=!!t,n||this.updateFiltersInUrl.emit(!!t)}openDetailByRow(t){this.detailApplicationRef.open(t),this.changeFilters.emit(p(r(r({},this.filters),this.paginator),{id:t}))}generateTableReport(t){this.reportStoreService.generateReport($t.CUSTOMER_CARGO,t,t.reportType==="all"?this.filters:null)}setViewFromCache(){let t=this.localStorageService.getItem(ci+this.userRole);this.toggleView(t==="table",!0)}searchType=ze.applications;onSettingsOpen(){this.powerTableActionsService.openTableSettings()}get showResetFilters(){return this.isTableView&&!!Object.keys(this.filters||{})?.filter(t=>Yt(t))?.length}onResetFilters(){this.powerTableActionsService.resetFilters()}dblClick(t){this.isForwarder&&this.openFullDetail.emit(t)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=M({type:i,selectors:[["tlp-applications"]],viewQuery:function(n,e){if(n&1&&K(Ti,5)(wi,5),n&2){let o;k(o=U())&&(e.detailApplicationRef=o.first),k(o=U())&&(e.detailReports=o.first)}},inputs:{applications:"applications",filters:"filters",isApprover:"isApprover",isInitiator:"isInitiator",isLoading:"isLoading",listError:"listError",needApprove:"needApprove",packagingTypes:"packagingTypes",paginator:"paginator",reports:"reports",reportsHasNew:"reportsHasNew",reportsLoading:"reportsLoading",searchFilters:"searchFilters",specialRequirements:"specialRequirements",stats:"stats",statusLinks:"statusLinks",total:"total",trailerTypes:"trailerTypes",userRole:"userRole",userId:"userId",settings:"settings",sortBy:"sortBy"},outputs:{changeFilters:"changeFilters",changePage:"changePage",closeDetail:"closeDetail",logout:"logout",openFullDetail:"openFullDetail",updateFiltersInUrl:"updateFiltersInUrl",changeTableFilters:"changeTableFilters",sorted:"sorted",resetFilters:"resetFilters"},standalone:!1,features:[z],ngContentSelectors:pi,decls:19,vars:12,consts:[["detailApplication",""],["detailReports",""],["sidebar",""],["viewChange",""],["gutter",""],[1,"page-heading"],["pageTitle","\u041C\u043E\u0438 \u0437\u0430\u044F\u0432\u043A\u0438",1,"page-heading__tabs",3,"links"],[1,"page-heading__search"],["position","end",1,"page-heading__action"],[1,"page-heading__action-buttons"],["dataTestId","allplicationsListSettingButton",1,"page-heading__settings",3,"isIconButton"],[3,"withoutFilters"],["data-testid","applicationsTableView",1,"wrapper"],[3,"closeEvent"],["type","application",3,"isForwarder"],[1,"page-heading__search__input"],["additionalClass","simple","innerPlaceholder","\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u043D\u043E\u043C\u0435\u0440\u0443 \u0438\u043B\u0438 \u043F\u043B\u0435\u0447\u0443","dataTestId","applicationsListSearchComponent",3,"search","noExtraButtons","searchType","searchString","updateOnlyZeroSearchString","noAdditionalFilters","noShadow"],["dataTestId","allplicationsListSettingButton",1,"page-heading__settings",3,"click","isIconButton"],["src","./assets/sprites/sprite.svg#ic-settings","width","14px","height","14px"],[4,"ngTemplateOutlet"],["contentLayoutMain",""],["dataTestId","applicationListTableViewSearch",3,"search","searchFilters","noAdditionalFilters","isForwarder"],[1,"cards-list__container"],[3,"clickItem","dblClickItem","cards","count","label","loading","packagingTypes","tlpLoading","noMargin"],["contentLayoutSidebar",""],[3,"rowSelected","pageSelected","filterEvent","resetFilters","sorted","generateExcelReport","applications","settings","sortBy","filters","trailerTypes"],[1,"over-sidebar"],["dataTestId","applicationListSidebarContent",1,"sidebar__content"],[3,"dialog"],[3,"sectionNotifications"],["dataTestId","applicationListReportBlock",1,"report"],[1,"report__container"],[1,"report__header"],[1,"report__header-title"],["data-testid","allplicationsListGenerateReport",1,"report__header-button",3,"click"],["src","../../../../assets/images/plus.svg","alt","",1,"report__header-icon"],["dataTestId","applicationListReportBody",1,"report__body",3,"tlpLoading"],[1,"report__body-container"],[3,"report"],[1,"view-toggle"],["tlpTooltip","\u0421\u043F\u0438\u0441\u043E\u043A","data-testid","allplicationsListButtonList",1,"view-toggle__button",3,"click"],[1,"view-toggle__icon"],["tlpTooltip","\u0422\u0430\u0431\u043B\u0438\u0446\u0430","data-testid","allplicationsListButtonTable",1,"view-toggle__button",3,"click"],["data-testid","applicationsGutter",1,"gutter"],[1,"row"],[1,"row-start"],[1,"total-count"],["data-testid","applicationComponentResetFilters",1,"reset-filters"],[1,"paginator"],[3,"totalCount","currentPage","itemsPerPage","showText"],["data-testid","applicationComponentResetFilters",1,"reset-filters",3,"click"],[1,"reset-filters__text"],[1,"reset-filters__icon"],[3,"changePage","totalCount","currentPage","itemsPerPage","showText"]],template:function(n,e){n&1&&(Dt(pi),c(0,"div",5),R(1,"tlp-main-header",6),x(2,yi,3,6,"div",7),c(3,"tlp-page-action-buttons",8)(4,"div",9),x(5,vi,2,1,"tlp-button",10),x(6,xi,1,1,"ng-container"),d()()(),x(7,Ei,8,14,"tlp-content-layout",11),x(8,Ii,5,7,"div",12),c(9,"tlp-detail-drawer-application",13,0),b("
2closeEvent",function(){return e.onDetailClose()}),d(),R(11,"tlp-detail-drawer-reports",14,1),L(13,Ni,3,2,"ng-template",null,2,Z)(15,Vi,7,4,"ng-template",null,3,Z)(17,Gi,1,1,"ng-template",null,4,Z)),n&2&&(g(),Y("page-heading__table-tabs",e.isForwarder)("page-heading__table",e.isTableView),h("links",e.isTableView?G(11,ui):e._statusLinks),g(),P(e.isTableView?2:-1),g(3),P(e.isTableView?5:-1),g(),P(e.isForwarder?6:-1),g(),P(e.isTableView?-1:7),g(),P(e.isTableView?8:-1),g(3),h("isForwarder",e.isForwarder))},dependencies:[Vt,ke,_e,Pe,we,he,Ee,Re,Oe,fe,Ge,ge,We,$e,Xe,ii,ye,li,Ce],styles:["[_nghost-%COMP%]{display:flex;flex-flow:column nowrap;height:100vh;overflow-y:hidden}@media screen and (max-width:1279px){[_nghost-%COMP%]{height:calc(100vh - 72px)}}[_nghost-%COMP%]     tlp-content-layout{display:flex;height:100%;overflow-y:hidden}[_nghost-%COMP%]     tlp-content-layout .container{display:flex;flex:1;overflow-y:hidden}.wrapper[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden}.cards-list__banner[_ngcontent-%COMP%]:not(:empty){margin-bottom:24px;padding:0 10px}.loading[_ngcontent-%COMP%]{min-width:100%;min-height:20vh}.page-heading[_ngcontent-%COMP%]{display:flex;flex:0 0 68px;align-items:center;justify-content:space-between;height:68px;margin:0 16px}@media screen and (min-width:1280px){.page-heading__tabs[_ngcontent-%COMP%]{max-width:calc(100% - 300px)}.page-heading__forwarder-tabs[_ngcontent-%COMP%]{max-width:calc(100% - 388px)}}@media screen and (max-width:1279px){.page-heading__action-buttons[_ngcontent-%COMP%]{display:none}.page-heading__tabs[_ngcontent-%COMP%]{max-width:100%;overflow:hidden}}.page-heading__tabs[_ngcontent-%COMP%]{height:100%}@media screen and (max-width:1279px){.page-heading__action[_ngcontent-%COMP%]{display:none}}.page-heading__table[_ngcontent-%COMP%]{width:84px}.page-heading__table-tabs[_ngcontent-%COMP%]{max-width:calc(100% - 406px)}@media screen and (max-width:1279px){.page-heading__table-tabs[_ngcontent-%COMP%]{max-width:inherit}}.page-heading__action-buttons[_ngcontent-%COMP%]{display:flex;flex-flow:row nowrap;align-items:flex-start;justify-content:flex-start}.page-heading__search[_ngcontent-%COMP%]{width:calc(100% - 406px)}.page-heading__search__input[_ngcontent-%COMP%]{width:277px}.page-heading__settings[_ngcontent-%COMP%]{display:flex;flex-flow:row nowrap;align-items:flex-start;justify-content:flex-start;margin-right:16px;cursor:pointer}.page-heading__settings[_ngcontent-%COMP%]:hover, .page-heading__settings[_ngcontent-%COMP%]:active{color:#615f59}.report[_ngcontent-%COMP%]{display:grid;grid-template-rows:auto 1fr}@media screen and (min-width:640px){.report[_ngcontent-%COMP%]{height:100%;max-height:79vh}}@media screen and (min-width:640px)and (max-width:1279px){.report[_ngcontent-%COMP%]{height:calc(100vh - 90px)}}.report__container[_ngcontent-%COMP%]{padding:16px}.report__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.report__header-title[_ngcontent-%COMP%]{color:#000;font-weight:700;font-size:13px}.report__header-button[_ngcontent-%COMP%]{display:flex;align-items:center;color:#a19f99;font-weight:700;font-size:13px;background:none;border:unset;outline:none;cursor:pointer}.report__header-icon[_ngcontent-%COMP%]{width:8px;height:8px;margin-right:12px}.report__body[_ngcontent-%COMP%]::-webkit-scrollbar{width:3px;height:3px}.report__body[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.report__body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#e30513;border-radius:2px}.report__body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{width:8px;background:#b1040f;border-radius:4px}.report__body[_ngcontent-%COMP%]{overflow-y:auto;border-top:1px solid #f5f4f2;border-bottom:1px solid #f5f4f2}.report__body-container[_ngcontent-%COMP%]{padding:15px 16px;color:#a19f99;font-weight:400;font-size:11px;text-align:center}@media screen and (max-width:1279px){.report__body-container[_ngcontent-%COMP%]{max-height:calc(100vh - 125px)}}.view-toggle[_ngcontent-%COMP%]{display:flex;flex-flow:row nowrap;align-items:center;justify-content:flex-start;box-sizing:border-box;width:86px;height:40px;overflow:hidden;border:2px solid #e0deda;border-radius:10px}@media screen and (max-width:1279px){.view-toggle[_ngcontent-%COMP%]{display:none}}.view-toggle__button[_ngcontent-%COMP%]{display:flex;flex-flow:row nowrap;align-items:center;justify-content:center;width:50%;height:100%;padding:0;color:#a19f99;background-color:#f5f4f2;border:0;cursor:pointer;-webkit-user-select:none;user-select:none}.view-toggle__button[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{width:20px;height:20px;font-size:20px}.view-toggle__button[_ngcontent-%COMP%]:hover{color:#89867e}.view-toggle__button[_ngcontent-%COMP%]:active{background:#eae8e4}.view-toggle__button--active[_ngcontent-%COMP%]{color:#706f67;background:#e0deda}.view-toggle__button--active[_ngcontent-%COMP%]:hover{color:#55554f}.view-toggle__button--active[_ngcontent-%COMP%]:active{background:#c9c5be}.view-toggle__button[_ngcontent-%COMP%]:nth-child(1){border-right:1px solid #e0deda}.view-toggle__button[_ngcontent-%COMP%]:nth-child(2){border-left:1px solid #e0deda}.over-sidebar[_ngcontent-%COMP%]{position:absolute;top:73px;right:16px;z-index:10;width:292px;border-radius:10px;box-shadow:0 6px 16px #aba7954d}@media screen and (min-width:640px){.over-sidebar[_ngcontent-%COMP%]   .sidebar__content[_ngcontent-%COMP%]{height:100%;max-height:79vh;overflow:hidden}}.reset-filters[_ngcontent-%COMP%]{display:flex;flex-flow:row nowrap;align-items:center;justify-content:flex-start;margin-left:16px;color:#a19f99;font-weight:700;background:transparent;border:0;cursor:pointer}.reset-filters__icon[_ngcontent-%COMP%]{width:16px;height:16px;margin-left:8px;font-size:16px}.reset-filters[_ngcontent-%COMP%]:hover, .reset-filters[_ngcontent-%COMP%]:active{color:#615f59}"],changeDetection:0})}return i})();
2var St=vt(Jt());var $i=["view"],ji=()=>[];function Hi(i,f){if(i&1){let t=E();c(0,"tlp-applications",2,0),C(2,"async"),C(3,"async"),C(4,"async"),C(5,"async"),C(6,"async"),C(7,"async"),C(8,"async"),C(9,"async"),C(10,"async"),C(11,"async"),C(12,"async"),C(13,"async"),C(14,"async"),C(15,"async"),C(16,"async"),C(17,"async"),C(18,"async"),C(19,"async"),C(20,"async"),b("changeFilters",function(e){m(t);let o=s();return _(o.onChangeFilters(e))})("changePage",function(e){m(t);let o=s();return _(o.onChangePage(e))})("changeTableFilters",function(e){m(t);let o=s();return _(o.onChangeTableFilters(e))})("closeDetail",function(){m(t);let e=s();return _(e.onDetailClose())})("logout",function(){m(t);let e=s();return _(e.onLogout())})("openFullDetail",function(e){m(t);let o=s();return _(o.navigateToFullDetail(e))})("resetFilters",function(){m(t);let e=s();return _(e.resetFilters())})("sorted",function(e){m(t);let o=s();return _(o.sortTable(e))})("updateFiltersInUrl",function(e){m(t);let o=s();return _(o.updateFiltersInUrl(e))}),d()}if(i&2){let t=s();h("applications",S(2,22,t.applicationsStoreService.applications$)||G(60,ji))("filters",S(3,24,t.applicationsStoreService.filters$))("isApprover",S(4,26,t.userStoreService.isApprover$))("isInitiator",S(5,28,t.requestEssentialsStoreService.isInitiator$))("isLoading",S(6,30,t.applicationsStoreService.isListLoading$))("listError",S(7,32,t.applicationsStoreService.listError$))("needApprove",S(8,34,t.userStoreService.needApprove$))("packagingTypes",S(9,36,t.applicationsStoreService.packagingTypes$))("paginator",S(10,38,t.applicationsStoreService.paginator$))("reportsHasNew",S(11,40,t.reportStoreService.reportsHasNew$))("reportsLoading",S(12,42,t.reportStoreService.reportsLoading$))("reports",S(13,44,t.reportStoreService.reports$))("searchFilters",t.searchFilters)("settings",S(14,46,t.settings$))("sortBy",t.sortBy)("specialRequirements",S(15,48,t.applicationsStoreService.specialRequirements$))("stats",S(16,50,t.applicationsStoreService.applicationStats$))("statusLinks",t.statusLinks)("total",S(17,52,t.applicationsStoreService.total$))("trailerTypes",S(18,54,t.applicationsStoreService.trailerTypes$))("userRole",S(19,56,t.userStoreService.role$))("userId",S(20,58,t.userStoreService.userId$))}}var zi=3e4,gi=(()=>{class i{cdr=T(Nt);logoutStoreService=T(le);router=T(oe);route=T(ie);applicationsStoreService=T(se);organizationStoreService=T(pe);reportStoreService=T(J);userStoreService=T(de);backofficeSettingsStoreService=T(it);requestEssentialsStoreService=T(ue);viewRef;allStatusFilter=ct;isFirstLoaded=!1;isForwarder=!1;lastFilters=null;lastPaginator=null;lastSort=void 0;queryParamsCache={};destroyRef=T(Ft);searchFilters={};statusLinks=[];childActive$;constructor(){this.childActive$=this.router.events.pipe(Et(()=>xt(this.route.children.length>0))),this.setFourEyesPresets(),this.userStoreService.role$.pipe(D(this.destroyRef)).subscribe(t=>this.isForwarder=t===I.FORWARDER)}ngOnInit(){this.applicationsStoreService.getApplicationGuides(),this.applicationsStoreService.loadApplicationStats(),this.setStatusTabLinks(),this.setFourEyesPresets(),Pt(zi).pipe(D(this.destroyRef)).subscribe(()=>{this.applicationsStoreService.loadApplicationStats()}),this.initTableView(),this.lastPaginator=p(r({},this.lastPaginator||lt),{currentPage:1})}ngAfterViewInit(){this.route.url.pipe(D(this.destroyRef)).subscribe(()=>{this.cdr.markForCheck()}),this.route.queryParams.pipe(D(this.destroyRef)).subscribe(t=>{let Tt=t,{id:n=null}=Tt,e=B(Tt,["id"]),wt=e,{currentPage:o,itemsPerPage:l,direction:w,field:O}=wt,v=B(wt,["currentPage","itemsPerPage","direction","field"]);this.searchFilters=r({},v);let{status:A}=e;if(A==="ALL"){this.router.navigate([],{queryParams:{tab:"ALL"}}).then();return}delete v.status,n&&this.viewRef?.openDetailById(n);let V=w&&O?{direction:w,field:O}:void 0;if(this.sortBy=V?{id:V.field,type:V.direction}:null,!this.isFirstLoaded||!St.isEqual(e,this.queryParamsCache)){let yt=this.route.snapshot.queryParams;(!Object.keys(yt).filter(_i=>["tab","status"].includes(_i)).length||A==="ALL")&&this.router.navigate([],{queryParams:p(r({},yt),{tab:"ALL"})}),this.queryParamsCache=e,typeof A=="string"&&!["COUNTER_OFFERS"].includes(A)&&(A=[A]),this.lastPaginator={currentPage:Number(o)||1,itemsPerPage:Number(l)||te[0]},this.lastFilters=p(r({},v),{status:["COUNTER_OFFERS"].includes(A)?this.allStatusFilter:A}),this.lastSort=V,this.applicationsStoreService.loadApplications(this.lastPaginator,this.lastFilters,V,this.isForwarder),this.isFirstLoaded=!0}})}ngOnDestroy(){this.applicationsStoreService.resetApplications()}setStatusTabLinks(t){let n=e=>e===u.SHIPPING?[e,u.DRIVER_ASSIGNED]:e===u.NEGOTIATING?[e,u.ROUTING,u.ROUTED,u.CREATED,u.VALIDATED,u.PRICED]:e;ot([this.organizationStoreService.isExternalCustomer$,this.organizationStoreService.isOrderEditingEnabled$,this.requestEssentialsStoreService.isInitiator$]).pipe(D(this.destroyRef)).subscribe(([e,o,l])=>{this.statusLinks=Object.keys($).filter(w=>(t||!ut[w])&&(e||w!=="COUNTER_OFFERS")&&(o&&!l||w!=="CANCELED_FOR_EDITING")).map(w=>{let O={};return w=="ALL"?O={tab:"ALL"}:O=w==="COUNTER_OFFERS"?{status:n("COUNTER_OFFERS"),isActiveCounterOffer:"true"}:{status:n(w)},{title:$[w],meta:w.toLowerCase(),href:"/applications",queryParams:O,countOfNew:0}})})}onDetailClose(){this.navigate(this.queryParamsCache,"")}navigate(t,n="merge"){this.router.navigate(["/",dt.applications],{queryParams:t,queryParamsHandling:n}).then()}onChangePage(t){this.navigate({currentPage:t.currentPage,itemsPerPage:t.itemsPerPage})}onChangeFilters(t){Object.keys(t).forEach(n=>{let e=n;(t[e]===void 0||t[e]===null)&&delete t[e]}),St.isEqual(t,this.searchFilters)||this.navigate(p(r({}
2,t),{status:this.route.snapshot.queryParams.status}),"")}onLogout(){this.logoutStoreService.logout()}setFourEyesPresets(){this.organizationStoreService.load(),ot([this.organizationStoreService.organization$]).pipe(D(this.destroyRef),At(t=>t&&!!t[0])).subscribe(([t])=>{(t?.isOrderControl||t?.type===ee.FORWARDER)&&(this.allStatusFilter=[...ct,...Object.keys(ut)],this.setStatusTabLinks(!0),this.queryParamsCache?.status||this.updateAllApplications())})}updateAllApplications(){!this.lastPaginator||!this.lastFilters||this.applicationsStoreService.loadApplications(this.lastPaginator,p(r({},this.lastFilters),{status:this.allStatusFilter}),this.lastSort,this.isForwarder)}navigateToFullDetail(t){this.router.navigate(["/",dt.applications,t,"common"],{queryParams:{backUrl:this.router.url}}).then()}settings$;sortBy=null;initTableView(){this.backofficeSettingsStoreService.loadSettings(),this.settings$=this.backofficeSettingsStoreService.getSettings$(et.APPLICATION_LIST)}sortTable(t){this.router.navigate([],{queryParams:p(r(r({},this.lastPaginator),this.lastFilters),{field:t?.id,direction:t?.type})}).then()}onChangeTableFilters(t){if(!t)return;this.lastPaginator=p(r({},this.lastPaginator||lt),{currentPage:1});let n=r({},this.lastFilters),{query:e,fieldName:o,type:l}=t;e&&o&&(n=r(p(r({},n),{[o]:e}),l!==qt.RANGE_INCLUDES&&{[`${o}Type`]:l})),!e&&o&&n&&(delete n[o],delete n[`${o}Type`]),this.router.navigate([],{queryParams:r(r(r({},this.lastPaginator),this.lastSort),n)}).then()}resetFilters(){this.router.navigate([]).then()}updateFiltersInUrl(t){let n=Zt(si,this.route.snapshot.queryParams,t);this.router.navigate([],{queryParams:n}).then()}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=M({type:i,selectors:[["tlp-applications-controller"]],viewQuery:function(n,e){if(n&1&&K($i,5),n&2){let o;k(o=U())&&(e.viewRef=o.first)}},standalone:!1,decls:3,vars:3,consts:[["view",""],[3,"applications","filters","isApprover","isInitiator","isLoading","listError","needApprove","packagingTypes","paginator","reportsHasNew","reportsLoading","reports","searchFilters","settings","sortBy","specialRequirements","stats","statusLinks","total","trailerTypes","userRole","userId"],[3,"changeFilters","changePage","changeTableFilters","closeDetail","logout","openFullDetail","resetFilters","sorted","updateFiltersInUrl","applications","filters","isApprover","isInitiator","isLoading","listError","needApprove","packagingTypes","paginator","reportsHasNew","reportsLoading","reports","searchFilters","settings","sortBy","specialRequirements","stats","statusLinks","total","trailerTypes","userRole","userId"]],template:function(n,e){n&1&&(x(0,Hi,21,61,"tlp-applications",1),C(1,"async"),R(2,"router-outlet")),n&2&&P(S(1,1,e.childActive$)?-1:0)},dependencies:[ne,di,Bt],encapsulation:2,changeDetection:0})}return i})();var Wi=[{path:"",component:gi,canActivate:[tt],data:{roles:[I.CUSTOMER,I.FORWARDER]},children:[{path:":id",component:ht,canActivate:[tt],data:{roles:[I.FORWARDER]}},{path:":id/:tab",component:ht,canActivate:[He,tt],data:{roles:[I.FORWARDER]}}]}],mi=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=W({type:i});static \u0275inj=H({imports:[gt.forChild(Wi),gt]})}return i})();var gr=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=W({type:i});static \u0275inj=H({providers:[kt],imports:[Ut,mi,Ne,Be,Ue,qe,De,me,Qe,je,ei,ti,ni,Se,ve,Je,Le,Me]})}return i})();export{gr as ApplicationsModule};

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.