Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Santhosh
Agile24X7-Mobile-singledb
Commits
a356718d
Commit
a356718d
authored
3 years ago
by
tejaswi
Browse files
Options
Download
Email Patches
Plain Diff
Changes
parent
4c0f0a25
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/UserComponents/Calendar/Calendar.js
+30
-13
src/UserComponents/Calendar/Calendar.js
with
30 additions
and
13 deletions
+30
-13
src/UserComponents/Calendar/Calendar.js
View file @
a356718d
...
...
@@ -59,6 +59,8 @@ export default class Calendar extends Component {
addEventData
:
[],
selectedItems
:
[],
title
:
''
,
Description
:
''
,
editEventData
:[]
};
this
.
eventsData
();
}
...
...
@@ -336,6 +338,23 @@ export default class Calendar extends Component {
return
valid
;
}
//Validatios
isValid1
()
{
const
{
title
,
}
=
this
.
state
.
event
;
let
valid
=
false
;
if
(
title
.
length
===
0
)
{
log
(
"
Warn
"
,
"
Enter Title
"
);
this
.
setState
({
error1
:
'
Enter Title
'
});
}
else
{
valid
=
true
;
}
return
valid
;
}
//Add event
addEvent
()
{
// alert(this.state.assignedto)
...
...
@@ -448,9 +467,10 @@ export default class Calendar extends Component {
//Modify the event
editEvent
()
{
// alert(this.state.event.Id)
const
addEventData
=
{
// alert(this.state.event.title)
const
editEventData
=
{
EventStatus
:
"
Active
"
,
Subject
:
this
.
state
.
title
,
Subject
:
this
.
state
.
event
.
title
,
Id
:
this
.
state
.
event
.
Id
,
StartTime
:
this
.
state
.
startDate
,
EndTime
:
this
.
state
.
targetDate
,
...
...
@@ -460,7 +480,8 @@ export default class Calendar extends Component {
Location
:
this
.
state
.
location
,
}
// alert(this.state.Menbers)
alert
(
this
.
state
.
Subject
)
alert
(
this
.
state
.
editEventData
)
// alert(JSON.stringify(addEventData));
log
(
"
Info
"
,
"
addEpic(sprintId, cropcode) is used Modify the existing module
"
);
...
...
@@ -492,7 +513,7 @@ export default class Calendar extends Component {
// alert("Target Date shouild not exceed Sprint target date");
// }
else
{
if
(
this
.
isValid
())
{
if
(
this
.
isValid
1
())
{
this
.
setState
({
itemPressedDisabled
:
true
})
fetch
(
API
+
'
calendar.php
'
,
{
...
...
@@ -502,8 +523,8 @@ export default class Calendar extends Component {
'
Content-Type
'
:
'
application/json
'
,
},
body
:
JSON
.
stringify
({
current
:
add
EventData
,
action
:
"
EditOccurrenc
e
"
,
current
:
edit
EventData
,
action
:
"
InsertUpdat
e
"
,
// idea_id: idea_id,
corp_code
:
cropcode
,
...
...
@@ -517,17 +538,13 @@ export default class Calendar extends Component {
.
then
((
response
)
=>
response
.
json
())
.
then
((
responseJson
)
=>
{
console
.
log
(
responseJson
)
alert
(
JSON
.
stringify
(
responseJson
))
//
alert(JSON.stringify(responseJson))
if
(
responseJson
.
status
==
'
True
'
)
{
this
.
setState
({
open
:
false
});
this
.
setState
({
itemPressedDisabled
:
false
,
isVisible
:
!
this
.
state
.
isVisible
,
title
:
''
,
location
:
''
,
startDate
:
''
,
targetDate
:
''
,
eventdescription
:
''
,
})
//Navigate to AddModule screen
...
...
@@ -742,7 +759,7 @@ export default class Calendar extends Component {
<
Text
style
=
{{
color
:
'
red
'
}}
>
{
this
.
state
.
error2
}
<
/Text
>
<
TextInput
placeholder
=
"
Title
"
style
=
{{
width
:
'
90%
'
,
borderBottomWidth
:
0.5
,
borderBottomColor
:
'
black
'
}}
value
=
{
this
.
state
.
event
.
title
}
onChangeText
=
{(
t
ext
)
=>
this
.
setState
({
title
:
t
ext
})}
><
/TextInput
>
onChangeText
=
{(
t
itle
)
=>
this
.
setState
({
title
:
t
itle
})}
><
/TextInput
>
<
/View
>
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help