Commit 114f58ab authored by Riri Novita's avatar Riri Novita

apdet pl

parent 98d66391
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -274,28 +274,28 @@ export default class ProfitLossROO extends Component { ...@@ -274,28 +274,28 @@ export default class ProfitLossROO extends Component {
res.map((item, index) => { res.map((item, index) => {
dataTable.push([ dataTable.push([
item.type_report_id, item.type_report_id,
item.id, item.id,
item.parent, item.parent,
item.formula, item.formula,
item.level, item.level,
item.description, item.description,
item.profit_loss.notes, item.profit_loss.notes,
item.profit_loss.last_year_total === "" ? "0" : item.profit_loss.last_year_total, item.profit_loss.last_year_total === "" ? "0" : item.profit_loss.last_year_total,
item.profit_loss.january === "" ? "0" : item.profit_loss.january, item.profit_loss.january === "" ? "0" : item.profit_loss.january,
item.profit_loss.february === "" ? "0" : item.profit_loss.february, item.profit_loss.february === "" ? "0" : item.profit_loss.february,
item.profit_loss.march === "" ? "0" : item.profit_loss.march, item.profit_loss.march === "" ? "0" : item.profit_loss.march,
item.profit_loss.april === "" ? "0" : item.profit_loss.april, item.profit_loss.april === "" ? "0" : item.profit_loss.april,
item.profit_loss.may === "" ? "0" : item.profit_loss.may, item.profit_loss.may === "" ? "0" : item.profit_loss.may,
item.profit_loss.june === "" ? "0" : item.profit_loss.june, item.profit_loss.june === "" ? "0" : item.profit_loss.june,
item.profit_loss.july === "" ? "0" : item.profit_loss.july, item.profit_loss.july === "" ? "0" : item.profit_loss.july,
item.profit_loss.august === "" ? "0" : item.profit_loss.august, item.profit_loss.august === "" ? "0" : item.profit_loss.august,
item.profit_loss.september === "" ? "0" : item.profit_loss.september, item.profit_loss.september === "" ? "0" : item.profit_loss.september,
item.profit_loss.october === "" ? "0" : item.profit_loss.october, item.profit_loss.october === "" ? "0" : item.profit_loss.october,
item.profit_loss.november === "" ? "0" : item.profit_loss.november, item.profit_loss.november === "" ? "0" : item.profit_loss.november,
item.profit_loss.december === "" ? "0" : item.profit_loss.december, item.profit_loss.december === "" ? "0" : item.profit_loss.december,
item.profit_loss.current_year_total === "" ? "0" : item.profit_loss.current_year_total, item.profit_loss.current_year_total === "" ? "0" : item.profit_loss.current_year_total,
item.profit_loss.actual_formula === "" ? "0" : item.profit_loss.actual_formula, item.profit_loss.actual_formula === "" ? "0" : item.profit_loss.actual_formula,
item.order, item.order,
]) ])
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
...@@ -629,7 +629,7 @@ export default class ProfitLossROO extends Component { ...@@ -629,7 +629,7 @@ export default class ProfitLossROO extends Component {
// if (response.data) { // if (response.data) {
// if (response.data.status === "success") { // if (response.data.status === "success") {
// if (response.data.data.result && err === false) { // if (response.data.data.result && err === false) {
this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false }) this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false })
// } else { // } else {
// this.setState({ loading: false, buttonError: true, editable: true, saveDraft: false }) // this.setState({ loading: false, buttonError: true, editable: true, saveDraft: false })
// } // }
...@@ -856,7 +856,16 @@ export default class ProfitLossROO extends Component { ...@@ -856,7 +856,16 @@ export default class ProfitLossROO extends Component {
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 4 ? null : tableMeta.rowData[4] === 0 ? null : tableMeta.rowData[4] === 1 ? null : {tableMeta.rowData[0] === 4 ? null : tableMeta.rowData[4] === 0 ? null : tableMeta.rowData[4] === 1 ? null :
this.state.get_for == 'view' ? value : this.state.get_for == 'view' ?
<Input
disableUnderline={true}
style={{ fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
defaultValue={value}
/>
:
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
// value={value} // value={value}
...@@ -2414,27 +2423,27 @@ export default class ProfitLossROO extends Component { ...@@ -2414,27 +2423,27 @@ export default class ProfitLossROO extends Component {
<div className="col-2"> <div className="col-2">
</div> : </div> :
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 5 }}> <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 5 }}>
{this.state.get_for == 'view' && this.state.viewOnly && {this.state.get_for == 'view' && this.state.viewOnly &&
<button <button
className="button" className="button"
type="button" type="button"
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
marginRight: 20 marginRight: 20
}} }}
onClick={() => { onClick={() => {
this.setState({ loading: true, refresh: true }, () => { this.setState({ loading: true, refresh: true }, () => {
this.handleGetFor('edit') this.handleGetFor('edit')
}) })
}} }}
> >
<div style={{ backgroundColor: '#fff', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960' }}> <div style={{ backgroundColor: '#fff', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960' }}>
<Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Edit</Typography> <Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Edit</Typography>
</div> </div>
</button>} </button>}
{this.state.get_for == 'edit' && <button {this.state.get_for == 'edit' && <button
className="button" className="button"
type="button" type="button"
......
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