gilberto.cancel 2 年之前
父節點
當前提交
1592af12bf
共有 1 個文件被更改,包括 8 次插入2 次删除
  1. 8
    2
      screens/main/StateTime.js

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

@@ -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
+