PageSourceSearch

https://chromaworks.co.kr/build/assets/MyPageFormula-8244741f.js

js chromaworks.co.kr collected 2026-09-24 14:24:14 UTC 6,470 bytes, 2 lines download raw bytes

1import{az as W,C as h,o as G,u as H,E as x,ah as X,m as p,p as s,z as d,G as B,t as o,w as f,I as b,n as i,al as J,ad as Q,y as U,F as M,r as Y,k as m,O as S,c as q,X as C}from"./entry-client-6684a004.js";import{_ as Z}from"./MyDashboard-d9f53d53.js";import{u as ee}from"./useFormula-31e90337.js";(function(){try{var _=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(_._sentryDebugIds=_._sentryDebugIds||{},_._sentryDebugIds[n]="102cd71e-8e63-4617-b8d0-31fa42d55b6f",_._sentryDebugIdIdentifier="sentry-dbid-102cd71e-8e63-4617-b8d0-31fa42d55b6f")}catch{}})();const te={class:"px-4 py-6 flex-col flex gap-4 w-full"},se={class:"ev-heading-1"},ae={class:"float-right"},ne={class:"text-stone-600 px-1"},ie={class:"flex gap-2"},le={ref:"orderList",class:"flex flex-col gap-4 w-full"},oe={key:0,class:"mx-auto"},ce={class:"order-1 self-stretch flex-col justify-start items-start gap-3 flex"},de=["onClick"],ue=["src"],re={class:"grow shrink basis-0 flex-col justify-center items-start gap-2 inline-flex"},ge={class:"flex-col justify-end items-start gap-1 flex"},pe={class:"justify-start items-center inline-flex"},fe={class:"text-stone-700 text-sm font-normal leading-none"},me={class:"flex w-full py-2 gap-2 items-center justify-start"},_e={class:"text-stone-700 text-base font-semibold leading-none"},ve={class:"text-stone-700 text-lg font-normal leading-none whitespace-nowrap"},xe={key:0,class:"grow shrink basis-0 justify-center items-start gap-1 flex lg:pt-3"},ye={class:"lg:text-lg grow shrink basis-0 text-stone-700 text-base font-normal leading-none whitespace-nowrap overflow-hidden text-ellipsis max-w-[14rem] lg:max-w-max"},we={class:"text-stone-700 text-base font-normal leading-none"},he={class:"order-2 self-stretch justify-end items-center gap-3 inline-flex flex-col"},be={class:"text-center text-sm leading-tight"},Ce={class:"text-center text-sm leading-tight"},De={__name:"MyPageFormula",setup(_){const n=ee(),{t:c}=W();function L(){v.value=!0}async function E(){v.value=!1,await n.store({name:r.value.name,description:r.value.description}),r.value={},await y.push({name:"MyPageFormulaShow",params:{id:n.getModel.id}})}const v=h(!1),r=h({}),u=h(null);G(()=>{n.getPageIndex(1)});const N=a=>{var t,g;return((g=(t=a.items[0])==null?void 0:t.product)==null?void 0:g.thumb_image)||""};function T(a){n.getPageIndex(a)}const y=H();function k(a){y.push({name:"MyPageFormulaShow",params:{id:a.id}})}async function V(a){u.value!==a.id&&(u.value=a.id,await y.push({name:"CustomBlendService",query:{recipe_id:a.id}}),u.value=null)}async function A(a){var t,g;if(u.value!==a.id){u.value=a.id;try{const{data:l}=await q.get(`/api/v1/custom-blends/recipe/${a.id}/cart-payload`);if(!(l!=null&&l.op_id)){await C(c("상품 정보를 불러올 수 없어요."));return}await q.post("/api/v1/my-cart",{...l,qty:l.qty??5,options:l.options??[]}),await C(c("장바구니에 담았습니다"))}catch(l){const w=((g=(t=l==null?void 0:l.response)==null?void 0:t.data)==null?void 0:g.message)||c("장바구니에 담는 중 오류가 발생했어요.");await C(w)}finally{u.value=null}}}return(a,t)=>{var $,P;const g=x("iconic-input"),l=x("iconic-paginator"),w=x("iconic-textarea"),R=x("iconic-form"),z=x("modal-dialog"),K=X("loading");return m(),p(M,null,[s("div",te,[d(Z),s("div",se,[B(o(a.$t("CW 포뮬라"))+" ",1),t[10]||(t[10]=s("span",{class:"text-base"},"(Beta)",-1)),s("span",ae,[d(b,{class:"text-base",onClick:L},{default:f(()=>t[9]||(t[9]=[B(" 새로운 포뮬라 만들기 ")])),_:1,__:[9]})])]),s("p",ne,o(a.$t("CW 베이스와 조향원료로 만든 프래그런스의 MSDS, Allergen List, IFRA 함량 계산 서비스"))+" (현재 BETA로 제공되고 있는 점 참고해 주세요.) ",1),s("div",ie,[d(g,{value:i(n).query.name,"onUpdate:value":t[0]||(t[0]=e=>i(n).query.name=e),class:"w-full bg-clear",placeholder:a.$t("포뮬라 명칭"),icon:"/images/icons/search.svg",onKeyup:t[1]||(t[1]=J(()=>i(n).index(),["enter"]))},null,8,["value","placeholder"])]),s("section",null,[Q((m(),p("div",le,[(P=($=i(n))==null?void 0:$.getData)!=null&&P.length?U("",!0):(m(),p("div",oe,o(i(c)("내역이 없어요")),1)),(m(!0),p(M,null,Y(i(n).getData,(e,O)=>{var D,I,j;
1return m(),p("div",{key:O,class:"self-stretch p-4 rounded bg-stone-100 flex-col lg:flex-row lg:justify-between justify-start items-start gap-3 flex"},[s("div",ce,[s("div",{class:"self-stretch justify-start items-start gap-3 inline-flex",onClick:F=>k(e)},[s("img",{class:"w-14 lg:w-20 h-auto",src:N(e)},null,8,ue),s("div",re,[s("div",ge,[s("div",pe,[s("div",fe,o(e.created_at),1)]),s("div",me,[s("div",_e," #"+o(e.id),1),s("div",ve,o(e.name),1)])]),((D=e==null?void 0:e.items)==null?void 0:D.length)>0?(m(),p("div",xe,[s("div",ye,o((j=(I=e==null?void 0:e.items[0])==null?void 0:I.product)==null?void 0:j.it_name),1),s("div",we,o(i(c)("외"))+" "+o(e.items_count)+o(i(c)("건 함유")),1)])):U("",!0)])],8,de)]),s("div",he,[d(b,{class:"w-36",onClick:F=>k(e)},{default:f(()=>[s("div",be,o(i(c)("자세히 보기")),1)]),_:2},1032,["onClick"]),d(b,{class:"w-36",primary:"",disabled:u.value===e.id,onClick:F=>e.product_id?A(e):V(e)},{default:f(()=>[s("div",Ce,o(u.value===e.id?i(c)("담는 중..."):e.product_id?i(c)("재구매하기"):i(c)("커스텀 블렌드 주문")),1)]),_:2},1032,["disabled","onClick"])])])}),128)),d(l,{total:i(n).getPagination.total,"onUpdate:total":t[2]||(t[2]=e=>i(n).getPagination.total=e),page:i(n).getPagination.current_page,"onUpdate:page":t[3]||(t[3]=e=>i(n).getPagination.current_page=e),"per-page":i(n).getPagination.per_page,"onUpdate:perPage":t[4]||(t[4]=e=>i(n).getPagination.per_page=e),onChange:T},null,8,["total","page","per-page"])])),[[K,i(n).isLoading]])])]),d(z,{visible:v.value,"onUpdate:visible":t[7]||(t[7]=e=>v.value=e),"cancel-label":a.$t("취소"),"confirm-label":a.$t("만들기"),onConfirm:E,onCancel:t[8]||(t[8]=()=>v.value=!1)},{default:f(()=>[d(R,{value:r.value,"onUpdate:value":t[6]||(t[6]=e=>r.value=e),class:"w-full"},{default:f(()=>[d(S,{field:"name",comment:a.$t("포뮬라 명칭을 입력하세요")},null,8,["comment"]),d(S,{field:"description",comment:a.$t("포뮬라 간단한 설명을 입력하세요")},{default:f(()=>[d(w,{value:r.value.description,"onUpdate:value":t[5]||(t[5]=e=>r.value.description=e)},null,8,["value"])]),_:1},8,["comment"])]),_:1},8,["value"])]),_:1},8,["visible","cancel-label","confirm-label"])],64)}}};export{De as default};
2//# sourceMappingURL=MyPageFormula-8244741f.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.