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
681e5ded
Commit
681e5ded
authored
Jul 14, 2022
by
muhammad ridwan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfixing v5
parent
e8467239
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
CarfmDocument.js
src/container/CRFM/CarfmDocument.js
+1
-1
CreateCarfmDoc.js
src/container/CRFM/CreateCarfmDoc.js
+8
-7
No files found.
src/container/CRFM/CarfmDocument.js
View file @
681e5ded
...
...
@@ -208,7 +208,7 @@ export default class CarfmDocument extends Component {
this
.
getDataCarfm
(
'create'
)
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
this
.
setState
({
visibleCreate
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
...
...
src/container/CRFM/CreateCarfmDoc.js
View file @
681e5ded
...
...
@@ -19,7 +19,6 @@ export default class CreateCarfmDoc extends Component {
super
(
props
)
this
.
state
=
{
perusahaan
:
null
,
perusahaanData
:
null
,
getPerusahaan
:
null
,
errorPerusahaan
:
false
,
msgErrorPerusahaan
:
''
,
...
...
@@ -47,7 +46,8 @@ export default class CreateCarfmDoc extends Component {
docId
:
''
,
sizeUpload
:
"1"
,
menuName
:
null
,
saveDisable
:
false
saveDisable
:
false
,
submitVal
:
0
}
}
...
...
@@ -109,10 +109,10 @@ export default class CreateCarfmDoc extends Component {
// company_name: 'Default'
// })
let
typeProps
=
{
options
:
typeData
.
sort
((
a
,
b
)
=>
a
.
company_name
-
b
.
company_name
),
options
:
typeData
.
sort
((
a
,
b
)
=>
a
.
company_name
.
localeCompare
(
b
.
company_name
)
),
getOptionLabel
:
(
option
)
=>
option
.
company_name
,
};
this
.
setState
({
perusahaan
:
typeProps
,
perusahaanData
:
response
.
data
.
data
}
)
this
.
setState
({
perusahaan
:
typeProps
},
()
=>
console
.
log
(
this
.
state
.
perusahaan
)
)
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
...
...
@@ -259,7 +259,7 @@ export default class CreateCarfmDoc extends Component {
}
else
if
(
R
.
isNil
(
this
.
state
.
file
))
{
this
.
setState
({
alert
:
true
,
messageAlert
:
'File Cannot be Empty'
,
tipeAlert
:
'warning'
,
saveDisable
:
false
})
}
else
{
}
else
if
(
this
.
state
.
submitVal
===
1
)
{
const
formData
=
new
FormData
();
formData
.
append
(
"file"
,
this
.
state
.
file
);
formData
.
append
(
"companyId"
,
this
.
state
.
getPerusahaan
.
company_id
);
...
...
@@ -460,8 +460,9 @@ export default class CreateCarfmDoc extends Component {
onClick
=
{()
=>
{
this
.
setState
({
saveDisable
:
true
});
saveDisable
:
true
,
submitVal
:
this
.
state
.
submitVal
+
1
},
console
.
log
());
this
.
props
.
handleLoading
(
1
);
setTimeout
(()
=>
{
...
...
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