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 { ...@@ -340,7 +340,7 @@ export default class Calendar extends Component {
//Validatios //Validatios
isValid1() { isValid1() {
const { title, } = this.state.event; const { title, } = this.state;
let valid = false; let valid = false;
if (title.length === 0) { if (title.length === 0) {
...@@ -470,8 +470,8 @@ export default class Calendar extends Component { ...@@ -470,8 +470,8 @@ export default class Calendar extends Component {
// alert(this.state.event.title) // alert(this.state.event.title)
const editEventData = { const editEventData = {
EventStatus: "Active", EventStatus: "Active",
Subject: this.state.event.title, Subject: this.state.title,
Id:this.state.event.Id, Id:this.state.Id,
StartTime: this.state.startDate, StartTime: this.state.startDate,
EndTime: this.state.targetDate, EndTime: this.state.targetDate,
Members: this.state.selectedItems, Members: this.state.selectedItems,
...@@ -480,8 +480,8 @@ export default class Calendar extends Component { ...@@ -480,8 +480,8 @@ export default class Calendar extends Component {
Location: this.state.location, Location: this.state.location,
} }
// alert(this.state.Menbers) // alert(this.state.Menbers)
alert(this.state.editEventData) // alert(this.state.editEventData)
// alert(JSON.stringify(editEventData));
// alert(JSON.stringify(addEventData)); // alert(JSON.stringify(addEventData));
log("Info", " addEpic(sprintId, cropcode) is used Modify the existing module"); log("Info", " addEpic(sprintId, cropcode) is used Modify the existing module");
...@@ -524,7 +524,7 @@ export default class Calendar extends Component { ...@@ -524,7 +524,7 @@ export default class Calendar extends Component {
}, },
body: JSON.stringify({ body: JSON.stringify({
current: editEventData, current: editEventData,
action: "InsertUpdate", action: "update",
// idea_id: idea_id, // idea_id: idea_id,
corp_code: cropcode, corp_code: cropcode,
...@@ -538,12 +538,12 @@ export default class Calendar extends Component { ...@@ -538,12 +538,12 @@ export default class Calendar extends Component {
.then((response) => response.json()) .then((response) => response.json())
.then((responseJson) => { .then((responseJson) => {
console.log(responseJson) console.log(responseJson)
// alert(JSON.stringify(responseJson)) alert(JSON.stringify(responseJson))
if (responseJson.status == 'True') { if (responseJson.status == 'True') {
this.setState({ open: false }); this.setState({ open: false });
this.setState({ this.setState({
itemPressedDisabled: false, itemPressedDisabled: false,
isVisible: !this.state.isVisible, // isVisible: !this.state.isVisible,
}) })
...@@ -654,8 +654,22 @@ export default class Calendar extends Component { ...@@ -654,8 +654,22 @@ export default class Calendar extends Component {
} }
_eventTapped(event) { _eventTapped(event) {
// alert((event.title)); // alert((event.title));
// this.setState({
// event: event,
// })
this.setState({ 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) this.setModalVisible(true)
} }
...@@ -731,11 +745,11 @@ export default class Calendar extends Component { ...@@ -731,11 +745,11 @@ export default class Calendar extends Component {
<Modal isVisible={modalVisible} style={this.state.event.status === 0 ? styles.mssize : styles.mbsize}> <Modal isVisible={modalVisible} style={this.state.event.status === 0 ? styles.mssize : styles.mbsize}>
<View style={{ backgroundColor: 'white', padding: 10 }}> <View style={{ backgroundColor: 'white', padding: 10 }}>
<View style={{ width: '100%', backgroundColor: '#00A2C1', padding: 2 }}> <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> </View>
<Text style={{ padding: 5 }}>{this.state.event.start}</Text> <Text style={{ padding: 5 }}>{this.state.start}</Text>
<Text style={{ paddingLeft: 5 }}>{this.state.event.summary}</Text> <Text style={{ paddingLeft: 5 }}>{this.state.summary}</Text>
<Text style={{ paddingLeft: 5, paddingTop: 5 }}>{this.state.event.Location}</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%' }} <TouchableOpacity style={{ padding: 5, backgroundColor: '#00A2C1', marginLeft: 8, borderRadius: 10, width: 50, left: '80%' }}
onPress={() => this.setModalVisible(!modalVisible)} onPress={() => this.setModalVisible(!modalVisible)}
...@@ -743,7 +757,7 @@ export default class Calendar extends Component { ...@@ -743,7 +757,7 @@ export default class Calendar extends Component {
<Text style={{ color: 'white', fontSize: 12 }}>CLOSE</Text> <Text style={{ color: 'white', fontSize: 12 }}>CLOSE</Text>
</TouchableOpacity> </TouchableOpacity>
{ {
this.state.event.status && this.state.status &&
<View> <View>
<View <View
style={{ style={{
...@@ -757,9 +771,15 @@ export default class Calendar extends Component { ...@@ -757,9 +771,15 @@ export default class Calendar extends Component {
<View style={{ marginLeft: 10, width: '100%', }}> <View style={{ marginLeft: 10, width: '100%', }}>
<Text style={{ color: 'red' }}>{this.state.error2}</Text> <Text style={{ color: 'red' }}>{this.state.error2}</Text>
<TextInput placeholder="Title" style={{ width: '90%', borderBottomWidth: 0.5, borderBottomColor: 'black' }} <TextInput placeholder="Title" style={{ width: '90%', borderBottomWidth: 0.5, borderBottomColor: 'black' }}
value={this.state.event.title} value={this.state.title}
onChangeText={(title) => this.setState({ title: title })}></TextInput> onChangeText={(text) => this.setState({title: text})}
>
</TextInput>
</View> </View>
...@@ -889,7 +909,7 @@ export default class Calendar extends Component { ...@@ -889,7 +909,7 @@ export default class Calendar extends Component {
<Text style={{ color: 'red' }}>{this.state.error2}</Text> <Text style={{ color: 'red' }}>{this.state.error2}</Text>
<TextInput placeholder="Description" style={{ width: '90%', borderBottomWidth: 0.5, borderBottomColor: 'black' }} <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> onChangeText={(eventdescription) => this.setState({ eventdescription: eventdescription })}></TextInput>
</View> </View>
......
...@@ -120,7 +120,7 @@ export default class App extends React.Component { ...@@ -120,7 +120,7 @@ export default class App extends React.Component {
<Image style={{ width: 400, height: 150 }} source={require('./Images/agile2.png')} /> <Image style={{ width: 400, height: 150 }} source={require('./Images/agile2.png')} />
<Text style={styles.text}>Powered by Novisync</Text> <Text style={styles.text}>Powered by Novisync</Text>
<Text></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> </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