Commit 6f1e931d authored by EKSAD's avatar EKSAD

per-console-an

parent dd6887b9
......@@ -13,7 +13,7 @@ class EmailVerification extends Component {
}
componentDidMount(){
console.log("forgot-password")
// console.log("forgot-password")
}
handleChange(e) {
......
......@@ -23,7 +23,7 @@ class ForgotPassword extends Component {
}
componentDidMount(){
console.log("forgot-password")
// console.log("forgot-password")
}
handleChange(e) {
......
......@@ -90,7 +90,7 @@ class Login extends Component {
}
login() {
console.log('login');
// console.log('login');
let payload = {
"email": this.state.email,
"password": this.state.password
......@@ -99,7 +99,7 @@ class Login extends Component {
if (response.data) {
if (response.ok) {
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.USER, response.data.data.user_id)
if (this.state.rememberMe) {
......
......@@ -576,7 +576,7 @@ export default class ReportItems extends Component {
menu: "report items"
}
api.create().getPermission(payload).then(response => {
console.log(response)
// console.log(response)
if (response.data) {
if (response.data.status === "success") {
this.setState({
......@@ -595,7 +595,7 @@ export default class ReportItems extends Component {
getData() {
this.setState({ loading: true })
api.create().getReportItems().then((response) => {
console.log(response)
// console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.status == 'success') {
......@@ -628,7 +628,7 @@ export default class ReportItems extends Component {
}
deleteReport(payload) {
console.log(payload);
// console.log(payload);
let id = String(payload[1])
api.create().deleteReportItems(id).then(response => {
if (response.data) {
......@@ -711,7 +711,7 @@ export default class ReportItems extends Component {
createReportItems = (payload) => {
this.setState({ add: false })
api.create().createReportItems(payload).then(response => {
console.log(response);
// console.log(response);
if (response.data) {
if (response.ok) {
if (response.data.status == 'success') {
......@@ -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"
)
res = await res.blob()
console.log(res)
// console.log(res)
if (res.size > 0) {
let url = window.URL.createObjectURL(res);
let a = document.createElement('a');
......@@ -756,7 +756,7 @@ export default class ReportItems extends Component {
"https://tia.eksad.com/tia-reporting-dev/public/item_report/export_item_report"
)
res = await res.blob()
console.log(res)
// console.log(res)
if (res.size > 0) {
let url = window.URL.createObjectURL(res);
let a = document.createElement('a');
......
......@@ -82,7 +82,7 @@ export default class CreateReportItems extends Component {
this.getReportType()
// this.getParent()
let date = format(new Date, 'yyyy-MM-dd')
console.log(date);
// console.log(date);
this.setState({
startDate: date,
endDate: date
......@@ -211,7 +211,7 @@ export default class CreateReportItems extends Component {
"start_date": this.state.startDate,
"end_date": this.state.endDate
}
console.log(payload)
// console.log(payload)
this.props.createReportItems(payload)
}
......
......@@ -185,7 +185,7 @@ export default class EditReportItems extends Component {
"start_date": this.state.tempData.start_date,
"end_date": this.state.tempData.end_date
}
console.log(payload)
// console.log(payload)
this.props.updateReportItems(payload)
}
......@@ -201,7 +201,7 @@ export default class EditReportItems extends Component {
}, () => this.getInputType(),
this.getPerusahaan(),
this.getReportType())
console.log(response.data.data)
// console.log(response.data.data)
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) {
......@@ -262,7 +262,7 @@ export default class EditReportItems extends Component {
getPerusahaan() {
api.create().getPerusahaanActive().then((response) => {
console.log(response)
// console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.status === 'success') {
......@@ -393,7 +393,7 @@ export default class EditReportItems extends Component {
getReportType() {
api.create().getReportType().then((response) => {
console.log(response)
// console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.status === 'success') {
......@@ -432,13 +432,13 @@ export default class EditReportItems extends Component {
getParent() {
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 = {
"report_id": this.state.reportType.report_id,
"company_id": this.state.company.company_id
}
api.create().getReportParent(payload).then((response) => {
console.log(response)
// console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.status === 'success') {
......@@ -457,7 +457,7 @@ export default class EditReportItems extends Component {
if (currentIndex !== null) {
parentData.splice(currentIndex, 1)
}
console.log(parentData)
// console.log(parentData)
let defaultProps = {
options: parentData,
getOptionLabel: (option) => titleCase(option.description),
......
......@@ -71,7 +71,7 @@ export default class VisualReportItems extends Component {
}
componentDidMount() {
console.log(this.props.height)
// console.log(this.props.height)
this.getReportType()
}
......@@ -157,7 +157,7 @@ export default class VisualReportItems extends Component {
"company_id": this.state.company.company_id
}
api.create().getItemReportHierarki(payload).then((response) => {
console.log(response.data)
// console.log(response.data)
if (response.data) {
if (response.ok) {
if (response.data.status == 'success') {
......@@ -183,7 +183,7 @@ export default class VisualReportItems extends Component {
}
} else {
items[index].collapse = !items[index].collapse
console.log(items[index])
// console.log(items[index])
}
}
......@@ -216,7 +216,7 @@ export default class VisualReportItems extends Component {
})
} else {
api.create().saveVisualisasiReport(payload).then((response) => {
console.log(response);
// console.log(response);
// if (response.data.status == 'ucces') {
if (response.data) {
if (response.ok) {
......
......@@ -97,7 +97,7 @@ export default class OperatingIndicator extends Component {
this.setState({ listAttachment: response.data.data })
}
}
// // console.log(response);
// console.log(response);
})
}
......@@ -120,7 +120,7 @@ export default class OperatingIndicator extends Component {
item.is_can_upload
]
})
// // console.log(dataTable);
// console.log(dataTable);
this.setState({ dataTable, dataReport: response.data.data })
}
}
......@@ -335,7 +335,7 @@ export default class OperatingIndicator extends Component {
fileHandler = (event) => {
let fileObj = event
ExcelRenderer(fileObj, (err, resp) => {
// // console.log(resp)
// console.log(resp)
if (err) {
// console.log(err);
}
......@@ -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 {
// <Select
// value={val}
// onChange={event => {
// // // console.log(event.target)
// // console.log(event.target)
// updateValue(event.target.value)
// this.handleChange(event.target.value, tableMeta)
// }}
......
......@@ -152,7 +152,7 @@ export default class OutlookPA extends Component {
this.setState({ listAttachment: response.data.data })
}
}
// // console.log(response);
// console.log(response);
})
}
......@@ -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 })
}
} else {
......@@ -288,7 +288,7 @@ export default class OutlookPA extends Component {
// let dateNow = new Date
// let year = this.state.rawData ? this.state.rawData.periode : format(dateNow, 'yyyy')
let currentYear = new Date().getFullYear()
// // console.log(currentYear)
// console.log(currentYear)
if (response.data) {
if (response.data.status === "success") {
let data = []
......@@ -314,10 +314,10 @@ export default class OutlookPA extends Component {
};
let periode = (this.state.lastPeriod == "" ? String(Number(currentYear) + 1) : this.state.lastPeriod)
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(periodeData)
// // console.log(index)
// console.log(periodeData)
// console.log(index)
this.setState({ listPeriode: defaultProps, periode: index === -1 ? periodeData[0] : periodeData[index] }, () => {
if (this.state.isApprover === true) {
this.getCompanySubmitted()
......@@ -380,7 +380,7 @@ export default class OutlookPA extends Component {
this.historyApproval()
this.getLatestPeriodSubmit()
api.create().checkApprover().then(response => {
// // console.log(response);
// console.log(response);
if (response.data.data.is_approver === true) {
this.setState({ isApprover: true, checkApprover: true })
} else {
......@@ -510,7 +510,7 @@ export default class OutlookPA extends Component {
fileHandler = (event) => {
let fileObj = event
ExcelRenderer(fileObj, (err, resp) => {
// // console.log(resp)
// console.log(resp)
if (err) {
// console.log(err);
}
......@@ -553,7 +553,7 @@ export default class OutlookPA extends Component {
saveToOLPA(data) {
this.setState({ loading: true })
// // console.log(JSON.stringify(data));
// console.log(JSON.stringify(data));
api.create('UPLOAD').createReportOLPA(data).then(response => {
// console.log(response);
if (response.data) {
......@@ -579,7 +579,7 @@ export default class OutlookPA extends Component {
let fileType = name.split(".")[length - 1]
// console.log(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(
`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 {
<Select
value={val}
onChange={event => {
// // console.log(event.target)
// console.log(event.target)
updateValue(event.target.value)
this.handleChange(event.target.value, tableMeta)
}}
......@@ -784,10 +784,10 @@ export default class OutlookPA extends Component {
defaultValue={value}
color={"#5198ea"}
onBlur={(event) => {
// // console.log(event.target.value)
// console.log(event.target.value)
// updateValue(event.target.value)
handleChangeText(event.target.value, tableMeta)
// // console.log(dataTable2)
// console.log(dataTable2)
}}
/>}
/>
......
......@@ -30,7 +30,7 @@ class ResetPassword extends Component {
}
componentDidMount() {
console.log(this.props.match.params.id)
// console.log(this.props.match.params.id)
let userId = this.props.match.params.id
this.setState({ userId })
this.checkExpiredLink(userId)
......
......@@ -30,7 +30,7 @@ class SetPassword extends Component {
}
componentDidMount() {
console.log(this.props.match.params.id)
// console.log(this.props.match.params.id)
let userId = this.props.match.params.id
this.setState({ 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