Compare commits

..

6 Commits

Author SHA1 Message Date
c154ccc0f6 Merge pull request 'bukopin' (#1) from bukopin into devops-staging
Reviewed-on: #1
2023-01-18 11:50:37 +07:00
“marselinowidis”
b2a0cc9cdc fix dockerfile 2023-01-17 23:59:19 +07:00
“marselinowidis”
0a482dd766 fix dockerfile 2023-01-17 23:41:42 +07:00
“marselinowidis”
8a8d7c0e74 fix dockerfile 2023-01-17 23:40:55 +07:00
“marselinowidis”
8c02184bd9 fix dockerfile 2023-01-17 23:33:25 +07:00
“marselinowidis”
07634ef503 fix dockerfile 2023-01-17 23:28:01 +07:00
21 changed files with 92 additions and 153 deletions

View File

@@ -1,7 +1,9 @@
FROM node:8-alpine FROM node:8-alpine
RUN apk add --no-cache libc6-compat
RUN apk add git && yarn
WORKDIR /app WORKDIR /app
COPY package.json /app COPY package.json /app
RUN yarn RUN yarn install --frozen-lockfile
COPY . /app COPY . /app
CMD npm run watch CMD npm run watch
EXPOSE 8080 EXPOSE 8080

View File

@@ -2,9 +2,9 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>KB Bukopin</title> <title>BTN</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="icon" type="image/png" href="/assets/images/kb_bukopin.jpeg" sizes="96x96" /> <link rel="icon" type="image/png" href="/assets/images/logo-bankbtn.png" sizes="96x96" />
<style> <style>
body { body {
visibility: hidden; visibility: hidden;

View File

@@ -2,9 +2,9 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>KB Bukopin</title> <title>BTN</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="icon" type="image/png" href="/assets/images/kb_bukopin.jpeg" sizes="96x96" /> <link rel="icon" type="image/png" href="/assets/images/logo-bankbtn.png" sizes="96x96" />
<style> <style>
body { body {
visibility: hidden; visibility: hidden;

View File

@@ -2,9 +2,9 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>KB Bukopin</title> <title>BTN</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="icon" type="image/png" href="/assets/images/kb_bukopin.jpeg" sizes="96x96" /> <link rel="icon" type="image/png" href="/assets/images/logo-bankbtn.png" sizes="96x96" />
<style> <style>
body { body {
visibility: hidden; visibility: hidden;

View File

@@ -2,9 +2,9 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>KB Bukopin</title> <title>BTN</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="icon" type="image/png" href="/assets/images/kb_bukopin.jpeg" sizes="96x96" /> <link rel="icon" type="image/png" href="/assets/images/logo-bankbtn.png" sizes="96x96" />
<style> <style>
body { body {
visibility: hidden; visibility: hidden;

View File

@@ -560,7 +560,7 @@ class App extends React.Component {
<WithdrawDialog /> <WithdrawDialog />
<div className={classes.root}> <div className={classes.root}>
<AppBar style={{ zIndex: 1 }} position="fixed"> <AppBar position="fixed">
<Toolbar className={classes.toolbar}> <Toolbar className={classes.toolbar}>
<div className={classes.sectionMobile}> <div className={classes.sectionMobile}>
<IconButton className={classes.menuButton} color="action" aria-label="Open drawer" onClick={this.toggleDrawerNew(true)}> <IconButton className={classes.menuButton} color="action" aria-label="Open drawer" onClick={this.toggleDrawerNew(true)}>
@@ -573,8 +573,8 @@ class App extends React.Component {
<img <img
className={classes.title} className={classes.title}
style={{ style={{
width: 70, width: 100,
height: 40 height: 30
}} }}
src={applicationIcon} /> src={applicationIcon} />
</Link> </Link>

View File

@@ -9,7 +9,7 @@ export const styles = theme => ({
width: "100%", width: "100%",
top: 0, top: 0,
zIndex: 1000, zIndex: 1000,
backgroundColor: '#FAAF03', backgroundColor: yellow['500'],
height: '70px !important', height: '70px !important',
padding: "8px 24px", padding: "8px 24px",
borderBottom: "1px solid rgb(223, 223, 223)" borderBottom: "1px solid rgb(223, 223, 223)"

View File

@@ -199,7 +199,7 @@ class DashboardComponent extends React.Component {
Voucher Voucher
</Typography> </Typography>
<Typography component="p"> <Typography component="p">
<NumberFormat value={(this.props.appstate.wallet.data.wallet).toFixed(2)} displayType={'text'} thousandSeparator={true} prefix={'Rp '} /> <NumberFormat value={(0).toFixed(2)} displayType={'text'} thousandSeparator={true} prefix={'Rp '} />
</Typography> </Typography>
</MuiCardContent> </MuiCardContent>
<MuiCardActions> <MuiCardActions>
@@ -330,8 +330,7 @@ class DashboardComponent extends React.Component {
style={{ marginTop: 15 }}> style={{ marginTop: 15 }}>
{(this.vouchersStore.list.length > 0) ? {(this.vouchersStore.list.length > 0) ?
this.vouchersStore.list.map((item, index) => { this.vouchersStore.list.map((item, index) => {
console.log("itemm", item) let image = get(item, 'images.logo', '');
let image = get(item, 'images.main', '');
if (!image.includes('http')) { if (!image.includes('http')) {
image = this.http.appendImagePath(image); image = this.http.appendImagePath(image);

View File

@@ -129,7 +129,6 @@ class RegisterPage extends React.Component {
}); });
} }
{console.log("namee", name)}
this.setState({ this.setState({
[name]: event.target.value, [name]: event.target.value,
}); });
@@ -209,46 +208,45 @@ class RegisterPage extends React.Component {
no_rekening : this.state.no_rekening no_rekening : this.state.no_rekening
} }
}; };
this.props.history.push(LINKS.VOUCHERS); this.authStore.register(data).then(res => {
// this.authStore.register(data).then(res => { //message.success("Please check your email to confirm your account");this.props.history.push(LINKS.LOGIN);
// //message.success("Please check your email to confirm your account");this.props.history.push(LINKS.LOGIN); setTimeout(() => {
// setTimeout(() => { this.setState({ isLoading: false });
// this.setState({ isLoading: false }); this.props.history.push(LINKS.REGISTER_COMPLETED);
// this.props.history.push(LINKS.REGISTER_COMPLETED); // this.props.history.push(LINKS.LOGIN);
// // this.props.history.push(LINKS.LOGIN); }, 250);
// }, 250); }).catch(err => {
// }).catch(err => { this.setState({ isLoading: false });
// this.setState({ isLoading: false });
// if (err.type === 'BodyValidationError') {
// if (err.type === 'BodyValidationError') { message.error(err.detail[0].message);
// message.error(err.detail[0].message); } else {
// } else { if (err.message.toLowerCase().includes('email')) {
// if (err.message.toLowerCase().includes('email')) { this.setState({
// this.setState({ errors: {
// errors: { ...this.state.errors,
// ...this.state.errors, email_exists: 'Email sudah terdaftar'
// email_exists: 'Email sudah terdaftar' }
// } })
// }) } else if (err.message.toLowerCase().includes('phone number')) {
// } else if (err.message.toLowerCase().includes('phone number')) { this.setState({
// this.setState({ errors: {
// errors: { ...this.state.errors,
// ...this.state.errors, phone_exists: 'Nomer handphone sudah terdaftar'
// phone_exists: 'Nomer handphone sudah terdaftar' }
// } })
// }) } else if (err.message.toLowerCase().includes('referal')) {
// } else if (err.message.toLowerCase().includes('referal')) { this.setState({
// this.setState({ errors: {
// errors: { ...this.state.errors,
// ...this.state.errors, referal_not_found: 'Kode Referal Salah - Silahkan Hubungi Petugas BTN'
// referal_not_found: 'Kode Referal Salah - Silahkan Hubungi Petugas BTN' }
// } })
// }) } else {
// } else { message.error(err.message);
// message.error(err.message); }
// } }
// } });
// });
}; };
handleChangeUploadKtp = (info) => { handleChangeUploadKtp = (info) => {
@@ -636,7 +634,7 @@ class RegisterPage extends React.Component {
<div style={{ padding: 5, marginTop: 20 }}> <div style={{ padding: 5, marginTop: 20 }}>
<Button <Button
fullWidth fullWidth
variant="contained" style={{ backgroundColor: '#FAAF03' }} onClick={this.register}> variant="contained" style={{ backgroundColor: '#ffeb3b' }} onClick={this.register}>
{this.state.isLoading ? <CircularProgress className={classes.progress} /> : "Daftar"} {this.state.isLoading ? <CircularProgress className={classes.progress} /> : "Daftar"}
</Button> </Button>

View File

@@ -4,7 +4,7 @@ export const styles = theme => ({
flex :1, flex :1,
flexGrow : 1, flexGrow : 1,
height : "100vh", height : "100vh",
backgroundColor:'#FEFAF0', backgroundColor:'#024f8e',
marginTop: '-56px', marginTop: '-56px',
}, },
gridContainer : { gridContainer : {

View File

@@ -43,8 +43,7 @@ export default class ItemList extends React.Component {
<p className={'nameText'}>{data.item.name}</p> <p className={'nameText'}>{data.item.name}</p>
<div className={'childContainer'}> <div className={'childContainer'}>
<p className={'childTitle'}>Price</p> <p className={'childTitle'}>Price</p>
{/*<p className={'childText'}>{(+data.price).toFixed(0)} Points</p>*/} <p className={'childText'}>{(+data.item_sku.price).toFixed(0)} Points</p>
<p className={'childText'}>{data.price} Points</p>
</div> </div>
<div className={'childContainer'}> <div className={'childContainer'}>
<p className={'childTitle'}>Voucher Code</p> <p className={'childTitle'}>Voucher Code</p>

View File

@@ -38,13 +38,13 @@ export default class TransactionPage extends React.Component {
transaction: { transaction: {
status: 'Transaction Success', status: 'Transaction Success',
}, },
price: faker.commerce.price(1000, 1000000, 0, ''), price: faker.commerce.price(),
voucher_code: `${faker.random.alphaNumeric(5).toUpperCase()} - ${faker.random.alphaNumeric(5).toUpperCase()} - ${faker.random.alphaNumeric(5).toUpperCase()} - ${faker.random.alphaNumeric(5).toUpperCase()} - ${faker.random.alphaNumeric(5).toUpperCase()}`, voucher_code: `${faker.random.alphaNumeric(5).toUpperCase()} - ${faker.random.alphaNumeric(5).toUpperCase()} - ${faker.random.alphaNumeric(5).toUpperCase()} - ${faker.random.alphaNumeric(5).toUpperCase()} - ${faker.random.alphaNumeric(5).toUpperCase()}`,
}, },
{ {
transaction_id: `INV/20190101/VII/X/${faker.random.alphaNumeric(6).toUpperCase()}`, transaction_id: `INV/20190101/VII/X/${faker.random.alphaNumeric(6).toUpperCase()}`,
created_at: moment(faker.date.past()).format("dddd, MMMM Do YYYY, HH:mm:ss"), created_at: moment(faker.date.past()).format("dddd, MMMM Do YYYY, HH:mm:ss"),
updated_at: moment(faker.date.past(5, '2020-01-01T00:00:00.000Z')).format("dddd, MMMM Do YYYY, HH:mm:ss"), updated_at: moment(faker.date.past()).format("dddd, MMMM Do YYYY, HH:mm:ss"),
deleted_at: null, deleted_at: null,
item: { item: {
name: faker.commerce.productName(), name: faker.commerce.productName(),

View File

@@ -6,7 +6,7 @@
align-items: center; align-items: center;
.parentContainer{ .parentContainer{
width: 60vw; width: 40vw;
.barContainer{ .barContainer{
display: flex; display: flex;

View File

@@ -1,7 +1,7 @@
@media(min-width: 1000px){ @media(min-width: 1000px){
.imageCard{ .imageCard{
width: 20vw; width: 20vw;
height: 35vh; height: 25vh;
} }
.upper-card{ .upper-card{

View File

@@ -110,7 +110,7 @@ export default class PaymentVouchers extends React.Component {
{this.props.vouchersStore.dataItems.name} - {this.props.vouchersStore.skuName} {this.props.vouchersStore.dataItems.name} - {this.props.vouchersStore.skuName}
</h3> </h3>
<h3 className={'item-points'}> <h3 className={'item-points'}>
KB Bukopin Payment BTN Points Payment
</h3> </h3>
</div> </div>
<img className={'image-logo'} src={image} /> <img className={'image-logo'} src={image} />

View File

@@ -9,7 +9,7 @@
@media(min-width: 1000px){ @media(min-width: 1000px){
.image-logo{ .image-logo{
width: 10vw; width: 10vw;
height: 35vh; height: 10vh;
} }
.item-container{ .item-container{

View File

@@ -8,14 +8,12 @@
} }
.itemCard{ .itemCard{
background-color: white; background-color: #eee;
border: #ccc 1px solid; border: #ccc 1px solid;
width: 100%; width: 100%;
height: 200px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
text-align: center;
align-items: center; align-items: center;
margin-bottom: 10px; margin-bottom: 10px;
cursor: pointer; cursor: pointer;
@@ -23,7 +21,7 @@
.imageCard{ .imageCard{
width: 120px; width: 120px;
max-height: 100px; max-height: 60px;
} }
.titleCard{ .titleCard{

View File

@@ -19,66 +19,13 @@ export default class ModalTopupComponent extends React.Component {
inputCode2: '', inputCode2: '',
inputCode3: '', inputCode3: '',
inputCode4: '', inputCode4: '',
confirmLoading: false, confirmLoading: false
onOk: {}
}; };
this.defaultState = Object.assign({}, this.state); this.defaultState = Object.assign({}, this.state);
} }
componentDidMount() {} componentDidMount() {}
redeemCode (code) {
const codeList = [
{
code: 'MLXNAPNU18nd0871',
amount: 10000
},
{
code: 'ABAKO1239KLKHASD',
amount: 20000
},
{
code: 'W54VCZJN23FGSDAG',
amount: 50000
},
{
code: '123456789ABCEFGH',
amount: 100000
}
]
let rightCode = {};
codeList.map((cl) => {
if (cl.code === code){
rightCode = cl
}}
)
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() { render() {
const {data, isVisible = false, onOk = () => {}, onCancel = () => {}, title='Redeem your code'} = this.props; const {data, isVisible = false, onOk = () => {}, onCancel = () => {}, title='Redeem your code'} = this.props;
@@ -88,29 +35,25 @@ export default class ModalTopupComponent extends React.Component {
visible={isVisible} visible={isVisible}
onOk={async () => { onOk={async () => {
this.setState({ this.setState({
confirmLoading: true, confirmLoading: true
onOk: onOk()
}); });
let voucherCode = this.state.inputCode1 + this.state.inputCode2 + this.state.inputCode3 + this.state.inputCode4; let voucherCode = this.state.inputCode1 + this.state.inputCode2 + this.state.inputCode3 + this.state.inputCode4;
console.log("voucherCode", voucherCode)
this.redeemCode(voucherCode) try {
await this.props.appstate.wallet.redeemVoucherCode(voucherCode);
// try { this.props.onOk();
// await this.props.appstate.wallet.redeemVoucherCode(voucherCode); message.info("Voucher redeem success");
// this.props.onOk(); } catch (e) {
// message.info("Voucher redeem success"); message.error(e.message);
// } catch (e) { } finally {
// message.error(e.message); this.setState({
// } finally { inputCode1: '',
// this.setState({ inputCode2: '',
// inputCode1: '', inputCode3: '',
// inputCode2: '', inputCode4: '',
// inputCode3: '', confirmLoading: false
// inputCode4: '', });
// confirmLoading: false }
// });
// }
}} }}
onCancel={() => { onCancel={() => {

View File

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

View File

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

View File

@@ -7,7 +7,7 @@
body { body {
-webkit-font-smoothing: antialiased !important; -webkit-font-smoothing: antialiased !important;
background-color: #FEFAF0; background-color: #f1f5f9;
text-transform: none; text-transform: none;
padding-top: 56px; padding-top: 56px;
font-family: 'Montserrat', "Avenir Next W01", "Proxima Nova W01", "Rubik", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-family: 'Montserrat', "Avenir Next W01", "Proxima Nova W01", "Rubik", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;