gilberto.cancel 3 年前
父节点
当前提交
1592af12bf
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8
    2
      screens/main/StateTime.js

+ 8
- 2
screens/main/StateTime.js 查看文件

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