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