Commit 8ace5649 authored by herman's avatar herman

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into herman

parents 8d3199f6 dc06a583
// contents of .env // contents of .env
REACT_APP_URL_MAIN_BE=https://dashboard.triputra-group.com/tia-reporting REACT_APP_URL_MAIN_BE=https://dashboard.triputra-group.com/tia-reporting
REACT_APP_URL_MAIN_FE=/tia-web REACT_APP_URL_MAIN_FE=/web
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
"bootstrap": "^4.5.2", "bootstrap": "^4.5.2",
"date-fns": "^2.15.0", "date-fns": "^2.15.0",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"echarts": "^5.0.2",
"echarts-for-react": "^3.0.0-beta.2",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"install": "^0.13.0", "install": "^0.13.0",
"moment": "^2.27.0", "moment": "^2.27.0",
......
This diff is collapsed.
This diff is collapsed.
...@@ -140,7 +140,7 @@ export default class BalanceSheet extends Component { ...@@ -140,7 +140,7 @@ export default class BalanceSheet extends Component {
"submission_id": this.props.submissionID "submission_id": this.props.submissionID
} }
let response = await api.create().getDetailReportMB(payload) let response = await api.create().getDetailReportMB(payload)
// console.log(response); console.log(response);
let dataTable = [] let dataTable = []
if (response.data) { if (response.data) {
let res = response.data.data let res = response.data.data
...@@ -264,7 +264,11 @@ export default class BalanceSheet extends Component { ...@@ -264,7 +264,11 @@ export default class BalanceSheet extends Component {
} }
// console.log(data); // console.log(data);
this.setState({ loading: false }) this.setState({ loading: false })
this.props.saveToMasterBudget(payload) if (type == 'submitted') {
this.props.saveToMasterBudget(payload, 'BS')
} else {
this.props.saveToMasterBudget(payload)
}
this.props.onClickClose() this.props.onClickClose()
} }
...@@ -323,7 +327,8 @@ export default class BalanceSheet extends Component { ...@@ -323,7 +327,8 @@ export default class BalanceSheet extends Component {
company_id: this.props.company.company_id, company_id: this.props.company.company_id,
periode: this.props.periode, periode: this.props.periode,
report_id: this.props.report_id, report_id: this.props.report_id,
balance_sheet: payload balance_sheet: payload,
status: 'submitted'
} }
// console.log(body) // console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] }) this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] })
...@@ -430,7 +435,11 @@ export default class BalanceSheet extends Component { ...@@ -430,7 +435,11 @@ export default class BalanceSheet extends Component {
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.props.onClickClose() this.props.onClickClose()
this.props.getReport() if (type == 'submitted') {
this.props.getReport('BS')
} else {
this.props.getReport()
}
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) { if (response.data.message.includes("Someone Logged In")) {
...@@ -526,17 +535,33 @@ export default class BalanceSheet extends Component { ...@@ -526,17 +535,33 @@ export default class BalanceSheet extends Component {
let dataTable2 = this.state.dataTable let dataTable2 = this.state.dataTable
const handleChange = (value, tableMeta, type) => { const handleChange = (value, tableMeta, type) => {
let val = String(value).split(",").join("") let val = String(value).split(",").join("")
// console.log('masuk')
if (type === "actual") { if (type === "actual") {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val).toFixed(1) dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val).toFixed(1)
} else { } else {
// console.log('masuk2')
let indexParent = dataTable2.findIndex((val) => val[1] === dataTable2[tableMeta.rowIndex][2]) let indexParent = dataTable2.findIndex((val) => val[1] === dataTable2[tableMeta.rowIndex][2])
if (indexParent > 0) { if (indexParent > 0) {
// console.log(indexParent) // console.log(indexParent)
let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val) let a = 0
if (type == 'r/e') {
// console.log('masuk8')
a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value = Number(val).toFixed(1)
} else {
// console.log('masuk9')
a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val).toFixed(1)
}
let jagain = dataTable2[indexParent][tableMeta.columnIndex] let jagain = dataTable2[indexParent][tableMeta.columnIndex]
a = dataTable2[indexParent][tableMeta.columnIndex] = jagain === undefined ? (0 + Number(val)).toFixed(1) : Number(jagain + Number(val)).toFixed(1) a = dataTable2[indexParent][tableMeta.columnIndex] = jagain === undefined ? (0 + Number(val)).toFixed(1) : Number(jagain + Number(val)).toFixed(1)
} else { } else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val).toFixed(1) // console.log('masuk3')
if (type == 'r/e') {
// console.log('masuk4')
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value = Number(val).toFixed(1)
} else {
// console.log('masuk5')
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val).toFixed(1)
}
} }
} }
} }
...@@ -568,7 +593,12 @@ export default class BalanceSheet extends Component { ...@@ -568,7 +593,12 @@ export default class BalanceSheet extends Component {
// console.log(tableMeta.rowIndex) // console.log(tableMeta.rowIndex)
// console.log(total) // console.log(total)
// dataTable2[tableMeta.rowIndex][column] = total // dataTable2[tableMeta.rowIndex][column] = total
total = handleValueFormula(dataTable2[tableMeta.rowIndex][column], tableMeta, column, periode, dataTable2[tableMeta.rowIndex][25]) if (column == 19 && String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)") {
total = tableMeta.rowData[7].value
dataTable2[tableMeta.rowIndex][column] = tableMeta.rowData[7].value
} else {
total = handleValueFormula(dataTable2[tableMeta.rowIndex][column], tableMeta, column, periode, dataTable2[tableMeta.rowIndex][25])
}
// console.log(total) // console.log(total)
return total return total
} }
...@@ -957,22 +987,30 @@ export default class BalanceSheet extends Component { ...@@ -957,22 +987,30 @@ export default class BalanceSheet extends Component {
tableMeta.rowData[0] === 6 ? tableMeta.rowData[0] === 6 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? '#5198ea' : 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
value={Number(handleValueFormula(value, tableMeta)).toFixed(1)} value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? Number(value.value).toFixed(1) : Number(handleValueFormula(value, tableMeta)).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, 'r/e')
// console.log(dataTable2)
}}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? '#5198ea' : 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
value={Number(handleValueFormula(value, tableMeta)).toFixed(1)} value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)" ? Number(value.value).toFixed(1) : Number(handleValueFormula(value, tableMeta)).toFixed(1)}
/> onBlur={(event) => {
handleChange(event.target.value, tableMeta, 'r/e')
// console.log(dataTable2)
}}
/>
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
null null
......
This diff is collapsed.
...@@ -108,7 +108,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -108,7 +108,7 @@ export default class CorporateAnnualTarget extends Component {
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
"submission_id": this.props.submissionID "submission_id": this.props.submissionID
} }
// // // console.log(JSON.stringify(payload)) console.log(JSON.stringify(payload))
api.create().getDetailReportMB(payload).then(response => { api.create().getDetailReportMB(payload).then(response => {
let dataTable = [] let dataTable = []
let dataCustomerPrs = [] let dataCustomerPrs = []
...@@ -425,7 +425,8 @@ export default class CorporateAnnualTarget extends Component { ...@@ -425,7 +425,8 @@ export default class CorporateAnnualTarget extends Component {
periode: this.props.periode, periode: this.props.periode,
report_id: this.props.report_id, report_id: this.props.report_id,
status: '', status: '',
cat: payload cat: payload,
status: 'submitted'
} }
// // // // console.log(body) // // // // console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0] }) this.setState({ payload: body, judul: resp.rows[1][0] })
......
...@@ -99,7 +99,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -99,7 +99,7 @@ export default class FixedAssetsMovement extends Component {
"submission_id": this.props.submissionID "submission_id": this.props.submissionID
} }
api.create().getDetailReportMB(payload).then(response => { api.create().getDetailReportMB(payload).then(response => {
// console.log(response); console.log(response);
let dataTable = [] let dataTable = []
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
...@@ -180,6 +180,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -180,6 +180,7 @@ export default class FixedAssetsMovement extends Component {
} }
} }
}) })
console.log(dataTable)
this.setState({ dataTable, loading: false, buttonError: true, editable: true }) this.setState({ dataTable, loading: false, buttonError: true, editable: true })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
...@@ -259,7 +260,11 @@ export default class FixedAssetsMovement extends Component { ...@@ -259,7 +260,11 @@ export default class FixedAssetsMovement extends Component {
"fixed_asset_movement": data "fixed_asset_movement": data
} }
// // console.log(data); // // console.log(data);
this.props.saveToMasterBudget(payload) if (type == 'submitted') {
this.props.saveToMasterBudget(payload, 'FAM')
} else {
this.props.saveToMasterBudget(payload)
}
this.props.onClickClose() this.props.onClickClose()
} }
...@@ -318,7 +323,8 @@ export default class FixedAssetsMovement extends Component { ...@@ -318,7 +323,8 @@ export default class FixedAssetsMovement extends Component {
company_id: this.props.company.company_id, company_id: this.props.company.company_id,
periode: this.props.periode, periode: this.props.periode,
report_id: this.props.report_id, report_id: this.props.report_id,
fixed_asset_movement: payload fixed_asset_movement: payload,
status: 'submitted'
} }
// // console.log(body) // // console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] }) this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] })
...@@ -430,7 +436,11 @@ export default class FixedAssetsMovement extends Component { ...@@ -430,7 +436,11 @@ export default class FixedAssetsMovement extends Component {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.props.onClickClose() this.props.onClickClose()
this.props.getReport() if (type == 'submitted') {
this.props.getReport('FAM')
} else {
this.props.getReport()
}
} 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")) { if (response.data.message.includes("Someone Logged In")) {
...@@ -662,12 +672,22 @@ export default class FixedAssetsMovement extends Component { ...@@ -662,12 +672,22 @@ export default class FixedAssetsMovement extends Component {
} else { } else {
let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[tableMeta.rowIndex][2]) let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[tableMeta.rowIndex][2])
if (indexParent > 0) { if (indexParent > 0) {
let a = 0
// // console.log(indexParent) // // console.log(indexParent)
let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val) if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') {
a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value = Number(val)
} else {
a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
}
let jagain = dataTable2[indexParent][tableMeta.columnIndex] let jagain = dataTable2[indexParent][tableMeta.columnIndex]
a = dataTable2[indexParent][tableMeta.columnIndex] = jagain == undefined ? (0 + Number(val)) : (jagain + Number(val)) a = dataTable2[indexParent][tableMeta.columnIndex] = jagain == undefined ? (0 + Number(val)) : (jagain + Number(val))
} else { } else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val) if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value = Number(val)
} else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
}
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
} }
} }
} }
...@@ -1049,11 +1069,15 @@ export default class FixedAssetsMovement extends Component { ...@@ -1049,11 +1069,15 @@ export default class FixedAssetsMovement extends Component {
tableMeta.rowData[0] === 6 ? tableMeta.rowData[0] === 6 ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance' ? "#5198ea" : "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={this.props.isApprover ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') && String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance' ? false : true)}
value={Number(handleValueFormula(value, tableMeta)).toFixed(1)} value={String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance' ? Number(value.value).toFixed(1) : Number(handleValueFormula(value, tableMeta)).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
}}
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
......
This diff is collapsed.
...@@ -454,7 +454,8 @@ export default class TaxPlanning extends Component { ...@@ -454,7 +454,8 @@ export default class TaxPlanning extends Component {
company_id: this.props.company.company_id, company_id: this.props.company.company_id,
periode: this.props.periode, periode: this.props.periode,
report_id: this.props.report_id, report_id: this.props.report_id,
tax_planning: payload tax_planning: payload,
status: 'submitted'
} }
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] }) this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] })
} }
......
...@@ -213,24 +213,21 @@ export default function MiniDrawer() { ...@@ -213,24 +213,21 @@ export default function MiniDrawer() {
path: '', path: '',
subItem: [ subItem: [
{ {
img: '',
label: 'Subco',
path: 'beranda',
}, {
img: 'beranda', img: 'beranda',
label: 'CAT Dashboard', label: 'Summary of Triputra Group',
path: 'dashboard-cat', path: 'beranda',
}, }, {
{
img: 'beranda', img: 'beranda',
label: 'Financial Dashboard', label: 'Financial Dashboard',
path: 'dashboard-financial', path: 'dashboard-financial',
}, }, {
{
img: 'beranda', img: 'beranda',
label: 'Summary of Triputra Group', label: 'CAT Dashboard',
path: 'beranda', path: 'dashboard-cat',
},
{
img: '',
label: 'Sub Holding',
path: 'beranda',
} }
], ],
collapse: false, collapse: false,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import React, { Component, useEffect, useState } from 'react' import React, { Component, useEffect, useState } from 'react'
import ReactSpeedometer from "react-d3-speedometer" import ReactSpeedometer from "react-d3-speedometer"
import { Paper, Typography } from '@material-ui/core' import { GridList, Paper, Typography, GridListTile } from '@material-ui/core'
import Images from '../../assets/Images' import Images from '../../assets/Images'
import LineChart from 'react-linechart'; import LineChart from 'react-linechart';
...@@ -233,11 +233,87 @@ export default class ExceutiveScoreboard extends Component { ...@@ -233,11 +233,87 @@ export default class ExceutiveScoreboard extends Component {
{ judul: "Internal Perspective", kpi: 5, rank: 'C', value: 2.61, status: 'down' }, { judul: "Internal Perspective", kpi: 5, rank: 'C', value: 2.61, status: 'down' },
{ judul: "Financial", kpi: 5, rank: 'B+', value: 3.52, status: 'up' }, { judul: "Financial", kpi: 5, rank: 'B+', value: 3.52, status: 'up' },
], ],
<<<<<<< HEAD
selectIndex: 0 selectIndex: 0
=======
data: this.props.data,
dataPayload: this.props.dataPayload,
selectIndex: null
>>>>>>> dc06a5839018d36f490ebd641fcdca90e43ebc26
} }
} }
componentDidMount() {
console.log(this.props.data)
console.log(this.state.dataPayload)
let arrOverAll = []
let totalOverAll = 0
if (this.state.data.length > 0) {
this.state.data.map((item,index) => {
if(item.parent == null || item.parent == 'null') {
arrOverAll.push(item)
} else {
totalOverAll +=
this.state.dataPayload.month.month_id == 1? Number(item.month1 == null? 0 : item.month1) :
this.state.dataPayload.month.month_id == 2? Number(item.month2 == null? 0 : item.month2) :
this.state.dataPayload.month.month_id == 3? Number(item.month3 == null? 0 : item.month3) :
this.state.dataPayload.month.month_id == 4? Number(item.month4 == null? 0 : item.month4) :
this.state.dataPayload.month.month_id == 5? Number(item.month5 == null? 0 : item.month5) :
this.state.dataPayload.month.month_id == 6? Number(item.month6 == null? 0 : item.month6) :
this.state.dataPayload.month.month_id == 7? Number(item.month7 == null? 0 : item.month7) :
this.state.dataPayload.month.month_id == 8? Number(item.month8 == null? 0 : item.month8) :
this.state.dataPayload.month.month_id == 9? Number(item.month9 == null? 0 : item.month9) :
this.state.dataPayload.month.month_id == 10? Number(item.month10 == null? 0 : item.month10) :
this.state.dataPayload.month.month_id == 11? Number(item.month11 == null? 0 : item.month11) :
Number(item.month12 == null? 0 : item.month12)
}
})
let indexFinancial = arrOverAll.findIndex((val) => String(val.item_name).toLocaleLowerCase().includes('financial'))
let indexCust = arrOverAll.findIndex((val) => String(val.item_name).toLocaleLowerCase().includes('customer'))
let indexInternal = arrOverAll.findIndex((val) => String(val.item_name).toLocaleLowerCase().includes('internal'))
let indexLearn = arrOverAll.findIndex((val) => String(val.item_name).toLocaleLowerCase().includes('learn'))
let arrFinancial = []
let arrCust = []
let arrInternal = []
let arrLearn = []
console.log(indexFinancial)
console.log(indexCust)
console.log(indexInternal)
console.log(indexLearn)
if (indexFinancial != -1) {
arrFinancial = this.state.data.filter((val) => val.parent == arrOverAll[indexFinancial].item_report_id)
}
if (indexCust != -1) {
arrCust = this.state.data.filter((val) => val.parent == arrOverAll[indexCust].item_report_id)
}
if (indexInternal != -1) {
arrInternal = this.state.data.filter((val) => val.parent == arrOverAll[indexInternal].item_report_id)
}
if (indexLearn != -1) {
arrLearn = this.state.data.filter((val) => val.parent == arrOverAll[indexLearn].item_report_id)
}
console.log(totalOverAll)
console.log(arrOverAll)
console.log(arrFinancial)
console.log(arrCust)
console.log(arrInternal)
console.log(arrLearn)
}
}
render() { render() {
let { selectIndex } = this.state let { selectIndex } = this.state
let yuk = [1,2,3]
const data = [ const data = [
{ {
color: "steelblue", color: "steelblue",
...@@ -258,7 +334,7 @@ export default class ExceutiveScoreboard extends Component { ...@@ -258,7 +334,7 @@ export default class ExceutiveScoreboard extends Component {
<div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', flexFlow: 'wrap' }}> <div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', flexFlow: 'wrap' }}>
{this.state.listDummy.map((item, index) => { {this.state.listDummy.map((item, index) => {
return ( return (
<div style={{ padding: 10, backgroundColor: this.state.selectIndex === index ? '#6885a6' : '#fff', borderRadius: 6, paddingBottom: 20, margin: 10, boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.25)' }} onClick={() => this.setState({ selectIndex: index })}> <div style={{ padding: 10, backgroundColor: this.state.selectIndex === index ? '#6885a6' : '#fff', borderRadius: 6, paddingBottom: 20, margin: 10, boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.25)' }} onClick={() => this.setState({ selectIndex: index }, () => console.log(this.state.data))}>
<span style={{ fontSize: '17px', color: this.state.selectIndex === index ? '#fff' : '#7e8085' }}>{item.judul}</span> <span style={{ fontSize: '17px', color: this.state.selectIndex === index ? '#fff' : '#7e8085' }}>{item.judul}</span>
<div style={{ backgroundColor: 'transparent', display: 'flex', marginTop: index === 0 ? 54 : 30, placeContent: 'center' }}> <div style={{ backgroundColor: 'transparent', display: 'flex', marginTop: index === 0 ? 54 : 30, placeContent: 'center' }}>
<div> <div>
...@@ -297,7 +373,34 @@ export default class ExceutiveScoreboard extends Component { ...@@ -297,7 +373,34 @@ export default class ExceutiveScoreboard extends Component {
) )
})} })}
</div> </div>
<div style={{ width: 566, height: 233, boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.25)', padding: 20, justifyContent: 'space-between', display: 'grid', margin: 10 }}> <div style={{padding: 10, marginTop: 10, display: 'flex', width: '100%' }}>
<GridList cellHeight={250} cols={3}>
{yuk.map((tile) => (
<GridListTile key={tile} cols={1} style={{}}>
<div style={{ maxWidth: 566, height: 233, boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.25)', padding: 20, marginLeft: 5, marginTop: 5, marginRight: 5, display: 'inline-grid'}}>
<div>
<span style={{ fontSize: 17 }}>YTD Revenue</span>
<Typography style={{ fontSize: 24, fontWeight: 'bold' }}>1,016,489.78</Typography>
<Typography style={{ fontSize: 16, fontWeight: 'bold' }}>In IDR mn</Typography>
</div>
<LineChart
width={400}
height={50}
data={data}
yMin={0}
yMax={10}
hideXAxis={true}
hideYAxis={true}
hideXLabel={true}
hideYLabel={true}
/>
</div>
</GridListTile>
))}
</GridList>
</div>
{/* <div style={{ width: 566, height: 233, boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.25)', padding: 20, justifyContent: 'space-between', display: 'grid', margin: 10 }}>
<div> <div>
<span style={{ fontSize: 17 }}>YTD Revenue</span> <span style={{ fontSize: 17 }}>YTD Revenue</span>
<Typography style={{ fontSize: 24, fontWeight: 'bold' }}>1,016,489.78</Typography> <Typography style={{ fontSize: 24, fontWeight: 'bold' }}>1,016,489.78</Typography>
...@@ -314,8 +417,8 @@ export default class ExceutiveScoreboard extends Component { ...@@ -314,8 +417,8 @@ export default class ExceutiveScoreboard extends Component {
hideXLabel={true} hideXLabel={true}
hideYLabel={true} hideYLabel={true}
/> />
</div> </div> */}
</div> </div>
) )
} }
} }
......
import React, { Component } from 'react'
import { Paper, Typography } from '@material-ui/core'
import Images from '../../assets/Images'
export default class StrategiMap extends Component {
render() {
return (
<div style={{ padding: 20 }}>
<Paper style={{ borderRadius: 10, boxShadow: '0 0 4px 0 rgba(0, 0, 0, 0.5)' }}>
<div style={{ height: 56, backgroundColor: '#f1f1f1', display: 'flex' }}>
<div style={{ width: '100%', borderBottom: 'solid 3px #979696 ', display: 'grid', alignContent: 'center', marginLeft: 20 }}>
<Typography style={{ color: '#656565', fontWeight: 'bold', fontSize: 12 }}>Category</Typography>
</div>
<div style={{ width: '75%', borderBottom: 'solid 3px #979696 ', display: 'grid', alignContent: 'center', paddingLeft: 20 }}>
<Typography style={{ color: '#656565', fontWeight: 'bold', fontSize: 12 }}>KPI</Typography>
</div>
<div style={{ width: '100%', borderBottom: 'solid 3px #979696 ', display: 'grid', alignContent: 'center', paddingLeft: 20 }}>
<Typography style={{ color: '#656565', fontWeight: 'bold', fontSize: 12 }}>Trends</Typography>
</div>
<div style={{ width: '75%', borderBottom: 'solid 3px #979696 ', display: 'grid', alignContent: 'center', paddingLeft: 20 }}>
<Typography style={{ color: '#656565', fontWeight: 'bold', fontSize: 12 }}>Current</Typography>
</div>
<div style={{ width: '75%', borderBottom: 'solid 3px #979696 ', marginRight: 20, display: 'grid', alignContent: 'center', paddingLeft: 20 }}>
<Typography style={{ color: '#656565', fontWeight: 'bold', fontSize: 12 }}>Achievement</Typography>
</div>
</div>
<div style={{ height: 56, backgroundColor: '#f1f1f1', display: 'flex' }}>
<div style={{ width: '100%', borderBottom: 'solid 1px #979696 ', display: 'grid', alignContent: 'center', marginLeft: 20 }}>
<Typography style={{ color: '#656565', fontWeight: 'bold', fontSize: 12 }}>Category</Typography>
</div>
<div style={{ width: '75%', borderBottom: 'solid 1px #979696 ', display: 'grid', alignContent: 'center', paddingLeft: 20 }}>
<Typography style={{ color: '#656565', fontWeight: 'bold', fontSize: 12 }}>KPI</Typography>
</div>
<div style={{ width: '100%', borderBottom: 'solid 1px #979696 ', display: 'grid', alignContent: 'center', paddingLeft: 20 }}>
<Typography style={{ color: '#656565', fontWeight: 'bold', fontSize: 12 }}>Trends</Typography>
</div>
<div style={{ width: '75%', borderBottom: 'solid 1px #979696 ', display: 'grid', alignContent: 'center', paddingLeft: 20 }}>
<Typography style={{ color: '#656565', fontWeight: 'bold', fontSize: 12 }}>Current</Typography>
</div>
<div style={{ width: '75%', borderBottom: 'solid 1px #979696 ', marginRight: 20, display: 'grid', alignContent: 'center', paddingLeft: 20 }}>
<Typography style={{ color: '#656565', fontWeight: 'bold', fontSize: 12 }}>Achievement</Typography>
</div>
</div>
<div style={{ height: 56, backgroundColor: '#f1f1f1', display: 'flex' }}>
<div style={{ width: '100%', borderBottom: 'solid 1px #979696 ', display: 'grid', alignContent: 'center', marginLeft: 20 }}>
<Typography style={{ color: '#656565', fontWeight: 'bold', fontSize: 12 }}></Typography>
</div>
<div style={{ width: '75%', borderBottom: 'solid 1px #979696 ', display: 'grid', alignContent: 'center', paddingLeft: 20 }}>
<Typography style={{ color: '#656565', fontWeight: 'bold', fontSize: 12 }}>KPI</Typography>
</div>
<div style={{ width: '100%', borderBottom: 'solid 1px #979696 ', display: 'grid', alignContent: 'center', paddingLeft: 20 }}>
<Typography style={{ color: '#656565', fontWeight: 'bold', fontSize: 12 }}>Trends</Typography>
</div>
<div style={{ width: '75%', borderBottom: 'solid 1px #979696 ', display: 'grid', alignContent: 'center', paddingLeft: 20 }}>
<Typography style={{ color: '#656565', fontWeight: 'bold', fontSize: 12 }}>Current</Typography>
</div>
<div style={{ width: '75%', borderBottom: 'solid 1px #979696 ', marginRight: 20, display: 'grid', alignContent: 'center', paddingLeft: 20 }}>
<Typography style={{ color: '#656565', fontWeight: 'bold', fontSize: 12 }}>Achievement</Typography>
</div>
</div>
</Paper>
</div>
)
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -224,7 +224,7 @@ export default class Parameter extends Component { ...@@ -224,7 +224,7 @@ export default class Parameter extends Component {
downloadFile = async () => { downloadFile = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=ParameterTemplate&&fileType=xlsx" `${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=ParameterTemplate&&fileType=xlsx`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
...@@ -239,7 +239,7 @@ export default class Parameter extends Component { ...@@ -239,7 +239,7 @@ export default class Parameter extends Component {
downloadDataTable = async () => { downloadDataTable = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/setting/export_setting" `${process.env.REACT_APP_URL_MAIN_BE}/public/setting/export_setting`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
......
...@@ -468,7 +468,7 @@ export default class Perusahaan extends Component { ...@@ -468,7 +468,7 @@ export default class Perusahaan extends Component {
downloadFile = async () => { downloadFile = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=CompanyTemplate&&fileType=xlsx" `${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=CompanyTemplate&&fileType=xlsx`
) )
res = await res.blob() res = await res.blob()
console.log(res) console.log(res)
...@@ -483,7 +483,7 @@ export default class Perusahaan extends Component { ...@@ -483,7 +483,7 @@ export default class Perusahaan extends Component {
downloadDataTable = async () => { downloadDataTable = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/company/export_company" `${process.env.REACT_APP_URL_MAIN_BE}/public/company/export_company`
) )
res = await res.blob() res = await res.blob()
console.log(res) console.log(res)
......
...@@ -752,7 +752,7 @@ export default class ReportItems extends Component { ...@@ -752,7 +752,7 @@ export default class ReportItems extends Component {
downloadFile = async () => { downloadFile = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=ItemReportTemplate&&fileType=xlsx" `${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=ItemReportTemplate&&fileType=xlsx`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
...@@ -767,7 +767,7 @@ export default class ReportItems extends Component { ...@@ -767,7 +767,7 @@ export default class ReportItems extends Component {
downloadDataTable = async () => { downloadDataTable = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/item_report/export_item_report" `${process.env.REACT_APP_URL_MAIN_BE}/public/item_report/export_item_report`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
......
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.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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