Files
appco_dist/.output/public/_nuxt/GUbWy-m1.js
T

2 lines
10 KiB
JavaScript
Raw Normal View History

2025-07-27 10:51:22 +03:30
import{d as E,G,J as Q,r as f,a1 as Y,F as m,z as v,D as d,A as r,C as o,B as x,H as t,y as H,a3 as A,a2 as M,T as w,E as Z,ae as I,S as D,a4 as R,d6 as q,u as ee,h as le,av as ae,o as te,d7 as se,ak as ne,a7 as oe,aj as re,al as ue,Z as ie,d8 as de,d9 as ve}from"./vNwORUzZ.js";import{B as N}from"./DSh6TMV1.js";import{e as L}from"./DWEdiVkG.js";import{i as V}from"./ClILpcqr.js";import{_ as $}from"./D2ZVpacU.js";/* empty css */import{_ as pe}from"./DYK3k91P.js";import{_ as fe,a as ce}from"./DmWkMYeV.js";import{_ as me}from"./B-nmsWZK.js";import{_ as K}from"./CLfv5Oag.js";/* empty css */import{_}from"./IiZ1e1lr.js";import{B as ge}from"./B7_GJxBp.js";import{S as W}from"./I3pYu3kF.js";import{N as be,Q as ye,V as _e}from"./C2HEp5W0.js";import{d as we,F as xe}from"./BS3cW_7I.js";const ke={class:"px-4 pb-4 flex flex-col justify-between h-70vh"},Se={class:"flex flex-col gap-2 mt-5 mb-5"},he={flex:"","p-2":""},Ce={"mt-1":"","font-semibold":""},Ue={class:"max-h-[50vh] overflow-auto"},$e=["onClick"],He=E({__name:"JobSelector",props:{open:{type:Boolean},id:{}},emits:["update:open","setField"],setup(T,{emit:h}){const s=G();Q();const g=f(null),k=f([]);f();const j=T,C=h,S=f();function U(u,p=null){return u.filter(c=>c.parent_id===p).map(c=>({...c,children:U(u,c.id)}))}const F=async()=>{try{w.value=!0;const u=await q();k.value=U(u)}catch(u){console.log("e ===>",u)}finally{w.value=!1}};async function e(){var u,p;j.id&&(S.value=j.id),((u=k.value)==null?void 0:u.length)==0&&F(),await I(),await((p=g.value)==null?void 0:p.setOpen())}async function O(){var u;await I(),await((u=g.value)==null?void 0:u.setClose())}Y(j,u=>{u.open?e():O()});const P=u=>{O(),C("setField",u)};return(u,p)=>{const c=W;return v(),m(ge,{title:"",ref_key:"sheetRef",ref:g,headerCls:"",closeOnClickOutside:"",onOnClickOutside:p[0]||(p[0]=n=>C("update:open",!1)),onOnClose:p[1]||(p[1]=n=>C("update:open",!1))},{header:d(()=>p[2]||(p[2]=[r("div",null,null,-1)])),default:d(()=>[r("div",ke,[r("div",Se,[r("div",null,[r("div",he,[r("div",Ce,x(t(s).useString("allCollection")),1)]),o(c,{spinning:t(w)},{default:d(()=>[r("div",Ue,[(v(!0),H(M,null,A(k.value,n=>(v(),m(t(be),{as:"div",class:"mt-2"},{default:d(({open:J})=>[o(t(ye),{class:"flex w-full items-center rounded-lg px-4 justify-start text-sm focus:outline-none focus-visible:ring bg-transparent",onClick:()=>{var b;return(b=n==null?void 0:n.children)!=null&&b.length?null:P(n)}},{default:d(()=>{var b,z,i;return[r("div",{class:R(["w-full flex items-center gap2 rounded-md p-2 font-azar text-start",[S.value===n.id?"border-primary border-solid border-1 ":"",(b=n==null?void 0:n.children)!=null&&b.length?t(s).isNightStore?"text-gray-2":"text-gray-8":t(s).isNightStore?"text-gray-2":"text-gray-8"]])},[r("span",null,[o(N,{icon:(z=n==null?void 0:n.children)!=null&&z.length?"vuesax-linear:main-component":"vuesax-linear:component"},null,8,["icon"])]),r("span",null,x(n.title),1)],2),(i=n.children)!=null&&i.length?(v(),m(N,{key:0,class:R([J?"":"rotate-180","transform"]),icon:"tabler:chevron-up"},null,8,["class"])):D("",!0)]}),_:2},1032,["onClick"]),o(t(_e),{class:"px-4 flex flex-col gap-2 text-sm mt2 mb5"},{default:d(()=>[(v(!0),H(M,null,A(n==null?void 0:n.children,b=>(v(),H("div",{class:R(["w-full flex items-center gap2 rounded-md p-2 font-azar text-start ms2",[S.value===b.id?"border-primary border-solid border-1 ":"",t(s).isNightStore?"text-gray-2":"text-gray-8"]]),onClick:z=>P(b)},[r("span",null,[o(N,{icon:"vuesax-linear:component"})]),r("span",null,x(b.title),1)],10,$e))),256))]),_:2},1024)]),_:2},1024))),256))])]),_:1},8,["spinning"])])]),o(K,{block:"",class:"!h-unset !rounded-lg mt-5",onClick:O},{default:d(()=>[Z(x(t(s).useString("close")),1)]),_:1})])]),_:1},512)}}}),Ne={class:"px-4 flex items-center justify-between"},je={class:"flex gap-5 py-4"},Oe={class:"font-semibold"},ze={class:"pt-4rem pb-6rem overflow-y-auto"},Be={class:"w-full flex justify-center"},Re=["alt"],Fe={class:"px-1rem mt-2rem"},Pe={class:"flex items-center"},Ve={key:0,class:"text-gray-3 mt2 mr2"},el=E({__name:"index",setup(T){const h=ee(),s=G(),g=Q(),k=f(!1),