PageSourceSearch

https://nationalhorseman.com/_nuxt/_id_.65b2eb61.js

js nationalhorseman.com collected 2026-10-02 18:51:08 UTC 6,973 bytes, 2 lines download raw bytes

1import{T as B}from"./TitleBar.85f9c616.js";import{_ as I}from"./Divider.b4517d06.js";import{_ as z}from"./JbButton.60c5f92f.js";import{_ as E}from"./CardComponent.f76f010f.js";import{M}from"./MainSection.b471a663.js";import{r as _,e as R,h as V,g as k,c as n,a as f,l as F,o as s,b as t,t as a,z as c,F as p,x as h,s as j,m as g,p as Q,k as S}from"./entry.aa807b51.js";import{a as U,m as G}from"./nhTypes.6d9fb8b6.js";import{u as H}from"./index.26ecbba3.js";import"./mdi.8725f226.js";import"./Level.cbe959c7.js";import"./_plugin-vue_export-helper.a1a6add7.js";import"./colors.1602e50d.js";import"./Icon.a1f9a363.js";const J={class:"px-28"},K={key:0,class:"bg-blueLightNat text-white p-5"},W=t("div",{class:"font-bold"}," Billing Address :",-1),X={key:1,class:"bg-blueLightNat text-white p-5"},Y=t("div",{class:"font-bold"}," Shipping Address :",-1),Z=t("thead",null,[t("tr",null,[t("th",{class:"font-medium"},"Id "),t("th",{class:"font-medium"}," Category "),t("th",{class:"font-medium"}," Product Name "),t("th",{class:"font-medium"}," Option Name "),t("th",{class:"font-medium"}," Option Category "),t("th",{class:"font-medium"}," Thumbnail "),t("th",{class:"font-medium"}," Quantity "),t("th",{class:"font-medium"}," Price ")])],-1),tt={key:0},et={key:1},at={key:0,class:"font-bold"},st={class:"font-bold"},nt={class:"font-bold"},lt={key:1},ot={key:0},it={key:1},ut={key:0},dt={key:0},rt={key:1},ct={key:1},_t=["src","alt"],vt={key:0},pt={key:1},ht=t("th",null,null,-1),mt=t("th",null,null,-1),ft=t("th",null,null,-1),yt=t("th",null,null,-1),gt=t("th",null,null,-1),bt=t("th",null,null,-1),kt=t("div",null,"Subtotal :",-1),wt={key:0},xt={key:1},Ft=t("div",null,"Surcharge :",-1),St=t("div",null,"Tax :",-1),Ot=t("div",null,"Shipping :",-1),qt=t("div",null,"Total :",-1),Pt={key:0},Tt={key:1},$t={class:"flex flex-row justify-between"},At={class:"pl-4 pb-3"},Dt={class:"w-fit"},Lt={class:"w-fit"},Nt={class:"w-fit items-end pr-4"},Xt={__name:"[id]",setup(Ct){const O=_(["Admin / Orders","Order Products"]),w=R().params.id,d=_(new U),e=_(new G);_([]),_("");const m=V(),x=_([]),q=_(null),P=k(()=>m.userRoles),T=k(()=>m.tableTrStyle),$=k(()=>m.tableTrOddStyle),A=async()=>{try{await S.get("/api/orders/"+w).then(u=>{if(x.value=u.data.products,d.value=u.data.shippingAddress,e.value=u.data.orderInformation,e.value.campaign_id=e.value.campaign?e.value.campaign.id:0,e.value.voucher_name=e.value.campaign?e.value.campaign.voucher_name:"",e.value.discount=0,e.value.campaign){let v=e.value.campaign.discount;if(e.value.campaign.campaign_offers.length>0)e.value.products.forEach(o=>{e.value.campaign.campaign_offers.find(b=>b.offer_id===o.product_id)!==void 0&&(e.value.campaign.discount_type===0?e.value.discount+=e.value.campaign.discount/100*o.price*o.quantity:e.value.campaign.discount_type===1&&v>0&&(o.price*o.quantity<v?(e.value.discount+=o.price*o.quantity,v-=o.price*o.quantity):(e.value.discount+=v,v=0)))});else{let o=e.value.campaign.discount;e.value.products.forEach(i=>{e.value.campaign.discount_type===0?e.value.discount+=e.value.campaign.discount/100*i.price*i.quantity:e.value.campaign.discount_type===1&&o>0&&(i.price*i.quantity<o?(e.value.discount+=i.price*i.quantity,o-=i.price*i.quantity):(e.value.discount+=o,o=0))})}}})}catch(u){console.log(u)}},D=async()=>{try{await S.get("/api/order-logs/"+w).then(u=>{q.value=u.data})}catch(u){console.log(u)}};return(async()=>{m.setOverlay(!0),await A(),m.setOverlay(!1)})(),(u,v)=>{const o=B,i=I,b=z,L=E,N=M;return s(),n("div",null,[f(o,{"title-stack":O.value},null,8,["title-stack"]),f(N,null,{default:F(()=>[f(L,{title:"Details :",status:e.value.transaction,hasTable:""},{default:F(()=>[t("div",J,[e.value!=null?(s(),n("div",K,[W,t("div",null," First name : "+a(e.value.first_name),1),t("div",null," Last name : "+a(e.value.last_name),1),t("div",null," Address : "+a(e.value.address)+", "+a(e.value.city)+", "+a(e.value.state)+", "+a(e.value.zip_code)+", "+a(e.value.country),1),t("div",null," Phone Number : "+a(e.value.phone_number),1),t("div",null," Email Address : "+a(e.value.email_address),1)])):c("",!0),d.value!=null?(s(),n("div",X,[Y,t("div",null," First name : "+a(d.value.first_name),1),t("div",null," Last name : "+a(d.value.last_name),1),t("div",null," Address : "+a(d.value.address)+", "+a(d.value.city)+", "+a(d.value.state)+", "+a(d.value.zip_code)+", "+a(d.value.country),1)])):c("",!0)]),f(i),t("table",null,[Z,t("tbody",null,[(s(!0),n(p,null,h(x.value,(l,C)=>(s(),n("tr",{key:l.id,class:j([[g(T),C%2===0?g($):""],"align-top"])},[t("td",null,a(l.id),1),t("td",null,[l.hasOwnProperty("offers")?(s(),n("div",tt,[t("p",null,a(l.category),1),(s(!0),n(p,null,h(l.offers,(r,y)=>(s(),n("p",null," - "+a(r.category),1))),256))])):(s(),n("p",et,a(l.category),1))]),t("td",null,[l.hasOwnProperty("offers")?(s(),n("div",at,[t("p",st,a(l.name)+": ",1),(s(!0),n(p,null,h(l.offers,(r,y)=>(s(),n("p",nt," - "+a(r.name),1))),256))])):(s(),n("p",lt,a(l.name),1))]),t("td",null,[l.hasOwnProperty("offers")?(s(),n("div",ot,[t("p",null,a(l.option),1),(s(!0),n(p,null,h(l.offers,(r,y)=>(s(),n("p",null,a(r.option),1))),256))])):(s(),n("p",it,a(l.option),1))]),t("td",null,[l.hasOwnProperty("offers")?(s(),n("div",ut,[l.category_option?(s(),n("p",dt,a(l.category_option),1)):(s(),n("br",rt)),(s(!0),n(p,null,h(l.offers,(r,y)=>(s(),n("p",null," - "+a(r.category_option),1))),256))])):(s(),n("p",ct,a(l.category_option),1))]),t("td",null,[l.thumbnail!=null?(s(),n("img",{key:0,class:"w-32",src:g(H)(l.thumbnail),alt:l.name},null,8,_t)):c("",!0)]),t("td",null,[l.hasOwnProperty("offers")?(s(),n("div",vt,[t("p",null,a(l.quantity),1),(s(!0),n(p,null,h(l.offers,(r,y)=>(s(),n("p",null,a(r.quantity),1))),256))])):(s(),n("p",pt,a(l.quantity),1))]),t("td",null," $ "+a(l.price),1)],2))),128)),t("tr",null,[ht,mt,ft,yt,gt,bt,t("th",null,[kt,e.value.discount!==0?(s(),n("div",wt,"Promo Discount :")):c("",!0),e.value.campaign_id>0?(s(),n("div",xt,"Promo Code :")):c("",!0),Ft,St,Ot,qt]),t("th",null,[t("div",null,"$ "+a(parseFloat(e.value.subtotal).toFixed(2)),1),e.value.discount>0?(s(),n("div",Pt,"$ "+a(parseFloat(e.value.discount).toFixed(2)),1)):c("",!0),e.value.campaign_id>0?(s(),n("div",Tt,a(e.value.voucher_name),1)):c("",!0),t("div",null,"$ "+a(parseFloat(e.value.surcharge_amount).toFixed(2))+" ("+a(e.value.surcharge)+" %)",1),t("div",null,"$ "+a(parseFloat((e.value.subtotal-e.value.discount)*e.value.tax/100).toFixed(2))+" ("+a(e.value.tax)+" %)",1),t("div",null,"$ "+a(parseFloat(e.value.shipping_tax).toFixed(2)),1),t("div",null,"$ "+a(parseFloat(e.value.total).toFixed(2)),1)])])])]),f(i),t("div",$t,[t("div",At,[t("div",Dt,"Transaction ID : "+a(e.value.transaction_id),1),t("div",Lt,"Date : "+a(new Intl.DateTimeFormat("default").format(new Date(e.value.created_at))),1)]),t("div",Nt,[g(P).includes("Superadmin")?(s(),Q(b,{key:0,onClick:D,color:"danger",label:"Show Logs (look in the request)"})):c("",!0)])])]),_:1},8,["status"])]),_:1})])}}};export{Xt as default};
2//# sourceMappingURL=_id_.65b2eb61.js.map

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.