PageSourceSearch

https://portal.kis.no/_next/static/chunks/9548.4fd3a013e1371620.js

js kis.no collected 2026-10-08 01:30:46 UTC 9,551 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="eb20c257-bc9a-4bc8-a08e-2b1505f66d9b",e._sentryDebugIdIdentifier="sentry-dbid-eb20c257-bc9a-4bc8-a08e-2b1505f66d9b")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9548],{9548:function(e,t,a){"use strict";a.r(t),a.d(t,{EquipmentUseApprovalChart:function(){return w}});var n=a(48282),s=a(27432),l=a.n(s),i=a(33624),o=a(76924),r=a(18529),u=a(38461),d=a(45685),c=a(21468),p=a(90227),_=a(35901),m=a(97387);async function h(e,t){return await m.Z.post("/customer/equipment/use-approval-stats",JSON.stringify(t),null==e?void 0:e.access_token)}var b=a(18670),v=a(29826),g=a(63415),y=a(15823),f=a(87253),x=a(63547),C=a(91005),j=a(32542),k=a(29143);let E={0:"#6b6a6a",1:"#6b6a6a",2:"#6b6a6a",3:"#75a938",4:"#75a938",5:"#75a938",6:"#faa21b",7:"#f44336"},q={0:"#6b6a6a",1:"#6b6a6a",2:"#3d3d3d",3:"#75a938",4:"#4b0092",5:"#75a938",6:"#0c7bdc",7:"#4b0092"},w=e=>{var t,a;let{editMode:s,name:C,settingData:w,onDataUpdated:F=()=>{},onNameUpdated:N=()=>{},onItemDeleted:A=()=>{},onMoveLeft:S=()=>{},onMoveRight:U=()=>{}}=e,{t:D,lang:R}=(0,o.Z)("common"),{status:T,data:z}=(0,d.useSession)(),{hierarchyContext:I}=(0,_.w)(),[V,L]=(0,r.useState)(),[Z,O]=(0,r.useState)(!1),B=(0,p.useRouter)(),[P,J]=(0,r.useState)(null!==(t=null==w?void 0:w.equipmentType)&&void 0!==t?t:null),[K,Q]=(0,r.useState)(null!==(a=null==w?void 0:w.equipmentResponsible)&&void 0!==a?a:j.F_.eitherResponsible),[X]=(0,v.O)(),[Y,H]=(0,r.useState)(null!=C?C:D("useApproval")),[G,W]=(0,r.useState)(!1),$=(0,r.useMemo)(()=>(0,y.t)("/customer/equipment-type/dx-search","id",R,(0,u.z)(T,z),null,m.Z,"/customer/equipment-type"),[T,z]),ee=(0,r.useCallback)(async()=>{let e={equipmentTypeId:P,includeCustomerManagedEquipment:K===j.F_.eitherResponsible||K===j.F_.customerResponsible,includeKisManagedEquipment:K===j.F_.eitherResponsible||K===j.F_.kisResponsible};var t=await h((0,u.z)(T,z),e);t.success&&(L(t.content),O(!0))},[T,z,P,K]);(0,r.useEffect)(()=>{"authenticated"===T&&ee()}
1,[T,z,P,K,I]),(0,r.useEffect)(()=>{var e,t;w&&(J(null!==(e=null==w?void 0:w.equipmentType)&&void 0!==e?e:null),Q(null!==(t=null==w?void 0:w.equipmentResponsible)&&void 0!==t?t:j.F_.kisResponsible))},[w]);let et=(0,r.useMemo)(()=>C||D("useApproval"),[C]),ea=(0,r.useMemo)(()=>({store:$,paginate:!0,sort:[{selector:"name",desc:!1}]}),[$]),en=(0,r.useMemo)(()=>({store:{type:"array",data:Object.keys(j.F_).map(e=>({id:j.F_[e],text:D(e)})),key:"id"}}),[D]),es=(0,r.useMemo)(()=>!!P||K!==j.F_.eitherResponsible,[P,K]),el=(0,r.useCallback)(e=>e.pointName?(0,c.le)(e.pointName,D):"",[D]),ei=(0,r.useCallback)(e=>X?{color:q[e.argument]}:{color:E[e.argument]},[X]),eo=(0,r.useCallback)(async e=>{let t=e.target;var a={columns:[{visibleIndex:1,dataField:"useApproval",width:235,visible:!0}],filterValue:[["isActive","=",!0],"and",["useApproval","=","object"==typeof t?t.argument:t]]};if(a&&K!==j.F_.eitherResponsible&&(a.filterValue.push("and"),a.filterValue.push(["isManagedByCustomer","=",K===j.F_.customerResponsible])),a&&P){let e=await (0,k.F)((0,u.z)(T,z),P);a.filterValue.push("and"),a.filterValue.push(["equipmentType","=",null==e?void 0:e.name])}a&&B.push("/equipment?intiState=".concat(encodeURIComponent(JSON.stringify(a))))},[K,P,T,z]),er=(0,r.useCallback)(e=>{J(e.value)},[]),eu=(0,r.useCallback)(e=>{Q(e.value)},[]);return(0,n.jsxs)(g.B,{span:1,editMode:s,componentName:Y,settingData:w,onMoveLeft:S,onMoveRight:U,onItemDeleted:A,handleNameChange:e=>{e.value&&(H(e.value),N(e.value))},onDataUpdated:F,TileSettingManager:M,children:[!s&&(0,n.jsxs)("div",{className:l().toolbar,children:[G?(0,n.jsxs)("span",{className:l().options_container,children:[(0,n.jsx)(f.jL,{dataSource:ea,value:P,onValueChanged:er,stylingMode:"outlined",label:D("equipmentType"),labelMode:"floating",height:28,width:"80%",showClearButton:!0,searchEnabled:!0,searchExpr:"name",displayExpr:"name",valueExpr:"id"}),(0,n.jsx)(f.jL,{dataSource:en,value:K,onValueChanged:eu,stylingMode:"outlined",label:D("responsible"),labelMode:"floating",height:28,width:"80%",displayExpr:"text",valueExpr:"id"})]}):(0,n.jsx)("span",{}),(0,n.jsx)(x.z,{icon:b.U.getFaIcon("gear"),type:es?"default":void 0,onClick:()=>W(e=>!e)}),es&&(0,n.jsx)("span",{className:l().filter_counter,children:b.U.getFaIconEmbedded("exclamation")})]}),Z&&V.length<=0&&(0,n.jsxs)("div",{className:l().empty_data,children:[(0,n.jsx)("div",{className:l().heading,children:D("useApproval")}),(0,n.jsxs)("div",{className:l().message,children:[(0,n.jsx)("div",{className:l().icon,children:b.U.getFaIconEmbedded(["far","face-frown-slight"])}),(0,n.jsx)("div",{className:l().text,children:D("noData")})]})]}),Z&&V.length>0&&(0,n.jsxs)(i.ZP,{id:"useApprovalStatusChart",dataSource:V,title:et,customizePoint:ei,resolveLabelOverlapping:"shift",onPointClick:eo,onLegendClick:eo,height:"95%",children:[(0,n.jsx)(i.FH,{argumentField:"useApproval",valueField:"count",children:(0,n.jsx)(i.__,{visible:!0,children:(0,n.jsx)(i.wR,{visible:!0,width:1})})}),(0,n.jsx)(i.De,{customizeText:el,horizontalAlignment:"center",columnCount:7,verticalAlignment:"bottom"}),(0,n.jsx)(i.D7,{enabled:!0})]})]})},M=e=>{var t;let{settingData:a,onDataUpdated:s=()=>{},closeTileManager:i=()=>{}}=e,{t:c,lang:p}=(0,o.Z)("common"),{status:_,data:h}=(0,d.useSession)(),[b,v]=(0,r.useState)(null==a?void 0:a.equipmentType),[g,k]=(0,r.useState)(null!==(t=null==a?void 0:a.equipmentResponsible)&&void 0!==t?t:j.F_.eitherResponsible),E=(0,r.useMemo)(()=>(0,y.t)("/customer/equipment-type/dx-search","id",p,(0,u.z)(_,h),null,m.Z,"/customer/equipment-type"),[_,h]),q=(0,r.useMemo)(()=>({store:E,paginate:!0,sort:[{selector:"name",desc:!1}]}),[E]),w=(0,r.useMemo)(()=>({store:{type:"array",data:Object.keys(j.F_).map(e=>({id:j.F_[e],text:c(e)})),key:"id"}}),[c]),M=(0,r.useCallback)(e=>{v(e.value)},[]),F=(0,r.useCallback)(e=>{k(e.value)},[]),N=(0,r.useCallback)(()=>{s({equipmentType:b,equipmentResponsible:g}),i()},[b,g]);return(0,n.jsxs)("div",{className:l().tile_setting_Manager,children:[(0,n.jsx)(C.D,{title:c("settings")}),(0,n.jsx)(f.jL,{dataSource:q,value:b,onValueChanged:M,stylingMode:"outlined",label:c("equipmentType"),labelMode:"floating",he
1ight:28,width:"100%",showClearButton:!0,searchEnabled:!0,searchExpr:"name",displayExpr:"name",valueExpr:"id"}),(0,n.jsx)(f.jL,{dataSource:w,value:g,onValueChanged:F,stylingMode:"outlined",label:c("responsible"),labelMode:"floating",height:28,width:"100%",displayExpr:"text",valueExpr:"id"}),(0,n.jsxs)("div",{className:l().button_wrapper,children:[(0,n.jsx)(x.z,{icon:"check",type:"success",text:c("select"),onClick:N}),(0,n.jsx)(x.z,{icon:"close",type:"danger",text:c("cancel"),onClick:i})]})]})}},63415:function(e,t,a){"use strict";a.d(t,{B:function(){return c}});var n=a(48282),s=a(18529),l=a(47861),i=a.n(l),o=a(79034),r=a(63547),u=a(76924),d=a(18670);let c=e=>{let{children:t,span:a,editMode:l,componentName:c,settingData:p,onMoveLeft:_=()=>{},onMoveRight:m=()=>{},onItemDeleted:h=()=>{},handleNameChange:b=()=>{},onDataUpdated:v=()=>{},TileSettingManager:g}=e,{t:y}=(0,u.Z)("common"),[f,x]=(0,s.useState)(!1);(0,s.useEffect)(()=>{!l&&f&&x(!1)},[l]);let C=(0,s.useMemo)(()=>{switch(a){case 1:default:return i().tile_layout_span_1;case 2:return i().tile_layout_span_2}},[a]);return(0,n.jsxs)("div",{className:C,children:[l&&(0,n.jsxs)("div",{className:i().edit_mode_bar,children:[(0,n.jsx)(o.zC,{value:c,stylingMode:"outlined",labelMode:"floating",label:y("name"),width:"70%",height:28,onValueChanged:b}),(0,n.jsxs)("div",{className:i().button_wrapper,children:[!!g&&(0,n.jsx)(r.z,{type:"default",icon:d.U.getFaIcon("gear"),onClick:()=>x(!f)}),(0,n.jsx)(r.z,{type:"default",icon:"arrowleft",onClick:_}),(0,n.jsx)(r.z,{type:"default",icon:"arrowright",onClick:m}),(0,n.jsx)(r.z,{type:"danger",icon:"trash",onClick:h})]})]}),f?(0,n.jsx)(g,{settingData:p,onDataUpdated:v,closeTileManager:()=>x(!1)}):t]})}},91005:function(e,t,a){"use strict";a.d(t,{D:function(){return i}});var n=a(48282),s=a(73362),l=a.n(s);let i=e=>{let{title:t}=e;return(0,n.jsx)("div",{className:l().dashboard_tile_title,children:(0,n.jsx)("h2",{children:t})})}},29143:function(e,t,a){"use strict";a.d(t,{F:function(){return s}});var n=a(97387);async function s(e,t,a){return(await n.Z.get("/customer/equipment-type/".concat(t).concat(a?"/trash":""),null==e?void 0:e.access_token)).content}},27432:function(e){e.exports={toolbar:"EquipmentUseApprovalChart_toolbar__4hoF3",options_container:"EquipmentUseApprovalChart_options_container__wjxPY",filter_counter:"EquipmentUseApprovalChart_filter_counter__46MS4",empty_data:"EquipmentUseApprovalChart_empty_data___ysul",heading:"EquipmentUseApprovalChart_heading__X7t45",message:"EquipmentUseApprovalChart_message__ckN8K",icon:"EquipmentUseApprovalChart_icon__UDVsr",edit_mode_bar:"EquipmentUseApprovalChart_edit_mode_bar__7QFt4",button_wrapper:"EquipmentUseApprovalChart_button_wrapper__XQffk",loading_container:"EquipmentUseApprovalChart_loading_container__R5Tq1",tile_setting_Manager:"EquipmentUseApprovalChart_tile_setting_Manager__UboV5"}},47861:function(e){e.exports={tile_layout_span_1:"DashboardTileLayout_tile_layout_span_1__0iEO0",tile_layout_span_2:"DashboardTileLayout_tile_layout_span_2__dsYF2",edit_mode_bar:"DashboardTileLayout_edit_mode_bar__woZun",button_wrapper:"DashboardTileLayout_button_wrapper__U7F3_"}},73362:function(e){e.exports={dashboard_tile_title:"DashboardTileTitle_dashboard_tile_title__y0hkh"}}}]);

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.