PageSourceSearch

https://r3store.co/_nuxt/D_JadP3R.js

js r3store.co collected 2026-10-04 11:49:42 UTC 11,317 bytes, 1 lines download raw bytes

1import{s as w,r as f,g as k,c as i,a as l,b as v,d as L,k as o,A as a,H as r,j as y,K as N,o as m,bA as h}from"./DmI-g1TT.js";import{h as V}from"./C5S46NFB.js";import{u as E}from"./COU07cT_.js";const U={class:"space-y-6"},A={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-3"},C={class:"text-2xl font-bold text-gray-200 flex items-center gap-2"},T={class:"w-full lg:w-10/12 bg-gray-800 rounded-xl shadow-sm border border-gray-700 p-6 my-2"},B={key:0,class:"flex items-center justify-center space-x-2"},j={key:1,class:"flex flex-col justify-between gap-3"},I={class:"flex flex-row gap-3"},M={key:0,class:"w-1/2"},F={key:1,class:"w-1/2"},S={class:"flex flex-col lg:flex-row gap-3"},q={class:"w-full lg:w-1/2"},D={class:"w-full lg:w-1/2"},G={class:"flex flex-col lg:flex-row gap-3"},R={class:"w-full lg:w-1/2"},Y={class:"w-full lg:w-1/2"},z={class:"flex flex-col lg:flex-row gap-3"},H={class:"w-full lg:w-1/2"},P={class:"w-full lg:w-1/2"},W={class:"flex flex-col lg:flex-row gap-3"},X={class:"w-full lg:w-1/2"},K={class:"w-full lg:w-1/2"},O={class:"flex flex-col lg:flex-row gap-3"},$={class:"w-full lg:w-1/2"},J={class:"w-full lg:w-1/2"},Q={class:"flex flex-col lg:flex-row gap-3"},Z={class:"w-full lg:w-1/2"},_={class:"w-full lg:w-1/2"},se={__name:"merchant",setup(ee){V.locale("id");const{$toast:p}=w(),c=E(),d=f(!1),t=f({name:"",email:"",desc:"",alamat:"",lat:"",lng:"",igName:"",fbName:"",ytName:"",twitterName:"",whatsappNumber:"",igLink:"",fbLink:"",ytLink:"",twitterLink:"",whatsappLink:"",appstoreLink:"",playstoreLink:"",ytAdsContent:""}),n=f(null),g=async()=>{d.value=!0;try{const u=await c.makeRequest("GET","/dash/merchant");if(u!=null&&u.data)n.value=u.data,t.value.name=n.value.name,t.value.email=n.value.email,t.value.desc=n.value.desc,t.value.alamat=n.value.alamat,t.value.lat=n.value.lat,t.value.lng=n.value.lng,t.value.whatsappNumber=n.value.whatsapp_number,t.value.whatsappLink=n.value.whatsapp_link,t.value.igName=n.value.ig_name,t.value.igLink=n.value.ig_link,t.value.fbName=n.value.fb_name,t.value.fbLink=n.value.fb_link,t.value.twitterName=n.value.twitter_name,t.value.twitterLink=n.value.twitter_link,t.value.ytName=n.value.yt_name,t.value.ytLink=n.value.yt_link,t.value.appstoreLink=n.value.appstore_link,t.value.playstoreLink=n.value.playstore_link,t.value.ytAdsContent=n.value.yt_ads_content;else throw new Error("Invalid response format")}catch(u){p.error("Gagal mendapatkan data merchant."),console.error(u)}finally{d.value=!1}},x=async()=>{d.value=!0;try{await c.makeRequest("POST","/dash/merchant",{body:t.value,onResponse({request:e,response:b,options:s}){b.status==200&&p.success("Berhasil menyimpan!")}})&&p.success("Berhasil menyimpan")}catch(u){console.error(u),p.error("Gagal menyimpan")}finally{d.value=!1}};return k(async()=>{await g()}),(u,e)=>{const b=N("FontAwesomeIcon");return m(),i("div",U,[l("div",null,[l("div",A,[l("div",null,[l("h1",C,[v(b,{icon:o(h),class:"w-8 h-8 text-blue-600"},null,8,["icon"]),e[19]||(e[19]=L(" Setting Merchant "))])])]),l("div",T,[o(d)?(m(),i("div",B,e[20]||(e[20]=[l("svg",{class:"animate-spin w-5 h-5 text-blue-600",fill:"none",viewBox:"0 0 24 24"},[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),l("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),l("span",{class:"text-gray-600"},"Loading...",-1)]))):(m(),i("div",j,[l("div",null,[e[21]||(e[21]=l("label",{class:"block text-sm font-medium text-gray-200"},"Name",-1)),a(l("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>o(t).name=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter name"},null,512),[[r,o(t).name]])]),l("div",null,[e[22]||(e[22]=l("label",{class:"block text-sm font-medium text-gray-200"},"Email",-1)),a(l("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>o(t).email=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter email"},null,512),[[r,o(t).email]])]),l("div",I,[o(d)?y("",!0):(m(),i("div",M,[e[23]||(e[23]=l("label",{class:"block text-sm font-medium text-gray-200"},"WhatsApp Number",-1)),a(l("input",{"onUpdate:modelValue":e[2]||(e[2]=s=>o(t).whatsappNumber=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter whatsapp number"},null,512),[[r,o(t).whatsappNumber]])])),o(d)?y("",!0):(m(),i("div",F,[e[24]||(e[24]=l("label",{class:"block text-sm font-medium text-gray-200"},"WhatsApp Link",-1)),a(l("input",{"onUpdate:modelValue":e[3]||(e[3]=s=>o(t).whatsappLink=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter title"},null,512),[[r,o(t).whatsappLink]])]))]),l("div",null,[e[25]||(e[25]=l("label",{class:"block text-sm font-medium text-gray-200"},"Description",-1)),a(l("textarea",{"onUpdate:modelValue":e[4]||(e[4]=s=>o(t).desc=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter description",rows:"6"},null,512),[[r,o(t).desc]])]),l("div",null,[e[26]||(e[26]=l("label",{class:"block text-sm font-medium text-gray-200"},"Address",-1)),a(l("textarea",{"onUpdate:modelValue":e[5]||(e[5]=s=>o(t).alamat=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter address",rows:"4"},null,512),[[r,o(t).alamat]])]),l("div",S,[l("div",q,[e[27]||(e[27]=l("label",{class:"block text-sm font-medium text-gray-200"},"Latitude",-1)),a(l("input",{"onUpdate:modelValue":e[6]||(e[6]=s=>o(t).lat=s),type:"number",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter latitude"},null,512),[[r,o(t).lat]])]),l("div",D,[e[28]||(e[28]=l("label",{class:"block text-sm font-medium text-gray-200"}
1,"Longitude",-1)),a(l("input",{"onUpdate:modelValue":e[7]||(e[7]=s=>o(t).lng=s),type:"number",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter longitude"},null,512),[[r,o(t).lng]])])]),l("div",G,[l("div",R,[e[29]||(e[29]=l("label",{class:"block text-sm font-medium text-gray-200"},"Instagram Name",-1)),a(l("input",{"onUpdate:modelValue":e[8]||(e[8]=s=>o(t).igName=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter instagram name"},null,512),[[r,o(t).igName]])]),l("div",Y,[e[30]||(e[30]=l("label",{class:"block text-sm font-medium text-gray-200"},"Instagram Link",-1)),a(l("input",{"onUpdate:modelValue":e[9]||(e[9]=s=>o(t).igLink=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter instagram link"},null,512),[[r,o(t).igLink]])])]),l("div",z,[l("div",H,[e[31]||(e[31]=l("label",{class:"block text-sm font-medium text-gray-200"},"Facebook Name",-1)),a(l("input",{"onUpdate:modelValue":e[10]||(e[10]=s=>o(t).fbName=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter facebook name"},null,512),[[r,o(t).fbName]])]),l("div",P,[e[32]||(e[32]=l("label",{class:"block text-sm font-medium text-gray-200"},"Facebook Link",-1)),a(l("input",{"onUpdate:modelValue":e[11]||(e[11]=s=>o(t).fbLink=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter facebook link"},null,512),[[r,o(t).fbLink]])])]),l("div",W,[l("div",X,[e[33]||(e[33]=l("label",{class:"block text-sm font-medium text-gray-200"},"Youtube Name",-1)),a(l("input",{"onUpdate:modelValue":e[12]||(e[12]=s=>o(t).ytName=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter youtube name"},null,512),[[r,o(t).ytName]])]),l("div",K,[e[34]||(e[34]=l("label",{class:"block text-sm font-medium text-gray-200"},"Youtube Link",-1)),a(l("input",{"onUpdate:modelValue":e[13]||(e[13]=s=>o(t).ytLink=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter youtube link"},null,512),[[r,o(t).ytLink]])])]),l("div",O,[l("div",$,[e[35]||(e[35]=l("label",{class:"block text-sm font-medium text-gray-200"},"Twitter (X) Name",-1)),a(l("input",{"onUpdate:modelValue":e[14]||(e[14]=s=>o(t).twitterName=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter x name"},null,512),[[r,o(t).twitterName]])]),l("div",J,[e[36]||(e[36]=l("label",{class:"block text-sm font-medium text-gray-200"},"Twitter (X) Link",-1)),a(l("input",{"onUpdate:modelValue":e[15]||(e[15]=s=>o(t).twitterLink=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter x link"},null,512),[[r,o(t).twitterLink]])])]),l("div",Q,[l("div",Z,[e[37]||(e[37]=l("label",{class:"block text-sm font-medium text-gray-200"},"App Store Link",-1)),a(l("input",{"onUpdate:modelValue":e[16]||(e[16]=s=>o(t).appstoreLink=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter appstore link"},null,512),[[r,o(t).appstoreLink]])]),l("div",_,[e[38]||(e[38]=l("label",{class:"block text-sm font-medium text-gray-200"},"Playstore Link",-1)),a(l("input",{"onUpdate:modelValue":e[17]||(e[17]=s=>o(t).playstoreLink=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter playstore link"},null,512),[[r,o(t).playstoreLink]])])]),l("div",null,[e[39]||(e[39]=l("label",{class:"block text-sm font-medium text-gray-200"},"Youtube Ads Content",-1)),a(l("input",{"onUpdate:modelValue":e[18]||(e[18]=s=>o(t).ytAdsContent=s),type:"text",class:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter youtube ads content"},null,512),[[r,o(t).ytAdsContent]])]),l("div",{class:"flex flex-row justify-end gap-3"},[l("button",{class:"px-6 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors",type:"submit",onClick:x}," Save ")])]))])])])}}};export{se 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.