Commit 43b20efb authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into deni-dev(pc)

parents 54585617 154e70c8
...@@ -56,7 +56,6 @@ export default class FixedAssetsMovement extends Component { ...@@ -56,7 +56,6 @@ export default class FixedAssetsMovement extends Component {
componentDidMount() { componentDidMount() {
this.getItemHierarki() this.getItemHierarki()
this.getLatestUpdate() this.getLatestUpdate()
console.log(this.props);
} }
getLatestUpdate() { getLatestUpdate() {
...@@ -88,7 +87,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -88,7 +87,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) {
let res = response.data.data let res = response.data.data
...@@ -240,7 +239,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -240,7 +239,7 @@ export default class FixedAssetsMovement extends Component {
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}` `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
) )
res = await res.blob() res = await res.blob()
console.log(res) // console.log(res)
if (res.size > 0) { if (res.size > 0) {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
...@@ -259,7 +258,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -259,7 +258,7 @@ export default class FixedAssetsMovement extends Component {
} }
else { else {
let isi = resp.rows.slice(3) let isi = resp.rows.slice(3)
console.log(resp.rows[2]); // console.log(resp.rows[2]);
let payload = [] let payload = []
let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/; let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/;
isi.map((i, index) => { isi.map((i, index) => {
...@@ -292,7 +291,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -292,7 +291,7 @@ export default class FixedAssetsMovement extends Component {
report_id: this.props.report_id, report_id: this.props.report_id,
fixed_asset_movement: payload fixed_asset_movement: payload
} }
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] })
} }
}); });
...@@ -301,7 +300,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -301,7 +300,7 @@ export default class FixedAssetsMovement extends Component {
checkUpload() { checkUpload() {
api.create().checkUploadMB(this.state.payload).then(response => { api.create().checkUploadMB(this.state.payload).then(response => {
// console.log(JSON.stringify(this.state.payload)); // console.log(JSON.stringify(this.state.payload));
console.log(response) // console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ visibleUpload: false, visibleFixedAssetsMovement: false, loading: true }) this.setState({ visibleUpload: false, visibleFixedAssetsMovement: false, loading: true })
...@@ -337,7 +336,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -337,7 +336,7 @@ export default class FixedAssetsMovement extends Component {
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => { this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
this.state.dataTable.map(item => { this.state.dataTable.map(item => {
if (item[24].length > 0) { if (item[24].length > 0) {
console.log('masuk') // console.log('masuk')
this.setState({ buttonError: true, errorPreview: true, editable: true }) this.setState({ buttonError: true, errorPreview: true, editable: true })
} }
}) })
...@@ -379,9 +378,9 @@ export default class FixedAssetsMovement extends Component { ...@@ -379,9 +378,9 @@ export default class FixedAssetsMovement extends Component {
fixed_asset_movement: data, fixed_asset_movement: data,
status: type status: type
} }
console.log(JSON.stringify(body)); // console.log(JSON.stringify(body));
api.create('UPLOAD').uploadMasterBudget(body).then(response => { api.create('UPLOAD').uploadMasterBudget(body).then(response => {
console.log(response); // console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.props.onClickClose() this.props.onClickClose()
...@@ -417,7 +416,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -417,7 +416,7 @@ export default class FixedAssetsMovement extends Component {
handleValidate() { handleValidate() {
let data = [] let data = []
console.log(this.state.dataTable) // console.log(this.state.dataTable)
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
data.push({ data.push({
item_report_id: i[1], item_report_id: i[1],
...@@ -439,7 +438,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -439,7 +438,7 @@ export default class FixedAssetsMovement extends Component {
total_more_year: i[0] === 3 && i[21] === "" ? "0" : String(i[21]) total_more_year: i[0] === 3 && i[21] === "" ? "0" : String(i[21])
}) })
}) })
console.log(JSON.stringify(data)) // console.log(JSON.stringify(data))
let payload = { let payload = {
"submission_id": this.props.submissionID, "submission_id": this.props.submissionID,
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
...@@ -449,7 +448,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -449,7 +448,7 @@ export default class FixedAssetsMovement extends Component {
"status": "submitted" "status": "submitted"
} }
api.create().validateSubmitReport(payload).then((response) => { api.create().validateSubmitReport(payload).then((response) => {
console.log(response) // console.log(response)
if (response.data.data.result) { if (response.data.data.result) {
this.setState({ loading: false, buttonError: false, editable: false }) this.setState({ loading: false, buttonError: false, editable: false })
} else { } else {
...@@ -881,7 +880,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -881,7 +880,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -970,7 +969,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -970,7 +969,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1059,7 +1058,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1059,7 +1058,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1148,7 +1147,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1148,7 +1147,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1237,7 +1236,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1237,7 +1236,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1326,7 +1325,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1326,7 +1325,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1415,7 +1414,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1415,7 +1414,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1504,7 +1503,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1504,7 +1503,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1593,7 +1592,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1593,7 +1592,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1682,7 +1681,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1682,7 +1681,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1771,7 +1770,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1771,7 +1770,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1860,7 +1859,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1860,7 +1859,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1987,7 +1986,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1987,7 +1986,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -2065,7 +2064,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2065,7 +2064,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
......
...@@ -13,7 +13,7 @@ class EmailVerification extends Component { ...@@ -13,7 +13,7 @@ class EmailVerification extends Component {
} }
componentDidMount(){ componentDidMount(){
console.log("forgot-password") // console.log("forgot-password")
} }
handleChange(e) { handleChange(e) {
......
...@@ -23,7 +23,7 @@ class ForgotPassword extends Component { ...@@ -23,7 +23,7 @@ class ForgotPassword extends Component {
} }
componentDidMount(){ componentDidMount(){
console.log("forgot-password") // console.log("forgot-password")
} }
handleChange(e) { handleChange(e) {
......
...@@ -90,7 +90,7 @@ class Login extends Component { ...@@ -90,7 +90,7 @@ class Login extends Component {
} }
login() { login() {
console.log('login'); // console.log('login');
let payload = { let payload = {
"email": this.state.email, "email": this.state.email,
"password": this.state.password "password": this.state.password
...@@ -99,7 +99,7 @@ class Login extends Component { ...@@ -99,7 +99,7 @@ class Login extends Component {
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
console.log(response.data.data) // console.log(response.data.data)
localStorage.setItem(Constant.TOKEN, response.data.data.token) localStorage.setItem(Constant.TOKEN, response.data.data.token)
localStorage.setItem(Constant.USER, response.data.data.user_id) localStorage.setItem(Constant.USER, response.data.data.user_id)
if (this.state.rememberMe) { if (this.state.rememberMe) {
......
...@@ -576,7 +576,7 @@ export default class ReportItems extends Component { ...@@ -576,7 +576,7 @@ export default class ReportItems extends Component {
menu: "report items" menu: "report items"
} }
api.create().getPermission(payload).then(response => { api.create().getPermission(payload).then(response => {
console.log(response) // console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.setState({ this.setState({
...@@ -595,7 +595,7 @@ export default class ReportItems extends Component { ...@@ -595,7 +595,7 @@ export default class ReportItems extends Component {
getData() { getData() {
this.setState({ loading: true }) this.setState({ loading: true })
api.create().getReportItems().then((response) => { api.create().getReportItems().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') {
...@@ -628,7 +628,7 @@ export default class ReportItems extends Component { ...@@ -628,7 +628,7 @@ export default class ReportItems extends Component {
} }
deleteReport(payload) { deleteReport(payload) {
console.log(payload); // console.log(payload);
let id = String(payload[1]) let id = String(payload[1])
api.create().deleteReportItems(id).then(response => { api.create().deleteReportItems(id).then(response => {
if (response.data) { if (response.data) {
...@@ -711,7 +711,7 @@ export default class ReportItems extends Component { ...@@ -711,7 +711,7 @@ export default class ReportItems extends Component {
createReportItems = (payload) => { createReportItems = (payload) => {
this.setState({ add: false }) this.setState({ add: false })
api.create().createReportItems(payload).then(response => { api.create().createReportItems(payload).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') {
...@@ -741,7 +741,7 @@ export default class ReportItems extends Component { ...@@ -741,7 +741,7 @@ export default class ReportItems extends Component {
"https://tia.eksad.com/tia-reporting-dev/public/attachment/download_file?fileName=ItemReportTemplate&&fileType=xlsx" "https://tia.eksad.com/tia-reporting-dev/public/attachment/download_file?fileName=ItemReportTemplate&&fileType=xlsx"
) )
res = await res.blob() res = await res.blob()
console.log(res) // console.log(res)
if (res.size > 0) { if (res.size > 0) {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
...@@ -756,7 +756,7 @@ export default class ReportItems extends Component { ...@@ -756,7 +756,7 @@ export default class ReportItems extends Component {
"https://tia.eksad.com/tia-reporting-dev/public/item_report/export_item_report" "https://tia.eksad.com/tia-reporting-dev/public/item_report/export_item_report"
) )
res = await res.blob() res = await res.blob()
console.log(res) // console.log(res)
if (res.size > 0) { if (res.size > 0) {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
......
...@@ -82,7 +82,7 @@ export default class CreateReportItems extends Component { ...@@ -82,7 +82,7 @@ export default class CreateReportItems extends Component {
this.getReportType() this.getReportType()
// this.getParent() // this.getParent()
let date = format(new Date, 'yyyy-MM-dd') let date = format(new Date, 'yyyy-MM-dd')
console.log(date); // console.log(date);
this.setState({ this.setState({
startDate: date, startDate: date,
endDate: date endDate: date
...@@ -211,7 +211,7 @@ export default class CreateReportItems extends Component { ...@@ -211,7 +211,7 @@ export default class CreateReportItems extends Component {
"start_date": this.state.startDate, "start_date": this.state.startDate,
"end_date": this.state.endDate "end_date": this.state.endDate
} }
console.log(payload) // console.log(payload)
this.props.createReportItems(payload) this.props.createReportItems(payload)
} }
......
...@@ -185,7 +185,7 @@ export default class EditReportItems extends Component { ...@@ -185,7 +185,7 @@ export default class EditReportItems extends Component {
"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
} }
console.log(payload) // console.log(payload)
this.props.updateReportItems(payload) this.props.updateReportItems(payload)
} }
...@@ -201,7 +201,7 @@ export default class EditReportItems extends Component { ...@@ -201,7 +201,7 @@ export default class EditReportItems extends Component {
}, () => this.getInputType(), }, () => this.getInputType(),
this.getPerusahaan(), this.getPerusahaan(),
this.getReportType()) this.getReportType())
console.log(response.data.data) // console.log(response.data.data)
} 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")) {
...@@ -262,7 +262,7 @@ export default class EditReportItems extends Component { ...@@ -262,7 +262,7 @@ export default class EditReportItems extends Component {
getPerusahaan() { getPerusahaan() {
api.create().getPerusahaanActive().then((response) => { api.create().getPerusahaanActive().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') {
...@@ -393,7 +393,7 @@ export default class EditReportItems extends Component { ...@@ -393,7 +393,7 @@ export default class EditReportItems extends Component {
getReportType() { getReportType() {
api.create().getReportType().then((response) => { api.create().getReportType().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') {
...@@ -432,13 +432,13 @@ export default class EditReportItems extends Component { ...@@ -432,13 +432,13 @@ export default class EditReportItems extends Component {
getParent() { getParent() {
if (this.state.reportType !== null && this.state.company !== null) { if (this.state.reportType !== null && this.state.company !== null) {
console.log(this.state.tempData.item_report_id) // console.log(this.state.tempData.item_report_id)
let payload = { let payload = {
"report_id": this.state.reportType.report_id, "report_id": this.state.reportType.report_id,
"company_id": this.state.company.company_id "company_id": this.state.company.company_id
} }
api.create().getReportParent(payload).then((response) => { api.create().getReportParent(payload).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') {
...@@ -457,7 +457,7 @@ export default class EditReportItems extends Component { ...@@ -457,7 +457,7 @@ export default class EditReportItems extends Component {
if (currentIndex !== null) { if (currentIndex !== null) {
parentData.splice(currentIndex, 1) parentData.splice(currentIndex, 1)
} }
console.log(parentData) // console.log(parentData)
let defaultProps = { let defaultProps = {
options: parentData, options: parentData,
getOptionLabel: (option) => titleCase(option.description), getOptionLabel: (option) => titleCase(option.description),
......
...@@ -71,7 +71,7 @@ export default class VisualReportItems extends Component { ...@@ -71,7 +71,7 @@ export default class VisualReportItems extends Component {
} }
componentDidMount() { componentDidMount() {
console.log(this.props.height) // console.log(this.props.height)
this.getReportType() this.getReportType()
} }
...@@ -157,7 +157,7 @@ export default class VisualReportItems extends Component { ...@@ -157,7 +157,7 @@ export default class VisualReportItems extends Component {
"company_id": this.state.company.company_id "company_id": this.state.company.company_id
} }
api.create().getItemReportHierarki(payload).then((response) => { api.create().getItemReportHierarki(payload).then((response) => {
console.log(response.data) // console.log(response.data)
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
...@@ -183,7 +183,7 @@ export default class VisualReportItems extends Component { ...@@ -183,7 +183,7 @@ export default class VisualReportItems extends Component {
} }
} else { } else {
items[index].collapse = !items[index].collapse items[index].collapse = !items[index].collapse
console.log(items[index]) // console.log(items[index])
} }
} }
...@@ -216,7 +216,7 @@ export default class VisualReportItems extends Component { ...@@ -216,7 +216,7 @@ export default class VisualReportItems extends Component {
}) })
} else { } else {
api.create().saveVisualisasiReport(payload).then((response) => { api.create().saveVisualisasiReport(payload).then((response) => {
console.log(response); // console.log(response);
// if (response.data.status == 'ucces') { // if (response.data.status == 'ucces') {
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
......
...@@ -97,7 +97,7 @@ export default class OperatingIndicator extends Component { ...@@ -97,7 +97,7 @@ export default class OperatingIndicator extends Component {
this.setState({ listAttachment: response.data.data }) this.setState({ listAttachment: response.data.data })
} }
} }
// // console.log(response); // console.log(response);
}) })
} }
...@@ -120,7 +120,7 @@ export default class OperatingIndicator extends Component { ...@@ -120,7 +120,7 @@ export default class OperatingIndicator extends Component {
item.is_can_upload item.is_can_upload
] ]
}) })
// // console.log(dataTable); // console.log(dataTable);
this.setState({ dataTable, dataReport: response.data.data }) this.setState({ dataTable, dataReport: response.data.data })
} }
} }
...@@ -335,7 +335,7 @@ export default class OperatingIndicator extends Component { ...@@ -335,7 +335,7 @@ export default class OperatingIndicator extends Component {
fileHandler = (event) => { fileHandler = (event) => {
let fileObj = event let fileObj = event
ExcelRenderer(fileObj, (err, resp) => { ExcelRenderer(fileObj, (err, resp) => {
// // console.log(resp) // console.log(resp)
if (err) { if (err) {
// console.log(err); // console.log(err);
} }
...@@ -360,7 +360,7 @@ export default class OperatingIndicator extends Component { ...@@ -360,7 +360,7 @@ export default class OperatingIndicator extends Component {
}) })
} }
} }
// // console.log(response) // console.log(response)
}) })
} }
...@@ -390,7 +390,7 @@ export default class OperatingIndicator extends Component { ...@@ -390,7 +390,7 @@ export default class OperatingIndicator extends Component {
// <Select // <Select
// value={val} // value={val}
// onChange={event => { // onChange={event => {
// // // console.log(event.target) // // console.log(event.target)
// updateValue(event.target.value) // updateValue(event.target.value)
// this.handleChange(event.target.value, tableMeta) // this.handleChange(event.target.value, tableMeta)
// }} // }}
......
...@@ -152,7 +152,7 @@ export default class OutlookPA extends Component { ...@@ -152,7 +152,7 @@ export default class OutlookPA extends Component {
this.setState({ listAttachment: response.data.data }) this.setState({ listAttachment: response.data.data })
} }
} }
// // console.log(response); // console.log(response);
}) })
} }
...@@ -184,7 +184,7 @@ export default class OutlookPA extends Component { ...@@ -184,7 +184,7 @@ export default class OutlookPA extends Component {
"" ""
] ]
}) })
// // console.log(dataTable); // console.log(dataTable);
this.setState({ dataTable, loading: false, dataTableRevision, dataForRevision: response.data.data }) this.setState({ dataTable, loading: false, dataTableRevision, dataForRevision: response.data.data })
} }
} else { } else {
...@@ -288,7 +288,7 @@ export default class OutlookPA extends Component { ...@@ -288,7 +288,7 @@ export default class OutlookPA extends Component {
// let dateNow = new Date // let dateNow = new Date
// let year = this.state.rawData ? this.state.rawData.periode : format(dateNow, 'yyyy') // let year = this.state.rawData ? this.state.rawData.periode : format(dateNow, 'yyyy')
let currentYear = new Date().getFullYear() let currentYear = new Date().getFullYear()
// // console.log(currentYear) // console.log(currentYear)
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
let data = [] let data = []
...@@ -314,10 +314,10 @@ export default class OutlookPA extends Component { ...@@ -314,10 +314,10 @@ export default class OutlookPA extends Component {
}; };
let periode = (this.state.lastPeriod == "" ? String(Number(currentYear) + 1) : this.state.lastPeriod) let periode = (this.state.lastPeriod == "" ? String(Number(currentYear) + 1) : this.state.lastPeriod)
let index = data.sort((a, b) => a - b).findIndex((val) => val === periode) let index = data.sort((a, b) => a - b).findIndex((val) => val === periode)
// // console.log(data) // console.log(data)
// console.log(this.state.lastPeriod) // console.log(this.state.lastPeriod)
// // console.log(periodeData) // console.log(periodeData)
// // console.log(index) // console.log(index)
this.setState({ listPeriode: defaultProps, periode: index === -1 ? periodeData[0] : periodeData[index] }, () => { this.setState({ listPeriode: defaultProps, periode: index === -1 ? periodeData[0] : periodeData[index] }, () => {
if (this.state.isApprover === true) { if (this.state.isApprover === true) {
this.getCompanySubmitted() this.getCompanySubmitted()
...@@ -380,7 +380,7 @@ export default class OutlookPA extends Component { ...@@ -380,7 +380,7 @@ export default class OutlookPA extends Component {
this.historyApproval() this.historyApproval()
this.getLatestPeriodSubmit() this.getLatestPeriodSubmit()
api.create().checkApprover().then(response => { api.create().checkApprover().then(response => {
// // console.log(response); // console.log(response);
if (response.data.data.is_approver === true) { if (response.data.data.is_approver === true) {
this.setState({ isApprover: true, checkApprover: true }) this.setState({ isApprover: true, checkApprover: true })
} else { } else {
...@@ -510,7 +510,7 @@ export default class OutlookPA extends Component { ...@@ -510,7 +510,7 @@ export default class OutlookPA extends Component {
fileHandler = (event) => { fileHandler = (event) => {
let fileObj = event let fileObj = event
ExcelRenderer(fileObj, (err, resp) => { ExcelRenderer(fileObj, (err, resp) => {
// // console.log(resp) // console.log(resp)
if (err) { if (err) {
// console.log(err); // console.log(err);
} }
...@@ -553,7 +553,7 @@ export default class OutlookPA extends Component { ...@@ -553,7 +553,7 @@ export default class OutlookPA extends Component {
saveToOLPA(data) { saveToOLPA(data) {
this.setState({ loading: true }) this.setState({ loading: true })
// // console.log(JSON.stringify(data)); // console.log(JSON.stringify(data));
api.create('UPLOAD').createReportOLPA(data).then(response => { api.create('UPLOAD').createReportOLPA(data).then(response => {
// console.log(response); // console.log(response);
if (response.data) { if (response.data) {
...@@ -579,7 +579,7 @@ export default class OutlookPA extends Component { ...@@ -579,7 +579,7 @@ export default class OutlookPA extends Component {
let fileType = name.split(".")[length - 1] let fileType = name.split(".")[length - 1]
// console.log(fileType); // console.log(fileType);
let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/outlook_pa/download_attachment?fileName=${fileurl}&&fileType=${fileType}` let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/outlook_pa/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
// // console.log(url); // console.log(url);
let res = await fetch( let res = await fetch(
`https://tia.eksad.com/tia-reporting-dev/public/transaction/outlook_pa/download_attachment?fileName=${fileurl}&&fileType=${fileType}` `https://tia.eksad.com/tia-reporting-dev/public/transaction/outlook_pa/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
) )
...@@ -657,7 +657,7 @@ export default class OutlookPA extends Component { ...@@ -657,7 +657,7 @@ export default class OutlookPA extends Component {
<Select <Select
value={val} value={val}
onChange={event => { onChange={event => {
// // console.log(event.target) // console.log(event.target)
updateValue(event.target.value) updateValue(event.target.value)
this.handleChange(event.target.value, tableMeta) this.handleChange(event.target.value, tableMeta)
}} }}
...@@ -784,10 +784,10 @@ export default class OutlookPA extends Component { ...@@ -784,10 +784,10 @@ export default class OutlookPA extends Component {
defaultValue={value} defaultValue={value}
color={"#5198ea"} color={"#5198ea"}
onBlur={(event) => { onBlur={(event) => {
// // console.log(event.target.value) // console.log(event.target.value)
// updateValue(event.target.value) // updateValue(event.target.value)
handleChangeText(event.target.value, tableMeta) handleChangeText(event.target.value, tableMeta)
// // console.log(dataTable2) // console.log(dataTable2)
}} }}
/>} />}
/> />
......
...@@ -30,7 +30,7 @@ class ResetPassword extends Component { ...@@ -30,7 +30,7 @@ class ResetPassword extends Component {
} }
componentDidMount() { componentDidMount() {
console.log(this.props.match.params.id) // console.log(this.props.match.params.id)
let userId = this.props.match.params.id let userId = this.props.match.params.id
this.setState({ userId }) this.setState({ userId })
this.checkExpiredLink(userId) this.checkExpiredLink(userId)
......
...@@ -30,7 +30,7 @@ class SetPassword extends Component { ...@@ -30,7 +30,7 @@ class SetPassword extends Component {
} }
componentDidMount() { componentDidMount() {
console.log(this.props.match.params.id) // console.log(this.props.match.params.id)
let userId = this.props.match.params.id let userId = this.props.match.params.id
this.setState({ userId }) this.setState({ userId })
this.checkExpiredLink(userId) this.checkExpiredLink(userId)
......
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