1import{j as V,Q as $,T as A,r as w,i as E,o as a,d as n,a as m,u as r,Z as N,w as v,b as e,t as i,e as g,g as j,l as y,v as B,x as L,F as _,h as x,n as T,f as b,k as S}from"./app-2803dbd2.js";import{_ as M}from"./AuthenticatedLayout-bb8fea16.js";import D from"./StepMenu-13deb604.js";/* empty css */import"./Header-4ad53e0b.js";import"./Count-25cc13c8.js";import"./ProjectTitle-8b46a3ad.js";import"./index-fbe79861.js";import"./index-93b0477c.js";import"./index-5023023c.js";import"./index-53bd1124.js";import"./index-af4fdabb.js";const F={class:"edit_property team p-3"},z={class:"card shadow"},O={class:"card-body"},P={key:0,class:"mb-4 font-medium text-sm text-green-600"},R={class:"flex flex-col md:flex-row gap-2"},G={class:"relative inline-block md:w-[65%]"},I={class:"sugestions z-50 bg-gray-100 w-100",id:"teamSuggestion"},K=["onClick"],Q={key:0,class:"form-text text-green-600"},U={class:"table-responsive shadow mt-4"},Y={class:"table table-bordered table-hover text-center"},Z={key:0},q=["src"],H=["src"],J={class:"text-left"},W={key:0},X={class:"d-flex justify-content-end mt-5"},pe={__name:"Team",props:{app_name:{type:String},coworking:{type:Object},status:{}},setup(f){const p=V.useToast(),l=$(),d=A({id:""}),k=()=>{if(c.value="",d.id==""){p.error("Please select a team member to continue.");return}d.post(route("coworking.step.team.save",l.props.coworking.coworking_id),{onSuccess:o=>{p.success("Team member added successfully."),d.reset()},onError:o=>{p.error(Object.values(o)[0]),d.reset()}})},u=w(!1),c=w(""),C=function(){let o=[];return l.props.suggestions.length&&l.props.suggestions.forEach(function(t,s){c.value?t.name.toLowerCase().includes(c.value.toLowerCase())&&o.push(t):o.push(t)}),o};return E(()=>{document.addEventListener("click",function(o){o.target.id!="teamSuggestion"&&o.target.id!="searchTeam"&&(u.value=!1)}),l.props.flash.success&&p.success(l.props.flash.success)}),(o,t)=>(a(),n(_,null,[m(r(N),{title:"Space Assign Team - "+f.coworking.coworking_id},null,8,["title"]),m(M,null,{default:v(()=>[e("div",F,[m(D),e("div",z,[e("div",O,[t[9]||(t[9]=e("div",{class:"card-title"},[e("h3",null,"Assign Team"),e("p",{class:"form-text"},"Search and select a member from list to add."),e("hr")],-1)),f.status?(a(),n("div",P,i(f.status),1)):g("",!0),e("form",{method:"post",id:"price_form",ref:"formRef",onSubmit:j(k,["prevent"])},[e("div",R,[e("div",G,[y(e("input",{type:"text",name:"team",class:"form-control inline",placeholder:"Search by name",id:"searchTeam",ref:"search",onKeyup:t[0]||(t[0]=s=>{u.value=!0,r(d).id=""}),onClick:t[1]||(t[1]=s=>u.value=!u.value),"onUpdate:modelValue":t[2]||(t[2]=s=>c.value=s),autocomplete:"off"},null,544),[[B,c.value]]),y(e("div",I,[(a(!0),n(_,null,x(C(),(s,h)=>(a(),n("button",{type:"button",class:"btn w-100 text-start",onClick:ee=>{c.value=s.name,u.value=!1,r(d).id=s.id}},i(h+1)+". "+i(s.name)+" - "+i(s.designation),9,K))),256))],512),[[L,u.value]])]),e("button",{type:"button",class:T([{disabled:r(d).id==""},"btn btn-primary md:mx-2"]),onClick:k},"Add Team Member",2)]),r(l).props.suggestions.length==0?(a(),n("p",Q,"You have already assgined all your team members.")):g("",!0)],544),e("div",U,[e("table",Y,[t[7]||(t[7]=e("thead",null,[e("tr",{class:"px-2"},[e("th",null,"#"),e("th",{colspan:"2"},"Title"),e("th",null,"Designation"),e("th",null,"Action")])],-1)),e("tbody",null,[r(l).props.assgined_team.length<1?(a(),n("tr",Z,t[3]||(t[3]=[e("td",{colspan:"5",class:"text-left italic"},"No team member is assigned to this coworking.",-1)]))):g("",!0),(a(!0),n(_,null,x(r(l).props.assgined_team,(s,h)=>(a(),n("tr",null,[e("td",null,i(h+1),1),e("td",null,[s.profile_photo_path?(a(),n("img",{key:0,src:s.profile_image_url,height:"64",width:"64",class:"rounded-50"},null,8,q)):(a(),n("img",{key:1,src:o.route("avatar",s.name),height:"64",width:"64",class:"rounded-50"},null,8,H))]),e("td",J,[b(i(s.name)+" ",1),t[5]||(t[5]=e("br",null,null,-1)),b(" "+i(s.email)+" ",1),s.active==0?(a(),n("div",W,t[4]||(t[4]=[e("span",{class:"badge bg-secondary"},"Inactive",-1)]))):g("",!0)]),e("td",null,i(s.designation),1),e("td",null,[m(r(S),{href:o.route("coworking.step.team.delete",[r(l).props.coworking.coworking_id,s.slug]),class:"link icon-button text-red",title:"Remove Assignment"},{default:v(()=>
1t[6]||(t[6]=[e("i",{class:"fa fa-trash"},null,-1)])),_:2},1032,["href"])])]))),256))])])]),e("div",X,[m(r(S),{class:T(["btn btn-primary",{disabled:o.$page.props.coworking.team_saved==0}]),href:o.route("coworking.step.publish",r(l).props.coworking.coworking_id)},{default:v(()=>t[8]||(t[8]=[b("Go to Publish "),e("i",{class:"fa fa-arrow-right"},null,-1)])),_:1},8,["href","class"])])])])])]),_:1})],64))}};export{pe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.