Commit b99a2342 authored by tejaswi's avatar tejaswi
Browse files

Edit event done

1 merge request!1WIP: Resolve "Calendar"
Showing with 38 additions and 18 deletions
+38 -18
......@@ -340,7 +340,7 @@ export default class Calendar extends Component {
//Validatios
isValid1() {
const { title, } = this.state.event;
const { title, } = this.state;
let valid = false;
if (title.length === 0) {
......@@ -470,8 +470,8 @@ export default class Calendar extends Component {
// alert(this.state.event.title)
const editEventData = {
EventStatus: "Active",
Subject: this.state.event.title,
Id:this.state.event.Id,
Subject: this.state.title,
Id:this.state.Id,
StartTime: this.state.startDate,
EndTime: this.state.targetDate,
Members: this.state.selectedItems,
......@@ -480,8 +480,8 @@ export default class Calendar extends Component {
Location: this.state.location,
}
// alert(this.state.Menbers)
alert(this.state.editEventData)
// alert(this.state.editEventData)
// alert(JSON.stringify(editEventData));
// alert(JSON.stringify(addEventData));
log("Info", " addEpic(sprintId, cropcode) is used Modify the existing module");
......@@ -524,7 +524,7 @@ export default class Calendar extends Component {
},
body: JSON.stringify({
current: editEventData,
action: "InsertUpdate",
action: "update",
// idea_id: idea_id,
corp_code: cropcode,
......@@ -538,12 +538,12 @@ 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,
// isVisible: !this.state.isVisible,
})
......@@ -654,8 +654,22 @@ export default class Calendar extends Component {
}
_eventTapped(event) {
// alert((event.title));
// this.setState({
// event: event,
// })
this.setState({
event: event
title: event.title,
start: event.start,
end: event.end,
summary:event.summary,
status:event.status,
eventdescription:event.eventdescription,
Id:event.Id,
Location:event.Location
})
this.setModalVisible(true)
}
......@@ -731,11 +745,11 @@ export default class Calendar extends Component {
<Modal isVisible={modalVisible} style={this.state.event.status === 0 ? styles.mssize : styles.mbsize}>
<View style={{ backgroundColor: 'white', padding: 10 }}>
<View style={{ width: '100%', backgroundColor: '#00A2C1', padding: 2 }}>
<Text style={{ color: 'white', fontSize: 16 }}>{this.state.event.title}</Text>
<Text style={{ color: 'white', fontSize: 16 }}>{this.state.title}</Text>
</View>
<Text style={{ padding: 5 }}>{this.state.event.start}</Text>
<Text style={{ paddingLeft: 5 }}>{this.state.event.summary}</Text>
<Text style={{ paddingLeft: 5, paddingTop: 5 }}>{this.state.event.Location}</Text>
<Text style={{ padding: 5 }}>{this.state.start}</Text>
<Text style={{ paddingLeft: 5 }}>{this.state.summary}</Text>
<Text style={{ paddingLeft: 5, paddingTop: 5 }}>{this.state.Location}</Text>
<TouchableOpacity style={{ padding: 5, backgroundColor: '#00A2C1', marginLeft: 8, borderRadius: 10, width: 50, left: '80%' }}
onPress={() => this.setModalVisible(!modalVisible)}
......@@ -743,7 +757,7 @@ export default class Calendar extends Component {
<Text style={{ color: 'white', fontSize: 12 }}>CLOSE</Text>
</TouchableOpacity>
{
this.state.event.status &&
this.state.status &&
<View>
<View
style={{
......@@ -757,9 +771,15 @@ export default class Calendar extends Component {
<View style={{ marginLeft: 10, width: '100%', }}>
<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={(title) => this.setState({ title: title })}></TextInput>
value={this.state.title}
onChangeText={(text) => this.setState({title: text})}
>
</TextInput>
</View>
......@@ -889,7 +909,7 @@ export default class Calendar extends Component {
<Text style={{ color: 'red' }}>{this.state.error2}</Text>
<TextInput placeholder="Description" style={{ width: '90%', borderBottomWidth: 0.5, borderBottomColor: 'black' }}
value={this.state.event.eventdescription}
value={this.state.eventdescription}
onChangeText={(eventdescription) => this.setState({ eventdescription: eventdescription })}></TextInput>
</View>
......
......@@ -120,7 +120,7 @@ export default class App extends React.Component {
<Image style={{ width: 400, height: 150 }} source={require('./Images/agile2.png')} />
<Text style={styles.text}>Powered by Novisync</Text>
<Text></Text>
<Text style={styles.text1}>1.0.1 13-09-2021</Text>
<Text style={styles.text1}>1.0.1 15-09-2021</Text>
</View>
);
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment