PageSourceSearch

https://markaz.pk/build/assets/Basics-4d1b47fd.js

js markaz.pk collected 2026-09-24 14:27:20 UTC 13,028 bytes, 1 lines download raw bytes

1import{j as H,Q as C,r as h,i as W,T as j,m as R,o as k,d as x,a as i,u as l,Z as F,w as S,b as s,t as U,e as O,g as z,f as u,l as n,v as G,q as I,x as b,F as A,h as Q,n as Y}from"./app-2803dbd2.js";import{_ as Z}from"./AuthenticatedLayout-bb8fea16.js";import{_ as c}from"./InputError-4832bc96.js";import{s as J}from"./index-1e4e32a5.js";import K from"./StepMenu-13deb604.js";import{s as P}from"./index-834f2222.js";import{s as X}from"./index-b151e450.js";import{s as m}from"./index-53f982d0.js";/* empty css            */import"./Header-4ad53e0b.js";import"./Count-25cc13c8.js";import"./index-6bddfbc3.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";import"./index-5f34830a.js";import"./index-073fd71a.js";import"./index-2b0ad55c.js";const ss={class:"edit_space p-3"},es={class:"card"},ls={class:"card-body"},os={key:0,class:"mb-4 font-medium text-sm text-green-600"},ts={class:"row mb-4"},is={class:"col-sm-9"},as={class:"row mb-4"},ns={class:"col-sm-9"},rs={class:"row mb-4"},ds={class:"col-sm-9"},us={class:"row mb-4"},cs={class:"col-sm-9"},ms={class:"row mb-4"},ps={class:"col-sm-9"},gs={class:"row mb-4"},fs={class:"col-sm-9 relative"},hs={class:"locations-dropdown mx-2"},vs={class:"no-match-message"},bs={class:"locations data-list"},_s=["onClick"],ws={class:"text"},ys={class:"locations"},Vs={class:"default-message"},ks={class:"advices-wrapper"},xs=["src"],qs={class:"row mb-4"},Ls={class:"col-sm-9"},Cs={class:"row mb-4"},Ss={class:"col-sm-9"},Us={class:"row mb-4"},As={class:"col-sm-9"},Bs={class:"clearfix"},$s={class:"ql-formats"},Ts={class:"ql-bold"},Es={class:"ql-italic"},Ms={class:"ql-underline"},Ns={class:"ql-formats"},Ds={class:"ql-list",value:"ordered"},Hs={class:"ql-list",value:"bullet"},Ws={class:"ql-formats"},js={class:"ql-align",value:""},Rs={class:"ql-align",value:"center"},Fs={class:"ql-align",value:"right"},Os={class:"ql-align",value:"justify"},zs={class:"row mb-4"},Gs={class:"col-sm-9"},Is={class:"row mb-4"},Qs={class:"col-sm-9"},Ys={class:"d-flex justify-content-end"},Zs=["disabled"],be={__name:"Basics",props:{app_name:{type:String},coworking:{type:Object},status:{}},setup(q){const _=H.useToast(),r=C();let w=h(),g=h(!1),y=h(!1),f=h(!1),p=h([]),L=h(!0),V=null;function B(a){let e=a.currentTarget;V&&(clearTimeout(V),V=null),V=setTimeout(()=>{if(e.value){const d=new Headers;d.append("Content-Type","application/json"),p.value=[],y.value=!0,L.value=!1,f.value=!1,window.location_controller&&window.location_controller.abort(),window.location_controller=new AbortController,window.location_signal=window.location_controller.signal,axios.post(route("locations.live.search"),{keyword:e.value,city:o.city,searchBySlug:!0},{headers:d,signal:location_signal}).then(t=>{const v=t.data;v.list.length<=0?f.value=!0:f.value=!1,p.value=v.list}).catch(()=>{f.value=!0,p.value=[]}).finally(()=>{y.value=!1})}else p.value=[],f.value=!1,y.value=!1,L.value=!0},250)}function $(a,e){if(w.value.location){if(e.name==o.locationName)return"cursor-highlight"}else if(a===0)return"cursor-highlight"}const T=function(a){a.target.classList.contains("cursor-highlight")||a.target.classList.add("cursor-highlight")},E=function(a){a.target.classList.contains("cursor-highlight")&&a.target.classList.remove("cursor-highlight")};function M(a){a&&(w.locationName=a.name,o.location_name=a.name,g.value=!1)}function N(){w.value.locationName="",document.addEventListener("click",function(a){a.target.id!="location"&&(g.value=!1)})}W(()=>{N()});const o=j({title:r.props.coworking.title,address_1:r.props.coworking.address_1,address_2:r.props.coworking.address_2,location_name:r.props.coworking.data.location_name,city:r.props.coworking.data.city_slug,selected_categories:r.props.coworking.data.selected_offerings,headline:r.props.coworking.headline,highlight_1:r.props.coworking.highlight_1,highlight_2:r.props.coworking.highlight_2,highlight_3:r.props.coworking.highlight_3,description:r.props.coworking.description,latitude:r.props.coworking.latitude,longitude:r.props.coworking.longitude}),D=()=>
1{if(!o.description){_.error("Description is a required field.");return}o.post(route("coworking.step.basic.save",r.props.coworking.coworking_id),{onSuccess:a=>{_.success("Space updated successfully."),a.props.coworking.submitted_for_approval==1&&_.info("The updates are now being reviewed and will be visible once approved.")},onError:a=>{_.error(Object.values(a)[0])}})};return(a,e)=>{const d=R("tooltip");return k(),x(A,null,[i(l(F),{title:"Space - "+q.coworking.coworking_id},null,8,["title"]),i(Z,null,{default:S(()=>[s("div",ss,[i(K),s("div",es,[s("div",ls,[e[41]||(e[41]=s("div",{class:"card-title flex gap-2"},[s("h3",null,"Basic Information")],-1)),q.status?(k(),x("div",os,U(q.status),1)):O("",!0),s("form",{method:"post",id:"profile_form",ref_key:"formRef",ref:w,onSubmit:z(D,["prevent"])},[s("div",ts,[e[17]||(e[17]=s("label",{for:"title",class:"col-sm-3 col-form-label form-label"},[u("CW Space Title"),s("sup",{class:"required"},"*")],-1)),s("div",is,[i(l(m),{type:"text",name:"title",class:"w-full",modelValue:l(o).title,"onUpdate:modelValue":e[0]||(e[0]=t=>l(o).title=t),required:""},null,8,["modelValue"]),i(c,{message:l(o).errors.title},null,8,["message"])])]),s("div",as,[e[18]||(e[18]=s("label",{for:"property_type",class:"col-sm-3 col-form-label form-label"},[u("CW Space Offerings "),s("sup",{class:"required"},"*")],-1)),s("div",ns,[i(l(P),{class:"w-full",modelValue:l(o).selected_categories,"onUpdate:modelValue":e[1]||(e[1]=t=>l(o).selected_categories=t),required:"",options:a.$page.props.categories,"option-label":"name","option-value":"id",display:"chip",selectionMode:"multiple",placeholder:"Select"},null,8,["modelValue","options"]),i(c,{message:l(o).errors.selected_categories},null,8,["message"])])]),e[38]||(e[38]=s("div",{class:"card-title"},[s("h5",null,"Address"),s("hr")],-1)),s("div",rs,[e[19]||(e[19]=s("label",{for:"address_1",class:"col-sm-3 col-form-label form-label"},"Address Line 1 ",-1)),s("div",ds,[i(l(m),{type:"text",name:"address_1",class:"w-full",modelValue:l(o).address_1,"onUpdate:modelValue":e[2]||(e[2]=t=>l(o).address_1=t)},null,8,["modelValue"]),i(c,{message:l(o).errors.address_1},null,8,["message"])])]),s("div",us,[e[20]||(e[20]=s("label",{for:"address_2",class:"col-sm-3 col-form-label form-label"},"Address Line 2",-1)),s("div",cs,[i(l(m),{type:"text",name:"address_2",class:"form-control",modelValue:l(o).address_2,"onUpdate:modelValue":e[3]||(e[3]=t=>l(o).address_2=t)},null,8,["modelValue"]),i(c,{message:l(o).errors.address_2},null,8,["message"])])]),s("div",ms,[e[21]||(e[21]=s("label",{for:"city",class:"col-sm-3 col-form-label form-label"},[u("City "),s("sup",{class:"required"},"*")],-1)),s("div",ps,[i(l(X),{options:a.$page.props.cities,optionValue:"slug",optionLabel:"label",required:"",filter:"",class:"w-full",modelValue:l(o).city,"onUpdate:modelValue":e[4]||(e[4]=t=>l(o).city=t),onChange:e[5]||(e[5]=t=>l(o).location_name=""),clearable:!1},null,8,["options","modelValue"]),i(c,{message:l(o).errors.city},null,8,["message"])])]),s("div",gs,[e[28]||(e[28]=s("label",{for:"location_name",class:"col-sm-3 col-form-label form-label"},[u("Location "),s("sup",{class:"required"},"*")],-1)),s("div",fs,[n(s("input",{type:"text",name:"location_name",id:"location",class:"form-control",required:"",onChange:e[6]||(e[6]=t=>{a.locationNotEmpty=t.target.value}),onKeyup:e[7]||(e[7]=t=>B(t)),onFocus:e[8]||(e[8]=t=>I(g)?g.value=!0:g=!0),autocomplete:"off","onUpdate:modelValue":e[9]||(e[9]=t=>l(o).location_name=t)},null,544),[[G,l(o).location_name]]),i(c,{message:l(o).errors.location_name},null,8,["message"]),n(s("div",hs,[e[26]||(e[26]=s("div",{class:"header clearfix"},[s("span",{class:"title"},"Location suggestions")],-1)),n(s("div",vs,e[22]||(e[22]=[s("i",{class:"fa-solid fa-triangle-exclamation"},null,-1),s("span",{class:"warning-message"},"No matching locations. ",-1),s("span",{class:"enlight-message"},"You can search by area or region.",-1)]),512),[[b,l(f)]]),n(s("ul",bs,[(k(!0),x(A,null,Q(l(p),(t,v)=>(k(),x("li",{key:v,class:Y(["location",$(v,t)]),onMouseenter:T,onMouseleave:E,onClick:Js=>M(t)},[e[23]||(e[23]=s("i",{class:"fa-solid fa-location-dot"},null,-1)),s("span",ws,U(t.name),1)],42,_s))),128))],512),[[b,l(p).length>0]]),n(s("ul",ys,e[24]||(e[24]=[s("li",{class:"location d-flex align-items-center"},[s("i",{class:"fa-solid fa-location-dot"})],-1)]),512),[[b,l(y)]]),n(s("div",Vs,[s("div",ks,[s("img",{src:l(C)().props.asset_url+"images/markaz-map-pin.png",width:"30"}
1,null,8,xs),e[25]||(e[25]=s("div",{class:"advices"},[s("div",{class:"advice"},"Enter a location to search"),s("div",{class:"detailed-advice"},"You can search by area or region.")],-1))])],512),[[b,l(L)&&l(p).length<=0]])],512),[[b,l(g)]]),e[27]||(e[27]=s("p",{class:"form-text italic"},"Location is important for your spaces to appear in searches.",-1))])]),e[39]||(e[39]=s("div",{class:"card-title"},[s("h5",null,"About CW Space"),s("hr")],-1)),s("div",qs,[e[30]||(e[30]=s("label",{for:"headline",class:"col-sm-3 col-form-label form-label"},[u("Headline "),s("sup",{class:"required"},"*")],-1)),s("div",Ls,[i(l(m),{type:"text",class:"w-full",name:"headline",id:"headline",placeholder:"Space Caption",modelValue:l(o).headline,"onUpdate:modelValue":e[10]||(e[10]=t=>l(o).headline=t),required:""},null,8,["modelValue"]),i(c,{message:l(o).errors.headline},null,8,["message"]),e[29]||(e[29]=s("p",{class:"form-text italic"},"Main headline that describes your space listing. Appears on slider and before description.",-1))])]),s("div",Cs,[e[32]||(e[32]=s("label",{for:"Highlights",class:"col-sm-3 col-form-label form-label"},[u("Highlights ("),s("sup",{class:"required"},"*"),u(" first)")],-1)),s("div",Ss,[i(l(m),{type:"text",class:"w-full mb-2",name:"highlights_1",placeholder:"Highlight sentence 1",modelValue:l(o).highlight_1,"onUpdate:modelValue":e[11]||(e[11]=t=>l(o).highlight_1=t),required:""},null,8,["modelValue"]),i(l(m),{type:"text",class:"w-full mb-2",name:"highlights_2",placeholder:"Highlight sentence 2",modelValue:l(o).highlight_2,"onUpdate:modelValue":e[12]||(e[12]=t=>l(o).highlight_2=t)},null,8,["modelValue"]),i(l(m),{type:"text",class:"w-full",name:"highlights_3",placeholder:"Highlight sentence 3",modelValue:l(o).highlight_3,"onUpdate:modelValue":e[13]||(e[13]=t=>l(o).highlight_3=t)},null,8,["modelValue"]),e[31]||(e[31]=s("p",{class:"form-text italic"},"Highlight your space listing with 3 sentences. Appears on slider and before description.",-1))])]),s("div",Us,[e[33]||(e[33]=s("label",{for:"description",class:"col-sm-3 col-form-label form-label"},[u("Description "),s("sup",{class:"required"},"*")],-1)),s("div",As,[s("div",Bs,[i(l(J),{editorStyle:"height: 350px",required:"",modelValue:l(o).description,"onUpdate:modelValue":e[14]||(e[14]=t=>l(o).description=t)},{toolbar:S(()=>[s("span",$s,[n(s("button",Ts,null,512),[[d,"Bold",void 0,{bottom:!0}]]),n(s("button",Es,null,512),[[d,"Italic",void 0,{bottom:!0}]]),n(s("button",Ms,null,512),[[d,"Underline",void 0,{bottom:!0}]])]),s("span",Ns,[n(s("button",Ds,null,512),[[d,"Ordered List",void 0,{bottom:!0}]]),n(s("button",Hs,null,512),[[d,"Bullet List",void 0,{bottom:!0}]])]),s("span",Ws,[n(s("button",js,null,512),[[d,"Align Left",void 0,{bottom:!0}]]),n(s("button",Rs,null,512),[[d,"Align Center",void 0,{bottom:!0}]]),n(s("button",Fs,null,512),[[d,"Align Right",void 0,{bottom:!0}]]),n(s("button",Os,null,512),[[d,"Justify",void 0,{bottom:!0}]])])]),_:1},8,["modelValue"])]),i(c,{message:l(o).errors.description},null,8,["message"])])]),e[40]||(e[40]=s("div",{class:"card-title"},[s("h5",null,"Location"),s("p",{class:"text-sm"},[u("Watch the tutorial on how to get location coordinates on both "),s("a",{target:"_blank",href:"https://youtu.be/iaVt0w1GWeQ?si=7ZiDM4ht6sbiiGUd"},"mobile"),u(" and "),s("a",{target:"_blank",href:"https://youtu.be/nkDwef_VWW8?si=4baBVGyvFI3oPbEz"},"desktop"),u(". ")]),s("hr")],-1)),s("div",zs,[e[35]||(e[35]=s("label",{for:"latitude",class:"col-sm-3 col-form-label form-label"},"Latitude (north/south)",-1)),s("div",Gs,[i(l(m),{type:"number",step:"any",name:"latitude",class:"w-full",modelValue:l(o).latitude,"onUpdate:modelValue":e[15]||(e[15]=t=>l(o).latitude=t)},null,8,["modelValue"]),i(c,{message:l(o).errors.latitude},null,8,["message"]),e[34]||(e[34]=s("p",{class:"form-text italic"},"Example: 31.362871",-1))])]),s("div",Is,[e[37]||(e[37]=s("label",{for:"longitude",class:"col-sm-3 col-form-label form-label"},"Longitude (east/west)",-1)),s("div",Qs,[i(l(m),{type:"number",step:"any",name:"longitude",class:"w-full",modelValue:l(o).longitude,"onUpdate:modelValue":e[16]||(e[16]=t=>l(o).longitude=t)},null,8,["modelValue"]),i(c,{message:l(o).errors.longitude},null,8,["message"]),e[36]||(e[36]=s("p",{class:"form-text italic"},"Example: 74.186107",-1))])]),s("div",Ys,[s("button",{type:"submit",class:"btn btn-primary",disabled:l(o).processing},"Save changes",8,Zs)])],544)])])])]),_:1})],64)}}};export{be 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.