2 lines
42 KiB
JavaScript
2 lines
42 KiB
JavaScript
|
|
import{j as u,an as S,B as L,i as ee,b as je,T as P,aj as ne,ak as oe,al as B,am as z,ao as Ae,c6 as Gu,ar as Fu,as as Ru,c7 as Tu,at as Bu,a_ as ge,ay as $u,az as Lu,aA as Ye,aO as Pu,aP as Mu,I as zu,c8 as Ou,c9 as Wu,aQ as Yu,ca as qu,ad as Uu,bt as Hu,af as Ju,a6 as Ku}from"./mui-vendor-D_SVL-Dx.js";import{r as f}from"./react-vendor-CmFgShSM.js";import{L as U,j as H,h as T,A as Ke,u as Qe,c as Ne,a0 as k,C as we,G as C,V as I,r as ue,dx as Qu,aK as Xe,fZ as he,S as R,fY as Se,$ as Ze,v as de,f_ as Ee,f$ as Xu,g0 as Zu,cE as Eu,ce as me,O as Du,b7 as ku,g1 as e0,fX as u0}from"./index-D80MdVQn.js";import{a as J,u as De}from"./redux-vendor-CfkcHgWN.js";import{c as n0,a as t0}from"./city-get-city-Cof5ivkn.js";import{d as ye}from"./Person-PsPK2YrR.js";import{d as Ie}from"./Phone-DO6stZ0w.js";import{d as a0,a as ke}from"./Cake-B9u2Frdy.js";import{L as Ce}from"./LabelField-BYhJrYEE.js";import{D as s0}from"./DialogAlert-CML4Ua46.js";import{d as qe}from"./Business-C5WNOK1n.js";import{d as le}from"./CheckCircle-DhdOmw2t.js";const r0=J("CHECK_KILLHOUSE_REQUEST_GUILD_SERVICE",async(e,{dispatch:n})=>{try{n(U());const{data:a,status:t}=await H.post("check_guilds/",e);return n(T()),{data:a,status:t}}catch(a){return n(T()),{error:a.response.data.result}}}),l0=Ne({verificationCode:I().required("کد احراز الزامی است").matches(/^\d+$/,"کد احراز باید فقط شامل اعداد باشد").min(4,"کد احراز باید حداقل ۴ رقم باشد").max(6,"کد احراز حداکثر ۶ رقم میباشد")}),i0=({item:e,updateTable:n,userType:a})=>{const t=a==="steward",r=De(),[c]=f.useContext(Ke),l=Qe({initialValues:{verificationCode:""},validationSchema:l0,onSubmit:o=>{r(r0(t?{steward_key:e.key,state:"accepted",code:o.verificationCode,role:k()}:{guilds_key:e.key,state:"accepted",code:o.verificationCode,role:k()})).then(b=>{b.payload.error?c({vertical:"top",horizontal:"center",msg:b.payload.error,severity:"error"}):(n(),r(we()),c({vertical:"top",horizontal:"center",msg:"عملیات با موفقیت انجام شد.",severity:"success"}))})}});return u.jsxs(C,{component:"form",onSubmit:l.handleSubmit,xs:12,justifyContent:"center",alignItems:"center",children:[u.jsx(S,{fullWidth:!0,id:"verificationCode",name:"verificationCode",label:"کد احراز",value:l.values.verificationCode,onChange:l.handleChange,onBlur:l.handleBlur,error:l.touched.verificationCode&&!!l.errors.verificationCode,helperText:l.touched.verificationCode&&l.errors.verificationCode,variant:"outlined",inputProps:{maxLength:6,inputMode:"numeric",pattern:"[0-9]*"},placeholder:"کد احراز را وارد کنید"}),u.jsx(L,{type:"submit",variant:"contained",color:"primary",fullWidth:!0,sx:{mt:1},children:"ثبت کد"})]})},c0=J("PROVINCE_GET_REGISTER_CODE_SERVICE",async(e,{dispatch:n})=>{n(U());const{data:a,status:t}=await H.get("allow_register_code_for_guilds");return n(T()),{data:a,status:t}}),c6=J("PROVINCE_RESEND_REGISTER_CODE_SERVICE",async(e,{dispatch:n})=>{n(U());try{const{data:a,status:t}=await H.post("send_again_sms_for_register_code_guild/",e);return n(T()),{data:a,status:t}}catch(a){return n(T()),{error:a.response.data.result}}}),o6=J("SEND_AGAIN_SMS_FOR_REGISTER_CODE_STEWARD",async(e,{dispatch:n})=>{n(U());try{const{data:a,status:t}=await H.post("send_again_sms_for_register_code_steward/",e);return n(T()),{data:a,status:t}}catch(a){return n(T()),{error:a.response.data.result}}});var Ve={},o0=ee;Object.defineProperty(Ve,"__esModule",{value:!0});var eu=Ve.default=void 0,d0=o0(ue()),C0=u;eu=Ve.default=(0,d0.default)((0,C0.jsx)("path",{d:"M9 11H7v2h2zm4 0h-2v2h2zm4 0h-2v2h2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V9h14z"}),"DateRange");var Ge={},h0=ee;Object.defineProperty(Ge,"__esModule",{value:!0});var uu=Ge.default=void 0,_0=h0(ue()),p0=u;uu=Ge.default=(0,_0.default)((0,p0.jsx)("path",{d:"M22 10V6c0-1.11-.9-2-2-2H4c-1.1 0-1.99.89-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2s.9-2 2-2m-9 7.5h-2v-2h2zm0-4.5h-2v-2
|