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
e14b3aca
Commit
e14b3aca
authored
Sep 07, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
senin siang
parent
af86ccde
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
337 additions
and
128 deletions
+337
-128
index.js
src/api/index.js
+5
-2
Images.js
src/assets/Images.js
+1
-0
failed.svg
src/assets/failed.svg
+19
-0
CreateParameter.js
src/container/MasterData/Parameter/CreateParameter.js
+2
-4
Parameter.js
src/container/MasterData/Parameter/Parameter.js
+94
-33
ReportItems.js
src/container/MasterData/ReportItems.js
+79
-66
UnitBisnis.js
src/container/MasterData/UnitBisnis.js
+89
-23
PopUpDelete.js
src/library/PopUpDelete.js
+48
-0
No files found.
src/api/index.js
View file @
e14b3aca
...
@@ -91,7 +91,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
...
@@ -91,7 +91,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
const
uploadUnitBisnis
=
(
body
)
=>
api
.
post
(
'/business_unit/import_business_unit'
,
body
)
const
uploadUnitBisnis
=
(
body
)
=>
api
.
post
(
'/business_unit/import_business_unit'
,
body
)
const
getUnitBisnisActive
=
()
=>
api
.
get
(
'business_unit/get_all_business_unit_active'
)
const
getUnitBisnisActive
=
()
=>
api
.
get
(
'business_unit/get_all_business_unit_active'
)
const
getDetailUnitBisnis
=
(
id
)
=>
api
.
get
(
`business_unit/get_business_unit_by_id/
${
id
}
`
)
const
getDetailUnitBisnis
=
(
id
)
=>
api
.
get
(
`business_unit/get_business_unit_by_id/
${
id
}
`
)
const
deleteUnitBisnis
=
(
id
)
=>
api
.
post
(
`business_unit/delete_business_unit/
${
id
}
`
)
// Perusahaan
// Perusahaan
const
getPerusahaan
=
()
=>
api
.
get
(
'company/get_all_company'
)
const
getPerusahaan
=
()
=>
api
.
get
(
'company/get_all_company'
)
...
@@ -154,6 +154,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
...
@@ -154,6 +154,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
const
checkUploadParameter
=
(
body
)
=>
api
.
post
(
'setting/check_import'
,
body
)
const
checkUploadParameter
=
(
body
)
=>
api
.
post
(
'setting/check_import'
,
body
)
const
uploadParameter
=
(
body
)
=>
api
.
post
(
'/setting/import_setting'
,
body
)
const
uploadParameter
=
(
body
)
=>
api
.
post
(
'/setting/import_setting'
,
body
)
const
searchParameter
=
(
body
)
=>
api
.
post
(
'setting/search_setting'
,
body
)
const
searchParameter
=
(
body
)
=>
api
.
post
(
'setting/search_setting'
,
body
)
const
deleteParameter
=
(
id
)
=>
api
.
post
(
`setting/delete_setting/
${
id
}
`
)
//Transaction
//Transaction
const
getReportTypeBody
=
(
body
)
=>
api
.
post
(
'transaction/get_all_report'
,
body
)
const
getReportTypeBody
=
(
body
)
=>
api
.
post
(
'transaction/get_all_report'
,
body
)
...
@@ -268,7 +269,9 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
...
@@ -268,7 +269,9 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
getPeriodeTransaction
,
getPeriodeTransaction
,
getRevision
,
getRevision
,
deleteAttachment
,
deleteAttachment
,
getDetailReportMB
getDetailReportMB
,
deleteUnitBisnis
,
deleteParameter
}
}
}
}
...
...
src/assets/Images.js
View file @
e14b3aca
...
@@ -44,6 +44,7 @@ const Images = {
...
@@ -44,6 +44,7 @@ const Images = {
logout
:
require
(
'./setting.png'
),
logout
:
require
(
'./setting.png'
),
setting
:
require
(
'./logout.png'
),
setting
:
require
(
'./logout.png'
),
failedCopy
:
require
(
'./failed-copy.svg'
),
failedCopy
:
require
(
'./failed-copy.svg'
),
failed
:
require
(
'./failed.svg'
),
triputraLogo
:
require
(
'./triputra-logo.png'
),
triputraLogo
:
require
(
'./triputra-logo.png'
),
photo
:
require
(
'./photo.svg'
),
photo
:
require
(
'./photo.svg'
),
camera
:
require
(
'./camera.svg'
),
camera
:
require
(
'./camera.svg'
),
...
...
src/assets/failed.svg
0 → 100644
View file @
e14b3aca
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"72"
height=
"72"
viewBox=
"0 0 72 72"
>
<g
fill=
"none"
fill-rule=
"evenodd"
>
<g>
<g>
<g>
<g
transform=
"translate(-685 -449) translate(420 393) translate(265 56)"
>
<circle
cx=
"36"
cy=
"36"
r=
"36"
fill=
"#ED8080"
/>
<path
fill=
"#FF3939"
d=
"M36 72c19.882 0 36-16.118 36-36S55.882 0 36 0"
/>
<circle
cx=
"35.95"
cy=
"35.95"
r=
"31.95"
fill=
"#FFF"
fill-rule=
"nonzero"
/>
<g
fill=
"#FF3939"
transform=
"translate(31 17)"
>
<rect
width=
"11"
height=
"24"
rx=
"3"
/>
<circle
cx=
"5.5"
cy=
"32.5"
r=
"5.5"
/>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
src/container/MasterData/Parameter/CreateParameter.js
View file @
e14b3aca
...
@@ -621,11 +621,10 @@ export default class CreateParameter extends Component {
...
@@ -621,11 +621,10 @@ export default class CreateParameter extends Component {
}}
}}
name
=
"value"
name
=
"value"
onChange
=
{(
e
)
=>
{
onChange
=
{(
e
)
=>
{
let
coba
=
String
(
e
.
target
.
value
).
replace
(
/
[^\d]
/g
,
''
);
this
.
setState
({
this
.
setState
({
tempData
:
{
tempData
:
{
...
this
.
state
.
tempData
,
...
this
.
state
.
tempData
,
value
:
coba
value
:
e
.
target
.
value
}
}
})
})
this
.
clearMessage
()
this
.
clearMessage
()
...
@@ -1006,9 +1005,8 @@ export default class CreateParameter extends Component {
...
@@ -1006,9 +1005,8 @@ export default class CreateParameter extends Component {
}}
}}
name
=
"value"
name
=
"value"
onChange
=
{(
e
)
=>
{
onChange
=
{(
e
)
=>
{
let
coba
=
String
(
e
.
target
.
value
).
replace
(
/
[^\d]
/g
,
''
);
this
.
setState
({
this
.
setState
({
value
:
coba
value
:
e
.
target
.
value
})
})
this
.
clearMessage
()
this
.
clearMessage
()
}
}
...
...
src/container/MasterData/Parameter/Parameter.js
View file @
e14b3aca
This diff is collapsed.
Click to expand it.
src/container/MasterData/ReportItems.js
View file @
e14b3aca
...
@@ -89,7 +89,7 @@ export default class ReportItems extends Component {
...
@@ -89,7 +89,7 @@ export default class ReportItems extends Component {
});
});
}
}
checkUpload
(){
checkUpload
()
{
api
.
create
().
checkUploadReportItems
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
checkUploadReportItems
(
this
.
state
.
payload
).
then
(
response
=>
{
console
.
log
(
response
)
console
.
log
(
response
)
let
dataRow
=
[]
let
dataRow
=
[]
...
@@ -513,7 +513,9 @@ export default class ReportItems extends Component {
...
@@ -513,7 +513,9 @@ export default class ReportItems extends Component {
let
listData
=
data
.
sort
((
a
,
b
)
=>
a
.
item_report_id
-
b
.
item_report_id
).
map
((
item
,
index
)
=>
{
let
listData
=
data
.
sort
((
a
,
b
)
=>
a
.
item_report_id
-
b
.
item_report_id
).
map
((
item
,
index
)
=>
{
return
[
index
,
item
.
item_report_id
,
item
.
report_name
,
item
.
company_name
,
item
.
order
,
item
.
description
,
item
.
parent
,
item
.
uom
,
item
.
weight
,
item
.
type_item_report_name
,
item
.
status
]
return
[
index
,
item
.
item_report_id
,
item
.
report_name
,
item
.
company_name
,
item
.
order
,
item
.
description
,
item
.
parent
,
item
.
uom
,
item
.
weight
,
item
.
type_item_report_name
,
item
.
status
]
})
})
this
.
setState
({
dataTable
:
listData
,
listData
:
response
.
data
.
data
})
this
.
setState
({
dataTable
:
listData
,
listData
:
response
.
data
.
data
},
()
=>
{
console
.
log
(
this
.
state
.
dataTable
);
})
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Token"
))
{
if
(
response
.
data
.
message
.
includes
(
"Token"
))
{
...
@@ -951,6 +953,17 @@ export default class ReportItems extends Component {
...
@@ -951,6 +953,17 @@ export default class ReportItems extends Component {
<
ReactTooltip
border
=
{
true
}
id
=
"tambah"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"tambah"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
25
}}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
theme
=
{
getMuiTheme
()}
data
=
{
this
.
state
.
dataTable
}
columns
=
{
columns
}
options
=
{
options
}
/
>
<
/MuiThemeProvider
>
<
/div
>
<
/div
>
<
/div
>
)
)
:
:
...
@@ -1049,7 +1062,7 @@ export default class ReportItems extends Component {
...
@@ -1049,7 +1062,7 @@ export default class ReportItems extends Component {
onUpload
=
{()
=>
{
onUpload
=
{()
=>
{
this
.
state
.
judul
===
"MASTER DATA - REPORT ITEMS"
?
this
.
state
.
judul
===
"MASTER DATA - REPORT ITEMS"
?
this
.
checkUpload
()
:
this
.
checkUpload
()
:
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
}}
}}
/
>
/
>
...
...
src/container/MasterData/UnitBisnis.js
View file @
e14b3aca
This diff is collapsed.
Click to expand it.
src/library/PopUpDelete.js
0 → 100644
View file @
e14b3aca
import
React
,
{
Component
}
from
'react'
;
import
Images
from
'../assets/Images'
;
import
{
Typography
}
from
'@material-ui/core'
;
export
default
class
PopUpDelete
extends
Component
{
render
()
{
return
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'center'
,
paddingTop
:
20
}}
>
<
img
src
=
{
Images
.
failed
}
/
>
<
/div
>
<
div
style
=
{{
display
:
'grid'
,
justifyContent
:
'center'
,
marginTop
:
20
,
paddingBottom
:
20
}}
>
<
span
style
=
{{
textAlign
:
'center'
,
fontSize
:
14
,
fontWeight
:
'bold'
,
fontFamily
:
'Nunito Sans, sans-serif'
}}
>
{
this
.
props
.
intent
===
'parameter'
?
`Delete [
${
this
.
props
.
rowData
[
2
]}
,
${
this
.
props
.
rowData
[
3
]}
,
${
this
.
props
.
rowData
[
4
]}
,
${
this
.
props
.
rowData
[
7
]
===
""
?
this
.
props
.
rowData
[
8
]
+
' + '
+
this
.
props
.
rowData
[
9
]
:
this
.
props
.
rowData
[
7
]}
]?`
:
`Delete
${
this
.
props
.
name
}
?`
}
<
/span
>
<
/div
>
<
div
className
=
"border-top grid grid-2x"
style
=
{{
height
:
56
,
backgroundColor
:
'#f5f5f5'
,
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
style
=
{{
alignSelf
:
'center'
}}
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Cancel
<
/span
>
<
/div
>
<
/button
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
alignItems
:
'center'
}}
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
props
.
onClickDelete
(
this
.
props
.
rowData
)}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
Delete
<
/span
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
}
}
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