/
home
/
maktab
/
pwa
/
assets
/
File Upload :
llllll
Current File: /home/maktab/pwa/assets/selectPerson-6ac1366f.js
import{_ as I}from"./default_image-3c98eb2d.js";import{d as D,y as j,r as z,J as E,l as J,c as d,b as s,e as a,w as i,u as o,q as p,x as A,K as B,F as k,h as c,o as n,j as L,I as K,t as N,n as V,z as x,i as G}from"./index-b702d2bf.js";import{_ as H}from"./NavBar.vue_vue_type_script_setup_true_lang-d06a6254.js";import{b as O}from"./service-ced3318c.js";import{l as y,s as v,u,a as _,b as f}from"./index-74454ec7.js";const Q={class:"fixed w-full"},W={class:"fixed top-0 w-full max-w-3xl bg-white"},X={dir:"rtl",class:"px-4 pt-4"},Y={class:"flex flex-row justify-between mt-4 px-4 py-2 bg-gray-50 border-gray-100"},Z=s("div",{class:"font-bold"},"انتخاب همه",-1),ee={class:"mt-28 overflow-y-auto h-[62vh] pb-20"},se={key:0},le={class:"flex flex-row px-4 py-1 justify-center gap-5 items-center w-full"},ae={class:"flex flex-row px-4 py-1 justify-center gap-5 items-center pb-0 divide-y divide-gray-200 w-full"},te={class:"flex flex-row px-4 py-1 justify-center gap-5 items-center pb-0 divide-y divide-gray-200 w-full"},oe={class:"flex flex-row px-4 py-1 justify-center gap-5 items-center pb-0 divide-y divide-gray-200 w-full"},ne={key:0,class:"p-4 pb-0 divide-y divide-gray-200 w-full"},re=s("div",{class:"bg-gray-200 rounded-lg text-center p-1 w-full"},"کاربران",-1),de=s("div",{class:"pl-2"},[s("img",{class:"rounded-full w-11 h-11",src:I,alt:""})],-1),ue={class:"flex-1 grid grid-rows-2 text-right"},ie={class:"font-semibold"},ce={class:"text-xs font-thin text-gray-400"},ve={class:"mt-2 p-4 pb-0 divide-y divide-gray-200 w-full h-50vh"},pe={key:0,class:"bg-gray-200 rounded-lg text-center p-1 w-full"},_e=s("div",{class:"pl-2"},[s("img",{class:"rounded-full w-11 h-11",src:I,alt:""})],-1),fe={class:"flex-1 grid grid-rows-2 text-right"},ge={class:"font-semibold"},he={class:"text-xs font-thin text-gray-400"},xe={class:"fixed bottom-20 w-full px-2"},Ce=D({__name:"selectPerson",setup(ye){const m=G(),M=j(()=>r.value!=null||r.value!=""?u.value.filter(l=>l.name.includes(r.value)):u.value),$=j(()=>r.value!=null||r.value!=""?v.value.filter(l=>{var t;return(l.mobile!=null?l.mobile.includes(r.value):!1)||((t=l.name)==null?void 0:t.includes(r.value))}):v.value),r=z(""),q=E(),F=()=>{b.value?(f.value=v.value.map(l=>l.id),_.value=u.value.map(l=>l.id)):(f.value=[],_.value=[])},b=z();return J(async()=>{y.value=!0;let{data:l}=await O(q.query);console.log(l),v.value=l.student,u.value=l.user,y.value=!1,console.log(v.value),console.log(u.value[0])}),(l,t)=>{var C,U;const P=c("a-input"),w=c("a-checkbox"),g=c("a-skeleton-avatar"),h=c("ASkeleton"),S=c("a-checkbox-group"),R=c("a-button");return n(),d(k,null,[s("div",Q,[s("div",W,[a(H,{dir:"rtl"},{Title:i(()=>[L(" ارسال پیامک ")]),IconLeft:i(()=>[]),_:1})]),s("div",X,[a(P,{size:"large",value:r.value,"onUpdate:value":t[0]||(t[0]=e=>r.value=e)},{prefix:i(()=>[a(K,{class:"pl-1 text-primary",size:"16px",icon:"vuesax-linear:search-normal-1"})]),_:1},8,["value"])]),s("div",Y,[Z,s("div",null,[a(w,{width:"50",checked:b.value,"onUpdate:checked":t[1]||(t[1]=e=>b.value=e),onChange:F},null,8,["checked"])])])]),s("div",ee,[o(y)?(n(),d("div",se,[s("div",le,[a(g,{active:""}),a(h,{active:"",paragraph:{rows:1}})]),s("div",ae,[a(g,{active:""}),a(h,{active:"",paragraph:{rows:1}})]),s("div",te,[a(g,{active:""}),a(h,{active:"",paragraph:{rows:1}})]),s("div",oe,[a(g,{active:""}),a(h,{active:"",paragraph:{rows:1}})])])):p("",!0),((C=o(u)[0])==null?void 0:C.name)!=null?(n(),A(S,{key:1,value:o(_),"onUpdate:value":t[2]||(t[2]=e=>B(_)?_.value=e:null),class:"w-full"},{default:i(()=>[o(u).length>0?(n(),d("div",ne,[re,(n(!0),d(k,null,N(o(M),(e,T)=>(n(),d("div",{class:V(["flex py-2 pl-3 items-center divide-gray-500 w-full",e!=null&&e.mobile?"":"bg-gray-100"])},[de,s("div",ue,[s("div",ie,x(e==null?void 0:e.name),1),s("div",ce,x(e==null?void 0:e.mobile),1)]),s("div",null,[a(w,{width:"50",value:e==null?void 0:e.key,disabled:!(e!=null&&e.mobile)},null,8,["value","disabled"])])],2))),256))])):p("",!0)]),_:1},8,["value"])):p("",!0),((U=o(v)[0])==null?void 0:U.name)!==null?(n(),A(S,{key:2,value:o(f),"onUpdate:value":t[3]||(t[3]=e=>B(f)?f.value=e:null),class:"w-full"},{default:i(()=>[s("div",ve,[o(m).isAdminMan()||o(m).isSuperAdmin()?(n(),d("div",pe,"متربیان")):p("",!0),(n(!0),d(k,null,N(o($),(e,T)=>(n(),d("div",{class:V(["flex py-2 pl-3 items-center divide-gray-500 w-full",e!=null&&e.mobile?"":"bg-gray-100"])},[_e,s("div",fe,[s("div",ge,x(e==null?void 0:e.name),1),s("div",he,x((e==null?void 0:e.mobile)??"بدون شماره"),1)]),s("div",null,[a(w,{width:"50",value:e==null?void 0:e.key,disabled:!(e!=null&&e.mobile)},null,8,["value","disabled"])])],2))),256))])]),_:1},8,["value"])):p("",!0)]),s("div",xe,[a(R,{class:"w-full",type:"primary","html-type":"submit",size:"large",loading:o(y),onClick:t[4]||(t[4]=e=>l.$router.push({name:"sendSMS"}))},{default:i(()=>[L(" بعدی ")]),_:1},8,["loading"])])],64)}}});export{Ce as default};
Copyright ©2k19 -
Hexid
|
Tex7ure