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
0a3ec303
Commit
0a3ec303
authored
Jul 14, 2022
by
Arfin Syadziy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'env/ridwan' into 'ENV-DEV-CR-CAFRM'
Env/ridwan See merge request
!1584
parents
58dc11d4
38f4a6c6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
33 deletions
+33
-33
CarfmDocument.js
src/container/CRFM/CarfmDocument.js
+16
-16
CreateCarfmDoc.js
src/container/CRFM/CreateCarfmDoc.js
+17
-17
No files found.
src/container/CRFM/CarfmDocument.js
View file @
0a3ec303
...
...
@@ -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
)
{
...
...
@@ -310,7 +310,7 @@ export default class CarfmDocument extends Component {
<
div
style
=
{{
padding
:
20
}}
>
{
this
.
state
.
loading
&&
loadingComponent
&&
this
.
state
.
isHasAccessDocument
}
{
this
.
state
.
loading
&&
loadingComponent
}
<
Paper
style
=
{{
padding
:
20
}}
>
...
...
src/container/CRFM/CreateCarfmDoc.js
View file @
0a3ec303
...
...
@@ -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
)
{
...
...
@@ -491,10 +491,10 @@ export default class CreateCarfmDoc extends Component {
type
=
"button"
onClick
=
{()
=>
{
this
.
props
.
handleLoading
(
1
);
this
.
setState
({
saveDisable
:
true
});
this
.
props
.
handleLoading
(
1
);
setTimeout
(()
=>
{
this
.
validasi
()
console
.
log
(
"vlidasi "
+
this
.
validasi
());
...
...
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