Compare commits

...

8 Commits

8 changed files with 32 additions and 20 deletions

View File

@@ -5,5 +5,5 @@ WORKDIR /app
COPY package.json package-lock.json /app/
RUN npm install
COPY . /app
CMD npm run watch
CMD npm run start
EXPOSE 7700

View File

@@ -560,7 +560,7 @@ class App extends React.Component {
<WithdrawDialog />
<div className={classes.root}>
<AppBar position="fixed">
<AppBar style={{ zIndex: 1 }} position="fixed">
<Toolbar className={classes.toolbar}>
<div className={classes.sectionMobile}>
<IconButton className={classes.menuButton} color="action" aria-label="Open drawer" onClick={this.toggleDrawerNew(true)}>

View File

@@ -73,7 +73,7 @@ export default class ComponentName extends React.Component {
// description: 'Please check your email to continue'
// });
this.props.history.push({
pathname:LINKS.VOUCHERS
pathname:LINKS.DASHBOARD
});
this.setState({isLoading: false, isSuccess: true})
// this

View File

@@ -209,7 +209,7 @@ class RegisterPage extends React.Component {
no_rekening : this.state.no_rekening
}
};
this.props.history.push(LINKS.VOUCHERS);
this.props.history.push(LINKS.DASHBOARD);
// this.authStore.register(data).then(res => {
// //message.success("Please check your email to confirm your account");this.props.history.push(LINKS.LOGIN);
// setTimeout(() => {

View File

@@ -11,9 +11,11 @@
background-color: white;
border: #ccc 1px solid;
width: 100%;
height: 200px;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
align-items: center;
margin-bottom: 10px;
cursor: pointer;

View File

@@ -49,24 +49,34 @@ export default class ModalTopupComponent extends React.Component {
}
]
var rightCode = {}
let rightCode = {};
codeList.map((cl) => {
if (cl.code === code){
rightCode = cl
this.props.appstate.wallet.data.wallet = this.props.appstate.wallet.data.wallet + cl.amount
message.success("Voucher redeem success");
this.setState({
confirmLoading: false
});
this.state.onOk()
}else{
this.setState({
confirmLoading: false
});
message.warning("Voucher redeem failed")
}
})
}}
)
this.setState({
inputCode1: '',
inputCode2: '',
inputCode3: '',
inputCode4: ''
});
if (rightCode.code){
message.success("Voucher redeem success");
this.props.appstate.wallet.data.wallet = this.props.appstate.wallet.data.wallet + rightCode.amount
this.setState({
confirmLoading: false
});
this.state.onOk()
}else{
this.setState({
confirmLoading: false
});
message.warning("Voucher redeem failed")
}
}
render() {

View File

@@ -5,7 +5,7 @@ export class ItemStore extends BaseStore {
@observable listImages = [];
constructor(context) {
super(context);
this.url = "items";
this.url = "/categories/11936220-31f7-4f5e-8555-9110dbec4a5d/items";
}
@action

View File

@@ -26,7 +26,7 @@ export default class Vouchers {
getList(){
console.log('res');
this.isLoading = true;
return this.http.get("items")
return this.http.get("categories/11936220-31f7-4f5e-8555-9110dbec4a5d/items")
.then(res => {
this.list = res.data;
this.isLoading = false;