PageSourceSearch

https://malice-kibana.com/assets/UnsubscribePerformancePlan-DHPNnRR4.js

js malice-kibana.com collected 2026-10-06 20:13:50 UTC 5,015 bytes, 1 lines download raw bytes

1import{r as i,j as a}from"./vendor-react-CYOoHjOf.js";import{j as T}from"./vendor-redux-BXotTMQH.js";import{F as C,a as N,b as A}from"./FormikTextField-wLZ9yJXR.js";import{i as w,A as v,s as $}from"./cancel-membership.helpers-Di0QdOju.js";import{I as M}from"./InputPassword-DEEn31F-.js";import{i as F,h as _,a as R,b as B,bP as U,q as k,g6 as L,m as O,fR as W,ar as D,M as c,v as G,a1 as H,T as o,fx as q,C as z,j as K,k as X,fT as g,fS as J,b1 as V,bu as Y,t as Z}from"./index-NXCSpy0w.js";import{R as Q}from"./ReturnButton-C43vaIAe.js";import{C as aa}from"./change-email.errors-BFkhXwnM.js";import{aH as ea,aK as sa}from"./vendor-mui-A_M4pNO3.js";import{t as na}from"./currency-XkooOLiu.js";import{d as ra}from"./time.helper-BtM-HQXt.js";import{u as ta}from"./useCheckSitePerformancePlan-CRZQi_No.js";import"./vendor-lodash-Cp5T_Ztg.js";import"./form-validate-BSI3dMt8.js";import"./vendor-axios-BLlBCaos.js";import"./vendor-auth-DXBuXNeD.js";import"./vendor-motion-CwbUqb9k.js";const r="UnsubscribePerformancePlan",e={performancePlan:`${r}-performancePlan`,cancelTitle:`${r}-cancelTitle`,planInfo:`${r}-planInfo`,amount:`${r}-amount`,amountTax:`${r}-amountTax`,planCancelTitle:`${r}-planCancelTitle`,unsubscribeReason:`${r}-unsubscribeReason`,inputPassword:`${r}-inputPassword`,validityPeriod:`${r}-validityPeriod`,btnNext:`${r}-btnNext`},oa=ea("div")(({theme:s})=>({[`&.${e.performancePlan}`]:{padding:s.spacing(6),maxWidth:504,margin:s.spacing(0,"auto")},[`& .${e.cancelTitle}`]:{marginBottom:s.spacing(6),marginTop:s.spacing(3.5)},[`& .${e.planInfo}`]:{display:"flex",justifyContent:"space-between",alignItems:"center"},[`& .${e.amount}`]:{fontWeight:"bold",fontSize:18},[`& .${e.amountTax}`]:{fontWeight:"normal",fontSize:9},[`& .${e.planCancelTitle}`]:{marginBottom:s.spacing(2)},[`& .${e.unsubscribeReason}`]:{marginTop:s.spacing(8),marginBottom:s.spacing(1)},[`& .${e.inputPassword}`]:{margin:s.spacing(2,0)},[`& .${e.validityPeriod}`]:{margin:s.spacing(8,0)},[`& .${e.btnNext}`]:{paddingBottom:s.spacing(12)}})),ia=()=>{const s=F(),f=_(),l=R(n=>n.payment.joinedPerformancePlan),u=R(n=>n.payment.performancePlan)?.performancePlan?.priceIncludeTax,{fanclubMemberId:b}=B(),S=U(),d=k();ta(!0);const[y,j]=i.useState(!0),[p,I]=i.useState(!1);i.useEffect(()=>{d&&s(L(d)).finally(()=>{j(!1)})},[s,d]),i.useEffect(()=>{const{keyCloakUserId:n}=O(),{hasPassword:t}=W(n);t&&I(!0)},[]);const E=(n,{setSubmitting:t})=>{if(!p){s(g({unsubscribeReason:n.unsubscribeReason})),f.push(c.UNSUBSCRIBE_PERFORMANCE_PLAN_CONFIRM);return}b&&s(J({fanclubSiteId:S,fanclubMemberId:b.toString(),data:{password:n.password}})).then(T).then(m=>{if(!m.data.isPassword){s(V({withIcon:!0,snackbarType:Y.ERROR,message:aa.MSGNFMP08101}));return}s(g({unsubscribeReason:n.unsubscribeReason})),f.push(c.UNSUBSCRIBE_PERFORMANCE_PLAN_CONFIRM)}).catch(m=>{Z({error:m,dispatch:s})}).finally(()=>t(!1))};if(l?.performancePlanSales===null)return a.jsx(D,{to:c.MY_PAGE});if(y)return a.jsx(G,{isFullScreen:!0});if(!l)return a.jsx(sa,{p:2,children:"Error"});const{itemName:P,scheduledExpireAt:h}=l.performancePlanSales,x=ra(H(h),new Date);
1return a.jsxs(oa,{className:e.performancePlan,children:[a.jsx(Q,{text:P,path:c.PERFORMANCE_PLAN_DETAIL}),a.jsx(o,{variant:"h5",className:e.cancelTitle,children:"解約"}),a.jsx(o,{variant:"h6",fontWeight:"fontWeightBold",className:e.planCancelTitle,children:"解約するプラン"}),a.jsxs(o,{variant:"body2",className:e.planInfo,children:[a.jsx("div",{children:P}),u&&u>0&&a.jsxs("div",{className:e.amount,children:[na(u),a.jsx("span",{className:e.amountTax,children:" /月(税込)"})]})]}),a.jsx(C,{validationSchema:$(p),initialValues:w,onSubmit:E,children:({values:n,isSubmitting:t})=>a.jsxs(N,{children:[a.jsx("div",{className:e.unsubscribeReason,children:a.jsx(A,{id:"reason",name:"unsubscribeReason.reason",customLabel:"解約する理由をお聞かせください(任意)",fullWidth:!0,placeholder:"例)サービスに満足できなかった。",multiline:!0,rows:4,inputProps:{autoComplete:"off"}})}),a.jsxs(o,{variant:"caption",color:"textSecondary",textAlign:"right",display:"block",children:[n.unsubscribeReason.reason.length,"/",q.UNSUBSCRIBE_REASON.MAX]}),p&&a.jsxs(a.Fragment,{children:[a.jsx(v,{}),a.jsx("div",{className:e.inputPassword,children:a.jsx(M,{id:"password",customLabel:"パスワード",name:"password",fullWidth:!0,placeholder:"パスワードを入力",inputProps:{autoComplete:"current-password"}})}),a.jsx(z,{variant:"body2",withFixedColor:!0,href:K.REISSUE_PASSWORD,children:"パスワードを忘れた場合"})]}),a.jsx("div",{className:e.validityPeriod,children:h&&a.jsxs(o,{color:"textSecondary",variant:"caption",children:[x>0?`有効期限があと${x}日間残っています。`:"",a.jsx("br",{}),"本当に解約しますか?"]})}),a.jsx("div",{className:e.btnNext,children:a.jsx(X,{color:"primary",variant:"contained",fullWidth:!0,disabled:t,disabledWithOpacity:t,size:"large",type:"submit",children:"次へ"})})]})})]})},Ta=i.memo(ia);export{Ta 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.