-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtempcode.js
More file actions
69 lines (62 loc) · 1.75 KB
/
Copy pathtempcode.js
File metadata and controls
69 lines (62 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// ================= commonComponents ==================== //
// if(firebaseData.length > 0){
// checkingArray.
// checkingArray.forEach((currentId)=>{
// let res = arrDate.includes(currentId);
// firebaseData.forEach((child)=>{
// let dates = Object.keys(child.toJSON().Date);
// });
// console.log(arrDate,currentId,res);
//
// if(res){
// console.log('user exist');
// }else{
// console.log('user does not exist');
// }
// });
// arrDate.forEach((child)=>{
// let result = arrDate.includes(userId);
// console.log(child.key, userId,result);
// if(result){
// let dateArray = Object.keys(child.toJSON().Date);
// let res = dateArray.includes(currentDate);
// if(res){
// return console.log('date exist');
// }else{
// console.log('date not exist');
// return this._sendToFirebase(node);
// }
// }else{
// console.log('user not exist');
// return this._sendToFirebase(node);
// }
// });
// }else{
// return this._sendToFirebase(node);
// }
// console.log(this.state.dateTemp.toJSON().current_date);
// this.state.dateTemp.forEach((child)=>{
// let myData = child.toJSON().Date;
// console.log(Object.keys(myData));
// })
// RegisteryDateRef.on('value',(snap)=>{
// snap.forEach((child)=>{
// if(child.key == currentDate){
// this.setState({
// checkStatus:false,
// },()=>{
// return Toast.show({
// text: "Submitted!",
// position: "bottom",
// });
// });
// }else{
// this.setState({
// checkStatus:true,
// });
// }
// });
// if(this.state.checkStatus == true){
// return this._sendToFirebase(tempArr[i]);
// }
// });