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
...@@ -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