Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

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

Rev 9 Rev 11
Línea 19... Línea 19...
19
    @State private var messageGlobalAlert : String = ""
19
    @State private var messageGlobalAlert : String = ""
Línea 20... Línea 20...
20
    
20
    
Línea 21... Línea -...
21
    
-
 
22
    private var userExtendedPointViewModel : UserExtendedPointViewModel = UserExtendedPointViewModel()
21
    
-
 
22
    private var userExtendedPointViewModel : UserExtendedPointViewModel = UserExtendedPointViewModel()
Línea -... Línea 23...
-
 
23
 
-
 
24
    private let appDao = AppDao.sharedInstance
-
 
25
    private let appData : AppModel
Línea 23... Línea 26...
23
 
26
    
24
 
27
    init() {
Línea 86... Línea 89...
86
                    .edgesIgnoringSafeArea(.top)
89
                    .edgesIgnoringSafeArea(.top)
87
                    .frame(height: 70)
90
                    .frame(height: 70)
Línea 88... Línea 91...
88
                
91
                
-
 
92
                
89
                
93
                HStack {
90
                HStack {
94
                    
91
                    if appData.image.isEmpty {
95
                    if appData.userImage.isEmpty {
92
                         Image("logo")
96
                         Image("logo")
93
                            .resizable()
97
                            .resizable()
94
                            .aspectRatio(contentMode: .fit)
98
                            .aspectRatio(contentMode: .fit)
Línea 99... Línea 103...
99
                           
103
                           
100
                           
104
                           
101
                        
105
                        
102
                    } else {
106
                    } else {
103
                        CustomAsyncImageProfile(
107
                        CustomAsyncImageProfile(
104
                            url: URL(string: appData.image)!,
108
                            url: URL(string: appData.userImage)!,
105
                            placeholder: { Text(Config.LANG_COMMON_LOADING).font(.footnote).foregroundColor(.black)},
109
                            placeholder: { Text(Config.LANG_COMMON_LOADING).font(.footnote).foregroundColor(.black)},
Línea 112... Línea 116...
112
                    }
116
                    }
113
                }.padding(10)
117
                }.padding(10)
114
            }
118
            }
115
            VStack(spacing: 5) {
119
            VStack(spacing: 5) {
116
                VStack(spacing: 5) {
120
                VStack(spacing: 5) {
117
                    Text("\(appData.firstName) \(appData.lastName)" )
121
                    Text("\(appDao.selectOne().userFirstname) \(appDao.selectOne().userLastname)" )
118
                        .bold()
122
                        .bold()
119
                        .font(.title)
123
                        .font(.title)
120
                    Text("\(appData.email)")
124
                    Text("\(appDao.selectOne().userEmail)")
121
                        .font(.body)
125
                        .font(.body)
122
                        .foregroundColor(Color("color_textview_foreground"))
126
                        .foregroundColor(Color("color_textview_foreground"))
123
                }.padding()
127
                }.padding()
Línea 170... Línea 174...
170
                        let dateOn = dateFormatter.string(from: now)
174
                        let dateOn = dateFormatter.string(from: now)
Línea 171... Línea 175...
171
                            
175
                            
172
                            
176
                            
173
                        var userLog = UserLogModel()
177
                        var userLog = UserLogModel()
174
                        userLog.activity = Constants.USER_LOG_ACTIVITY_SIGNOUT
178
                        userLog.activity = Constants.USER_LOG_ACTIVITY_SIGNOUT
Línea 175... Línea 179...
175
                        userLog.userUuid = appData.userUuid
179
                        userLog.userUuid = appDao.selectOne().userUuid
176
                        userLog.addedOn = dateOn
180
                        userLog.addedOn = dateOn
Línea 189... Línea 193...
189
                            }
193
                            }
Línea 190... Línea 194...
190
                             
194
                             
191
                        let syncDao = SyncDao.sharedInstance
195
                        let syncDao = SyncDao.sharedInstance
Línea 192... Línea -...
192
                        syncDao.insert(record : sync)
-
 
-
 
196
                        syncDao.insert(record : sync)
193
                            
197
                            
194
                            
198
                        var appData = appDao.selectOne()
195
                        appData.email = ""
199
                        appData.userEmail = ""
196
                        appData.firstName = ""
200
                        appData.userFirstname = ""
-
 
201
                        appData.userLastname = ""
-
 
202
                        appData.userUuid = "";
-
 
203
                        
-
 
204
                        let appDao = AppDao.sharedInstance
197
                        appData.lastName = ""
205
                        
Línea 198... Línea 206...
198
                        appData.userUuid = "";
206
                        print("update query : 13")
199
                        appData.save()
207
                        appDao.update(model: appData)
Línea 200... Línea 208...
200
                            
208