Commit 13943e08 authored by Rifka Kurnia Irfiana's avatar Rifka Kurnia Irfiana

issue managdoc & taxplan

parent 1b74fbec
This diff is collapsed.
......@@ -223,7 +223,7 @@ export default class getAllDocument extends Component {
</button>
</a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
{this.props.btnedit && <span>
{this.props.btnedit && this.props.allsubcoEdit && <span>
<a data-tip={'Edit'} data-for="edit">
<button
style={{
......
......@@ -132,12 +132,23 @@ export default class CreateManagementDoc extends Component {
if (response.data) {
if (response.data.status == 'success') {
let data = response.data.data
let typeData = data.map((item) => {
return {
let typeData = []
data.map((item) => {
if (String(item.value).includes('Manual')){
if( this.props.allsubcoCreate ){
typeData.push( {
document_category_id: item.setting_id,
document_category_name: item.value
})
}
} else {
typeData.push( {
document_category_id: item.setting_id,
document_category_name: item.value
})
}
})
console.log(typeData)
let typeProps = {
options: typeData.sort((a, b) => a.document_category_id - b.document_category_id),
getOptionLabel: (option) => option.document_category_name,
......
......@@ -93,7 +93,7 @@ export default class DocumentManagement extends Component {
}
createDocument(payload, settingID, menuName) {
this.setState({ loading: true })
this.setState({ visibleCreate: false, loading: true })
api.create().uploadDocument(payload).then(response => {
console.log(response)
if (response.data) {
......@@ -127,6 +127,7 @@ export default class DocumentManagement extends Component {
}
createUploadDocument() {
this.setState({ visibleCreate: false, loading: true })
const formData = this.state.formData
formData.append("documentId", this.state.docId)
formData.append("updated", 1)
......@@ -253,7 +254,7 @@ export default class DocumentManagement extends Component {
{this.state.loading && loadingComponent}
<Paper style={{ padding: 20 }}>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
{(this.state.btncreate && this.state.btnadd) && <span>
{(this.state.btncreate) && <span>
<a data-tip={'Add'} data-for="add">
<div style={{ display: 'grid', justifyContent: 'flex-end' }}>
<button
......@@ -295,6 +296,7 @@ export default class DocumentManagement extends Component {
load={this.state.load}
setId={this.state.id}
userCompActive={this.state.userCompActive}
allsubcoEdit={this.state.btnadd}
/>
// this.state.id === 68542 ?
// <AuditTahunan
......@@ -359,6 +361,7 @@ export default class DocumentManagement extends Component {
setting_id={this.state.id}
name={this.state.name}
handleLoading={this.handleLoading.bind(this)}
allsubcoCreate={this.state.btnadd}
/>
)}
</div>
......
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