PageSourceSearch

https://eigdo.com/build/assets/Items-BOvPAfC7.js

js eigdo.com collected 2026-10-02 01:30:54 UTC 5,438 bytes, 1 lines download raw bytes

1import{y as U,p as w,a6 as V,c as d,b as u,u as i,h as S,i as k,w as n,e as b,d as e,z as j,f as a,F as p,l as c,t as _,k as x,B as g,s as $,q as I,g as z,S as M,U as B,j as D}from"./app-DGg9yO0A.js";import{_ as C}from"./AppLayout-CTaBH8Bc.js";import{_ as G}from"./ServiceWizardLayout-CcdQfJyD.js";import{_ as O,a as q}from"./CardContent-ZJBGtX_v.js";import{_ as N}from"./CardHeader-CM1TD4Nn.js";import{_ as P}from"./CardTitle-DwAifPAs.js";import{_ as T}from"./CardDescription-D-r_aovB.js";import{_ as F}from"./Button-BzgrTa0j.js";/* empty css            */import"./building-2-BxI1ookC.js";import"./chevron-down-BH0UlUTC.js";import"./check-BJ52jFgo.js";import"./briefcase-Dr-U5hwY.js";import"./plus-CaezNO5f.js";import"./ticket-B4ytzU_q.js";import"./shopping-cart-Cjot37hT.js";import"./triangle-alert-DG97y24v.js";import"./clock-D89YJdKb.js";import"./octagon-alert-C_nHdqmR.js";import"./bell-Csal-4eT.js";import"./circle-alert-BW9Huya_.js";import"./credit-card-t266ijNQ.js";import"./sparkles-BTNB7eSU.js";import"./circle-check-BuErEPi2.js";import"./shield-0_zF-1-R.js";import"./file-text-BABPrHef.js";import"./users-BNxC0kcH.js";import"./package-B41T9BkD.js";import"./shield-check-4E2-RW5h.js";import"./key-round-DIvy73oK.js";import"./hash-CVAcHciO.js";import"./printer-CI1LtL02.js";import"./download-DQIlmuny.js";import"./menu-D5d11qbY.js";import"./log-out-BMSJiKet.js";import"./lock-Bz08NzUA.js";import"./power-Dr_lvlk4.js";import"./arrow-left-m7RSYxQ4.js";import"./EigdoLogo-Crwv6Up3.js";import"./refresh-cw-CZZ19EV3.js";import"./loader-circle-B_tmpfyH.js";import"./arrow-right-BFbWwcMO.js";const L={class:"overflow-x-auto -mx-4 md:mx-0"},E={class:"w-full text-sm"},H={class:"py-2 px-2 font-medium"},R={class:"py-2 px-2 w-32"},K=["onUpdate:modelValue"],Q={class:"py-2 px-2 w-48"},A=["onUpdate:modelValue"],J=["value"],W={class:"py-2 px-2 w-72"},X=["onUpdate:modelValue"],Y=["value"],Z={class:"flex justify-between items-center"},ee={class:"text-xs text-muted-foreground"},te={class:"space-x-2"},se={key:0,class:"text-sm text-emerald-600"},oe={key:1,class:"text-sm text-red-600"},ie={class:"flex justify-end"},Qe={__name:"Items",props:{maps:Object,catalogs:{type:Object,default:()=>({unidades_medida:[],bienes_servicios:[]})},wizard:{type:Object,default:null}},setup(l){const y=l,v=r=>({id:r.id,qbo_name:r.qbo_name,dgii_uom:r.dgii_uom,dgii_cbs_code:r.dgii_cbs_code,item_type:r.item_type}),m=U({maps:y.maps.data.map(v)});w(()=>y.maps.data,r=>{m.maps=r.map(v)});const h=()=>new Promise(r=>{m.put(route("settings.mappings.items.update"),{onSuccess:()=>r(!0),onError:()=>r(!1)})}),f=V("wizardGuard",null);return f&&(w(()=>m.isDirty,r=>{f.dirty.value=r},{immediate:!0}),f.save.value=h),(r,o)=>(a(),d(p,null,[u(i(S),{title:"Mapeo de items"}),(a(),k(D(l.wizard?G:C),M(B(l.wizard?{wizard:l.wizard}:{})),{header:n(()=>[...o[0]||(o[0]=[e("h1",{class:"text-2xl font-bold tracking-tight"},"Mapeo de items",-1)])]),default:n(()=>[u(i(O),null,{default:n(()=>[u(i(N),null,{default:n(()=>[u(i(P),null,{default:n(()=>[...o[1]||(o[1]=[b("Items QBO → atributos DGII",-1)])]),_:1}),u(i(T),null,{default:n(()=>[...o[2]||(o[2]=[b("Unidad de medida y código de bien/servicio para cada SKU.",-1)])]),_:1})]),_:1}),u(i(q),null,{default:n(()=>[e("form",{onSubmit:j(h,["prevent"]),class:"space-y-4"},[e("div",L,[e("table",E,[o[5]||(o[5]=e("thead",null,[e("tr",{class:"border-b text-left text-xs uppercase text-muted-foreground"},[e("th",{class:"py-2 px-2 font-medium"},"Item"),e("th",{class:"py-2 px-2 font-medium"},"Tipo"),e("th",{class:"py-2 px-2 font-medium"},"Uni. medida DGII"),e("th",{class:"py-2 px-2 font-medium"},"Código bien/servicio")])],-1)),e("tbody",null,[(a(!0),d(p,null,c(i(m).maps,t=>(a(),d("tr",{key:t.id,class:"border-b last:border-0"},[e("td",H,_(t.qbo_name),1),e("td",R,[x(e("select",{"onUpdate:modelValue":s=>t.item_type=s,class:"h-9 rounded-md border border-input bg-background px-2 text-sm w-full"},[...o[3]||(o[3]=[e("option",{value:"producto"},"Producto",-1),e("option",{value:"servicio"},"Servicio",-1)])],8,K),[[g,t.item_type]])]),e("td",Q,[x(e("select",{"onUpdate:modelValue":s=>t.dgii_uom=s,class:"h-9 rounded-md border border-input bg-background px-2 text-sm w-full"},[(a(!0),d(p,null,c(l.catalogs.unidades_medida,s=>(a(),d("option",{key:s.code,value:s.code},_(s.name),9,J))),128))],8,A),[[g,t.dgii_uom]])]),e("td",W,[x(e("select",{"onUpdate:modelValue":s=>t.dgii_cbs_code=s,class:"h-9 rounded-md border border-input bg-background px-2 text-sm w-full"},[o[4]||(o[4]=e("option",{value:null},"— Sin código —",-1)),(a(!0),d(p,null,c(l.catalogs.bienes_servicios,s=>(a(),d("option",{key:s.code,value:s.code},_(s.name),9,Y))),128))],8,X),[[g,t.dgii_cbs_code]])])]))),128))])])]),e("div",Z,[e("div",ee,_(l.maps.total)+" items totales",1),e("div",te,[(a(!0),d(p,null,c(l.maps.links,t=>(a(),k(i($),{key:t.label,href:t.url??"#",innerHTML:t.label,class:I(["px-2 py-1 rounded text-sm",t.active?"bg-accent text-accent-foreground":"hover:bg-accent"])},null,8,["href","innerHTML","class"]))),128))])]),i(m).recentlySuccessful&&!l.wizard?(a(),d("div",se,"Mapeo de items guardado.")):z("",!0),i(m).errors&&Object.keys(i(m).errors).length?(a(),d("div",oe,[(a(!0),d(p,null,c(i(m).errors,(t,s)=>(a(),d("div",{key:s},_(t),1))),128))])):z("",!0),e("div",ie,[u(i(F),{type:"submit",disabled:i(m).processing},{default:n(()=>[...o[6]||(o[6]=[b("Guardar",-1)])]),_:1},8,["disabled"])])],32)]),_:1})]),_:1})]),_:1},16))],64))}};export{Qe as default};

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.