2025-08-25 15:52:41 +03:30
|
|
|
import{d as L,H as E,K,r as p,a2 as Q,F as c,z as r,D as u,A as o,C as n,B as w,I as l,y as C,a4 as A,a3 as D,U as y,E as Y,af as J,T as P,a5 as O,d8 as q,u as ee,h as ae,aw as le,o as te,d9 as se,al as ne,a8 as oe,ak as ue,am as re,_ as ie,da as de,db as ve}from"./CYzE2ijA.js";import{B}from"./DD5Ys7CO.js";import{e as M}from"./DWEdiVkG.js";import{i as I}from"./TO-7BJMV.js";import{B as U}from"./CsFPOKP-.js";import{B as pe}from"./DiwVHmYu.js";import{B as me,a as ce}from"./D9XEL_Je.js";import{B as fe}from"./dSj7_pEQ.js";import{B as G}from"./BGt43vt9.js";import{I as b}from"./CLYt9utx.js";import{B as ge}from"./DIYOB6kv.js";import{S as W}from"./5Tcs8R9X.js";import{N as be,Q as ye,V as we}from"./C2PFF9yu.js";import{d as xe,F as ke}from"./CYSIRAa5.js";const _e={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":""},Ue={"mt-1":"","font-semibold":""},Ce={class:"max-h-[50vh] overflow-auto"},Be=["onClick"],He=L({__name:"JobSelector",props:{open:{type:Boolean},id:{}},emits:["update:open","setField"],setup(F,{emit:_}){const s=E();K();const g=p(null),x=p([]);p();const H=F,S=_,k=p();function h(v,f=null){return v.filter(m=>m.parent_id===f).map(m=>({...m,children:h(v,m.id)}))}const j=async()=>{try{y.value=!0;const v=await q();x.value=h(v)}catch(v){console.log("e ===>",v)}finally{y.value=!1}};async function e(){H.id&&(k.value=H.id),x.value?.length==0&&j(),await J(),await g.value?.setOpen()}async function N(){await J(),await g.value?.setClose()}Q(H,v=>{v.open?e():N()});const R=v=>{N(),S("setField",v)};return(v,f)=>{const m=W;return r(),c(ge,{title:"",ref_key:"sheetRef",ref:g,headerCls:"",closeOnClickOutside:"",onOnClickOutside:f[0]||(f[0]=i=>S("update:open",!1)),onOnClose:f[1]||(f[1]=i=>S("update:open",!1))},{header:u(()=>f[2]||(f[2]=[o("div",null,null,-1)])),default:u(()=>[o("div",_e,[o("div",Se,[o("div",null,[o("div",he,[o("div",Ue,w(l(s).useString("allCollection")),1)]),n(m,{spinning:l(y)},{default:u(()=>[o("div",Ce,[(r(!0),C(D,null,A(x.value,i=>(r(),c(l(be),{as:"div",class:"mt-2"},{default:u(({open:z})=>[n(l(ye),{class:"flex w-full items-center rounded-lg px-4 justify-start text-sm focus:outline-none focus-visible:ring bg-transparent",onClick:()=>i?.children?.length?null:R(i)},{default:u(()=>[o("div",{class:O(["w-full flex items-center gap2 rounded-md p-2 text-start",[k.value===i.id?"border-primary border-solid border-1 ":"",i?.children?.length?l(s).isNightStore?"text-gray-2":"text-gray-8":l(s).isNightStore?"text-gray-2":"text-gray-8"]])},[o("span",null,[n(B,{icon:i?.children?.length?"vuesax-linear:main-component":"vuesax-linear:component"},null,8,["icon"])]),o("span",null,w(i.title),1)],2),i.children?.length?(r(),c(B,{key:0,class:O([z?"":"rotate-180","transform"]),icon:"tabler:chevron-up"},null,8,["class"])):P("",!0)]),_:2},1032,["onClick"]),n(l(we),{class:"px-4 flex flex-col gap-2 text-sm mt2 mb5"},{default:u(()=>[(r(!0),C(D,null,A(i?.children,$=>(r(),C("div",{class:O(["w-full flex items-center gap2 rounded-md p-2 text-start ms2",[k.value===$.id?"border-primary border-solid border-1 ":"",l(s).isNightStore?"text-gray-2":"text-gray-8"]]),onClick:V=>R($)},[o("span",null,[n(B,{icon:"vuesax-linear:component"})]),o("span",null,w($.title),1)],10,Be))),256))]),_:2},1024)]),_:2},1024))),256))])]),_:1},8,["spinning"])])]),n(G,{block:"",class:"!h-unset !rounded-lg mt-5",onClick:N},{default:u(()=>[Y(w(l(s).useString("close")),1)]),_:1})])]),_:1},512)}}}),Ne={class:"px-4 flex items-center justify-between"},$e={class:"flex gap-5 py-4"},Oe={class:"font-semibold"},je={class:"pt-4rem pb-6rem overflow-y-auto"},Re={class:"w-full flex justify-center"},Ie=["alt"],Pe={class:"px-1rem mt-2rem"},ze={class:"flex items-center"},De={key:0,class:"text-gray-3 mt2 mr2"},Xe=L({__name:"index",setup(F){const _=ee(),s=E(),g=K(),x=p(!1),H=p(""),S=p(),k=p(),h=p(),j=p([]),e=p({avatar:"",birthday:"",website:"",name:"",first_name:"",last_name:"",phone:"",email:"",bio:"",skill:""});function N(d){e.value.job=d.id,h.value=d}function R(){x.value=!0,H.value=e.value.avatar}function v(d){e.value.avatar=d}function f
|