Commit eb7217bd authored by Riri Novita's avatar Riri Novita

Merge branch 'ENV-STAGING' into 'ENV-PROD'

TIA Currency USD

See merge request !2096
parents 845a18c1 953bb3e8
// contents of .env
REACT_APP_URL_MAIN_BE=https://tia.eksad.com/tia-reporting-staging
REACT_APP_URL_MAIN_FE=/web-staging
\ No newline at end of file
{ {
"name": "my-app", "name": "my-app",
"version": "0.1.0", "version": "0.1.0",
"homepage": "http://localhost:8080/web/", "homepage": "http://localhost:8080/web-staging/",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@date-io/date-fns": "^1.3.13", "@date-io/date-fns": "^1.3.13",
...@@ -55,14 +55,18 @@ ...@@ -55,14 +55,18 @@
"start": "react-scripts start", "start": "react-scripts start",
"build": "react-scripts --max_old_space_size=8192 build", "build": "react-scripts --max_old_space_size=8192 build",
"build_dev": "copy .env_dev .env && react-scripts --max_old_space_size=8192 build", "build_dev": "copy .env_dev .env && react-scripts --max_old_space_size=8192 build",
"build_staging": "copy .env_staging .env && react-scripts --max_old_space_size=8192 build",
"build_prod": "copy .env_prod .env && react-scripts --max_old_space_size=8192 build", "build_prod": "copy .env_prod .env && react-scripts --max_old_space_size=8192 build",
"build_dev_linux": "cp .env_dev .env && react-scripts --max_old_space_size=8192 build", "build_dev_linux": "cp .env_dev .env && react-scripts --max_old_space_size=8192 build",
"build_staging_linux": "cp .env_staging .env && react-scripts --max_old_space_size=8192 build",
"build_prod_linux": "cp .env_prod .env && react-scripts --max_old_space_size=8192 build", "build_prod_linux": "cp .env_prod .env && react-scripts --max_old_space_size=8192 build",
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject", "eject": "react-scripts eject",
"dev": "copy .env_dev .env && react-scripts start", "dev": "copy .env_dev .env && react-scripts start",
"staging": "copy .env_staging .env && react-scripts start",
"prod": "copy .env_prod .env && react-scripts start", "prod": "copy .env_prod .env && react-scripts start",
"dev_linux": "cp .env_dev .env && react-scripts start", "dev_linux": "cp .env_dev .env && react-scripts start",
"staging_linux": "cp .env_staging .env && react-scripts start",
"prod_linux": "cp .env_prod .env && react-scripts start" "prod_linux": "cp .env_prod .env && react-scripts start"
}, },
"eslintConfig": { "eslintConfig": {
......
This diff is collapsed.
...@@ -56,6 +56,9 @@ const Images = { ...@@ -56,6 +56,9 @@ const Images = {
dotOverdue: require('./dot-overdue.svg'), dotOverdue: require('./dot-overdue.svg'),
dotOpen: require('./dot-open.svg'), dotOpen: require('./dot-open.svg'),
zip: require('./zip.png'), zip: require('./zip.png'),
warning: require('./warning.png'),
simulasiUpload: require('./upload-simulasi.png'),
information: require('./information.png'),
} }
export default Images export default Images
\ No newline at end of file
.main-color{
background-color: #273b80 !important;
}
/* .main-color{ /* .main-color{
background-color: #1474CA !important; background-color: #273b80 !important;
} */ } */
.main-color{
background-color: #0b6b24 !important;
}
.sub-color{ .sub-color{
background-color: #f0f1f3 !important; background-color: #f0f1f3 !important;
} }
...@@ -51,7 +51,7 @@ export default class EditApprovalMatrix extends Component { ...@@ -51,7 +51,7 @@ export default class EditApprovalMatrix extends Component {
getDetailAM() { getDetailAM() {
api.create().getDetailAM(this.props.data[1]).then(response => { api.create().getDetailAM(this.props.data[1]).then(response => {
// console.log(response) console.log(response)
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
...@@ -89,6 +89,8 @@ export default class EditApprovalMatrix extends Component { ...@@ -89,6 +89,8 @@ export default class EditApprovalMatrix extends Component {
getUserData() { getUserData() {
api.create().getApprovedByAM().then((response) => { api.create().getApprovedByAM().then((response) => {
console.log(response);
console.log(this.state.getUserId);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
......
...@@ -48,7 +48,6 @@ class Login extends Component { ...@@ -48,7 +48,6 @@ class Login extends Component {
componentDidMount() { componentDidMount() {
this.getUser() this.getUser()
var email = localStorage.getItem(Constant.EMAIL) var email = localStorage.getItem(Constant.EMAIL)
console.log(email)
} }
getWindowDimensions() { getWindowDimensions() {
...@@ -112,6 +111,7 @@ class Login extends Component { ...@@ -112,6 +111,7 @@ class Login extends Component {
} else { } else {
localStorage.setItem(Constant.TOKEN, datas.token) localStorage.setItem(Constant.TOKEN, datas.token)
localStorage.setItem(Constant.USER, datas.user_id) localStorage.setItem(Constant.USER, datas.user_id)
localStorage.setItem(Constant.ROLE, datas.role_id)
if (this.state.rememberMe) { if (this.state.rememberMe) {
localStorage.setItem(Constant.EMAIL, this.state.email) localStorage.setItem(Constant.EMAIL, this.state.email)
localStorage.setItem(Constant.PASSWORD, this.state.password) localStorage.setItem(Constant.PASSWORD, this.state.password)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -97,6 +97,10 @@ class DownloadReport extends Component { ...@@ -97,6 +97,10 @@ class DownloadReport extends Component {
return () => clearInterval(interval); return () => clearInterval(interval);
} }
closeAlert() {
this.setState({ alert: false })
}
getListDownload() { getListDownload() {
api.create().getListDownload().then((response) => { api.create().getListDownload().then((response) => {
// console.log(response); // console.log(response);
......
This diff is collapsed.
...@@ -34,6 +34,7 @@ export default class EditPerusahaan extends Component { ...@@ -34,6 +34,7 @@ export default class EditPerusahaan extends Component {
msgErrorSD: '', msgErrorSD: '',
msgErrorED: '', msgErrorED: '',
msgErrorJL: '', msgErrorJL: '',
optionCurrecy: []
} }
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -72,7 +72,18 @@ export default class CreateReportItems extends Component { ...@@ -72,7 +72,18 @@ export default class CreateReportItems extends Component {
maxAchValue: null, maxAchValue: null,
formulaYTDValue: null, formulaYTDValue: null,
kpiDisable: true, kpiDisable: true,
maxAchDisable: true maxAchDisable: true,
convertible: null,
listConvert: [
{
"id": 0,
"value": "No"
},
{
"id": 1,
"value": "Yes"
}
],
} }
} }
...@@ -209,7 +220,8 @@ export default class CreateReportItems extends Component { ...@@ -209,7 +220,8 @@ export default class CreateReportItems extends Component {
"max_ach": this.state.maxAchValue ? this.state.maxAchValue.value : null, "max_ach": this.state.maxAchValue ? this.state.maxAchValue.value : null,
"formula_ytd": this.state.formulaYTDValue, "formula_ytd": this.state.formulaYTDValue,
"start_date": this.state.startDate, "start_date": this.state.startDate,
"end_date": this.state.endDate "end_date": this.state.endDate,
"is_can_convert_value": this.state.convertible.id
} }
// console.log(payload) // console.log(payload)
this.props.createReportItems(payload) this.props.createReportItems(payload)
...@@ -1047,6 +1059,28 @@ export default class CreateReportItems extends Component { ...@@ -1047,6 +1059,28 @@ export default class CreateReportItems extends Component {
<div className="grid grid-2x grid-mobile-none gap-15px" style={{ paddingLeft: 20, paddingRight: 20 }}> <div className="grid grid-2x grid-mobile-none gap-15px" style={{ paddingLeft: 20, paddingRight: 20 }}>
<div className="column-1"> <div className="column-1">
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<Autocomplete
debug
id="tipe"
options={this.state.listConvert}
getOptionLabel={(option) => option.value}
onChange={(event, newInputValue) => this.setState({ convertible: newInputValue }, () => this.clearMessage())}
renderInput={(params) =>
<TextField
{...params}
label="Convertible"
margin="normal"
style={{ marginTop: 7 }}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
/>
}
/>
</div>
</div>
<div className="column-2" style={{ marginTop: 7}}>
<div className="margin-top-10px" style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}> <div className="margin-top-10px" style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}>
<TextField <TextField
style={{ width: '100%' }} style={{ width: '100%' }}
......
...@@ -72,7 +72,18 @@ export default class EditReportItems extends Component { ...@@ -72,7 +72,18 @@ export default class EditReportItems extends Component {
formulaYtd: ['SUM', 'AVG', 'LAST', 'FORMULA'], formulaYtd: ['SUM', 'AVG', 'LAST', 'FORMULA'],
kpiTypeValue: null, kpiTypeValue: null,
maxAchValue: null, maxAchValue: null,
formulaYTDValue: null formulaYTDValue: null,
convertible: null,
listConvert: [
{
"id": 0,
"value": "No"
},
{
"id": 1,
"value": "Yes"
}
],
} }
} }
...@@ -183,7 +194,8 @@ export default class EditReportItems extends Component { ...@@ -183,7 +194,8 @@ export default class EditReportItems extends Component {
"max_ach": this.state.tempData.max_ach, "max_ach": this.state.tempData.max_ach,
"formula_ytd": this.state.tempData.formula_ytd, "formula_ytd": this.state.tempData.formula_ytd,
"start_date": this.state.tempData.start_date, "start_date": this.state.tempData.start_date,
"end_date": this.state.tempData.end_date "end_date": this.state.tempData.end_date,
"is_can_convert_value": this.state.convertible.id
} }
// console.log(payload) // console.log(payload)
this.props.updateReportItems(payload) this.props.updateReportItems(payload)
...@@ -191,17 +203,20 @@ export default class EditReportItems extends Component { ...@@ -191,17 +203,20 @@ export default class EditReportItems extends Component {
getDetailReportItems() { getDetailReportItems() {
api.create().getDetailReportItems(this.props.data[1]).then((response) => { api.create().getDetailReportItems(this.props.data[1]).then((response) => {
console.log(response);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
let data = response.data.data let data = response.data.data
let index = this.state.listConvert.findIndex((val) => val.id === data.is_can_convert_value)
this.setState({ this.setState({
tempData: response.data.data, tempData: response.data.data,
getCompanyID: data.company_id getCompanyID: data.company_id,
convertible: index === -1 ? null : this.state.listConvert[index]
}, () => this.getInputType(), }, () => this.getInputType(),
this.getPerusahaan(), this.getPerusahaan(),
this.getReportType()) this.getReportType())
// console.log(response.data.data) // console.log(this.state.convertible)
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) { if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
...@@ -328,7 +343,7 @@ export default class EditReportItems extends Component { ...@@ -328,7 +343,7 @@ export default class EditReportItems extends Component {
getOptionLabel: (option) => titleCase(option.value), getOptionLabel: (option) => titleCase(option.value),
}; };
let index = inputKPI.findIndex((val) => val.value === this.state.tempData.kpi_type) let index = inputKPI.findIndex((val) => val.value === this.state.tempData.kpi_type)
this.setState({ listKPI: defaultProps, inputKPI: response.data.data, KPIValue: index === -1 ? null : inputKPI[index]}) this.setState({ listKPI: defaultProps, inputKPI: response.data.data, KPIValue: index === -1 ? null : inputKPI[index] })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) { if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
...@@ -1017,6 +1032,29 @@ export default class EditReportItems extends Component { ...@@ -1017,6 +1032,29 @@ export default class EditReportItems extends Component {
</div> </div>
<div className="grid grid-2x grid-mobile-none gap-15px" style={{ paddingLeft: 20, paddingRight: 20 }}> <div className="grid grid-2x grid-mobile-none gap-15px" style={{ paddingLeft: 20, paddingRight: 20 }}>
<div className="column-1"> <div className="column-1">
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<Autocomplete
debug
id="tipe"
options={this.state.listConvert}
getOptionLabel={(option) => option.value}
value={this.state.convertible}
onChange={(event, newInputValue) => this.setState({ convertible: newInputValue }, () => this.clearMessage())}
renderInput={(params) =>
<TextField
{...params}
label="Convertible"
margin="normal"
style={{ marginTop: 7 }}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
/>
}
/>
</div>
</div>
<div className="column-2">
<div className="margin-top-10px" style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}> <div className="margin-top-10px" style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}>
<TextField <TextField
style={{ width: '100%' }} style={{ width: '100%' }}
......
...@@ -71,7 +71,7 @@ const useStyles = makeStyles((theme) => ({ ...@@ -71,7 +71,7 @@ const useStyles = makeStyles((theme) => ({
easing: theme.transitions.easing.sharp, easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.enteringScreen, duration: theme.transitions.duration.enteringScreen,
}), }),
backgroundColor: '#273b80' backgroundColor: '#0b6b24'
}, },
topleftClose: { topleftClose: {
borderRight: 0, borderRight: 0,
...@@ -87,7 +87,7 @@ const useStyles = makeStyles((theme) => ({ ...@@ -87,7 +87,7 @@ const useStyles = makeStyles((theme) => ({
}, },
padding: 20, padding: 20,
display: 'flex', display: 'flex',
backgroundColor: '#273b80' backgroundColor: '#0b6b24'
}, },
drawerOpen: { drawerOpen: {
width: drawerWidth, width: drawerWidth,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
const Constant = { const Constant = {
TOKEN: null, TOKEN: null,
USER: 0, USER: 0,
ROLE: 'role_id',
EMAIL: 'TOKEN', EMAIL: 'TOKEN',
PASSWORD: 'PASSWORD', PASSWORD: 'PASSWORD',
URL_BE_DEV: '${process.env.REACT_APP_URL_MAIN_BE}', URL_BE_DEV: '${process.env.REACT_APP_URL_MAIN_BE}',
URL_BE_STAGING: 'https://tia.eksad.com/tia-reporting-staging',
URL_BE_DEMO: 'https://tia.eksad.com/tia-reporting-demo', URL_BE_DEMO: 'https://tia.eksad.com/tia-reporting-demo',
URL_BE_PROD: 'https://dashboard.triputra-group.com/tia-reporting', URL_BE_PROD: 'https://dashboard.triputra-group.com/tia-reporting',
URL_FE_DEV: 'https://tia.eksad.com/tia-web-dev', URL_FE_DEV: 'https://tia.eksad.com/tia-web-dev',
URL_FE_STAGING: 'https://tia.eksad.com/tia-web-staging',
URL_FE_DEMO: 'https://tia.eksad.com/tia-web-demo', URL_FE_DEMO: 'https://tia.eksad.com/tia-web-demo',
URL_FE_PROD: 'https://dashboard.triputra-group.com/tia-web', URL_FE_PROD: 'https://dashboard.triputra-group.com/tia-web',
DATACAT: 'datacat' DATACAT: 'datacat'
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment