PageSourceSearch

https://www.systemair.com/_next/static/chunks/6144.2eb189811901c033.js

js systemair.com collected 2026-10-02 02:58:35 UTC 8,254 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6144],{26769:(e,t,s)=>{s.d(t,{A:()=>c});var a=s(95155),r=s(49820),l=s(12115),n=s(50424),i=s(84456),o=s(62921),d=s(35208);let c=({env:e,setEnv:t,setLocales:s,setIsMockAPI:c,setReadLocaleFromStorage:m,replaceQueryParam:u,displayAllOption:p=!1,onChange:x})=>{let h=(0,l.useMemo)(()=>(0,i.Sy)(n.bH),[]);return(0,a.jsxs)(o.A,{size:d.x0Q.SMALL,value:e,onChange:e=>{let a,r;return x?x(e):(r="develop.systemair.com/api/mock/shop"===(a=p?e.target.value:e.target.value.trim()||n.rJ)||"www.systemair.com/api/mock/shop"===a,void(c&&c(r),t&&t(a),u&&u("env",a),!p&&(0,i.Xb)("selectedEnv",a),s&&s(void 0),m&&m(!0)))},children:[p&&(0,a.jsx)("option",{value:"all",children:"All"}),(0,r.A)(h,e=>{let t="develop.systemair.com"===e.value||"www.systemair.com"===e.value;return(0,a.jsxs)("option",{value:e.value,children:[t?"Mock ":"",e.value]},e.value)})]})}},53423:(e,t,s)=>{s.d(t,{_U:()=>d,h1:()=>c,ix:()=>u,yK:()=>m});var a=s(29097),r=s(12115),l=s(35208),n=s(83908),i=s(58323),o=s(67763);function d(e="",t=l.RHJ){if(e instanceof Date)return a.c9.fromJSDate(e);let s=a.c9.fromISO(e);return s.invalidExplanation?a.c9.fromFormat(e||"",t):s}function c(e=""){let[t,s]=(0,r.useState)(d(e));return(0,r.useEffect)(()=>{s(d(e))},[e]),t}function m(e=""){let t=a.c9.now(),s=c(e),r=(0,i.B)("Yesterday"),l=(0,i.B)("Today"),n=(0,i.B)("Tomorrow"),o=t.hasSame(s,"year"),d=u(e,{day:"2-digit",month:"long"}),p=u(e,a.c9.DATE_FULL);return t.minus({days:1}).hasSame(s,"day")?r:t.hasSame(s,"day")?l:t.plus({days:1}).hasSame(s,"day")?n:o?d:p}function u(e="",t=a.c9.DATE_FULL){let s=(0,n.G)(o.JV),r=c(e);return r?r.toLocaleString(t,{locale:s}):"N/A"}},56894:(e,t,s)=>{s.d(t,{A:()=>o});var a=s(95155),r=s(69730),l=s.n(r),n=s(5772),i=s(22704);let o=({fitHeight:e=!1})=>{let t=(0,i.uJ)("brandmark","brand","svg","systemair");return(0,a.jsx)("div",{className:l()("flex justify-center items-center my-auto",{"h-screen-3/4":!e}),children:(0,a.jsx)(n.default,{src:t,alt:"Loading Spinner",width:30,height:30,className:"animate-spin"})})}},66144:(e,t,s)=>{s.r(t),s.d(t,{default:()=>N});var a=s(95155),r=s(99764),l=s(9969),n=s(17302),i=s.n(n),o=s(69730),d=s.n(o),c=s(49820),m=s(12115),u=s(92674),p=s(26769),x=s(56894),h=s(10863),f=s(35208);let y=({message:e,type:t=f.pOz.INFO,timeout:s=3e3})=>{let[r,n]=(0,m.useState)(!1),i=t===f.pOz.SUCCESS?h.SG:t===f.pOz.INFO?h.iW:h.JA;return(0,m.useEffect)(()=>{n(!0);let e=setTimeout(()=>{n(!1)},s);return()=>{clearTimeout(e)}},[e,s]),(0,a.jsxs)("div",{className:d()("w-fit fixed top-10 left-1/2 transform -translate-x-1/2","p-200 rounded-2 flex items-center gap-100 transition-opacity z-20",{"opacity-100":r,"opacity-0":!r,"text-white":t!==f.pOz.WARNING,"bg-info-400":t===f.pOz.INFO,"bg-success-400":t===f.pOz.SUCCESS,"bg-warning-400":t===f.pOz.WARNING,"bg-danger-400":t===f.pOz.DANGER}),children:[(0,a.jsx)(l.g,{icon:i,className:"text-fixed-sm shrink-0"}),(0,a.jsx)("span",{className:"text-style-label-small",children:e}),(0,a.jsx)("button",{onClick:()=>{n(!1)},className:"shrink-0 flex ml-200",children:(0,a.jsx)(l.g,{icon:h.Jy,className:"text-fixed-sm"})})]})};var v=s(24402),b=s(69660),j=s(84456),g=s(74276),S=s(37549);let N=()=>{let{queryParams:e}=(0,b.A)(),t=(0,g.yn)(),s=(0,j.bl)(e,"env",""),n=window.localStorage.getItem("selectedEnv"),[o,h]=(0,m.useState)((0,j.fe)(s||n,"env")),[N,E]=(0,m.useState)(),[A,w]=(0,m.useState)(!1),[C,k]=(0,m.useState)(!1),[O,z]=(0,m.useState)(),[L,F]=(0,m.useState)(),[I,U]=(0,m.useState)([]),{data:_,isLoading:D,isError:J,error:M,refetch:R}=(0,v.m0)(o),{data:T,isLoading:G,refetch:P}=(0,v.v)(o,N),{data:$,isLoading:H,isError:q,error:B,refetch:Q}=(0,v.xY)(o,N),W=J?M?.message:q?B?.message:void 0;(0,m.useEffect)(()=>{o&&R()},[o,R]),(0,m.useEffect)(()=>{N&&O&&("promote"===O?P():Q())},[N,O,P,Q]),(0,m.useEffect)(()=>{_&&U(_)},[_]),(0,m.useEffect)(()=>{s&&o===s||t("env",(0,j.fe)(o!==s&&s?o:s,"env"))},[s,o,t]),(0,m.useEffect)(()=>{n&&n===o||((0,j.Xb)("selectedEnv",o),h(o))},[o,n,h]),(0,m.useEffect)(()=>{if(s&&o!==s){let e=(0,j.fe)(s,"env");h(e),t("env",e)}},[]),(0,m.useEffect)(()=>{w(J||q)},[J,q]),(0,m.useEffect)(()=>{"promote"===O&&T?.success?(R(),k(!0),F({message:`${T.promoted?.locale} promoted to the front of the queue`,type:f.pOz.SUCCESS,timeout:5e3}),z(void 0)):"remove"===O&&$?.success&&(R(),k(!0),F({message:`${$.deleted?.locale} removed from the queue`,type:f.pOz.SUCCESS,timeout:5e3}),z(void 0))},[O,T,$,R]);let Y=async(e,t)=>{if("approve"===t)try{let t=new URLSearchParams;t.append("shop",o),t.append("locale",e),(await i().get("/api/admin/importer/scheduler/approve",{params:t})).data.success?(U(t=>t.map(t=>t.locale===e?{...t,status:"approved"}:t)),k(!0),F({message:`Product import for ${o}, ${e} approved`,type:f.pOz.SUCCESS,timeout:5e3})):(k(!0),F({message:`Product import for ${o}, ${e} failed`,type:f.pOz.DANGER,timeout:5e3})),z(void 0)}catch(e){(0,S.MD)("Import queue approve request aborted",e)}else E(e),z(t)};
1return(0,a.jsxs)(a.Fragment,{children:[C&&(0,a.jsx)(y,{message:L.message,type:L.type,timeout:L.timeout}),(0,a.jsx)("div",{className:"flex justify-between items-center mb-100",children:(0,a.jsx)("p",{className:"mb-0 text-style-heading-h2",children:"Import Queue"})}),(0,a.jsx)("div",{className:"flex gap-100 items-center text-label-small mb-200",children:(0,a.jsx)(p.A,{env:o,setEnv:h,replaceQueryParam:t})}),A&&W&&(0,a.jsxs)("div",{className:d()("rounded-2 p-200 bg-danger-600 text-white","flex gap-100 justify-between items-center mb-200"),children:[(0,a.jsxs)("div",{className:"flex gap-100 items-center",children:[(0,a.jsx)(l.g,{size:"sm",icon:r.JA}),(0,a.jsx)("span",{className:"text-sm font-bolder",dangerouslySetInnerHTML:{__html:(0,j.sZ)(W)}})]}),(0,a.jsx)(l.g,{className:"cursor-pointer",size:"sm",icon:r.yY,onClick:()=>w(!1)})]}),D||G||H?(0,a.jsx)(x.A,{}):(0,a.jsxs)("table",{className:"text-label-small",children:[(0,a.jsx)("thead",{className:"sticky top-44 bg-white",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"Locale"}),(0,a.jsx)("th",{children:"Status"}),(0,a.jsx)("th",{children:"Priority"}),(0,a.jsx)("th",{children:"Delayed"}),(0,a.jsx)("th",{children:"Version"}),(0,a.jsx)("th",{children:"Added"}),(0,a.jsx)("th",{children:"Updated"}),(0,a.jsx)("th",{children:"Actions"})]})}),(0,a.jsx)("tbody",{children:I&&I.length>0?(0,c.A)(I,(e,t)=>{let s="blocked"===e.status,r="approved"===e.status;return(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"text-style-label-small-bold",children:e.locale}),(0,a.jsx)("td",{className:d()({"text-style-label-tiny-bold text-warning-600":"blocked"===e.status,"text-style-label-tiny-bold text-danger-600":"error"===e.status}),children:e.status}),(0,a.jsx)("td",{children:e.priority}),(0,a.jsx)("td",{className:d()({"text-style-label-small-bold text-danger-600":e.bumpCount>0}),children:e.bumpCount}),(0,a.jsx)("td",{children:e.version}),(0,a.jsx)("td",{children:(0,a.jsx)(u.A,{date:e.createdAt,useStringFormat:!0})}),(0,a.jsx)("td",{children:(0,a.jsx)(u.A,{date:e.updatedAt,useStringFormat:!0})}),(0,a.jsxs)("td",{className:"grid grid-cols-3 w-[380px]",children:[(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsx)("button",{type:"button",className:d()("btn btn-secondary rounded-2 py-050 px-300","cursor-pointer text-style-fixed-label-tiny-bold",{hidden:0===t}),onClick:()=>void Y(e.locale,"promote"),children:"Promote"})}),(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsx)("button",{type:"button",className:d()("btn btn-danger rounded-2 py-050 px-300","cursor-pointer text-style-fixed-label-tiny-bold",{hidden:!s&&!r}),onClick:()=>void Y(e.locale,"approve"),children:"Approve"})}),(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsx)("button",{type:"button",className:d()("btn btn-danger rounded-2 py-050 px-300 -ml-100","cursor-pointer text-style-fixed-label-tiny-bold"),onClick:()=>void Y(e.locale,"remove"),children:"Remove"})})]})]},e.locale)}):(0,a.jsx)("tr",{children:(0,a.jsx)("td",{className:"text-label-small",children:"No items available"})})})]})]})}},92674:(e,t,s)=>{s.d(t,{A:()=>n});var a=s(95155),r=s(29097),l=s(53423);let n=({date:e,format:t="yyyy-MM-dd HH:mm:ss",useStringFormat:s=!1})=>{let n=(0,l.ix)(e,t),i=r.c9.fromISO(e).toFormat(t);return(0,a.jsx)(a.Fragment,{children:s?i:n})}}}]);

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.