-
-
-
- New Products
+
+
+
+
+
+
+ New Products
-
-
-
+
+
+
+
-
-
-
-
-
-
-
- Voucher & Gift Card
+
+
+
+
+
+
+ Voucher & Gift Card
-
- {data.map((item, index) => {
- return ( this.setState({isOpened: true, data: item})} key={index} span={6}>
-
- )
- })}
-
+
+ {
+ ( this.vouchersStore.list.length > 0) ?
+ this.vouchersStore.list.map((item, index) => {
+ return ( this.setState({isOpened: true, data: item})} key={index} span={6}>
+
+ )
+ })
+ : (
+
+ )
+ }
+
- {/* this.setState({isOpened: false})}*/}
- {/*onCancel={() => this.setState({isOpened: false})}*/}
- {/*/>*/}
+ this.setState({isOpened: false})}
+ onCancel={() => this.setState({isOpened: false})}
+ />
+
-
+
- {/*
- xs=12 sm=6
-
-
- xs=12 sm=6
-
-
- xs=3 sm=3
-
-
- xs=3 sm=3
-
-
- xs=3 sm=3
-
-
- xs=3 sm=3
- */}
-
+
+ this.setModalTopup(false)} onCancel={() => this.setModalTopup(false)} isVisible={this.state.modalTopup} />
);
}
diff --git a/src/common/pages/Dashboard/style.scss b/src/common/pages/Dashboard/style.scss
index 6732ead..c117212 100644
--- a/src/common/pages/Dashboard/style.scss
+++ b/src/common/pages/Dashboard/style.scss
@@ -91,7 +91,7 @@
.value {
- font-size: 1.8rem;
+ font-size: 1rem;
letter-spacing: 1px;
line-height: 1.2;
display: inline-block;
diff --git a/src/common/pages/Login/LoginBtn.js b/src/common/pages/Login/LoginBtn.js
new file mode 100644
index 0000000..180a692
--- /dev/null
+++ b/src/common/pages/Login/LoginBtn.js
@@ -0,0 +1,110 @@
+import React from 'react';
+import withStyles from "@material-ui/core/styles/withStyles";
+import {styles} from '../Register/registerStyle';
+import Grid from '@material-ui/core/Grid';
+import Paper from '@material-ui/core/Paper';
+import Typography from '@material-ui/core/Typography';
+import TextField from '@material-ui/core/TextField';
+import Visibility from '@material-ui/icons/Visibility';
+import VisibilityOff from '@material-ui/icons/VisibilityOff';
+import Button from '@material-ui/core/Button';
+import Hidden from '@material-ui/core/Hidden';
+import InputAdornment from '@material-ui/core/InputAdornment';
+import IconButton from '@material-ui/core/IconButton';
+import { Link } from 'react-router-dom'
+
+class BTNLoginPage extends React.Component{
+ state = {
+ email : "",
+ password : "",
+ showPassword : false
+ };
+
+ handleChange = name => event => {
+ this.setState({
+ [name]: event.target.value,
+ });
+ };
+
+ viewPassword = ()=>{
+ this.setState({
+ showPassword : !this.state.showPassword
+ })
+ };
+
+ render(){
+ const { classes } = this.props;
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ Welcome to BTN Points
+
+
+ Sign in to get various voucher and items
+
+
+
+
+
+
+ Login to BTN Point
+
+
+ Doesn't have an account? Register
+
+
+ {/**/}
+
+
+ {this.state.showPassword ? : }
+
+
+ ),
+ }}
+ />
+
+
+
+
+
+
+
+
+
+ )
+ }
+}
+
+export default withStyles(styles)(BTNLoginPage);
\ No newline at end of file
diff --git a/src/common/pages/Login/style.scss b/src/common/pages/Login/style.scss
index dc1bc01..6e0b2a4 100644
--- a/src/common/pages/Login/style.scss
+++ b/src/common/pages/Login/style.scss
@@ -80,3 +80,4 @@
textarea:focus, input:focus{
outline: none;
}
+
diff --git a/src/common/pages/Register/registerStyle.js b/src/common/pages/Register/registerStyle.js
new file mode 100644
index 0000000..24f9058
--- /dev/null
+++ b/src/common/pages/Register/registerStyle.js
@@ -0,0 +1,36 @@
+import yellow from '@material-ui/core/colors/yellow';
+export const styles = theme => ({
+ container : {
+ flex :1,
+ flexGrow : 1,
+ height : '100vh',
+ marginTop: "-56px !important",
+ background : '#024F8E'
+ },
+ gridContainer : {
+ flex :1,
+ justifyContent:'center'
+ },
+ registerContainer: {
+ marginTop : 50
+ },
+ formRegister : {
+ padding : 20,
+ display : 'flex',
+ flexDirection: 'column',
+ textAlign : 'center'
+ },
+ registerPaper : {
+ flex :1,
+ flexDirection : 'row',
+ justifyContent:'center'
+ },
+ logo : {
+ width : '200px'
+ },
+ logoContainer : {
+ textAlign : 'center',
+ background : yellow['500'],
+ padding : 20
+ }
+});
\ No newline at end of file
diff --git a/src/common/pages/Vouchers/index.js b/src/common/pages/Vouchers/index.js
index c80b79b..57bc09e 100644
--- a/src/common/pages/Vouchers/index.js
+++ b/src/common/pages/Vouchers/index.js
@@ -28,12 +28,6 @@ export default class VouchersComponent extends React.Component {
additional_data: {
information:''
},
- // option: [
- // {
- // value: '',
- // cost: ''
- // },
- // ],
sku: [
{
id:'',
@@ -49,7 +43,6 @@ export default class VouchersComponent extends React.Component {
componentDidMount() {
this.vouchersStore.getList();
- console.log('res list component',this.vouchersStore.getList())
}
render() {
@@ -74,19 +67,6 @@ export default class VouchersComponent extends React.Component {
)
}
-
-
- {/* {
- (data.length > 0) ?
- data.map((item, index) => {
- return ( this.setState({isOpened: true, data: item})} key={index} span={6}>
-
- )
- })
- : (
-
- )
- } */}
{this.state.isOpened && (
diff --git a/src/common/routes.js b/src/common/routes.js
index dbd132b..1aa28d7 100644
--- a/src/common/routes.js
+++ b/src/common/routes.js
@@ -3,6 +3,7 @@ import {observer, inject} from 'mobx-react';
import {BrowserRouter as Router, Route, Switch, Redirect} from "react-router-dom";
import RegisterComponent from "./pages/RegisterNew";
import LoginComponent from "./pages/Login";
+import LoginBTNComponent from "./pages/Login/LoginBtn";
import ForgotPasswordComponent from "./pages/ForgotPassword";
import ChangePassword from './pages/ChangePassword';
import AppContainer from "./pages/App";
@@ -155,7 +156,7 @@ export default class Routes extends React.Component {
pathname: this.authStore.isLoggedIn ? LINKS.DASHBOARD : LINKS.LOGIN
}}/>)}/>
-
+
diff --git a/src/common/stores/global_ui.js b/src/common/stores/global_ui.js
index c833eb8..b1e3f86 100644
--- a/src/common/stores/global_ui.js
+++ b/src/common/stores/global_ui.js
@@ -149,4 +149,29 @@ export default class GlobalUI {
this.globalAlert = '';
this[DIALOG.UI.ALERT] = false;
}
+
+ @observable successAlertCB = ()=>{
+ this.closeAlert();
+ };
+
+ @action
+ openAlert({title=false,subtitle=false,cb=false,type='error'}){
+ if(typeof cb === 'function'){
+ this.successAlertCB = cb;
+ }
+ this.alertDialog= {
+ title : title,
+ open : true,
+ subtitle : subtitle,
+ type : type
+ }
+ };
+
+ @action
+ closeAlert(){
+ this.alertDialog.title = false;
+ this.alertDialog.open = false;
+ this.alertDialog.subtitle = false;
+ this.successAlertCB = ()=>this.closeAlert();
+ }
}