Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dida Adams Arizona
Tia-dev
Commits
bfccd74d
Commit
bfccd74d
authored
Dec 07, 2020
by
faisalhamdi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
view only
parent
310e25f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
61 deletions
+87
-61
MonthlyReport.js
src/container/MonthlyReport.js
+1
-0
FixedAssetsMovementMR.js
src/container/MonthlyReport/FixedAssetsMovementMR.js
+86
-61
No files found.
src/container/MonthlyReport.js
View file @
bfccd74d
...
...
@@ -1159,6 +1159,7 @@ export default class MonthlyReport extends Component {
month
=
{
this
.
state
.
month
}
saveToMonthlyReport
=
{
this
.
saveToMonthlyReport
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleFAM
:
false
,
visibleMonthlyReport
:
true
})}
isApprover
=
{
this
.
state
.
isApprover
}
/
>
)}
{
this
.
state
.
visibleCAT
&&
(
...
...
src/container/MonthlyReport/FixedAssetsMovementMR.js
View file @
bfccd74d
...
...
@@ -45,7 +45,8 @@ export default class FixedAssetsMovementMR extends Component {
this.state = {
dataTable: [],
loading: true,
visibleFAMMR
:
true
visibleFAMMR: true,
updateBy: '-'
}
this.fileHandler = this.fileHandler.bind(this);
}
...
...
@@ -96,8 +97,8 @@ export default class FixedAssetsMovementMR extends Component {
"months": this.props.month.month_id
}
api.create().getHierarkiMontlyReportFAM(payload).then(response => {
console
.
log
(
payload
);
console
.
log
(
response
);
//
console.log(payload);
//
console.log(response);
let dataTable = []
if (response.data) {
if (response.data.status === 'success') {
...
...
@@ -321,7 +322,7 @@ export default class FixedAssetsMovementMR extends Component {
}
console.log(data);
api.create('UPLOAD').uploadMonthlyReportFAM(body).then(response => {
console
.
log
(
response
);
//
console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.props.onClickClose()
...
...
@@ -344,7 +345,7 @@ export default class FixedAssetsMovementMR extends Component {
backToMonthlyReport(type) {
this.setState({ loading: true })
console
.
log
(
this
.
state
.
dataTable
);
//
console.log(this.state.dataTable);
let data = []
this.state.dataTable.map(i => {
data.push({
...
...
@@ -373,7 +374,7 @@ export default class FixedAssetsMovementMR extends Component {
// console.log(JSON.stringify(payload));
api.create('UPLOAD').createMonthlyReportFAM(payload).then(response => {
console
.
log
(
response
);
//
console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.props.saveToMonthlyReport()
...
...
@@ -862,10 +863,11 @@ export default class FixedAssetsMovementMR extends Component {
control={
<NumberFormat
thousandSeparator={true}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.props.isApprover ? 'black' : "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled
=
{
false
}
disabled={
this.props.isApprover
}
value={Number(tableMeta.rowData[8]).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, 8)
...
...
@@ -1262,55 +1264,78 @@ export default class FixedAssetsMovementMR extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
<div style={{ width: '50%' }}>
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
this
.
downloadTemplate
()
}
>
<
img
src
=
{
Images
.
template
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"template"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
a
data
-
tip
=
{
'Upload'
}
data
-
for
=
"upload"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
this
.
setState
({
visibleUpload
:
true
})}
>
<
img
src
=
{
Images
.
upload
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"upload"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
downloadAllData
()
},
100
);
})}
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
{this.props.isApprover === true ?
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download'} data-for="download">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() =>
this.setState({ loading: true }, () => {
setTimeout(() => {
this.downloadAllData()
}, 100);
})}
>
<img src={Images.download} />
</button>
</a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
</div> :
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download Template'} data-for="template">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() => this.downloadTemplate() }
>
<img src={Images.template} />
</button>
</a>
<ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
<a data-tip={'Upload'} data-for="upload">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() => this.setState({ visibleUpload: true })}
>
<img src={Images.upload} />
</button>
</a>
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
<a data-tip={'Download'} data-for="download">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
margin: 5
}}
onClick={() =>
this.setState({ loading: true }, () => {
setTimeout(() => {
this.downloadAllData()
}, 100);
})}
>
<img src={Images.download} />
</button>
</a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
</div>
}
</div>
</div>
...
...
@@ -1348,8 +1373,9 @@ export default class FixedAssetsMovementMR extends Component {
</div>
</button>
</div>
{
/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
(this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === "draft" || this.props.status === 'submitted') ? */
}
{this.props.isApprover === true ?
<div className="col-2"></div>
:
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
className="button"
...
...
@@ -1420,8 +1446,7 @@ export default class FixedAssetsMovementMR extends Component {
</div>
</button>
</div>
{
/* : null
} */
}
}
</div>
</Paper> :
<Paper style={{ paddingTop: 10 }}>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment