feat: initial commit for mockup bukopin

This commit is contained in:
2023-01-17 21:21:43 +07:00
parent 0ebe039eda
commit 9f0c68b2ce
23 changed files with 142 additions and 568201 deletions

View File

@@ -26,7 +26,7 @@ import {lowerCase,debounce} from 'lodash';
// import 'froala-editor/css/froala_style.min.css';
// import 'froala-editor/css/froala_editor.pkgd.min.css';
const $ = require("jquery");
require("froala-editor/js/froala_editor.pkgd.min.js")($);
// require("froala-editor/js/froala_editor.pkgd.min.js")($);
window.$ = window.jQuery = $;
// require("froala-editor/js/froala_editor.pkgd.min.js")($);
// require("froala-editor/js/plugins/code_view.min.js")($);
@@ -109,14 +109,14 @@ export default class Form extends React.Component {
async componentDidMount() {
console.log(this.props.match.params.id,'ini id params')
window.scrollTo(0, 0);
this.contentManagerStore.getTags();
// this.contentManagerStore.getTypes();
this.contentManagerStore.clearItems();
if(this.props.match.params.id){
this.contentManagerStore.getDetail(this.props.match.params.id).then(res => {
this.contentManagerStore.getDetail(this.props.match.params.id).then(res => {
console.log(this.contentManagerStore.selected.title,this.contentManagerStore.selected.content,'res detail')
let newArray = this.contentManagerStore.selected.additional_data.items.map(it => it);
let newTagsArray =this.contentManagerStore.selected.tags.map(it => it);
@@ -157,7 +157,7 @@ export default class Form extends React.Component {
// setTimeout(() => {
// $('.fr-wrapper').children[0].style.display = 'none';
// }, 1000);
}
handleModelChange = (model) => {
@@ -209,14 +209,14 @@ export default class Form extends React.Component {
.catch(err => {
this.globalUI.openSnackbar(err.message);
console.error(err, 'ini errornya');
});
}
};
deleteData = () => {
};
searchItem = ()=>{
@@ -245,10 +245,10 @@ export default class Form extends React.Component {
.catch(err => {
this.globalUI.openSnackbar(err.message);
console.error(err, 'ini errornya');
});
}
};
handleBackClose = () => {
@@ -314,7 +314,7 @@ export default class Form extends React.Component {
console.log("new fileList",newFileList);
this.setState({fileList : newFileList});
})
}
@@ -469,10 +469,10 @@ export default class Form extends React.Component {
}
}, () => {
console.log("value",this.state.formData.additional_data[key]);
console.log("value2",v);
console.log("key",key);
});
}
});
@@ -675,10 +675,10 @@ export default class Form extends React.Component {
)}
</div>
) : ('')}
{this.props.match.params.id ? (<ButtonAntd type={'primary'} style={{width: '100%', marginTop: 25}} onClick={this.handleOpen} icon={'save'}>Save</ButtonAntd>) : (<ButtonAntd type={'primary'} style={{width: '100%', marginTop: 25}} onClick={this.handleOpen} icon={'upload'}>Publish</ButtonAntd>)}
</div>
</Card>
</Affix>