update: responsive layout payment stepper
This commit is contained in:
		| @@ -8,12 +8,13 @@ import { Affix, Card, Slider, Select, Row, Col, Icon, Tag,Rate, Button, Checkbox | |||||||
| import {startCase} from 'lodash'; | import {startCase} from 'lodash'; | ||||||
| import LoadingDialog from "../../LoadingDialog"; | import LoadingDialog from "../../LoadingDialog"; | ||||||
| import Loader from 'react-loader-advanced'; | import Loader from 'react-loader-advanced'; | ||||||
| // import './style.scss'; | import './style.scss'; | ||||||
| import {DIALOG} from "../../../stores/global_ui"; | import {DIALOG} from "../../../stores/global_ui"; | ||||||
| import EmptyComponent from '../../EmptyComponent'; | import EmptyComponent from '../../EmptyComponent'; | ||||||
| import NavigationArrowBack from 'material-ui/svg-icons/navigation/arrow-back'; | import NavigationArrowBack from 'material-ui/svg-icons/navigation/arrow-back'; | ||||||
| import {LINKS} from "../../../routes"; | import {LINKS} from "../../../routes"; | ||||||
| import {APP_TYPE} from "../../../config/app"; | import {APP_TYPE} from "../../../config/app"; | ||||||
|  | import get from "lodash.get"; | ||||||
|  |  | ||||||
| const Panel = Collapse.Panel; | const Panel = Collapse.Panel; | ||||||
|  |  | ||||||
| @@ -51,16 +52,23 @@ export default class PaymentVouchers extends React.Component { | |||||||
|       const qty = 1; |       const qty = 1; | ||||||
|       const total = price * qty; |       const total = price * qty; | ||||||
|  |  | ||||||
|     let applicationName = 'Giift'; |     // let applicationName = 'Giift'; | ||||||
|     let applicationLogo = 'http://giift.asacreative.com/giift_logo_wide.4d15de72.png'; |     // let applicationLogo = 'http://giift.asacreative.com/giift_logo_wide.4d15de72.png'; | ||||||
|     if(APP_TYPE === 'btn') { |     // if(APP_TYPE === 'btn') { | ||||||
|       applicationName = 'BTN'; |     //   applicationName = 'BTN'; | ||||||
|       applicationLogo = 'http://btn-redemption-2.bangun-kreatif.com/dr6u0fppdi4xy.cloudfront.net/FilesDirectory/Albilad/ImgIconImage/logo-btn.png'; |     //   applicationLogo = 'http://btn-redemption-2.bangun-kreatif.com/dr6u0fppdi4xy.cloudfront.net/FilesDirectory/Albilad/ImgIconImage/logo-btn.png'; | ||||||
|  |     // } | ||||||
|  |     const logoUrl = (this.props.vouchersStore.dataItems.images.logo) ? get(this.vouchersStore.dataItems, 'images.logo', '') : 'http://lorempixel.com/400/200'; | ||||||
|  |  | ||||||
|  |     let image = logoUrl; | ||||||
|  |  | ||||||
|  |     if (!image.includes('http')) { | ||||||
|  |       image = this.http.appendImagePath(image); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     return( |     return( | ||||||
|       <div> |       <div> | ||||||
|         <div className="row"> |         <div className="upper-card"> | ||||||
|           <Collapse bordered={true}> |           <Collapse bordered={true}> | ||||||
|             <Panel style={{backgroundColor:'white'}} showArrow={false} header={ |             <Panel style={{backgroundColor:'white'}} showArrow={false} header={ | ||||||
|               <div style={{display:'flex',justifyContent:'space-between', paddingRight:20, paddingLeft:15}}> |               <div style={{display:'flex',justifyContent:'space-between', paddingRight:20, paddingLeft:15}}> | ||||||
| @@ -94,16 +102,17 @@ export default class PaymentVouchers extends React.Component { | |||||||
|             </Panel> |             </Panel> | ||||||
|           </Collapse> |           </Collapse> | ||||||
|         </div> |         </div> | ||||||
|         <div className="row"> |         <div className="bottom-card"> | ||||||
|           <Card  title={<div style={{display:'flex',justifyContent:'space-between'}}> |           <Card title={<div style={{display:'flex',justifyContent:'space-between', alignItems: 'center'}}> | ||||||
|             <div> |             <div className={'item-container'}> | ||||||
|               <h3 style={{fontSize:20}}> |               <h3 className={'item-name'}> | ||||||
|                 Points {applicationName} |                 {this.props.vouchersStore.dataItems.name} - {this.props.vouchersStore.skuName} | ||||||
|  |               </h3> | ||||||
|  |               <h3 className={'item-points'}> | ||||||
|  |                 BTN Points Payment | ||||||
|               </h3> |               </h3> | ||||||
|             </div> |             </div> | ||||||
|             <div> |             <img className={'image-logo'} src={image} /> | ||||||
|               <img  style={{width:120, height:40}} src={applicationLogo} /> |  | ||||||
|             </div> |  | ||||||
|           </div>}> |           </div>}> | ||||||
|             <div className="row"> |             <div className="row"> | ||||||
|               <Alert message="Pastikan data anda sudah terverivikasi dan vouchers anda yang pilih sudah benar sebelum melakukan transaksi" type="warning" /> |               <Alert message="Pastikan data anda sudah terverivikasi dan vouchers anda yang pilih sudah benar sebelum melakukan transaksi" type="warning" /> | ||||||
|   | |||||||
							
								
								
									
										50
									
								
								src/common/pages/Vouchers/Payment/style.scss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								src/common/pages/Vouchers/Payment/style.scss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | |||||||
|  | .upper-card{ | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .bottom-card{ | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @media(min-width: 1000px){ | ||||||
|  |   .image-logo{ | ||||||
|  |     width: 10vw; | ||||||
|  |     height: 10vh; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   .item-container{ | ||||||
|  |     height: 10vh; | ||||||
|  |     display: flex; | ||||||
|  |     flex-direction: column; | ||||||
|  |     justify-content: center; | ||||||
|  |     .item-name{ | ||||||
|  |       padding-top: 1vh; | ||||||
|  |       margin-bottom: -0.25vh; | ||||||
|  |       font-size: 1.35em; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     .item-points{ | ||||||
|  |       font-size: 0.95em; | ||||||
|  |       color: #aaa; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @media(max-width: 999px){ | ||||||
|  |   .image-logo{ | ||||||
|  |     width: 25vw; | ||||||
|  |     height: 10vh; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   .item-container{ | ||||||
|  |     .item-name{ | ||||||
|  |       font-size: 1.15em; | ||||||
|  |       margin-bottom: -0.25vh; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     .item-points{ | ||||||
|  |       font-size: 0.75em; | ||||||
|  |       color: #aaa; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
| @@ -66,6 +66,7 @@ export class VoucherStepper extends React.Component { | |||||||
|         title: 'Anda yakin mau menukarkan voucher?', |         title: 'Anda yakin mau menukarkan voucher?', | ||||||
|         content: 'Sistem akan langsung memotong point anda ketika anda menekan tombol konfirmasi dibawah.', |         content: 'Sistem akan langsung memotong point anda ketika anda menekan tombol konfirmasi dibawah.', | ||||||
|         onOk: () => { |         onOk: () => { | ||||||
|  |           this.globalUI.showDialogLoading(); | ||||||
|           this.vouchersStore.buyVoucher(this.vouchersStore.skuId) |           this.vouchersStore.buyVoucher(this.vouchersStore.skuId) | ||||||
|             .then(res => { |             .then(res => { | ||||||
|               const openNotificationWithIcon = (type) => { |               const openNotificationWithIcon = (type) => { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user