Commit c1e5164a authored by Riri Novita's avatar Riri Novita

Merge branch 'ENV-PROD' into 'ENV-DEPLOYMENT-PROD'

update RO CF

See merge request !2115
parents 2e087adf a72dd7e4
// 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",
"version": "0.1.0",
"homepage": "http://localhost:8080/web/",
"homepage": "http://localhost:8080/web-staging/",
"private": true,
"dependencies": {
"@date-io/date-fns": "^1.3.13",
......@@ -55,14 +55,18 @@
"start": "react-scripts start",
"build": "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_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",
"test": "react-scripts test",
"eject": "react-scripts eject",
"dev": "copy .env_dev .env && react-scripts start",
"staging": "copy .env_staging .env && react-scripts start",
"prod": "copy .env_prod .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"
},
"eslintConfig": {
......
This diff is collapsed.
......@@ -56,6 +56,9 @@ const Images = {
dotOverdue: require('./dot-overdue.svg'),
dotOpen: require('./dot-open.svg'),
zip: require('./zip.png'),
warning: require('./warning.png'),
simulasiUpload: require('./upload-simulasi.png'),
information: require('./information.png'),
}
export default Images
\ No newline at end of file
.main-color{
background-color: #273b80 !important;
}
/* .main-color{
background-color: #1474CA !important;
background-color: #273b80 !important;
} */
.main-color{
background-color: #0b6b24 !important;
}
.sub-color{
background-color: #f0f1f3 !important;
}
......@@ -51,7 +51,7 @@ export default class EditApprovalMatrix extends Component {
getDetailAM() {
api.create().getDetailAM(this.props.data[1]).then(response => {
// console.log(response)
console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.status === "success") {
......@@ -89,6 +89,8 @@ export default class EditApprovalMatrix extends Component {
getUserData() {
api.create().getApprovedByAM().then((response) => {
console.log(response);
console.log(this.state.getUserId);
if (response.data) {
if (response.ok) {
if (response.data.status == 'success') {
......
......@@ -48,7 +48,6 @@ class Login extends Component {
componentDidMount() {
this.getUser()
var email = localStorage.getItem(Constant.EMAIL)
console.log(email)
}
getWindowDimensions() {
......@@ -112,6 +111,7 @@ class Login extends Component {
} else {
localStorage.setItem(Constant.TOKEN, datas.token)
localStorage.setItem(Constant.USER, datas.user_id)
localStorage.setItem(Constant.ROLE, datas.role_id)
if (this.state.rememberMe) {
localStorage.setItem(Constant.EMAIL, this.state.email)
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 {
return () => clearInterval(interval);
}
closeAlert() {
this.setState({ alert: false })
}
getListDownload() {
api.create().getListDownload().then((response) => {
// console.log(response);
......
This diff is collapsed.
......@@ -34,6 +34,7 @@ export default class EditPerusahaan extends Component {
msgErrorSD: '',
msgErrorED: '',
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 {
maxAchValue: null,
formulaYTDValue: null,
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 {
"max_ach": this.state.maxAchValue ? this.state.maxAchValue.value : null,
"formula_ytd": this.state.formulaYTDValue,
"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)
this.props.createReportItems(payload)
......@@ -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="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 }}>
<TextField
style={{ width: '100%' }}
......
......@@ -72,7 +72,18 @@ export default class EditReportItems extends Component {
formulaYtd: ['SUM', 'AVG', 'LAST', 'FORMULA'],
kpiTypeValue: 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 {
"max_ach": this.state.tempData.max_ach,
"formula_ytd": this.state.tempData.formula_ytd,
"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)
this.props.updateReportItems(payload)
......@@ -191,17 +203,20 @@ export default class EditReportItems extends Component {
getDetailReportItems() {
api.create().getDetailReportItems(this.props.data[1]).then((response) => {
console.log(response);
if (response.data) {
if (response.ok) {
if (response.data.status === 'success') {
let data = response.data.data
let index = this.state.listConvert.findIndex((val) => val.id === data.is_can_convert_value)
this.setState({
tempData: response.data.data,
getCompanyID: data.company_id
getCompanyID: data.company_id,
convertible: index === -1 ? null : this.state.listConvert[index]
}, () => this.getInputType(),
this.getPerusahaan(),
this.getReportType())
// console.log(response.data.data)
// console.log(this.state.convertible)
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
......@@ -328,7 +343,7 @@ export default class EditReportItems extends Component {
getOptionLabel: (option) => titleCase(option.value),
};
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 {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
......@@ -1017,6 +1032,29 @@ export default class EditReportItems extends Component {
</div>
<div className="grid grid-2x grid-mobile-none gap-15px" style={{ paddingLeft: 20, paddingRight: 20 }}>
<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 }}>
<TextField
style={{ width: '100%' }}
......
......@@ -71,7 +71,7 @@ const useStyles = makeStyles((theme) => ({
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.enteringScreen,
}),
backgroundColor: '#273b80'
backgroundColor: '#0b6b24'
},
topleftClose: {
borderRight: 0,
......@@ -87,7 +87,7 @@ const useStyles = makeStyles((theme) => ({
},
padding: 20,
display: 'flex',
backgroundColor: '#273b80'
backgroundColor: '#0b6b24'
},
drawerOpen: {
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 = {
TOKEN: null,
USER: 0,
ROLE: 'role_id',
EMAIL: 'TOKEN',
PASSWORD: 'PASSWORD',
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_PROD: 'https://dashboard.triputra-group.com/tia-reporting',
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_PROD: 'https://dashboard.triputra-group.com/tia-web',
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