price update
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
import React, { useState } from 'react'
|
||||
import ApexCharts from 'apexcharts'
|
||||
|
||||
const StockPrice = () => {
|
||||
const [series, setSeries] = useState( {
|
||||
series: [{
|
||||
name: "Desktops",
|
||||
data: [10, 41, 35, 51, 49, 62, 69, 91, 148]
|
||||
}],
|
||||
options: {
|
||||
chart: {
|
||||
height: 350,
|
||||
type: 'line',
|
||||
zoom: {
|
||||
enabled: false
|
||||
}
|
||||
},
|
||||
dataLabels: {
|
||||
enabled: false
|
||||
},
|
||||
stroke: {
|
||||
curve: 'straight'
|
||||
},
|
||||
title: {
|
||||
text: 'Product Trends by Month',
|
||||
align: 'left'
|
||||
},
|
||||
grid: {
|
||||
row: {
|
||||
colors: ['#f3f3f3', 'transparent'], // takes an array which will be repeated on columns
|
||||
opacity: 0.5
|
||||
},
|
||||
},
|
||||
xaxis: {
|
||||
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep'],
|
||||
}
|
||||
},
|
||||
|
||||
} )
|
||||
return (
|
||||
<div>
|
||||
<ApexCharts series={series.series} options={series.options} type='line' />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default StockPrice
|
||||
@@ -0,0 +1,170 @@
|
||||
import {
|
||||
MDBBtn,
|
||||
MDBCard,
|
||||
MDBCardBody,
|
||||
MDBCardImage,
|
||||
MDBCardText,
|
||||
MDBCol,
|
||||
MDBContainer,
|
||||
MDBRow,
|
||||
MDBTypography
|
||||
} from 'mdb-react-ui-kit'
|
||||
import React from 'react'
|
||||
import { FiArrowLeft, FiArrowUp } from 'react-icons/fi'
|
||||
import { LineChart, Line, XAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer, YAxis } from 'recharts'
|
||||
import AppContainer from '../../../pages/appContainer'
|
||||
import CountUp from 'react-countup'
|
||||
import Link from 'next/link'
|
||||
import PriceStock from '../../../public/resource/images/512-512-p.png'
|
||||
|
||||
const data = [
|
||||
{
|
||||
name: '1400 تیر ',
|
||||
قیمت: 350000000
|
||||
},
|
||||
{
|
||||
name: '1400 شهریور ',
|
||||
قیمت: 450000000
|
||||
},
|
||||
{
|
||||
name: '1400 آبان ',
|
||||
قیمت: 500000000
|
||||
},
|
||||
{
|
||||
name: '1400 اسفند ',
|
||||
قیمت: 550000000
|
||||
},
|
||||
{
|
||||
name: 'اردیبهشت 1401 ',
|
||||
قیمت: 650000000
|
||||
},
|
||||
{
|
||||
name: 'مهر 1401 ',
|
||||
قیمت: 750000000
|
||||
},
|
||||
{
|
||||
name: 'دی 1401 ',
|
||||
قیمت: 850000000
|
||||
}
|
||||
]
|
||||
|
||||
const StockNews = [
|
||||
{ id: 1, title: 'شرایط انتقال سهام', url: '/page/news/34' },
|
||||
{ id: 2, title: ' نحوه خرید آنلاین سهم', url: 'https://landing.miphospital.ir/' },
|
||||
{ id: 3, title: 'چرا باید سهام بیمارستان بخریم؟ ', url: '/page/news/24' },
|
||||
{ id: 4, title: ' همکاری در فروش (کسب درآمد)', url: 'https://landing.miphospital.ir/' }
|
||||
]
|
||||
const StockPriceChart = () => {
|
||||
return (
|
||||
<AppContainer title={'قیمت سهام بیمارستان مهر ایرانیان'}>
|
||||
<div className='bg-stock-price p-5 '>
|
||||
<h2 className='bk-heavy text-xs text-center text-white hover:hidden hover:hidden '>
|
||||
قیمت سهام بیمارستان مهر ایرانیان
|
||||
</h2>
|
||||
<MDBContainer
|
||||
dir='rtl'
|
||||
className='flex md:flex-col sm:flex-col lg:flex-row items-center p-3 justify-center mt-3'
|
||||
>
|
||||
<div className='flex bg-white px-4 md:flex-col sm:flex-col lg:flex-row py-3 items-center rounded-lg'>
|
||||
<div className='mt-2 flex md:flex-col md:items-center sm:items-center sm:flex-col lg:flex-row'>
|
||||
<div className='flex justify-center'>
|
||||
<span className='blob mb-3 mt-2 ml-3' />
|
||||
</div>
|
||||
<h3 className='text-success bk-med'>قیمت روز سهم : </h3>
|
||||
<h3 className='text-success mr-2'>
|
||||
<CountUp start={0} end={85000000} separator=',' />
|
||||
</h3>
|
||||
<p
|
||||
style={{ fontSize: 15, backgroundColor: '#2dd4bf' }}
|
||||
className=' text-white p-1 rounded-full flex justify-center items-center mr-2 mt-1'
|
||||
>
|
||||
<FiArrowUp />
|
||||
<span style={{ fontSize: 10 }} className='mt-1'>
|
||||
25%
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</MDBContainer>
|
||||
</div>
|
||||
<MDBCard className='flex justify-center p-5'>
|
||||
<div className={'mb-4 flex align-items-center justify-content-end'}>
|
||||
<MDBTypography variant={'h5'} className={'text-right bk-med'}>
|
||||
نمودار تغییرات قیمت سهام
|
||||
</MDBTypography>
|
||||
<span className={'blob-right ml-2 mb-2'} />
|
||||
</div>
|
||||
<div style={{ width: '100%', height: 300 }}>
|
||||
<ResponsiveContainer>
|
||||
<LineChart
|
||||
width={2000}
|
||||
height={300}
|
||||
data={data}
|
||||
margin={{
|
||||
top: 5,
|
||||
right: 30,
|
||||
left: 50,
|
||||
bottom: 5
|
||||
}}
|
||||
>
|
||||
<CartesianGrid strokeDasharray='3 3' />
|
||||
<XAxis dataKey='name' />
|
||||
<YAxis tickCount={1} />
|
||||
<Tooltip cursor={{ stroke: 'red', strokeWidth: 2 }} />
|
||||
<Legend />
|
||||
<Line type='monotone' dataKey='قیمت' stroke='#82ca9d' />
|
||||
</LineChart>
|
||||
</ResponsiveContainer>
|
||||
</div>
|
||||
<div className={'mb-4 mt-3 flex align-items-center justify-content-end'}>
|
||||
<MDBTypography variant={'h5'} className={'text-right bk-med'}>
|
||||
آخرین مطالب سهام
|
||||
</MDBTypography>
|
||||
<span className={'blob-right ml-2 mb-2'} />
|
||||
</div>
|
||||
<MDBRow>
|
||||
{StockNews.map((item, index) => (
|
||||
<MDBCol className={'mt-2'} key={index} md={6} sm={12} lg={3}>
|
||||
<MDBCard>
|
||||
<MDBCardBody>
|
||||
<MDBCardImage with={50} className={'rounded-lg'} src={PriceStock} />
|
||||
<MDBCardText className={'mt-3 bk-bold'}>
|
||||
<div className={'flex align-items-center justify-content-end'}>
|
||||
{item.title}
|
||||
<span className={'blob-right ml-2 mb-2'} />
|
||||
</div>
|
||||
<br />
|
||||
<Link href={item.url}>
|
||||
<MDBBtn className={'border-none flex items-center'} outline>
|
||||
<FiArrowLeft className={'mr-2'} />
|
||||
مشاهده{' '}
|
||||
</MDBBtn>
|
||||
</Link>
|
||||
</MDBCardText>
|
||||
</MDBCardBody>
|
||||
</MDBCard>
|
||||
</MDBCol>
|
||||
))}
|
||||
</MDBRow>
|
||||
<div className='text-center flex lg:flex-row sm:flex-col md:flex-col justify-center'>
|
||||
<div>
|
||||
<a target={'_blank'} href='https://panel.mehriranianco.ir/welcome'>
|
||||
<MDBBtn rounded className='mt-5 bg-primary-teal'>
|
||||
خرید آنلاین سهام
|
||||
</MDBBtn>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<Link href='/page/sales'>
|
||||
<MDBBtn rounded outline className='mt-5 text-[#39a2a5] ml-2 border-[#39a2a5]'>
|
||||
مشاوره تلفنی
|
||||
</MDBBtn>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</MDBCard>
|
||||
</AppContainer>
|
||||
)
|
||||
}
|
||||
|
||||
export default StockPriceChart
|
||||
@@ -0,0 +1,2 @@
|
||||
export const ADDFRAMEWORK = () => ({ type: 'ADD_FRAMEWORK' })
|
||||
export const FORM_CAST = (dataA) => ({ type: 'PersonaForm', data: [dataA] })
|
||||
@@ -0,0 +1,15 @@
|
||||
const initialState = [
|
||||
{id:1, name: 'next.js', lang: 'js'},
|
||||
{id:2, name: 'nuxt.js', lang: 'js'},
|
||||
{id:3, name: 'nuxt.js', lang: 'js'},
|
||||
{id:4, name: 'react', lang: 'js'}
|
||||
]
|
||||
export const GlobalReducer = (state = initialState, action) => {
|
||||
switch (action.type) {
|
||||
case 'ADD_FRAMEWORK':
|
||||
console.log(state)
|
||||
return [...state, {id: 1,name:'vue', lang: 'js'}]
|
||||
default:
|
||||
return state
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
const RequestFormReducerState = []
|
||||
|
||||
export const RequestFormReducer = (state = RequestFormReducerState, action) => {
|
||||
switch (action.type) {
|
||||
case 'PersonaForm':
|
||||
console.log('actiony',action)
|
||||
return [...RequestFormReducerState, action.data]
|
||||
default:
|
||||
return state
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import {RequestFormReducer} from "./RequestFormReducer";
|
||||
const {GlobalReducer} = require('./GlobalReducer')
|
||||
|
||||
const {combineReducers} = require("redux");
|
||||
|
||||
export const CoreReducer = combineReducers({
|
||||
Global: GlobalReducer,
|
||||
FormRequest: RequestFormReducer
|
||||
})
|
||||
@@ -0,0 +1,13 @@
|
||||
export const imgslides = {
|
||||
a: require("../../../public/resource/brands/A.png"),
|
||||
b: require("../../../public/resource/brands/B.png"),
|
||||
c: require("../../../public/resource/brands/C.png"),
|
||||
d: require("../../../public/resource/brands/D.png"),
|
||||
e: require("../../../public/resource/brands/E.png"),
|
||||
f: require("../../../public/resource/brands/F.png"),
|
||||
g: require("../../../public/resource/brands/G.png"),
|
||||
h: require("../../../public/resource/brands/H.png"),
|
||||
i: require("../../../public/resource/brands/I.png"),
|
||||
j: require("../../../public/resource/brands/J.png"),
|
||||
k: require("../../../public/resource/brands/k.jpg"),
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
import {createStore, applyMiddleware} from "redux";
|
||||
import {CoreReducer} from "../reducers/reducer";
|
||||
import thunk from "redux-thunk";
|
||||
import {composeWithDevTools} from "redux-devtools-extension";
|
||||
|
||||
export const CoreStore = createStore(
|
||||
CoreReducer,
|
||||
composeWithDevTools(applyMiddleware(thunk))
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
export const SET_NAME = "SET_NAME"
|
||||
Reference in New Issue
Block a user