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 {
...
@@ -26,7 +26,7 @@ export default class CarfmDocument extends Component {
load
:
false
,
load
:
false
,
name
:
''
,
name
:
''
,
userCompActive
:
[],
userCompActive
:
[],
isHasAccessDocument
:
fals
e
,
isHasAccessDocument
:
tru
e
,
submenu_id
:
0
,
submenu_id
:
0
,
submenu_name
:
""
,
submenu_name
:
""
,
menu_title
:
""
menu_title
:
""
...
@@ -38,8 +38,8 @@ export default class CarfmDocument extends Component {
...
@@ -38,8 +38,8 @@ export default class CarfmDocument extends Component {
// this.getPermission()
// this.getPermission()
await
this
.
getMenuName
();
await
this
.
getMenuName
();
this
.
getDataCarfm
();
await
this
.
getDataCarfm
();
this
.
getDetailUser
();
await
this
.
getDetailUser
();
}
}
...
@@ -68,11 +68,11 @@ export default class CarfmDocument extends Component {
...
@@ -68,11 +68,11 @@ export default class CarfmDocument extends Component {
)
)
}
}
getDataCarfm
(
create
){
async
getDataCarfm
(
create
){
let
payload
=
{
let
payload
=
{
submenu_id
:
this
.
state
.
submenu_id
submenu_id
:
this
.
state
.
submenu_id
}
}
api
.
create
().
getCarfmDocumentBySubmenu
(
payload
).
then
(
a
wait
a
pi
.
create
().
getCarfmDocumentBySubmenu
(
payload
).
then
(
response
=>
{
response
=>
{
if
(
response
){
if
(
response
){
if
(
response
.
data
.
status
===
'success'
){
if
(
response
.
data
.
status
===
'success'
){
...
@@ -112,11 +112,11 @@ export default class CarfmDocument extends Component {
...
@@ -112,11 +112,11 @@ export default class CarfmDocument extends Component {
)
)
}
}
getPermission
(
subMenu
)
{
async
getPermission
(
subMenu
)
{
let
payload
=
{
let
payload
=
{
menu
:
subMenu
menu
:
subMenu
}
}
api
.
create
().
getPermission
(
payload
).
then
(
response
=>
{
a
wait
a
pi
.
create
().
getPermission
(
payload
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
this
.
setState
({
...
@@ -137,9 +137,9 @@ export default class CarfmDocument extends Component {
...
@@ -137,9 +137,9 @@ export default class CarfmDocument extends Component {
})
})
}
}
getDetailUser
()
{
async
getDetailUser
()
{
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
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
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
...
@@ -153,8 +153,8 @@ export default class CarfmDocument extends Component {
...
@@ -153,8 +153,8 @@ export default class CarfmDocument extends Component {
})
})
}
}
getCompanyActive
()
{
async
getCompanyActive
()
{
api
.
create
().
getPerusahaanActive
().
then
((
response
)
=>
{
a
wait
a
pi
.
create
().
getPerusahaanActive
().
then
((
response
)
=>
{
console
.
log
(
"getcompanyactive start"
);
console
.
log
(
"getcompanyactive start"
);
console
.
log
(
response
);
console
.
log
(
response
);
console
.
log
(
"getcompanyactive stop"
);
console
.
log
(
"getcompanyactive stop"
);
...
@@ -198,13 +198,13 @@ export default class CarfmDocument extends Component {
...
@@ -198,13 +198,13 @@ export default class CarfmDocument extends Component {
})
})
}
}
createUploadDocument
()
{
async
createUploadDocument
()
{
this
.
setState
({
visibleCreate
:
false
,
konfirmasi
:
false
})
this
.
setState
({
visibleCreate
:
false
,
konfirmasi
:
false
})
const
formData
=
this
.
state
.
formData
const
formData
=
this
.
state
.
formData
formData
.
append
(
"documentId"
,
this
.
state
.
docId
)
formData
.
append
(
"documentId"
,
this
.
state
.
docId
)
formData
.
append
(
"updated"
,
1
)
formData
.
append
(
"updated"
,
1
)
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
api
.
create
().
updateDocument
(
formData
).
then
(
response
=>
{
a
wait
a
pi
.
create
().
updateDocument
(
formData
).
then
(
response
=>
{
// console.log(response)
// console.log(response)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
...
@@ -230,9 +230,9 @@ export default class CarfmDocument extends Component {
...
@@ -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
})
this
.
setState
({
loading
:
true
})
api
.
create
().
uploadCarfmDocument
(
payload
).
then
(
response
=>
{
a
wait
a
pi
.
create
().
uploadCarfmDocument
(
payload
).
then
(
response
=>
{
// console.log(response)
// console.log(response)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
...
...
src/container/CRFM/CreateCarfmDoc.js
View file @
80e2cf57
...
@@ -53,21 +53,21 @@ export default class CreateCarfmDoc extends Component {
...
@@ -53,21 +53,21 @@ export default class CreateCarfmDoc extends Component {
}
}
}
}
componentDidMount
()
{
async
componentDidMount
()
{
this
.
getDataCompany
()
await
this
.
getMenuName
()
this
.
getPeriode
()
await
this
.
getDataCompany
()
this
.
getMonth
()
await
this
.
getPeriode
()
this
.
getFileSize
()
await
this
.
getMonth
()
this
.
getMenuNam
e
()
await
this
.
getFileSiz
e
()
}
}
getFileSize
()
{
async
getFileSize
()
{
let
body
=
{
let
body
=
{
group
:
'MAX_FILE_SIZE'
,
group
:
'MAX_FILE_SIZE'
,
company_id
:
0
,
company_id
:
0
,
type
:
'MAX_FILE_SIZE'
type
:
'MAX_FILE_SIZE'
}
}
api
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
a
wait
a
pi
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
// console.log(response);
// console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
@@ -95,8 +95,8 @@ export default class CreateCarfmDoc extends Component {
...
@@ -95,8 +95,8 @@ export default class CreateCarfmDoc extends Component {
})
})
}
}
getDataCompany
()
{
async
getDataCompany
()
{
api
.
create
().
getPerusahaanUserActive
().
then
((
response
)
=>
{
a
wait
a
pi
.
create
().
getPerusahaanUserActive
().
then
((
response
)
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
...
@@ -131,9 +131,9 @@ export default class CreateCarfmDoc extends Component {
...
@@ -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
=>
{
response
=>
{
if
(
response
.
data
){
if
(
response
.
data
){
if
(
response
.
data
.
status
===
'success'
){
if
(
response
.
data
.
status
===
'success'
){
...
@@ -153,8 +153,8 @@ export default class CreateCarfmDoc extends Component {
...
@@ -153,8 +153,8 @@ export default class CreateCarfmDoc extends Component {
)
)
}
}
getPeriode
()
{
async
getPeriode
()
{
api
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
a
wait
a
pi
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
let
dateNow
=
new
Date
let
dateNow
=
new
Date
let
year
=
format
(
dateNow
,
'yyyy'
)
let
year
=
format
(
dateNow
,
'yyyy'
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
...
@@ -185,8 +185,8 @@ export default class CreateCarfmDoc extends Component {
...
@@ -185,8 +185,8 @@ export default class CreateCarfmDoc extends Component {
})
})
}
}
getMonth
()
{
async
getMonth
()
{
api
.
create
().
getMonthTransaction
().
then
(
response
=>
{
a
wait
a
pi
.
create
().
getMonthTransaction
().
then
(
response
=>
{
let
dateNow
=
new
Date
let
dateNow
=
new
Date
// let bulan = format(dateNow, 'MMMM')
// let bulan = format(dateNow, 'MMMM')
if
(
response
.
data
)
{
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