Commit 26b73725 authored by Deni Rinaldi's avatar Deni Rinaldi

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

api reprot

See merge request !469
parents 53eaa6ec 0ac0e3ad
...@@ -234,6 +234,7 @@ const create = (type = "") => { ...@@ -234,6 +234,7 @@ const create = (type = "") => {
const checkUploadOLPA = (body) => api.post('transaction/outlook_pa/check_import', body) const checkUploadOLPA = (body) => api.post('transaction/outlook_pa/check_import', body)
const validateSubmitReportOLPA = (body) => api.post('transaction/outlook_pa/validate_save', body) const validateSubmitReportOLPA = (body) => api.post('transaction/outlook_pa/validate_save', body)
const uploadOLPA = (body) => api.post('transaction/outlook_pa/import_outlook_pa') const uploadOLPA = (body) => api.post('transaction/outlook_pa/import_outlook_pa')
const uploadAttOLPA = (body) => api.post('transaction/outlook_pa/upload_attachment', body)
//Template //Template
const downloadTemplate = (fileName, fileType) => api.get(`attachment/download_file?fileName=${fileName}&&fileType=${fileType}`) const downloadTemplate = (fileName, fileType) => api.get(`attachment/download_file?fileName=${fileName}&&fileType=${fileType}`)
...@@ -405,7 +406,8 @@ const create = (type = "") => { ...@@ -405,7 +406,8 @@ const create = (type = "") => {
checkUploadOLPA, checkUploadOLPA,
uploadOLPA, uploadOLPA,
validateSubmitReportOLPA, validateSubmitReportOLPA,
getDetailReportOLPA getDetailReportOLPA,
uploadAttOLPA
} }
} }
......
...@@ -984,7 +984,7 @@ export default class BudgetTahunan extends Component { ...@@ -984,7 +984,7 @@ export default class BudgetTahunan extends Component {
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
<Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Attachment: </Typography> <Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Attachment: </Typography>
</div> </div>
{!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' && this.state.lastStatus === 'REVISION') && ( {!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' || this.state.lastStatus === 'REVISION') && (
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
<button <button
style={{ style={{
...@@ -1030,7 +1030,7 @@ export default class BudgetTahunan extends Component { ...@@ -1030,7 +1030,7 @@ export default class BudgetTahunan extends Component {
: null : null
} }
</div> </div>
{!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' && this.state.lastStatus === 'REVISION') && ( {!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' || this.state.lastStatus === 'REVISION') && (
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
{this.state.listAttachment.length > 0 ? {this.state.listAttachment.length > 0 ?
this.state.listAttachment.map((item) => { this.state.listAttachment.map((item) => {
......
...@@ -492,7 +492,7 @@ export default class OutlookPA extends Component { ...@@ -492,7 +492,7 @@ export default class OutlookPA extends Component {
} }
uploadAttachment(formData) { uploadAttachment(formData) {
api.create().uploadAttachment(formData).then(response => { api.create().uploadAttOLPA(formData).then(response => {
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.setState({ visibleUpload: false }, () => { this.setState({ visibleUpload: false }, () => {
...@@ -905,7 +905,7 @@ export default class OutlookPA extends Component { ...@@ -905,7 +905,7 @@ export default class OutlookPA extends Component {
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
<Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Attachment: </Typography> <Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Attachment: </Typography>
</div> </div>
{!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' && this.state.lastStatus === 'REVISION') && ( {!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' || this.state.lastStatus === 'REVISION') && (
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
<button <button
style={{ style={{
...@@ -951,7 +951,7 @@ export default class OutlookPA extends Component { ...@@ -951,7 +951,7 @@ export default class OutlookPA extends Component {
: null : null
} }
</div> </div>
{!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' && this.state.lastStatus === 'REVISION') && ( {!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' || this.state.lastStatus === 'REVISION') && (
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
{this.state.listAttachment.length > 0 ? {this.state.listAttachment.length > 0 ?
this.state.listAttachment.map((item) => { this.state.listAttachment.map((item) => {
......
...@@ -341,7 +341,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -341,7 +341,7 @@ export default class BalanceSheetOLPA extends Component {
balance_sheet: data, balance_sheet: data,
status: type status: type
} }
// console.log(data); console.log(JSON.stringify(body));
api.create('UPLOAD').uploadOLPA(body).then(response => { api.create('UPLOAD').uploadOLPA(body).then(response => {
console.log(response); console.log(response);
if (response.data) { if (response.data) {
......
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