gilberto.cancel 2 years ago
parent
commit
1592af12bf
1 changed files with 8 additions and 2 deletions
  1. 8
    2
      screens/main/StateTime.js

+ 8
- 2
screens/main/StateTime.js View File

@@ -165,12 +165,14 @@ export default class Time extends Component{
165 165
   else{
166 166
     const user = firebase.auth().currentUser
167 167
     const uid = user.uid
168
+    const username = this.state.username;
169
+    const I_username = this.state.I_username;
168 170
     const u_token = this.state.u_token;
169 171
     const i_token = this.state.i_token;
170 172
     const date = this.state.Appointment
171
-    const month = date.getMonth();
173
+    const month = date.getMonth() + 1;
174
+    console.log("Month: ", month)
172 175
     const day = date.getDate();
173
-    console.log("Date: ", day)
174 176
     const _time_ = selectedTime;
175 177
     const i_id = this.state.int2_id;
176 178
     console.log('Params: ')
@@ -178,6 +180,8 @@ export default class Time extends Component{
178 180
     firebase.firestore()
179 181
     .collection('APPOINTMENTS')
180 182
     .add({ 
183
+      User: username,
184
+      Interpreter: I_username,
181 185
       participantes: [
182 186
       i_id,
183 187
       uid, 
@@ -214,3 +218,5 @@ export default class Time extends Component{
214 218
     );
215 219
   }
216 220
 }
221
+
222
+