Commit ceb3ffc4 authored by Rifka Kurnia Irfiana's avatar Rifka Kurnia Irfiana

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

parents 8323819d 5b90dbfc
...@@ -312,7 +312,7 @@ export default class BudgetTahunan extends Component { ...@@ -312,7 +312,7 @@ export default class BudgetTahunan extends Component {
saveToMasterBudget(data) { saveToMasterBudget(data) {
this.setState({ loading: true }) this.setState({ loading: true })
// console.log(JSON.stringify(data)); // console.log(JSON.stringify(data));
api.create().createSubmitReport(data).then(response => { api.create('UPLOAD').createSubmitReport(data).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 diff is collapsed.
...@@ -524,16 +524,17 @@ export default class UserRole extends Component { ...@@ -524,16 +524,17 @@ export default class UserRole extends Component {
} }
uploadUser() { uploadUser() {
console.log(JSON.stringify(this.state.payload))
api.create().uploadUser(this.state.payload).then(response => { api.create().uploadUser(this.state.payload).then(response => {
this.setState({buttonError: false}) this.setState({buttonError: false})
console.log(response) console.log(JSON.stringify(response))
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.getUser() this.getUser()
this.setState({ visibleUser: true, alert: true, messageAlert: response.data.message, tipeAlert: 'success', payload: [], rows: [], judul: '' }) this.setState({ visibleUser: true, alert: true, messageAlert: response.data.message, tipeAlert: 'success', payload: [], rows: [], judul: '' })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', payload: [], rows: [], judul: '' }, () => { 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")) {
setTimeout(() => { setTimeout(() => {
localStorage.removeItem(Constant.TOKEN) localStorage.removeItem(Constant.TOKEN)
...@@ -543,10 +544,10 @@ export default class UserRole extends Component { ...@@ -543,10 +544,10 @@ export default class UserRole extends Component {
}) })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', payload: [], rows: [], judul: '' }) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
} }
} else { } else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', payload: [], rows: [], judul: '' }) this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
......
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