PageSourceSearch

https://www.immoisrael.com/_next/static/chunks/197.6adc469c57013e08.js

js immoisrael.com collected 2026-10-10 00:50:45 UTC 15,725 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="e87f993a-245e-45e5-b4a1-ee3e1bf93e3d",e._sentryDebugIdIdentifier="sentry-dbid-e87f993a-245e-45e5-b4a1-ee3e1bf93e3d")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[197],{90197:function(e,r,a){a.r(r),a.d(r,{default:function(){return Y}});var n=a(11527),i=a(46828),s=a(23470),l=a(89672),t=a(89497),d=a(53112),c=a(70155),o=a(67883),u=a(40393),h=a(12792),x=a(67102),m=a(50959),y=a(78614),g=a(48566),j=a(91021),p=a(14948),P=a(32823),b=a(44247),C=a(60181),f=a(29793),S=a(49748),v=a(66),D=a(71060),I=a(79312),w=a(99366),A=a(64078),E=a(16077),q=a(58550),O=a(29461),N=a(10897),R=a(83735),k=a(55423),F=e=>{let{onSubmit:r}=e,{isOpen:a,onOpen:s,onClose:l}=(0,j.q)(),[t,{error:d}]=(0,y.X$)(),c=(0,i.p)();return(0,m.useEffect)(()=>{d&&c({title:d.name,description:null==d?void 0:d.message,status:"error"})},[d,c]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.z,{onClick:s,variant:"primaryOutline","data-sentry-element":"Button","data-sentry-source-file":"SubscriptionPlanModalCreate.tsx",children:"Create new plan"}),(0,n.jsxs)(P.u_,{isOpen:a,onClose:l,isCentered:!0,"data-sentry-element":"Modal","data-sentry-source-file":"SubscriptionPlanModalCreate.tsx",children:[(0,n.jsx)(b.Z,{"data-sentry-element":"ModalOverlay","data-sentry-source-file":"SubscriptionPlanModalCreate.tsx"}),(0,n.jsxs)(C.h,{"data-sentry-element":"ModalContent","data-sentry-source-file":"SubscriptionPlanModalCreate.tsx",children:[(0,n.jsx)(f.x,{color:"bluePrimary","data-sentry-element":"ModalHeader","data-sentry-source-file":"SubscriptionPlanModalCreate.tsx",children:"Create new Plan"}),(0,n.jsx)(S.o,{color:"bluePrimary","data-sentry-element":"ModalCloseButton","data-sentry-source-file":"SubscriptionPlanModalCreate.tsx"}),(0,n.jsx)(R.J9,{initialValues:{name:"",initialChargeAmount:0,recurringChargeAmount:0,gracePeriodDays:0,trialPeriodDays:0,chargeFrequency:"QUARTERLY",chargeOnPlanSwitch:!1},validationSchema:k.Ry({name:k.Z_().required(),initialChargeAmount:k.Rx().min(0),recurringChargeAmount:k.Rx().min(0).required(),gracePeriodDays:k.Rx().min(0),trialPeriodDays:k.Rx().min(0),chargeFrequency:k.Z_().required(),chargeOnPlanSwitch:k.O7().required()}),onSubmit:async(e,a)=>{let{setSubmitting:n}=a;try{await t({variables:{createSubscriptionPlanData:{name:e.name,initialChargeAmount:Number(e.initialChargeAmount),recurringChargeAmount:Number(e.recurringChargeAmount),gracePeriodDays:Number(e.gracePeriodDays),trialPeriodDays:Number(e.trialPeriodDays),chargeFrequency:e.chargeFrequency,currency:"ILS"}}}),l(),r()}catch(e){}finally{n(!1)}},"data-sentry-element":"Formik","data-sentry-source-file":"SubscriptionPlanModalCreate.tsx",children:e=>{let{values:r,errors:a,touched:i,handleChange:s,handleBlur:l,handleSubmit:t,isSubmitting:d,setFieldValue:c}=e;return(0,n.jsxs)(R.l0,{children:[(0,n.jsxs)(v.f,{color:"bluePrimary",display:"flex",flexDirection:"column",gap:4,children:[(0,n.jsxs)(D.NI,{isInvalid:!!a.name&&i.name,isRequired:!0,children:[(0,n.jsx)(I.l,{children:"Name"}),(0,n.jsx)(w.I,{value:r.name,onChange:s("name"),onBlur:l("name"),dir:"auto"}),(0,n.jsx)(A.J1,{children:a.name})]}),(0,n.jsxs)(D.NI,{isInvalid:!!a.chargeFrequency&&i.chargeFrequency,isRequired:!0,children:[(0,n.jsx)(I.l,{children:"Charge Frequency"}),(0,n.jsxs)(E.P,{value:r.chargeFrequency,onChange:s("chargeFrequency"),onBlur:l("chargeFrequency"),placeholder:"Select charge frequency",children:[(0,n.jsx)("option",{value:"ONCE",children:"Once"}),(0,n.jsx)("option",{value:"DAILY",children:"Daily"}),(0,n.jsx)("option",{value:"WEEKLY",children:"Weekly"}),(0,n.jsx)("option",{value:"EVERY 2 WEEKS",children:"Every 2 weeks"}),(0,n.jsx)("option",{value:"MONTHLY",children:"Monthly"}),(0,n.jsx)("option",{value:"EVERY 2 MONTHS",children:"Every 2 months"}),(0,n.jsx)("option",{value:"QUARTERLY",children:"Quarterly"}),(0,n.jsx)("option",{value:"EVERY 6 MONTHS",children:"Every 6 months"}),(0,n.jsx)("option",{value:"ANNUALLY",children:"Annually"}),(0,n.jsx)("option",{value:"EVERY 2 YEARS",children:"Every 2 years"}),(0,n.jsx)("option",{value:"EVERY 3 YEARS",children:"Every 3 years"})]}),(0,n.jsx)(A.J1,{children:a.chargeFrequency})]}),(0,n.jsxs)(D.NI,{isInvalid:!!a.initialChargeAmount&&i.initialChargeAmount,children:[(0,n.jsx)(I.l,{children:"Initial charge amount (ILS)"}
1),(0,n.jsxs)(q.Y2,{precision:2,min:0,value:r.initialChargeAmount,onChange:s("initialChargeAmount"),onBlur:l("initialChargeAmount"),children:[(0,n.jsx)(q.zu,{}),(0,n.jsxs)(q.Fi,{children:[(0,n.jsx)(q.WQ,{}),(0,n.jsx)(q.Y_,{})]})]}),(0,n.jsx)(A.J1,{children:a.initialChargeAmount}),(0,n.jsx)(D.Q6,{children:"Cannot be included in Update Plan requests unless the plan already has an initial charge"})]}),(0,n.jsxs)(D.NI,{isInvalid:!!a.initialChargeAmount&&i.initialChargeAmount,isRequired:!0,children:[(0,n.jsx)(I.l,{children:"Recurring charge amount (ILS)"}),(0,n.jsxs)(q.Y2,{precision:2,min:0,value:r.recurringChargeAmount,onChange:s("recurringChargeAmount"),onBlur:l("recurringChargeAmount"),children:[(0,n.jsx)(q.zu,{}),(0,n.jsxs)(q.Fi,{children:[(0,n.jsx)(q.WQ,{}),(0,n.jsx)(q.Y_,{})]})]}),(0,n.jsx)(A.J1,{children:a.recurringChargeAmount}),(0,n.jsx)(D.Q6,{children:"Cannot be changed in Update Plan requests"})]}),(0,n.jsxs)(D.NI,{isInvalid:!!a.gracePeriodDays&&i.gracePeriodDays,children:[(0,n.jsx)(I.l,{children:"Grace period days"}),(0,n.jsxs)(q.Y2,{precision:0,min:0,value:r.gracePeriodDays,onChange:s("gracePeriodDays"),onBlur:l("gracePeriodDays"),children:[(0,n.jsx)(q.zu,{}),(0,n.jsxs)(q.Fi,{children:[(0,n.jsx)(q.WQ,{}),(0,n.jsx)(q.Y_,{})]})]}),(0,n.jsx)(A.J1,{children:a.gracePeriodDays}),(0,n.jsx)(D.Q6,{children:"In case of payment failure, automatic retries will be attempted during this grace period."})]}),(0,n.jsxs)(D.NI,{isInvalid:!!a.trialPeriodDays&&i.trialPeriodDays,children:[(0,n.jsx)(I.l,{children:"Trial period days"}),(0,n.jsxs)(q.Y2,{precision:0,min:0,value:r.trialPeriodDays,onChange:s("trialPeriodDays"),onBlur:l("trialPeriodDays"),children:[(0,n.jsx)(q.zu,{}),(0,n.jsxs)(q.Fi,{children:[(0,n.jsx)(q.WQ,{}),(0,n.jsx)(q.Y_,{})]})]}),(0,n.jsx)(A.J1,{children:a.trialPeriodDays}),(0,n.jsx)(D.Q6,{children:"Cannot be included in Update Plan requests unless the plan already has a trial period"})]}),(0,n.jsxs)(D.NI,{isInvalid:!!a.chargeOnPlanSwitch&&i.chargeOnPlanSwitch,isRequired:!0,children:[(0,n.jsx)(O.X,{onChange:()=>c("chargeOnPlanSwitch",!r.chargeOnPlanSwitch),onBlur:l("chargeOnPlanSwitch"),isChecked:r.chargeOnPlanSwitch,children:"Charge on plan switch"}),(0,n.jsx)(A.J1,{children:a.chargeOnPlanSwitch}),(0,n.jsxs)(D.Q6,{children:["Determines whether subscriptions that are switched to this plan are charged immediately.",(0,n.jsx)("br",{})," true = Immediate charge on switch. ",(0,n.jsx)("br",{}),"false = Subscription will be charged at the next scheduled recurring payment. (default)"]})]})]}),(0,n.jsx)(N.m,{children:(0,n.jsx)(p.z,{variant:"blueFill",isLoading:d,type:"submit",onClick:()=>t(),children:"Create plan"})})]})}})]})]})]})},M=e=>{let{plan:r,onSubmit:a}=e,{isOpen:l,onOpen:t,onClose:d}=(0,j.q)(),[c,{error:o}]=(0,y.cV)(),u=(0,i.p)();return(0,m.useEffect)(()=>{o&&u({title:o.name,description:null==o?void 0:o.message,status:"error"})},[o,u]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.z,{onClick:t,variant:"primaryOutline","data-sentry-element":"Button","data-sentry-source-file":"SubscriptionPlanModalEdit.tsx",children:"Edit"}),(0,n.jsxs)(P.u_,{isOpen:l,onClose:d,isCentered:!0,"data-sentry-element":"Modal","data-sentry-source-file":"SubscriptionPlanModalEdit.tsx",children:[(0,n.jsx)(b.Z,{"data-sentry-element":"ModalOverlay","data-sentry-source-file":"SubscriptionPlanModalEdit.tsx"}),(0,n.jsxs)(C.h,{"data-sentry-element":"ModalContent","data-sentry-source-file":"SubscriptionPlanModalEdit.tsx",children:[(0,n.jsx)(f.x,{color:"bluePrimary","data-sentry-element":"ModalHeader","data-sentry-source-file":"SubscriptionPlanModalEdit.tsx",children:r.name}),(0,n.jsx)(S.o,{color:"bluePrimary","data-sentry-element":"ModalCloseButton","data-sentry-source-file":"SubscriptionPlanModalEdit.tsx"}),(0,n.jsx)(R.J9,{initialValues:{name:r.name,initialChargeAmount:r.initialChargeAmount||0,gracePeriodDays:r.gracePeriodDays||0,trialPeriodDays:r.trialPeriodDays||0,chargeOnPlanSwitch:r.chargeOnPlanSwitch,status:r.status},validationSchema:k.Ry({initialChargeAmount:k.Rx().test("required-if-truthy","Initial charge amount is required",(e,r)=>{let{parent:a}=r;return!a.initialChargeAmount||!!e}).min(0),gracePeriodDays:k.Rx().min(0),trialPeriodDays:k.Rx().test("required-if-truthy","Trial period days is required",(e,r)=>{let{parent:a}=r;return!a.trialPeriodDays||!!e}).min(0),name:k.Z_().required(),status:k.Z_().oneOf(["ACTIVE","INACTIVE"]).required(),chargeOnPlanSwitch:k.O7().required()}),onSubmit:async(e,n)=>{let{setSubmitting:i}=n;try{await c({variables:{updateSubscriptionPlanData:{planId:r.planId,chargeFrequency:r.chargeFrequency,currency:r.currency,name:e.name,recurringChargeAmount:r.recurringChargeAmount||0,initialChargeAmount:Number(e.initialChargeAmount),gracePeriodDays:Number(e.gracePeriodDays),trialPeriodDays:Number(e.trialPeriodDays),chargeOnPlanSwitch:JSON.parse(e.chargeOnPlanSwitch),status:e.status}}}),d(),a()}catch(e){}finally{i(!1)}},"data-sentry-element":"Formik","data-sentry-source-file":"SubscriptionPlanModalEdit.tsx",children:e=>{let{values:a,errors:i,touched:l,handleChange:t,handleBlur:d,handleSubmit:c,setFieldValue:o,isSubmitting:u}=e;return(0,n.jsxs)(R.l0,{children:[(0,n.jsxs)(v.f,{color:"bluePrimary",display:"flex",flexDirection:"column",gap:4,children:[(0,n.jsxs)(s.xu,{children:[(0,n.jsxs)(s.xu,{children:["Id: ",r.planId]}),(0,n.jsxs)(s.xu,{children:["Charge frequency: ",r.chargeFrequency]})]}),(0,n.jsxs)(D.NI,{isInvalid:!!i.name&&l.name,isRequired:!0,children:[(0,n.jsx)(I.l,{children:"Name"}
1),(0,n.jsx)(w.I,{value:a.name,onChange:t("name"),onBlur:d("name"),dir:"auto"}),(0,n.jsx)(A.J1,{children:i.name})]}),r.initialChargeAmount?(0,n.jsxs)(D.NI,{isInvalid:!!i.initialChargeAmount&&l.initialChargeAmount,isRequired:!0,children:[(0,n.jsx)(I.l,{children:"Initial charge amount (ILS)"}),(0,n.jsxs)(q.Y2,{precision:2,min:1,value:a.initialChargeAmount,onChange:t("initialChargeAmount"),onBlur:d("initialChargeAmount"),children:[(0,n.jsx)(q.zu,{}),(0,n.jsxs)(q.Fi,{children:[(0,n.jsx)(q.WQ,{}),(0,n.jsx)(q.Y_,{})]})]}),(0,n.jsx)(A.J1,{children:i.initialChargeAmount})]}):null,(0,n.jsxs)(D.NI,{isInvalid:!!i.gracePeriodDays&&l.gracePeriodDays,children:[(0,n.jsx)(I.l,{children:"Grace period days"}),(0,n.jsxs)(q.Y2,{precision:0,min:0,value:a.gracePeriodDays,onChange:t("gracePeriodDays"),onBlur:d("gracePeriodDays"),children:[(0,n.jsx)(q.zu,{}),(0,n.jsxs)(q.Fi,{children:[(0,n.jsx)(q.WQ,{}),(0,n.jsx)(q.Y_,{})]})]}),(0,n.jsx)(A.J1,{children:i.gracePeriodDays})]}),a.trialPeriodDays?(0,n.jsxs)(D.NI,{isInvalid:!!i.trialPeriodDays&&l.trialPeriodDays,children:[(0,n.jsx)(I.l,{children:"Trial period days"}),(0,n.jsxs)(q.Y2,{precision:0,min:0,value:a.trialPeriodDays,onChange:t("trialPeriodDays"),onBlur:d("trialPeriodDays"),children:[(0,n.jsx)(q.zu,{}),(0,n.jsxs)(q.Fi,{children:[(0,n.jsx)(q.WQ,{}),(0,n.jsx)(q.Y_,{})]})]}),(0,n.jsx)(A.J1,{children:i.trialPeriodDays})]}):null,(0,n.jsxs)(D.NI,{isInvalid:!!i.chargeOnPlanSwitch&&l.chargeOnPlanSwitch,isRequired:!0,children:[(0,n.jsx)(O.X,{onChange:()=>o("chargeOnPlanSwitch",!a.chargeOnPlanSwitch),onBlur:d("chargeOnPlanSwitch"),isChecked:JSON.parse(a.chargeOnPlanSwitch),children:"Charge on plan switch"}),(0,n.jsx)(A.J1,{children:i.chargeOnPlanSwitch}),(0,n.jsxs)(D.Q6,{children:["Determines whether subscriptions that are switched to this plan are charged immediately.",(0,n.jsx)("br",{})," true = Immediate charge on switch. ",(0,n.jsx)("br",{}),"false = Subscription will be charged at the next scheduled recurring payment. (default)"]})]}),(0,n.jsxs)(D.NI,{isInvalid:!!i.status&&l.status,isRequired:!0,children:[(0,n.jsx)(I.l,{children:"Status"}),(0,n.jsxs)(E.P,{value:a.status,onChange:t("status"),onBlur:d("status"),children:[(0,n.jsx)("option",{value:"ACTIVE",children:"Active"}),(0,n.jsx)("option",{value:"INACTIVE",children:"Inactive"})]}),(0,n.jsx)(A.J1,{children:i.status})]})]}),(0,n.jsx)(N.m,{children:(0,n.jsx)(p.z,{variant:"blueFill",isLoading:u,type:"submit",onClick:()=>c(),children:"Save"})})]})}})]})]})]})},Y=()=>{let{data:e,loading:r,error:a,refetch:j}=(0,y.CS)(),p=(0,i.p)(),P=(0,x.useRouter)().locale;(0,m.useEffect)(()=>{a&&p({title:a.name,description:a.message,status:"error"})},[a,p]);let b=[...(null==e?void 0:e.subscriptionPlans)||[]];return(0,n.jsxs)(s.xu,{pb:10,as:"section","data-sentry-element":"Box","data-sentry-component":"SubscriptionPlans","data-sentry-source-file":"SubscriptionPlans.tsx",children:[(0,n.jsxs)(l.k,{justifyContent:"space-between","data-sentry-element":"Flex","data-sentry-source-file":"SubscriptionPlans.tsx",children:[(0,n.jsxs)(t.X,{as:"h1",size:"2xl",fontWeight:"extrabold",lineHeight:"normal",color:"bluePrimary",ms:[14,null,null,0],mb:[6,7,8,9,10],"data-sentry-element":"Heading","data-sentry-source-file":"SubscriptionPlans.tsx",children:["Subscription plans ",r&&(0,n.jsx)(d.$,{size:"md"})]}),(0,n.jsx)(F,{onSubmit:j,"data-sentry-element":"SubscriptionPlanModalCreate","data-sentry-source-file":"SubscriptionPlans.tsx"})]}),(0,n.jsx)(c.r,{templateColumns:["repeat(1, 1fr)","repeat(2, 1fr)","repeat(3, 1fr)"],gap:[4,5,6,7,8],"data-sentry-element":"Grid","data-sentry-source-file":"SubscriptionPlans.tsx",children:b.sort(e=>"ACTIVE"===e.status?-1:1).map(e=>(0,n.jsx)(o.P,{display:"flex",flexDir:"column",alignItems:"start",children:(0,n.jsxs)(s.xu,{borderRadius:"md",boxShadow:"0 15px 20px 0 rgba(180, 180, 198, 0.2)",bgColor:"white",position:"relative",top:0,transition:"top ease 0.5s,box-shadow ease 0.5s",height:"100%",display:"flex",flexDir:"column",p:[3,null,4,null,5],children:[(0,n.jsxs)(s.xu,{flex:1,mb:[3,null,4,null,5],children:[(0,n.jsx)(t.X,{as:"h3",size:"sm",color:"bluePrimary",mb:[3,null,4,null,5],children:e.name}),(0,n.jsxs)(u.x,{size:"xs",color:"bluePrimary",wordBreak:"break-all",my:[1,null,1.5,null,2],children:[(0,n.jsxs)(s.xu,{as:"span",fontWeight:"bold",children:["Id:"," "]}),e.planId]}),(0,n.jsxs)(u.x,{size:"xs",color:"bluePrimary",wordBreak:"break-all",my:[1,null,1.5,null,2],children:[(0,n.jsxs)(s.xu,{as:"span",fontWeight:"bold",children:["Recurring Charge Amount:"," "]}),(0,g.aS)(e.recurringChargeAmount||0,P)]}),(0,n.jsxs)(u.x,{size:"xs",color:"bluePrimary",wordBreak:"break-all",my:[1,null,1.5,null,2],children:[(0,n.jsxs)(s.xu,{as:"span",fontWeight:"bold",children:["Initial Charge Amount:"," "]}),(0,g.aS)(e.initialChargeAmount||0,P)]}),(0,n.jsxs)(u.x,{size:"xs",color:"bluePrimary",wordBreak:"break-all",my:[1,null,1.5,null,2],children:[(0,n.jsxs)(s.xu,{as:"span",fontWeight:"bold",children:["Charge on Plan:"," "]}),e.chargeOnPlanSwitch]}),(0,n.jsxs)(u.x,{size:"xs",color:"bluePrimary",wordBreak:"break-all",my:[1,null,1.5,null,2],children:[(0,n.jsxs)(s.xu,{as:"span",fontWeight:"bold",children:["Charge frequency:"," "]}),e.chargeFrequency]}),(0,n.jsxs)(u.x,{size:"xs",color:"bluePrimary",wordBreak:"break-all",my:[1,null,1.5,null,2],children:[(0,n.jsxs)(s.xu,{as:"span",fontWeight:"bold",children:["Grace Period Days:"," "]}),(null==e?void 0:e.gracePeriodDays)||0]}),(0,n.jsxs)(u.x,{size:"xs",color:"bluePrimary",wordBreak:"break-all",my:[1,null,1.5,null,2],children:[(0,n.jsxs)(s.xu,{as:"span",fontWeight:"bold",children:["Trial Period Days:"," "]}),(null==e?void 0:e.trialPeriodDays)||0]}),(0,n.jsx)(h.C,{colorScheme:"ACTIVE"===e.status?"green":"red",children:e.status})]}),(0,n.jsx)(M,{onSubmit:()=>j(),plan:e})]})},e.planId))})]})}}}]);

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.