Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

Rev 8 | Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
//
2
//  CompanyListView.swift
3
//  twogetskills
4
//
5
//  Created by Efrain Yanez Recanatini on 7/30/22.
6
//
7
 
8
import SwiftUI
9
 
10
struct CompanyListView: View {
11
    @EnvironmentObject var appNavigation : AppNavigation
12
 
13
    @ObservedObject var viewModel : CompanyListViewModel = CompanyListViewModel()
14
 
15
    private let appData : AppData = AppData.sharedInstance
16
 
17
    var body: some View {
18
        VStack(spacing: 0) {
19
            HStack {
20
                Image("logo")
21
                .resizable()
22
                .frame(width: 32, height: 32, alignment: .center)
23
                .aspectRatio(contentMode: .fit)
24
                .foregroundColor(Color("color_app_bar_foreground"))
25
                .padding(.leading, 16)
26
 
27
 
28
                Text(Config.LANG_TAB_BAR_BUTTON_COMPANIES)
29
                .font(Font.custom(Config.FONT_NAME_REGULAR, size: Config.FONT_SIZE_APP_BAR_HEAD1 ))
30
                .foregroundColor(Color("color_app_bar_foreground"))
31
                .padding(.leading, 4)
32
 
33
                Spacer()
34
 
35
 
36
            }
37
            .background(Color("color_app_bar_background"))
38
            .edgesIgnoringSafeArea(.top)
39
            .frame(height: 50)
40
            Divider()
41
 
42
            ScrollView {
43
                LazyVStack  {
44
 
45
 
46
 
47
                    ForEach(0..<self.viewModel.companies.count) { index in
48
 
49
 
50
                        CompanyListItemView(companyUuid: self.viewModel.companies[index].uuid)
51
                            .environmentObject(appNavigation)
52
                    }
53
 
54
 
55
 
56
 
57
 
58
 
59
 
60
                }
61
            }
62
 
63
        }
64
    }
65
}
66
 
67
struct CompanyListView_Previews: PreviewProvider {
68
    static var previews: some View {
69
        CompanyListView()
70
    }
71
}