cmms/frontend/dist/assets/InventoryView-Dvb43sMl.js

2 lines
5.5 KiB
JavaScript

import{_ as d,c as p,o as v,i as g,w as o,v as h,g as k,b as t,d as n,k as r,e as s,F as c}from"./index-BUdRbiwj.js";import{u as w}from"./parts-B3aeW8xP.js";import{F as x,a as b}from"./FPPageHeader-CTG2L28r.js";import{F as f}from"./FPStats-BGfZcDZc.js";import"./FPCard-qHzcEQAE.js";const y={class:"p-6"},M={class:"text-center py-12"},P={__name:"InventoryView",setup(B){const u=h(),i=w(),m=p(()=>{const a=i.inventoryStats;return a?[{name:"Total Parts",value:a.totalParts,subtitle:"Active parts in inventory",icon:{template:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" /></svg>'},iconBg:"bg-blue-100",iconColor:"text-blue-600",change:0},{name:"Low Stock",value:a.lowStockParts,subtitle:"Parts below minimum",icon:{template:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.728-.833-2.498 0L4.316 16.5c-.77.833.192 2.5 1.732 2.5z" /></svg>'},iconBg:"bg-red-100",iconColor:"text-red-600",change:0},{name:"Total Value",value:`$${(a.totalValue/1e3).toFixed(1)}K`,subtitle:"Inventory value",icon:{template:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1" /></svg>'},iconBg:"bg-green-100",iconColor:"text-green-600",change:0},{name:"Suppliers",value:a.totalSuppliers,subtitle:"Active suppliers",icon:{template:'<svg fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" /></svg>'},iconBg:"bg-yellow-100",iconColor:"text-yellow-600",change:0}]:[]}),l=()=>{u.push("/inventory/parts")};return v(async()=>{await i.initializeParts()}),(a,e)=>(k(),g(x,null,{header:o(()=>[n(b,{title:"Inventory Management",description:"Manage parts, supplies, and spare equipment inventory",breadcrumbs:[{text:"Inventory",to:null}]},{actions:o(()=>[n(s(c),{variant:"primary",size:"sm",onClick:l},{default:o(()=>e[0]||(e[0]=[t("svg",{class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"})],-1),r(" Manage Parts ",-1)])),_:1,__:[0]})]),stats:o(()=>[n(s(f),{stats:m.value},null,8,["stats"])]),_:1})]),default:o(()=>[t("div",y,[t("div",M,[e[2]||(e[2]=t("div",{class:"mb-6"},[t("svg",{class:"w-16 h-16 mx-auto text-blue-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"})])],-1)),e[3]||(e[3]=t("h3",{class:"text-lg font-medium text-gray-900 mb-2"},"Enhanced Parts Management",-1)),e[4]||(e[4]=t("p",{class:"text-gray-600 mb-8"},[r(" The inventory system has been upgraded with enhanced parts management capabilities."),t("br"),r(' Use the "Manage Parts" button above to access the new parts management interface. ')],-1)),n(s(c),{variant:"primary",onClick:l},{default:o(()=>e[1]||(e[1]=[t("svg",{class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"})],-1),r(" Go to Parts Management ",-1)])),_:1,__:[1]})])])]),_:1}))}},j=d(P,[["__scopeId","data-v-812ef749"]]);export{j as default};