1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a5855fa2-8fb7-415c-824c-bacad494172b",e._sentryDebugIdIdentifier="sentry-dbid-a5855fa2-8fb7-415c-824c-bacad494172b")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9037,9102],{12367:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/membership-settings/settings",function(){return s(86809)}])},39088:(e,t,s)=>{"use strict";s.d(t,{A:()=>d});var l=s(74848),a=s(59037),n=s(52177),r=s(64847),i=s(32578);let d=e=>{let{isSubmiting:t=!1,page:s,type:d="Edit"}=e,[{dataMe:c}]=(0,n.w)(),o=(0,r.F)(c,s,d),u=(0,i.useTranslations)("GeneralTranslate");return o&&(0,l.jsx)("button",{type:"submit",disabled:t,className:"bg-primary text-white px-12 py-2 rounded-lg text-sm justify-center items-center text-center",children:t?(0,l.jsx)(a.default,{}):(0,l.jsx)("span",{children:u("Save")})})}},53948:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var l=s(74848),a=s(86715);let n=e=>{let t=(0,a.useRouter)(),{title:s}=e;return(0,l.jsx)("nav",{className:"flex",children:(0,l.jsxs)("ol",{className:"inline-flex items-center space-x-1 md:space-x-3",children:[(0,l.jsx)("li",{className:"inline-flex items-center",onClick:()=>t.back(),children:(0,l.jsx)("a",{href:"#",className:"inline-flex items-center text-sm font-medium text-gray-700 hover:text-primary",children:s[0]})}),(0,l.jsx)("li",{children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)("svg",{className:"w-6 h-6 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})}),(0,l.jsx)("p",{className:"ml-1 text-sm font-medium text-thirdary md:ml-2",children:s[1]})]})})]})})}},10452:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var l=s(74848);let a=e=>{let{children:t,className:s}=e;return(0,l.jsx)("div",{className:"bg-white w-full rounded-2xl shadow border py-5 px-10 ".concat(s),children:t})}},7242:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var l=s(74848);let a=e=>{let{name:t}=e;return(0,l.jsx)("div",{className:"text-primary font-bold text-xl font-default",children:t})}},59037:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var l=s(74848);let a=()=>(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("svg",{role:"status",className:"w-6 h-6 text-white animate-spin dark:text-white dark:text-xl fill-primary mx-auto",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,l.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})})},86809:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSP:()=>y,default:()=>j});var l=s(74848),a=s(53948),n=s(4340),r=s(69621),i=s(39088),d=s(10452),c=s(28212),o=s(7242),u=s(32578),x=s(86715),m=s(96540),p=s(25004),f=s(49785),h=s(75249),b=s(59e3);let g=e=>{let{data:t}=e,s=(0,x.useRouter)(),a=new b.A().get("access_token_membership"),n=(0,u.useTranslations)("GeneralTranslate"),{register:r,handleSubmit:g,setValue:y}=(0,f.mN)(),[j,v]=(0,m.useState)(!1),[w,N]=(0,m.useState)(0),[_,C]=(0,m.useState)(null);async function S(e){v(!0);try{let i=await fetch("".concat("https://api.membership.jovasoftware.com/api","/project/point-setting"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(a)},body:JSON.stringify({...e,min_spend:w,used_in_transaction:0})}),d=await i.json();if(!0==d.status)h.oR.success(n("Success")),s.push("/membership-settings/sett
1ings");else{var t,l,r;h.oR.error(null!==(r=null!==(l=d.message)&&void 0!==l?l:null===(t=d.message)||void 0===t?void 0:t.status[0])&&void 0!==r?r:d.error)}v(!1)}catch(e){h.oR.error(e),v(!1)}}return(0,m.useEffect)(()=>{t&&(y("restriction_type",t.restriction_type),y("point_earned",t.point_earned),N(t.min_spend))},[t]),(0,l.jsx)("div",{children:(0,l.jsxs)("form",{onSubmit:g(S),children:[(0,l.jsx)(d.A,{className:"mb-5 mt-3",children:(0,l.jsxs)("div",{className:"py-5",children:[(0,l.jsx)(o.A,{name:n("Point Setting")}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 pt-6",children:[(0,l.jsxs)("div",{className:"flex flex-col ",children:[(0,l.jsx)("label",{className:"capitalize text-black font-normal text-xs sm:text-sm ",children:n("Restriction Type")}),(0,l.jsxs)("select",{onInput:e=>C(e.target.value),...r("restriction_type"),className:" disabled:bg-gray-200 disabled:cursor-not-allowed disabled:text-gray-500 text-black focus:outline-0 focus:ring-1 focus:ring-primary px-4 py-2 border rounded-lg text-sm ",children:[(0,l.jsx)("option",{value:"",hidden:!0,className:"",children:"".concat(n("Select")," --")}),(0,l.jsx)("option",{value:"0",children:n("Per Transaction")}),(0,l.jsx)("option",{value:"1",children:n("Per Day")})]})]}),(0,l.jsxs)("div",{className:"flex flex-col ",children:[(0,l.jsx)("label",{className:"capitalize text-black font-normal text-xs sm:text-sm ",children:n("Min Spend")}),(0,l.jsx)(p.Ay,{className:" disabled:bg-gray-200 disabled:cursor-not-allowed disabled:text-gray-500 text-black focus:outline-0 focus:ring-1 focus:ring-primary px-5 py-2 border rounded-lg text-sm ",id:"input-example",name:"input-name",decimalSeparator:",",groupSeparator:".",placeholder:n("Starting Balance"),value:w,onValueChange:(e,t,s)=>N(s.float)})]}),(0,l.jsx)(c.Ay,{label:n("Point Earned"),name:"point_earned",type:"number",isDisabled:j,register:r})]})]})}),(0,l.jsxs)("div",{className:"flex justify-end gap-4",children:[(0,l.jsx)("button",{onClick:()=>s.back(),type:"button",className:"bg-white focus:outline-none text-gray-600 px-12 py-2 border border-gray-500 rounded-lg text-sm justify-center items-center text-center",children:n("Cancel")}),(0,l.jsx)(i.A,{page:["settings"],isSubmiting:j})]})]})})};var y=!0;let j=e=>{let{data:t}=e,s=(0,u.useTranslations)("GeneralTranslate");return(0,l.jsxs)("div",{className:"h-full w-full absolute",children:[(0,l.jsx)(n.A,{title:s("Point Setting")}),(0,l.jsxs)(r.A,{children:[(0,l.jsx)(a.A,{title:[s("Membership"),s("Point Setting")]}),(0,l.jsx)(g,{data:null==t?void 0:t.data})]})]})}},64847:(e,t,s)=>{"use strict";function l(e,t,s){var l;let a=t[t.length-1],n="type"===a?"member-type":a,r=(null===(l=(null==e?void 0:e.filter(e=>(null==e?void 0:e.module_route)===n))[0])||void 0===l?void 0:l.type)||null;if(r)return!!r[s]}s.d(t,{F:()=>l})}},e=>{var t=t=>e(e.s=t);e.O(0,[4453,9965,9190,1106,1348,4967,6485,9785,7796,2434,2809,5004,9621,3111,636,6593,8792],()=>t(12367)),_N_E=e.O()}]);
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.