PageSourceSearch

https://www.lorflex.fr/_nuxt/C121AEYR.js

js lorflex.fr collected 2026-10-07 07:32:37 UTC 11,301 bytes, 1 lines download raw bytes

1import{_ as j}from"./Dekh5h_Q.js";import{_ as O}from"./By6vYVS1.js";import W from"./DiIoIlf4.js";import F from"./Btj8hxRM.js";import G from"./B-XNvCHk.js";import{aW as B,b5 as X,aV as Y,aX as Z,aU as U,a_ as J,aS as K,aY as ee}from"./VTUw61yR.js";import{A as Q,Q as i,X as c,V as e,W as a,Z as C,H as m,U as k,Y as h,z as l,d as T,G as A,b as V,E as te,a2 as ae,R as se,a9 as oe}from"./BRf5yKlS.js";import"./HUCTy1Bx.js";import{u as le}from"./GYCkzLI4.js";import"./CnUtb9vV.js";import"./uqdPGwt1.js";import"./DwU10Pnv.js";import"./nDs3-Gr9.js";import"./CbsawRzi.js";import"./DhTbjJlp.js";import"./cAPmiy2Z.js";import"./B5yeTdry.js";import"./BKFUH68g.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},w=new r.Error().stack;w&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[w]="6310fc41-f0b7-4ec6-a032-b0b88a7a8fda",r._sentryDebugIdIdentifier="sentry-dbid-6310fc41-f0b7-4ec6-a032-b0b88a7a8fda")}catch{}})();const ne={class:"mb-lg flex flex-col gap-md text-14 font-light md:my-0 md:table-row md:h-[70px]"},re=["data-label"],de={class:"font-bold md:hidden"},ie=["data-label"],ce={class:"font-bold md:hidden"},ue=["data-label"],me={class:"font-bold md:hidden"},_e=["data-label"],pe={class:"font-bold md:hidden"},be=["data-label"],fe={class:"font-bold md:hidden"},he=["data-label"],ye={class:"font-bold md:hidden"},ve={class:"sr-only"},ge=["data-label"],$e={class:"font-bold md:hidden"},qe={class:"sr-only"},ke=["data-label"],we={class:"font-bold md:hidden"},xe=["data-label"],Ce={class:"font-bold md:hidden"},Ve={class:"sr-only"},Pe={class:"flex justify-end gap-10"},Ne={class:"m-0 text-20 font-bold"},Se={class:"flex flex-col gap-md"},Ie={class:"flex items-start gap-sm"},De={for:"acceptSpecialPrices",class:"text-sm"},Te={class:"flex flex-col gap-sm"},Be={class:"flex items-start gap-sm"},Ue={for:"requestCallback",class:"text-sm"},Qe={key:0,class:"font-bold"},Ae={key:0,class:"ml-lg"},Le={key:0,class:"mt-sm text-sm text-danger"},Ee={class:"flex justify-end gap-10"},ze=Q({__name:"QuoteListItem",props:{quote:{}},emits:["quote-deleted"],setup(r,{emit:w}){const _=r,S=w,{getQuotesDocument:f}=B(),{fetchCart:N}=X(),{isLoading:y}=Y(Z()),{t:s}=U(),{setToast:v}=J(),P=K(),$=V(!1),u=V(null),g=V(!1),n=V({acceptSpecialPrices:!1,requestCallback:!1,phoneNumber:""}),q=V(""),L=async t=>{try{y.value=!0;const o=await f(t,"B"),d=new Blob([o],{type:"application/pdf"}),x=URL.createObjectURL(d),p=document.createElement("a");p.href=x,p.download=`${t.id}.pdf`,p.target="_blank",document.body.appendChild(p),p.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),document.body.removeChild(p)}catch{}finally{y.value=!1}},E=async(t,o)=>{try{y.value=!0;const{data:d}=await P.$api.cart.offerToCart(t,o);d?.error===2?I():d?.error?v({severity:"error",summary:s("error_transformation_message")}):d&&(await N(!0),v({severity:"success",summary:s("success_add_to_cart")}))}catch{v({severity:"error",summary:s("error_api")})}finally{y.value=!1}},z=()=>{u.value={id:_.quote.id,key:_.quote.key,shopId:_.quote.shop_id,saleplanId:_.quote.saleplan_id},$.value=!0},H=async()=>{if(!u.value)return;const{id:t,key:o,shopId:d,saleplanId:x}=u.value;try{y.value=!0,$.value=!1;const{error:p}=await P.$api.cart.deleteOffer({quote_id:t,key:o,shop_id:d,saleplan_id:x});if(p){v({severity:"error",summary:s("error_delete_quote")});return}v({severity:"success",summary:s("success_delete_quote")}),S("quote-deleted")}catch{v({severity:"error",summary:s("error_delete_quote")})}finally{y.value=!1,u.value=null}},I=()=>{n.value={acceptSpecialPrices:!1,requestCallback:!1,phoneNumber:""},q.value="",g.value=!0},D=()=>{g.value=!1,n.value={acceptSpecialPrices:!1,requestCallback:!1,phoneNumber:""},q.value=""},M=async()=>{if(q.value="",!n.value.acceptSpecialPrices&&!n.value.requestCallback){q.value=s("validation_agency_error_checkbox");return}if(n.value.requestCallback&&!n.value.phoneNumber.trim()){q.value=s("validation_agency_error_phone");return}if(n.value.requestCallback&&n.value.phoneNumber.trim()&&!/^(?:(?:\+|00)33|0)\s*[1-9](?:[\s.-]*\d{2}){4}$/.test(n.value.phoneNumber.trim())){q.value=s("validation_agency_error_phone_format");return}const t=[];
1n.value.acceptSpecialPrices&&t.push("validate"),n.value.requestCallback&&t.push("validate_with_phone");try{y.value=!0;const o={quote_id:_.quote.id,key:_.quote.key,shop_id:_.quote.shop_id,saleplan_id:_.quote.saleplan_id,response:t};n.value.requestCallback&&n.value.phoneNumber.trim()&&(o.phone=n.value.phoneNumber.trim());const{error:d}=await P.$api.cart.transformOfferByAgency(o);if(d){v({severity:"error",summary:s("error_api")});return}v({severity:"success",summary:s("validation_agency_success")}),D()}catch{v({severity:"error",summary:s("error_api")})}finally{y.value=!1}};return(t,o)=>{const d=O,x=W,p=F,R=G;return i(),c(A,null,[e("tr",ne,[e("td",{"data-label":t.$t("date"),class:"flex items-center gap-sm rounded-l-10 text-center md:table-cell md:w-[15%]"},[e("span",de,a(t.$t("date"))+" : ",1),C(a(r.quote.date),1)],8,re),e("td",{"data-label":t.$t("number"),class:"flex items-center gap-sm text-center md:table-cell md:w-[15%]"},[e("span",ce,a(t.$t("number"))+" : ",1),C(" "+a(r.quote.id),1)],8,ie),e("td",{"data-label":t.$t("reference_quotation"),class:"flex items-center gap-sm text-center md:table-cell md:w-[15%]"},[e("span",me,a(t.$t("reference_quotation"))+" : ",1),C(" "+a(r.quote.PurchaseNo),1)],8,ue),e("td",{"data-label":t.$t("contact_name_quotation"),class:"flex items-center gap-sm text-center md:table-cell md:w-[15%]"},[e("span",pe,a(t.$t("contact_name_quotation"))+" : ",1),C(" "+a(r.quote.contact_name),1)],8,_e),e("td",{"data-label":t.$t("amount"),class:"flex items-center gap-sm text-center md:table-cell md:w-[15%]"},[e("span",fe,a(t.$t("amount"))+" : ",1),C(" "+a(r.quote.amount)+" € HT ",1)],8,be),r.quote.add_cart===1?(i(),c("td",{key:0,"data-label":t.$t("download_net_price"),class:"flex items-center gap-sm text-center md:table-cell"},[e("span",ye,a(t.$t("download_net_price"))+" : ",1),m(d,{"icon-left":"download","icon-class":"text-32",class:"md:mx-auto",onClick:o[0]||(o[0]=b=>L(r.quote))},{default:k(()=>[e("span",ve,a(t.$t("download_net_price")),1)]),_:1})],8,he)):h("",!0),r.quote.add_cart===1?(i(),c("td",{key:1,"data-label":t.$t("add_cart"),class:"flex items-center gap-sm text-center md:table-cell"},[e("span",$e,a(t.$t("add_cart"))+" : ",1),m(d,{"icon-left":"shopping-cart-add-mono","icon-class":"block text-18 text-white group-hover:text-charte-1 md:text-24",class:"content-flex-center base-transition group size-32 rounded-full border border-charte-1 bg-charte-1 hover:bg-white md:mx-auto md:size-48",onClick:o[1]||(o[1]=b=>E(r.quote.id,r.quote.key))},{default:k(()=>[e("span",qe,a(t.$t("add_cart")),1)]),_:1})],8,ge)):r.quote.add_cart!==0?(i(),c("td",{key:2,"data-label":t.$t("validation_agency"),class:"flex items-center gap-sm text-center md:table-cell"},[e("span",we,a(t.$t("validation_agency"))+" : ",1),m(d,{class:"btn-primary whitespace-nowrap",text:t.$t("validation_agency"),onClick:I},null,8,["text"])],8,ke)):h("",!0),e("td",{"data-label":t.$t("delete_quote"),class:"flex items-center gap-sm text-center md:table-cell"},[e("span",Ce,a(t.$t("delete_quote"))+" : ",1),m(d,{"icon-left":"trash","icon-class":"block text-18 text-danger group-hover:text-white md:text-24",class:"content-flex-center base-transition group size-32 rounded-full border border-danger hover:bg-danger md:mx-auto md:size-48",onClick:z},{default:k(()=>[e("span",Ve,a(t.$t("delete_quote")),1)]),_:1})],8,xe)]),m(x,{visible:l($),"onUpdate:visible":o[3]||(o[3]=b=>T($)?$.value=b:null),modal:!0,style:{width:"450px"},draggable:!1},{footer:k(()=>[e("div",Pe,[m(d,{text:l(s)("cancel"),class:"btn-secondary mt-sm w-fit",onClick:o[2]||(o[2]=b=>$.value=!1)},null,8,["text"]),m(d,{text:l(s)("confirm"),class:"btn-primary mt-sm w-fit",onClick:H},null,8,["text"])])]),default:k(()=>[e("p",null,a(l(s)("delete_quote_confirm",{quoteId:_.quote.id})),1)]),_:1},8,["visible"]),m(x,{visible:l(g),"onUpdate:visible":o[7]||(o[7]=b=>T(g)?g.value=b:null),modal:!0,style:{width:"600px"},draggable:!1},{header:k(()=>[e("h3",Ne,a(t.$t("validation_agency_title")),1)]),footer:k(()=>[e("div",Ee,[m(d,{text:l(s)("cancel"),class:"btn-secondary mt-sm w-fit",onClick:D},null,8,["text"]),m(d,{text:t.$t("send"),class:"btn-primary mt-sm w-fit",onClick:M},null,8,["text"])])]),default:k(()=>[e("div",Se,[e("div",Ie,[m(p,{modelValue:l(n).acceptSpecialPrices,"onUpdate:modelValue":o[4]||(o[4]=b=>l(n).acceptSpecialPrices=b),binary:!0,"input-id":"acceptSpecialPrices"},null,8,["modelValue"]),e("label",De,a(t.$t("validation_agency_special_prices")),1)]),e("div",Te,[e("div",Be,[m(p,{modelValue:l(n).requestCallback,"onUpdate:modelValue":o[5]||(o[5]=b=>l(n).requestCallback=b),binary:!0,"input-id":"requestCallback"},null,8,["modelValue"]),e("label",Ue,[C(a(t.$t("validation_agency_callback")),1),o[8]||(o[8]=e("br",null,null,-1)),l(n).requestCallback?(i(),c("span",Qe,a(t.$t("validation_agency_callback_phone")),1)):h("",!0)])]),l(n).requestCallback?(i(),c("div",Ae,[m(R,{modelValue:l(n).phoneNumber,"onUpdate:modelValue":o[6]||(o[6]=b=>l(n).phoneNumber=b),placeholder:t.$t("validation_agency_phone_placeholder"),class:"w-full xs:w-1/2"},null,8,["modelValue","placeholder"]),l(q)?(i(),c("div",Le,a(l(q)),1)):h("",!0)])):h("",!0)])])]),_:1},8,["visible"])],64)}}}
1),He={class:"pb-2xl"},Me={class:"mb-sm block text-xs font-semibold uppercase text-charte-1"},Re={class:"title-3 mb-md"},je={key:0,class:"mb-2xl font-light"},Oe={class:"w-full max-w-[1200px]"},We={key:0},Fe={class:"hidden h-[70px] bg-white px-xl text-14 md:table-row"},Ge={class:"w-[15%] rounded-l-10"},Xe={class:"w-[15%]"},Ye={class:"w-[15%]"},Ze={class:"w-[15%]"},Je={class:"w-[15%]"},Ke={key:0},et={key:1},tt={key:2},at={class:"rounded-r-10"},st={key:0},ot=["innerHTML"],kt=Q({__name:"my-quotes",setup(r){const{t:w}=U(),{generate:_}=le();ee(_({title:w("my_quotation_saved"),description:w("my_quotes_meta_description")}));const{getQuotes:S}=B(),f=V([]),N=async()=>{const s=await S();s?.data&&(f.value=s.data?.list||[])},y=async()=>{await N()};return te(async()=>{await N()}),(s,v)=>{const P=j,$=ze;return i(),c("div",He,[m(P,{class:"mb-32"}),e("span",Me,a(s.$t("my_account")),1),e("h1",Re,a(s.$t("my_quotation_saved")),1),l(f).length>0?(i(),c("p",je,a(s.$t("my_quotation_intro")),1)):h("",!0),e("table",Oe,[l(f).length>0?(i(),c("thead",We,[e("tr",Fe,[e("th",Ge,a(s.$t("date")),1),e("th",Xe,a(s.$t("number")),1),e("th",Ye,a(s.$t("reference_quotation")),1),e("th",Ze,a(s.$t("contact_name_quotation")),1),e("th",Je,a(s.$t("amount")),1),l(f).some(u=>u.add_cart===1)?(i(),c("th",Ke,a(s.$t("download_net_price")),1)):h("",!0),l(f).some(u=>u.add_cart===1)?(i(),c("th",et,a(s.$t("add_cart")),1)):h("",!0),l(f).some(u=>u.add_cart!==0&&u.add_cart!==1)?(i(),c("th",tt,a(s.$t("validation_agency")),1)):h("",!0),e("th",at,a(s.$t("delete_quote")),1)])])):h("",!0),e("tbody",null,[(i(!0),c(A,null,ae(l(f),(u,g)=>(i(),se($,{key:u.id,quote:u,class:oe({"mt-lg":g!==0,"border-b border-light-grey pb-md md:border-0":g!==l(f).length-1,"md:bg-white":g%2!==0}),onQuoteDeleted:y},null,8,["quote","class"]))),128)),l(f).length===0?(i(),c("tr",st,[e("td",{colspan:"100%",class:"text-dark-grey",innerHTML:s.$t("no_quotations")},null,8,ot)])):h("",!0)])])])}}});export{kt 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.