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
80e2cf57
Commit
80e2cf57
authored
Jul 14, 2022
by
muhammad ridwan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixing v1
parent
58dc11d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
31 deletions
+31
-31
CarfmDocument.js
src/container/CRFM/CarfmDocument.js
+15
-15
CreateCarfmDoc.js
src/container/CRFM/CreateCarfmDoc.js
+16
-16
No files found.
src/container/CRFM/CarfmDocument.js
View file @
80e2cf57
...
...
@@ -26,7 +26,7 @@ export default class CarfmDocument extends Component {
load
:
false
,
name
:
''
,
userCompActive
:
[],
isHasAccessDocument
:
fals
e
,
isHasAccessDocument
:
tru
e
,
submenu_id
:
0
,
submenu_name
:
""
,
menu_title
:
""
...
...
@@ -38,8 +38,8 @@ export default class CarfmDocument extends Component {
// this.getPermission()
await
this
.
getMenuName
();
this
.
getDataCarfm
();
this
.
getDetailUser
();
await
this
.
getDataCarfm
();
await
this
.
getDetailUser
();
}
...
...
@@ -68,11 +68,11 @@ export default class CarfmDocument extends Component {
)
}
getDataCarfm
(
create
){
async
getDataCarfm
(
create
){
let
payload
=
{
submenu_id
:
this
.
state
.
submenu_id
}
api
.
create
().
getCarfmDocumentBySubmenu
(
payload
).
then
(
a
wait
a
pi
.
create
().
getCarfmDocumentBySubmenu
(
payload
).
then
(
response
=>
{
if
(
response
){
if
(
response
.
data
.
status
===
'success'
){
...
...
@@ -112,11 +112,11 @@ export default class CarfmDocument extends Component {
)
}
getPermission
(
subMenu
)
{
async
getPermission
(
subMenu
)
{
let
payload
=
{
menu
:
subMenu
}
api
.
create
().
getPermission
(
payload
).
then
(
response
=>
{
a
wait
a
pi
.
create
().
getPermission
(
payload
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
...
...
@@ -137,9 +137,9 @@ export default class CarfmDocument extends Component {
})
}
getDetailUser
()
{
async
getDetailUser
()
{
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
api
.
create
().
getDetailUser
(
userId
).
then
((
response
)
=>
{
a
wait
a
pi
.
create
().
getDetailUser
(
userId
).
then
((
response
)
=>
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
...
...
@@ -153,8 +153,8 @@ export default class CarfmDocument extends Component {
})
}
getCompanyActive
()
{
api
.
create
().
getPerusahaanActive
().
then
((
response
)
=>
{
async
getCompanyActive
()
{
a
wait
a
pi
.
create
().
getPerusahaanActive
().
then
((
response
)
=>
{
console
.
log
(
"getcompanyactive start"
);
console
.
log
(
response
);
console
.
log
(
"getcompanyactive stop"
);
...
...
@@ -198,13 +198,13 @@ export default class CarfmDocument extends Component {
})
}
createUploadDocument
()
{
async
createUploadDocument
()
{
this
.
setState
({
visibleCreate
:
false
,
konfirmasi
:
false
})
const
formData
=
this
.
state
.
formData
formData
.
append
(
"documentId"
,
this
.
state
.
docId
)
formData
.
append
(
"updated"
,
1
)
this
.
setState
({
loading
:
true
})
api
.
create
().
updateDocument
(
formData
).
then
(
response
=>
{
a
wait
a
pi
.
create
().
updateDocument
(
formData
).
then
(
response
=>
{
// console.log(response)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
...
...
@@ -230,9 +230,9 @@ export default class CarfmDocument extends Component {
})
}
createDocument
(
payload
)
{
//upload apinya disini
async
createDocument
(
payload
)
{
//upload apinya disini
this
.
setState
({
loading
:
true
})
api
.
create
().
uploadCarfmDocument
(
payload
).
then
(
response
=>
{
a
wait
a
pi
.
create
().
uploadCarfmDocument
(
payload
).
then
(
response
=>
{
// console.log(response)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
...
...
src/container/CRFM/CreateCarfmDoc.js
View file @
80e2cf57
...
...
@@ -53,21 +53,21 @@ export default class CreateCarfmDoc extends Component {
}
}
componentDidMount
()
{
this
.
getDataCompany
()
this
.
getPeriode
()
this
.
getMonth
()
this
.
getFileSize
()
this
.
getMenuNam
e
()
async
componentDidMount
()
{
await
this
.
getMenuName
()
await
this
.
getDataCompany
()
await
this
.
getPeriode
()
await
this
.
getMonth
()
await
this
.
getFileSiz
e
()
}
getFileSize
()
{
async
getFileSize
()
{
let
body
=
{
group
:
'MAX_FILE_SIZE'
,
company_id
:
0
,
type
:
'MAX_FILE_SIZE'
}
api
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
a
wait
a
pi
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
// console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
...
@@ -95,8 +95,8 @@ export default class CreateCarfmDoc extends Component {
})
}
getDataCompany
()
{
api
.
create
().
getPerusahaanUserActive
().
then
((
response
)
=>
{
async
getDataCompany
()
{
a
wait
a
pi
.
create
().
getPerusahaanUserActive
().
then
((
response
)
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
==
'success'
)
{
let
data
=
response
.
data
.
data
...
...
@@ -131,9 +131,9 @@ export default class CreateCarfmDoc extends Component {
})
}
getMenuName
(){
async
getMenuName
(){
api
.
create
().
getMenuByUser
().
then
(
a
wait
a
pi
.
create
().
getMenuByUser
().
then
(
response
=>
{
if
(
response
.
data
){
if
(
response
.
data
.
status
===
'success'
){
...
...
@@ -153,8 +153,8 @@ export default class CreateCarfmDoc extends Component {
)
}
getPeriode
()
{
api
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
async
getPeriode
()
{
a
wait
a
pi
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
let
dateNow
=
new
Date
let
year
=
format
(
dateNow
,
'yyyy'
)
if
(
response
.
data
)
{
...
...
@@ -185,8 +185,8 @@ export default class CreateCarfmDoc extends Component {
})
}
getMonth
()
{
api
.
create
().
getMonthTransaction
().
then
(
response
=>
{
async
getMonth
()
{
a
wait
a
pi
.
create
().
getMonthTransaction
().
then
(
response
=>
{
let
dateNow
=
new
Date
// let bulan = format(dateNow, 'MMMM')
if
(
response
.
data
)
{
...
...
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