PageSourceSearch

https://provitra.de/static/js/8138.be188246.chunk.js

js provitra.de collected 2026-10-09 03:14:26 UTC 6,204 bytes, 3 lines download raw bytes

1/*! For license information please see 8138.be188246.chunk.js.LICENSE.txt */
2"use strict";(globalThis.webpackChunkfrontend||=[]).push([[8138],{91140(e,a,t){t.r(a);var s=t(65043),r=t(1089),d=t(70579);const l=s.forwardRef((e,a)=>{let{className:t,...s}=e;return(0,d.jsx)("div",{ref:a,className:(0,r.cn)("rounded-xl border border-gray-200 bg-card text-card-foreground shadow",t),...s})});l.displayName="Card";const n=s.forwardRef((e,a)=>{let{className:t,...s}=e;return(0,d.jsx)("div",{ref:a,className:(0,r.cn)("flex flex-col space-y-1.5 p-6",t),...s})});n.displayName="CardHeader";const c=s.forwardRef((e,a)=>{let{className:t,...s}=e;return(0,d.jsx)("div",{ref:a,className:(0,r.cn)("font-semibold leading-none tracking-tight",t),...s})});c.displayName="CardTitle";const i=s.forwardRef((e,a)=>{let{className:t,...s}=e;return(0,d.jsx)("div",{ref:a,className:(0,r.cn)("text-sm text-muted-foreground",t),...s})});i.displayName="CardDescription";const o=s.forwardRef((e,a)=>{let{className:t,...s}=e;return(0,d.jsx)("div",{ref:a,className:(0,r.cn)("p-6 pt-0",t),...s})});o.displayName="CardContent";const m=s.forwardRef((e,a)=>{let{className:t,...s}=e;return(0,d.jsx)("div",{ref:a,className:(0,r.cn)("flex items-center p-6 pt-0",t),...s})});m.displayName="CardFooter",t.d(a,["Card",0,l,"CardContent",0,o,"CardDescription",0,i,"CardFooter",0,m,"CardHeader",0,n,"CardTitle",0,c])},58138(e,a,t){t.r(a),t.d(a,{default:()=>x});var s=t(65043),r=t(8821),d=t(91140),l=t(92264),n=t(56328),c=t(52343),i=t(2580),o=t(70579);const m=()=>({Authorization:`Bearer ${localStorage.getItem("token")}`});
2function x(){const[e,a]=(0,s.useState)([]),[t,x]=(0,s.useState)([]),[h,u]=(0,s.useState)(!0),[f,g]=(0,s.useState)({warehouse_id:"",from_date:"",to_date:""});(0,s.useEffect)(()=>{p()},[]),(0,s.useEffect)(()=>{j()},[f]);const p=async()=>{try{const e=await r.default.get("/api/lager/warehouses",{headers:m()});x(e.data.items||[])}catch(e){console.error("Error:",e)}},j=async()=>{try{const e=new URLSearchParams({movement_type:"incoming"});f.warehouse_id&&e.append("warehouse_id",f.warehouse_id),f.from_date&&e.append("from_date",f.from_date),f.to_date&&e.append("to_date",f.to_date);const t=await r.default.get(`/api/lager/stock/movements?${e}`,{headers:m()});a(t.data.items||[])}catch(e){n.toast.error("Fehler beim Laden")}finally{u(!1)}};return(0,o.jsxs)("div",{className:"min-h-screen bg-gray-50",children:[(0,o.jsx)("div",{className:"bg-white border-b border-gray-200 px-6 py-4",children:(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"Alle Wareneing\xe4nge"}),(0,o.jsx)("p",{className:"text-sm text-gray-500 mt-0.5",children:"\xdcbersicht aller eingebuchten Waren"})]})}),(0,o.jsxs)("div",{className:"p-6 max-w-7xl mx-auto space-y-6",children:[(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.CardTitle,{className:"flex items-center gap-2",children:[(0,o.jsx)(i.default,{className:"h-5 w-5"}),"Filter"]})}),(0,o.jsx)(d.CardContent,{children:(0,o.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{className:"text-sm text-gray-500",children:"Lager"}),(0,o.jsxs)("select",{value:f.warehouse_id,onChange:e=>g({...f,warehouse_id:e.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg",children:[(0,o.jsx)("option",{value:"",children:"Alle Lager"}),t.map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{className:"text-sm text-gray-500",children:"Von"}),(0,o.jsx)(l.Input,{type:"date",value:f.from_date,onChange:e=>g({...f,from_date:e.target.value})})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{className:"text-sm text-gray-500",children:"Bis"}),(0,o.jsx)(l.Input,{type:"date",value:f.to_date,onChange:e=>g({...f,to_date:e.target.value})})]})]})})]}),(0,o.jsxs)(d.Card,{children:[(0,o.jsx)(d.CardHeader,{children:(0,o.jsxs)(d.CardTitle,{className:"flex items-center gap-2",children:[(0,o.jsx)(c.default,{className:"h-5 w-5"}),"Wareneing\xe4nge (",e.length,")"]})}),(0,o.jsx)(d.CardContent,{children:h?(0,o.jsx)("div",{className:"text-center py-8 text-gray-500",children:"Laden..."}):0===e.length?(0,o.jsxs)("div",{className:"text-center py-8 text-gray-500",children:[(0,o.jsx)(c.default,{className:"h-12 w-12 mx-auto mb-4 text-gray-400"}),(0,o.jsx)("p",{children:"Keine Wareneing\xe4nge gefunden"})]}):(0,o.jsx)("div",{className:"overflow-x-auto",children:(0,o.jsxs)("table",{className:"w-full",children:[(0,o.jsx)("thead",{children:(0,o.jsxs)("tr",{className:"border-b text-left text-sm text-gray-500",children:[(0,o.jsx)("th",{className:"pb-3 font-medium",children:"Datum"}),(0,o.jsx)("th",{className:"pb-3 font-medium",children:"Artikel"}),(0,o.jsx)("th",{className:"pb-3 font-medium",children:"SKU"}),(0,o.jsx)("th",{className:"pb-3 font-medium",children:"Lieferant"}),(0,o.jsx)("th",{className:"pb-3 font-medium",children:"Referenz"}),(0,o.jsx)("th",{className:"pb-3 font-medium text-right",children:"Menge"}),(0,o.jsx)("th",{className:"pb-3 font-medium text-right",children:"Wert"})]})}),(0,o.jsx)("tbody",{children:e.map(e=>{var a,t;return(0,o.jsxs)("tr",{className:"border-b hover:bg-gray-50",children:[(0,o.jsx)("td",{className:"py-3 text-sm",children:(t=e.created_at,t?new Date(t).toLocaleString("de-DE"):"-")}),(0,o.jsx)("td",{className:"py-3 font-medium",children:e.article_name}),(0,o.jsx)("td",{className:"py-3 font-mono text-sm",children:e.article_sku}),(0,o.jsx)("td",{className:"py-3",children:e.supplier||"-"}),(0,o.jsx)("td",{className:"py-3",children:e.reference_number||"-"}),(0,o.jsxs)("td",{className:"py-3 text-right font-medium text-green-600",children:["+",e.quantity]}),(0,o.jsxs)("td",{className:"py-3 text-right",children:[(null===(a=e.total_value)||void 0===a?void 0:a.toFixed(2))||"0.00"," \u20ac"]})]},e.id)})})]})})})]})]})]})}},2580(e,a,t){t.r(a);const s=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],r=(0,t(81074).default)("funnel",s);t.d(a,["__iconNode",0,s,"default",0,r])}}]);
3//# sourceMappingURL=8138.be188246.chunk.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.