Commit b249bf0a authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'deni-dev(pc)' into 'master'

fix upload reportItem

See merge request !105
parents 52d5d253 f25eb3a5
...@@ -155,7 +155,7 @@ export default class Parameter extends Component { ...@@ -155,7 +155,7 @@ export default class Parameter extends Component {
let body = { let body = {
setting: payload setting: payload
} }
this.setState({ payload: body }) this.setState({ payload: body, buttonError: false })
api.create().checkUploadParameter(body).then(response => { api.create().checkUploadParameter(body).then(response => {
console.log(response); console.log(response);
if (response.data !== null) { if (response.data !== null) {
...@@ -733,7 +733,7 @@ export default class Parameter extends Component { ...@@ -733,7 +733,7 @@ export default class Parameter extends Component {
{this.state.visibleUpload && ( {this.state.visibleUpload && (
<div className="test app-popup-show"> <div className="test app-popup-show">
<div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}> <div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}>
<div className="popup-panel grid grid-2x" style={{ backgroundColor: '#51c6ea', height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}> <div className="popup-panel grid grid-2x main-color" style={{ height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}>
<div className="col-1" style={{ maxWidth: "inherit", display: 'flex', alignItems: 'center' }}> <div className="col-1" style={{ maxWidth: "inherit", display: 'flex', alignItems: 'center' }}>
<div className="popup-title"> <div className="popup-title">
<span style={{ color: '#fff', fontSize: 16, fontWeight: 'bold' }}>Upload File</span> <span style={{ color: '#fff', fontSize: 16, fontWeight: 'bold' }}>Upload File</span>
......
...@@ -58,7 +58,7 @@ export default class ReportItems extends Component { ...@@ -58,7 +58,7 @@ export default class ReportItems extends Component {
description: item[3], description: item[3],
parent: item[4], parent: item[4],
uom: item[5], uom: item[5],
weight: item[6], weight: String(item[6]),
type_report: item[7], type_report: item[7],
formula: item[8], formula: item[8],
condition_it_should_be: item[9], condition_it_should_be: item[9],
...@@ -71,7 +71,7 @@ export default class ReportItems extends Component { ...@@ -71,7 +71,7 @@ export default class ReportItems extends Component {
let body = { let body = {
item_report: payload item_report: payload
} }
this.setState({ payload: body }) this.setState({ payload: body, buttonError: false })
api.create().checkUploadReportItems(body).then(response => { api.create().checkUploadReportItems(body).then(response => {
if (response.data.status === "success") { if (response.data.status === "success") {
console.log(response) console.log(response)
...@@ -867,7 +867,7 @@ export default class ReportItems extends Component { ...@@ -867,7 +867,7 @@ export default class ReportItems extends Component {
{this.state.visibleUpload && ( {this.state.visibleUpload && (
<div className="test app-popup-show"> <div className="test app-popup-show">
<div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}> <div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}>
<div className="popup-panel grid grid-2x" style={{ backgroundColor: '#51c6ea', height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}> <div className="popup-panel grid grid-2x main-color" style={{ height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}>
<div className="col-1" style={{ maxWidth: "inherit", display: 'flex', alignItems: 'center' }}> <div className="col-1" style={{ maxWidth: "inherit", display: 'flex', alignItems: 'center' }}>
<div className="popup-title"> <div className="popup-title">
<span style={{ color: '#fff', fontSize: 16, fontWeight: 'bold' }}>Upload File</span> <span style={{ color: '#fff', fontSize: 16, fontWeight: 'bold' }}>Upload File</span>
......
...@@ -62,7 +62,7 @@ export default class UnitBisnis extends Component { ...@@ -62,7 +62,7 @@ export default class UnitBisnis extends Component {
let body = { let body = {
business_unit: payload business_unit: payload
} }
this.setState({ payload: body }) this.setState({ payload: body, buttonError: false })
api.create().checkUploadUnitBisnis(body).then(response => { api.create().checkUploadUnitBisnis(body).then(response => {
if (response.data.status === "success") { if (response.data.status === "success") {
let dataRow = response.data.data.map((item, index) => { let dataRow = response.data.data.map((item, index) => {
...@@ -492,7 +492,7 @@ export default class UnitBisnis extends Component { ...@@ -492,7 +492,7 @@ export default class UnitBisnis extends Component {
{this.state.visibleUpload && ( {this.state.visibleUpload && (
<div className="test app-popup-show"> <div className="test app-popup-show">
<div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}> <div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}>
<div className="popup-panel grid grid-2x" style={{ backgroundColor: '#51c6ea', height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}> <div className="popup-panel grid grid-2x main-color" style={{ height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}>
<div className="col-1" style={{ maxWidth: "inherit", display: 'flex', alignItems: 'center' }}> <div className="col-1" style={{ maxWidth: "inherit", display: 'flex', alignItems: 'center' }}>
<div className="popup-title"> <div className="popup-title">
<span style={{ color: '#fff', fontSize: 16, fontWeight: 'bold' }}>Upload File</span> <span style={{ color: '#fff', fontSize: 16, fontWeight: 'bold' }}>Upload File</span>
......
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