Proyectos de Subversion Iphone Microlearning - Inconcert

Rev

Rev 2 | Rev 19 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 2 Rev 4
Línea 116... Línea 116...
116
                            .font(.body)
116
                            .font(.body)
117
                            .foregroundColor(Color("color_textview_foreground"))
117
                            .foregroundColor(Color("color_textview_foreground"))
118
                    }.padding()
118
                    }.padding()
119
                }.background(Color("color_card_view_background"))
119
                }.background(Color("color_card_view_background"))
Línea -... Línea 120...
-
 
120
                
120
                
121
          
121
                Group {
-
 
122
                    VStack(spacing: 0)
-
 
123
                    {
122
                HStack {
124
                        Text(Config.LANG_DELETE_ACCOUNT_MESSAGE)
123
                        Text(Config.LANG_DELETE_ACCOUNT_MESSAGE)
125
                        .font(Font.custom(Config.FONT_NAME_REGULAR, size: 16))
124
                        .font(Font.custom(Config.FONT_NAME_REGULAR, size: 12))
126
                        .foregroundColor(Color("color_textview_foreground"))
-
 
-
 
125
                        .foregroundColor(Color("color_textview_foreground"))
-
 
126
                        
127
                        .padding(.horizontal, 16)
127
 
128
                        .padding(.top, 20)
-
 
129
                    }
128
                }.padding(.top, 20)
-
 
129
                .padding(.horizontal, 16)
Línea 130... Línea 130...
130
                }.padding(.top, 30)
130
                
131
 
131
 
132
                HStack {
132
                HStack {
133
                    Text(Config.LANG_DELETE_ACCOUNT_FIELD_CODE_LABEL)
133
                    Text(Config.LANG_DELETE_ACCOUNT_FIELD_CODE_LABEL)
Línea 163... Línea 163...
163
 
163
 
164
                if self.code.count != 8 {
164
                if self.code.count != 8 {
165
                    HStack {
165
                    HStack {
Línea 166... Línea 166...
166
                        Spacer()
166
                        Spacer()
167
                     
167
                     
168
                        Text(Config.LANG_ERROR_ACCOUNT_DELETE_CODE_IS_EMPTY_TITLE)
168
                        Text(Config.LANG_DELETE_ACCOUNTCODE_IS_WRONG_MESSAGE)
Línea 169... Línea 169...
169
                        .foregroundColor(.red)
169
                        .foregroundColor(.red)
170
                            .font(Font.custom(Config.FONT_NAME_REGULAR, size: 11))
170
                            .font(Font.custom(Config.FONT_NAME_REGULAR, size: 11))
Línea 219... Línea 219...
219
    }
219
    }
Línea 220... Línea 220...
220
    
220
    
221
    func sendCode() -> Void
221
    func sendCode() -> Void
222
    {
222
    {
223
        if code.isEmpty || code.count != 8 {
-
 
224
            self.titleAlert = Config.LANG_ERROR_ACCOUNT_DELETE_CODE_IS_EMPTY_TITLE
-
 
225
            self.messageAlert = Config.LANG_ERROR_ACCOUNT_DELETE_CODE_IS_EMPTY_MESSAGE
-
 
-
 
223
        if code.isEmpty || code.count != 8 {
226
            self.presentAlert = true
224
 
227
            return;
225
            return;
Línea 228... Línea 226...
228
        }
226
        }
229
        
227
        
230
        
228
        
Línea 231... Línea 229...
231
        
229
        
232
        let parameters = [
230
        let parameters = [
Línea 267... Línea 265...
267
                                    
265
                                    
268
                                    appNavigation.pageActive = .goodbyedeleteaccount
266
                                    appNavigation.pageActive = .goodbyedeleteaccount
269
                                }
267
                                }
270
                            }
268
                            }
271
                    } else {
-
 
-
 
269
                    } else {
272
                    
270
                        self.code = ""
273
                        let message = json?["data"].string ?? ""
271
                        let message = json?["data"]["message"].string ?? ""
274
                        if !message.isEmpty {
272
                        if !message.isEmpty {
275
                            self.titleAlert = Config.LANG_ERROR_GENERIC_TITLE
273
                            self.titleAlert = Config.LANG_ERROR_GENERIC_TITLE
276
                            self.messageAlert = message
274
                            self.messageAlert = message
277
                            self.presentAlert = true
275
                            self.presentAlert = true
Línea 307... Línea 305...
307
            self.showProgressView = false
305
            self.showProgressView = false
308
            switch response.result {
306
            switch response.result {
309
                case .success:
307
                case .success:
310
                    let json = try? JSON(data: response.data!)
308
                    let json = try? JSON(data: response.data!)
Línea 311... Línea 309...
311
          
309
          
312
                    let message = json?["data"].string ?? ""
310
                    let message = json?["data"]["message"].string ?? ""
313
                    if !message.isEmpty {
-
 
-
 
311
                    if !message.isEmpty {
314
                        self.titleAlert = Config.LANG_ERROR_GENERIC_TITLE
312
                        
315
                        self.messageAlert = message
313
                        let snackbar =  TTGSnackbar(message: message, duration: .long);
316
                        self.presentAlert = true
314
                        snackbar.show()
Línea 317... Línea 315...
317
                    }
315
                    }
Línea 318... Línea 316...
318
            
316