feat: handle transfer stok mide:
This commit is contained in:
@@ -14,9 +14,11 @@ import Link from 'next/link'
|
||||
const StockTransferContainer = () => {
|
||||
const [name, setName] = useState()
|
||||
const [mobileNumber, setMobileNumber] = useState('')
|
||||
const [InvestmentPrice, setInvestmentPrice] = useState('0')
|
||||
// const [InvestmentPrice, setInvestmentPrice] = useState('0')
|
||||
const [InvestmentType, setInvestmentType] = useState('1')
|
||||
const [Loading, setLoading] = useState(false)
|
||||
const [code, setCode] = useState('1')
|
||||
|
||||
const [showSuccessSubmitForm, setShowSuccessSubmitForm] = useState(false)
|
||||
|
||||
const SubmitForm = () => {
|
||||
@@ -26,8 +28,9 @@ const StockTransferContainer = () => {
|
||||
.post(`${AppProduction}public/website/request`, {
|
||||
name: name,
|
||||
mobile_number: mobileNumber,
|
||||
investment_price: InvestmentPrice,
|
||||
investment_type: InvestmentType
|
||||
investment_price: 0,
|
||||
investment_type: InvestmentType,
|
||||
type: 'transfer-stock'
|
||||
})
|
||||
.then(async res => {
|
||||
setLoading(false)
|
||||
@@ -35,6 +38,8 @@ const StockTransferContainer = () => {
|
||||
toast.remove()
|
||||
toast.success('درخواست شما ثبت شد به زودی کار شناسان ما به شما تماس می گیرند')
|
||||
await console.log('res', res)
|
||||
setCode(res.data.request.rrn)
|
||||
|
||||
})
|
||||
.catch(async err => {
|
||||
setLoading(false)
|
||||
@@ -127,7 +132,7 @@ const StockTransferContainer = () => {
|
||||
border-b border-solid border-[#65656540] border-r-0 border-l-0 border-t-0 hover:border-[#57C5C6] pt-2 '
|
||||
id='phone'
|
||||
type='text'
|
||||
placeHolder='099123456789 '
|
||||
placeHolder='09912345678'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -164,7 +169,7 @@ const StockTransferContainer = () => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/*
|
||||
<div className='mt-9 '>
|
||||
<label className='text-[#3c3c3c] text-base md:text-lg font-medium hover:text-[#57C5C6] ' for='money'>
|
||||
مبلغ سرمایه گذاری شما
|
||||
@@ -184,7 +189,7 @@ const StockTransferContainer = () => {
|
||||
placeHolder=' مبلغ مد نظر خود برای شروع سرمایه گذاری وارد نمایید'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className='mt-[6rem] mb-2'>
|
||||
<button
|
||||
@@ -199,7 +204,10 @@ const StockTransferContainer = () => {
|
||||
</div>
|
||||
) : (
|
||||
<div className='my-44 flex justify-center flex-col items-center'>
|
||||
<h3 className='text-green-600'>درخواست شما ثبت شد به زودی کار شناسان ما به شما تماس می گیرند</h3>
|
||||
<h3 className='text-green-600'>درخواست شما ثبت شد به زودی کارشناسان ما با شما تماس می گیرند</h3>
|
||||
<br />
|
||||
کد پیگیری درخواست شما :
|
||||
{code}
|
||||
<div className='mt-[6rem] mb-2'>
|
||||
<Link href={'/stock-unit'}>
|
||||
<button className='py-[1rem] outline-0 border-0 px-[2rem] bg-[#014258] rounded-[10px] text-white text-[20px] font-bold '>
|
||||
|
||||
Reference in New Issue
Block a user