2 lines
9.8 KiB
JavaScript
2 lines
9.8 KiB
JavaScript
import{d as L,G as E,J as G,r as p,a1 as Q,F as c,z as u,D as r,A as o,C as n,B as w,H as l,y as C,a3 as T,a2 as F,T as y,E as Y,af as A,S as P,a4 as O,d8 as Z,u as ee,h as ae,aw as le,o as te,d9 as se,al as ne,a7 as oe,ak as re,am as ue,Z as ie,da as de,db as ve}from"./G_17LgpR.js";import{B}from"./DUAMdf4s.js";import{e as M}from"./DWEdiVkG.js";import{i as R}from"./D2kAcYEe.js";import{B as U}from"./DFUQTW3o.js";import{B as pe}from"./CkcKLo8L.js";import{B as me,a as ce}from"./C7JdYvP_.js";import{B as fe}from"./BOQP8Z38.js";import{B as q}from"./C1vz2RTh.js";import{I as b}from"./B6ZhX6q6.js";import{B as ge}from"./C_gIYN7y.js";import{S as K}from"./aNyYT5DR.js";import{N as be,Q as ye,V as we}from"./CJk4gSXj.js";import{d as xe,F as ke}from"./n_QaF0JG.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(I,{emit:_}){const s=E();G();const g=p(null),x=p([]);p();const H=I,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 Z();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 A(),await g.value?.setOpen()}async function N(){await A(),await g.value?.setClose()}Q(H,v=>{v.open?e():N()});const z=v=>{N(),S("setField",v)};return(v,f)=>{const m=K;return u(),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:r(()=>f[2]||(f[2]=[o("div",null,null,-1)])),default:r(()=>[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:r(()=>[o("div",Ce,[(u(!0),C(F,null,T(x.value,i=>(u(),c(l(be),{as:"div",class:"mt-2"},{default:r(({open:D})=>[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:z(i)},{default:r(()=>[o("div",{class:O(["w-full flex items-center gap2 rounded-md p-2 font-azar 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?(u(),c(B,{key:0,class:O([D?"":"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:r(()=>[(u(!0),C(F,null,T(i?.children,$=>(u(),C("div",{class:O(["w-full flex items-center gap2 rounded-md p-2 font-azar text-start ms2",[k.value===$.id?"border-primary border-solid border-1 ":"",l(s).isNightStore?"text-gray-2":"text-gray-8"]]),onClick:V=>z($)},[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(q,{block:"",class:"!h-unset !rounded-lg mt-5",onClick:N},{default:r(()=>[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"},ze={class:"w-full flex justify-center"},Re=["alt"],Pe={class:"px-1rem mt-2rem"},De={class:"flex items-center"},Fe={key:0,class:"text-gray-3 mt2 mr2"},We=L({__name:"index",setup(I){const _=ee(),s=E(),g=G(),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 z(){x.value=!0,H.value=e.value.avatar}function v(d){e.
|