PageSourceSearch

https://enpatiler.com/_nuxt/B2lEbZCa.js

js enpatiler.com collected 2026-10-02 00:49:14 UTC 10,496 bytes, 1 lines download raw bytes

1import{_ as H}from"./uNecWPRX.js";import{_ as K}from"./Ccrp-WWQ.js";import{e as P,f as W,g as S,w as g,h as Y,i as J,j as N,r as l,o,a as t,b as q,k as V,d as c,c as a,t as n,l as i,F as B,m as j,n as L,p as $,v as X,q as Z,s as ee}from"./CsyhkCrC.js";import{_ as te}from"./-p8JY5de.js";const se={class:"mb-6"},re={key:0,class:"text-sm text-gray-500 mt-1"},oe={key:0,class:"space-y-4 animate-pulse"},ae={key:1,class:"text-center py-10"},le={class:"text-gray-500 text-sm mb-6"},ne={key:0,class:"max-w-sm mx-auto bg-orange-50 border-2 border-dashed border-primary rounded-2xl p-6 mb-6"},ie={class:"text-2xl font-black tracking-widest text-textDark font-mono"},de={key:0,class:"text-xs text-gray-500 mt-3"},ue={class:"font-semibold"},ce={class:"flex flex-col sm:flex-row gap-3 justify-center"},me={key:2,class:"text-center py-16 bg-gray-50 rounded-2xl border-2 border-dashed border-gray-200"},be={class:"text-gray-500 text-sm"},ye={key:3},xe={class:"space-y-4 mb-6"},pe={class:"flex items-start gap-4"},ve=["onClick"],ge={key:0,class:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},fe={class:"w-16 h-16 bg-gray-50 rounded-lg flex-shrink-0 overflow-hidden border border-gray-100"},he=["src","alt"],ke={key:1,class:"w-full h-full flex items-center justify-center text-gray-300"},_e={class:"flex-1 min-w-0"},we={class:"text-sm font-bold text-textDark leading-tight"},Ce={key:0,class:"text-xs text-gray-500 mt-0.5"},qe={class:"text-xs text-gray-400 mt-1"},Be={key:1,class:"mt-3 space-y-3"},je={class:"flex items-center gap-3"},ze={class:"flex items-center border border-gray-200 rounded-lg overflow-hidden"},Me=["onClick","disabled"],De={class:"w-10 text-center text-sm font-bold"},Se=["onClick","disabled"],Ne=["onUpdate:modelValue"],Ve=["value"],Le={class:"mb-6"},$e={key:0,class:"mb-4 text-sm text-red-600 bg-red-50 border border-red-100 rounded-lg px-4 py-3"},Re=["disabled"],Ae={key:0,class:"animate-spin h-5 w-5",viewBox:"0 0 24 24",fill:"none"},Ue={__name:"[id]",setup(Te){const R=Y(),A=J(),z=P(),m=R.params.id,f=l(""),y=l(!0),x=l([]),p=l(!1),v=l(""),h=l(""),u=l(!1),b=l(""),k=l(!1),_=l(""),w=l(""),M=l(""),T=["Beğenmedim","Yanlış ürün geldi","Üründe hasar/kusur var","Beden/ölçü uymadı","Ürün tanımdan farklı","Diğer"],D=ee(()=>x.value.some(s=>s.selected&&s.qty>0)),E=s=>({whatsapp:"WhatsApp",email:"e-posta",sms:"SMS"})[s]||s,F=s=>{s.selected=!s.selected,s.selected&&(!s.qty||s.qty<1)&&(s.qty=1)},G=s=>{s.qty<s.returnable_quantity&&s.qty++},O=s=>{s.qty>1&&s.qty--},U=async()=>{if(!(!z.token||!m)){y.value=!0;try{const s=await N(`/ecommerce/orders/${m}/returnable-items`);s?.success&&s?.data?(f.value=s.data.order_number,p.value=!!s.data.is_eligible,v.value=s.data.reason||"",x.value=(s.data.items||[]).map(e=>({...e,selected:!1,qty:1,reason:""}))):(p.value=!1,v.value=s?.message||"İade bilgileri alınamadı.")}catch(s){console.error("Fetch returnable items error:",s),p.value=!1,v.value=s?.data?.message||"İade bilgileri yüklenirken bir sorun oluştu."}finally{y.value=!1}}},I=async()=>{if(!D.value||u.value)return;b.value="",u.value=!0;const s={order_id:Number(m),customer_note:h.value||null,items:x.value.filter(e=>e.selected&&e.qty>0).map(e=>({order_item_id:e.order_item_id,quantity:e.qty,reason:e.reason||null}))};try{const e=await N("/ecommerce/returns",{method:"POST",body:s});e?.success?(k.value=!0,_.value=e?.meta?.return_barcode||e?.data?.return_barcode||"",w.value=e?.meta?.n
1otified_channel||"",M.value=e?.message||"İade talebiniz oluşturuldu."):b.value=e?.message||"İade talebi oluşturulamadı."}catch(e){console.error("Submit return error:",e),b.value=e?.data?.message||"İade talebi gönderilirken bir sorun oluştu."}finally{u.value=!1}};return W(()=>{if(!z.isAuthenticated){A.push("/auth/giris");return}U()}),(s,e)=>{const C=H,Q=K;return o(),S(te,null,{default:g(()=>[t("div",se,[q(C,{to:`/uyelik/siparislerim/${V(m)}`,class:"inline-flex items-center text-sm text-gray-500 hover:text-primary transition-colors font-medium mb-4 group"},{default:g(()=>[...e[1]||(e[1]=[t("svg",{class:"w-4 h-4 mr-1 group-hover:-translate-x-1 transition-transform",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 19l-7-7m0 0l7-7m-7 7h18"})],-1),c(" Sipariş Detayına Dön ",-1)])]),_:1},8,["to"]),e[2]||(e[2]=t("h2",{class:"text-2xl font-bold text-textDark"},"İade Talebi Oluştur",-1)),f.value?(o(),a("p",re,"Sipariş No: #"+n(f.value),1)):i("",!0)]),y.value?(o(),a("div",oe,[(o(),a(B,null,j(3,r=>t("div",{key:r,class:"h-28 bg-gray-50 rounded-xl border border-gray-100"})),64))])):k.value?(o(),a("div",ae,[e[8]||(e[8]=t("div",{class:"w-16 h-16 bg-green-50 text-green-600 rounded-full flex items-center justify-center mx-auto mb-4 shadow-sm"},[t("svg",{class:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})])],-1)),e[9]||(e[9]=t("h3",{class:"text-lg font-bold text-textDark mb-1"},"İade talebiniz alındı",-1)),t("p",le,n(M.value),1),_.value?(o(),a("div",ne,[e[5]||(e[5]=t("div",{class:"text-xs text-gray-500 mb-1"},"İade Kargo Barkodunuz",-1)),t("div",ie,n(_.value),1),w.value?(o(),a("p",de,[e[3]||(e[3]=c(" Barkodunuz ",-1)),t("span",ue,n(E(w.value)),1),e[4]||(e[4]=c(" ile de gönderildi. ",-1))])):i("",!0)])):i("",!0),t("div",ce,[q(C,{to:"/uyelik/iadelerim",class:"inline-block bg-primary text-white px-6 py-2.5 rounded-xl font-bold hover:bg-accent transition-all shadow-sm"},{default:g(()=>[...e[6]||(e[6]=[c("İadelerimi Görüntüle",-1)])]),_:1}),q(C,{to:`/uyelik/siparislerim/${V(m)}`,class:"inline-block bg-white text-textDark px-6 py-2.5 rounded-xl font-bold border border-gray-200 hover:bg-gray-50 transition-all"},{default:g(()=>[...e[7]||(e[7]=[c("Siparişe Dön",-1)])]),_:1},8,["to"])])])):p.value?(o(),a("div",ye,[e[18]||(e[18]=t("div",{class:"bg-orange-50/60 border border-primary/10 rounded-xl p-4 mb-6 text-sm text-gray-600 flex items-start gap-3"},[t("svg",{class:"w-5 h-5 text-primary flex-shrink-0 mt-0.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]),t("span",null,"İade etmek istediğiniz ürünleri ve adetlerini seçin. Onayınızın ardından iade kargo barkodunuz oluşturulup size iletilecektir.")],-1)),t("div",xe,[(o(!0),a(B,null,j(x.value,r=>(o(),a("div",{key:r.order_item_id,class:L(["border rounded-xl p-4 transition-all",r.selected?"border-primary bg-orange-50/30":"border-gray-100 bg-white"])},[t("div",pe,[t("button",{type:"button",onClick:d=>F(r),class:L(["mt-1 w-5 h-5 rounded border-2 flex items-center justify-center flex-shrink-0 transition-colors",r.selected?"bg-primary border-primary text-white":"border-gray-300 bg-white"])},[r.selected?(o(),a("svg",ge,[...e[12]||(e[12]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M5 13l4 4L19 7"},null,-1)])])):i("",!0)],10,ve),t("div",fe,[r.image?(o(),a("img",{key:0,src:r.image,alt:r.product_name,class:"w-full h-full object-cover"},null,8,he)):(o(),a("div",ke,[...e[13]||(e[13]=[t("svg",{class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1)])]))]),t("div",_e,[t("div",we,n(r.product_name),1),r.variant_name?(o(),a("div",Ce,n(r.variant_name),1)):i("",!0),t("div",qe,"İade edilebilir: "+n(r.returnable_quantity)+" adet",1),r.selected?(o(),a("div",Be,[t("div",je,[e[14]||(e[14]=t("span",{class:"text-xs font-semibold text-gray-600"},"İade adedi:",-1)),t("div",ze,[t("button",{type:"button",onClick:d=>O(r),class:"w-8 h-8 flex items-center justify-center text-gray-600 hover:bg-gray-50 disabled:opacity-40",disabled:r.qty<=1},"−",8,Me),t("span",De,n(r.qty),1),t("button",{type:"button",onClick:d=>G(r),class:"w-8 h-8 flex items-center justify-center text-gray-600 hover:bg-gray-50 disabled:opacity-40",disabled:r.qty>=r.returnable_quantity},"+",8,Se)])]),$(t("select",{"onUpdate:modelValue":d=>r.reason=d,class:"w-full text-sm border border-gray-200 rounded-lg px-3 py-2 focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary bg-white"},[e[15]||(e[15]=t("option",{value:""},"İade sebebi seçin (opsiyonel)",-1)),(o(),a(B,null,j(T,d=>t("option",{key:d,value:d},n(d),9,Ve)),64))],8,Ne),[[X,r.reason]])])):i("",!0)])])],2))),128))]),t("div",Le,[e[16]||(e[16]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-2"},"Eklemek istedikleriniz (opsiyonel)",-1)),$(t("textarea",{"onUpdate:modelValue":e[0]||(e[0]=r=>h.value=r),rows:"3",maxlength:"1000",placeholder:"İade ile ilgili not...",class:"w-full text-sm border border-gray-200 rounded-xl px-3 py-2 focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary"},null,512),[[Z,h.value]])]),b.value?(o(),a("div",$e,n(b.value),1)):i("",!0),t("button",{type:"button",onClick:I,disabled:!D.value||u.value,class:"w-full bg-primary text-white px-5 py-3 rounded-xl font-bold hover:bg-accent transition-all shadow-sm disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2"},[u.value?(o(),a("svg",Ae,[...e[17]||(e[17]=[t("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),t("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):i("",!0),c(" "+n(u.value?"Gönderiliyor...":"İade Talebini Gönder"),1)],8,Re)])):(o(),a("div",me,[e[10]||(e[10]=t("div",{class:"w-16 h-16 bg-white text-gray-400 rounded-full flex items-center justify-center mx-auto mb-4 shadow-sm"},[t("svg",{class:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})])],-1)),e[11]||(e[11]=t("h3",{class:"text-lg font-bold text-textDark mb-1"},"İade talebi oluşturulamıyor",-1)),t("p",be,n(v.value||"Bu sipariş için iade talebi oluşturamazsınız."),1)])),y.value?i("",!0):(o(),S(Q,{key:4,compact:"",class:"mt-8","show-refund-note":!k.value},null,8,["show-refund-note"]))]),_:1})}}};export{Ue 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.