From 9de72c1854e1880180a30cc1470faa3c5e8b1e64 Mon Sep 17 00:00:00 2001 From: Hugo Pezziardi Date: Tue, 6 Feb 2024 19:01:33 +0100 Subject: [PATCH] :sparkles: (LekaApp): Add Caregiver Profile in sidebar --- Apps/LekaApp/Resources/Localizable.xcstrings | 180 ++++++++++++------ .../AccountCreationProcess+Step4.swift | 3 + ...CaregiverSettingsView+AccentColorRow.swift | 71 +++++++ .../CaregiverSettingsView+AppearanceRow.swift | 43 +++++ .../CaregiverSettingsView+l10n.swift | 27 +++ .../CaregiverSettingsView.swift | 95 +++++++++ .../MainView/CaregiverSettingsLabel.swift | 133 +++++++++++++ .../Views/MainView/MainView.swift | 10 +- .../Views/MainView/RootOwnerViewModel.swift | 2 + .../Views/Profiles/CaregiverAvatarCell.swift | 1 + .../Views/Profiles/CaregiverPicker.swift | 30 +-- 11 files changed, 526 insertions(+), 69 deletions(-) create mode 100644 Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView+AccentColorRow.swift create mode 100644 Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView+AppearanceRow.swift create mode 100644 Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView+l10n.swift create mode 100644 Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView.swift create mode 100644 Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/CaregiverSettingsLabel.swift diff --git a/Apps/LekaApp/Resources/Localizable.xcstrings b/Apps/LekaApp/Resources/Localizable.xcstrings index 08d2f5880b..04e6cb7e97 100644 --- a/Apps/LekaApp/Resources/Localizable.xcstrings +++ b/Apps/LekaApp/Resources/Localizable.xcstrings @@ -2,6 +2,96 @@ "version": "1.0", "sourceLanguage": "en", "strings": { + "caregiver_settings_view.appearance_section.accent_color_row.title": { + "comment": "AccentColor Row title", + "extractionState": "extracted_with_value", + "localizations": { + "en": { + "stringUnit": { + "state": "new", + "value": "Accent Color" + } + }, + "fr": { + "stringUnit": { + "state": "translated", + "value": "Couleur accentu\u00e9e" + } + } + } + }, + "caregiver_settings_view.appearance_section.appearance_row.title": { + "comment": "Appearance Row title", + "extractionState": "extracted_with_value", + "localizations": { + "en": { + "stringUnit": { + "state": "new", + "value": "Dark mode" + } + }, + "fr": { + "stringUnit": { + "state": "translated", + "value": "Mode sombre" + } + } + } + }, + "caregiver_settings_view.close_button_label": { + "comment": "Close button label of Caregiver Settings View", + "extractionState": "extracted_with_value", + "localizations": { + "en": { + "stringUnit": { + "state": "new", + "value": "Close" + } + }, + "fr": { + "stringUnit": { + "state": "translated", + "value": "Fermer" + } + } + } + }, + "caregiver_settings_view.navigation_title": { + "comment": "The navigation title of Caregiver Settings View", + "extractionState": "extracted_with_value", + "localizations": { + "en": { + "stringUnit": { + "state": "new", + "value": "Profil of " + } + }, + "fr": { + "stringUnit": { + "state": "translated", + "value": "Profil de " + } + } + } + }, + "caregiver_settings_view.save_button_label": { + "comment": "Save button label of Caregiver Settings View", + "extractionState": "extracted_with_value", + "localizations": { + "en": { + "stringUnit": { + "state": "new", + "value": "Save" + } + }, + "fr": { + "stringUnit": { + "state": "translated", + "value": "Enregistrer" + } + } + } + }, "lekaapp.TextFieldEmail.invalidEmailErrorLabel": { "comment": "TextFieldEmail invalid Email Error Label", "extractionState": "extracted_with_value", @@ -848,6 +938,42 @@ } } }, + "lekapp.sidebar.change_caregiver_profile.button_label": { + "comment": "The button label of caregiver profile picker", + "extractionState": "extracted_with_value", + "localizations": { + "en": { + "stringUnit": { + "state": "new", + "value": "Change profile" + } + }, + "fr": { + "stringUnit": { + "state": "translated", + "value": "Changer de profil" + } + } + } + }, + "lekapp.sidebar.select_caregiver_profile.button_label": { + "comment": "The button label of caregiver profile picker when no profile is selected", + "extractionState": "extracted_with_value", + "localizations": { + "en": { + "stringUnit": { + "state": "new", + "value": "Select profile" + } + }, + "fr": { + "stringUnit": { + "state": "translated", + "value": "S\u00e9lectionnez un profil" + } + } + } + }, "main_view.sidebar.category_label.activities": { "comment": "The title of the category 'Activities'", "extractionState": "extracted_with_value", @@ -1136,60 +1262,6 @@ } } }, - "settings_view.appearance_section.accent_color_row.title": { - "comment": "AccentColor Row title", - "extractionState": "extracted_with_value", - "localizations": { - "en": { - "stringUnit": { - "state": "new", - "value": "Accent Color" - } - }, - "fr": { - "stringUnit": { - "state": "translated", - "value": "Couleur accentu\u00e9e" - } - } - } - }, - "settings_view.appearance_section.appearance_row.title": { - "comment": "Appearance Row title", - "extractionState": "extracted_with_value", - "localizations": { - "en": { - "stringUnit": { - "state": "new", - "value": "Dark mode" - } - }, - "fr": { - "stringUnit": { - "state": "translated", - "value": "Mode sombre" - } - } - } - }, - "settings_view.appearance_section.header": { - "comment": "Appearance section header", - "extractionState": "extracted_with_value", - "localizations": { - "en": { - "stringUnit": { - "state": "new", - "value": "Appearance" - } - }, - "fr": { - "stringUnit": { - "state": "translated", - "value": "Apparence" - } - } - } - }, "settings_view.close_button_label": { "comment": "Close button label of Settings View", "extractionState": "extracted_with_value", diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/AccountCreation/Process/AccountCreationProcess+Step4.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/AccountCreation/Process/AccountCreationProcess+Step4.swift index 4ecb506db6..c379146c56 100644 --- a/Apps/LekaApp/Sources/_NEWCodeBase/Views/AccountCreation/Process/AccountCreationProcess+Step4.swift +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/AccountCreation/Process/AccountCreationProcess+Step4.swift @@ -20,6 +20,9 @@ extension AccountCreationProcess { Text(l10n.AccountCreationProcess.Step4.message) Button(String(l10n.AccountCreationProcess.Step4.discoverContentButton.characters)) { + if !self.rootOwnerViewModel.mockCaregiversSet.isEmpty { + self.rootOwnerViewModel.currentCaregiver = self.rootOwnerViewModel.mockCaregiversSet[0] + } self.rootOwnerViewModel.isWelcomeViewPresented.toggle() } .buttonStyle(.bordered) diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView+AccentColorRow.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView+AccentColorRow.swift new file mode 100644 index 0000000000..d52bb65625 --- /dev/null +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView+AccentColorRow.swift @@ -0,0 +1,71 @@ +// Leka - iOS Monorepo +// Copyright APF France handicap +// SPDX-License-Identifier: Apache-2.0 + +import DesignKit +import LocalizationKit +import SwiftUI + +// swiftlint:disable nesting + +// MARK: - CaregiverSettingsView.AccentColorRow + +extension CaregiverSettingsView { + struct AccentColorRow: View { + // MARK: Internal + + @Binding var caregiver: Caregiver + + var body: some View { + HStack { + Text(l10n.CaregiverSettingsView.AccentColorRow.title) + + Spacer() + + ForEach(self.colors, id: \.self) { color in + ColorCircleView(color: color, isSelected: self.selectedColor == color) + .onTapGesture { + self.styleManager.accentColor = color + self.caregiver.preferredAccentColor = color + } + } + } + } + + // MARK: Private + + // MARK: - ColorCircleView + + private struct ColorCircleView: View { + let color: Color + let isSelected: Bool + + var body: some View { + VStack { + Circle() + .fill(self.color) + .frame(width: 25) + .overlay(Circle().fill(self.isSelected ? .white : .clear).frame(width: 8)) + .overlay(Circle().stroke(.gray, lineWidth: 0.5)) + } + .animation(.easeIn, value: self.isSelected) + } + } + + @ObservedObject private var styleManager: StyleManager = .shared + + private let colors: [Color] = [DesignKitAsset.Colors.lekaDarkBlue.swiftUIColor, .blue, .purple, .red, .orange, .yellow, .green, .gray] + + private var selectedColor: Color { + self.styleManager.accentColor ?? .clear + } + } +} + +// swiftlint:enable nesting + +#Preview { + Form { + CaregiverSettingsView.AccentColorRow(caregiver: .constant(Caregiver())) + } +} diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView+AppearanceRow.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView+AppearanceRow.swift new file mode 100644 index 0000000000..1f3efe97af --- /dev/null +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView+AppearanceRow.swift @@ -0,0 +1,43 @@ +// Leka - iOS Monorepo +// Copyright APF France handicap +// SPDX-License-Identifier: Apache-2.0 + +import DesignKit +import LocalizationKit +import SwiftUI + +// MARK: - CaregiverSettingsView.AppearanceRow + +extension CaregiverSettingsView { + struct AppearanceRow: View { + // MARK: Internal + + @Binding var caregiver: Caregiver + + var body: some View { + HStack(spacing: 10) { + Text(l10n.CaregiverSettingsView.AppearanceRow.title) + + Spacer() + + Toggle("", isOn: Binding( + get: { self.styleManager.colorScheme == .dark }, + set: { + self.styleManager.colorScheme = $0 ? .dark : .light + self.caregiver.preferredColorScheme = $0 ? .dark : .light + } + )) + } + } + + // MARK: Private + + @ObservedObject private var styleManager: StyleManager = .shared + } +} + +#Preview { + Form { + CaregiverSettingsView.AppearanceRow(caregiver: .constant(Caregiver())) + } +} diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView+l10n.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView+l10n.swift new file mode 100644 index 0000000000..63c62f5d08 --- /dev/null +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView+l10n.swift @@ -0,0 +1,27 @@ +// Leka - iOS Monorepo +// Copyright APF France handicap +// SPDX-License-Identifier: Apache-2.0 + +import LocalizationKit + +// swiftlint:disable line_length nesting + +extension l10n { + enum CaregiverSettingsView { + enum AppearanceRow { + static let title = LocalizedString("caregiver_settings_view.appearance_section.appearance_row.title", value: "Dark mode", comment: "Appearance Row title") + } + + enum AccentColorRow { + static let title = LocalizedString("caregiver_settings_view.appearance_section.accent_color_row.title", value: "Accent Color", comment: "AccentColor Row title") + } + + static let navigationTitle = LocalizedString("caregiver_settings_view.navigation_title", value: "Profil of ", comment: "The navigation title of Caregiver Settings View") + + static let saveButtonLabel = LocalizedString("caregiver_settings_view.save_button_label", value: "Save", comment: "Save button label of Caregiver Settings View") + + static let closeButtonLabel = LocalizedString("caregiver_settings_view.close_button_label", value: "Close", comment: "Close button label of Caregiver Settings View") + } +} + +// swiftlint:enable line_length nesting diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView.swift new file mode 100644 index 0000000000..ba5704398e --- /dev/null +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/CaregiverSettingsView/CaregiverSettingsView.swift @@ -0,0 +1,95 @@ +// Leka - iOS Monorepo +// Copyright APF France handicap +// SPDX-License-Identifier: Apache-2.0 + +import DesignKit +import LocalizationKit +import SwiftUI + +// MARK: - CaregiverSettingsView + +struct CaregiverSettingsView: View { + // MARK: Internal + + @State var modifiedCaregiver: Caregiver + + var body: some View { + NavigationStack { + VStack(spacing: 40) { + self.avatarNavigationLink + + TextFieldDefault(label: String(l10n.CaregiverCreation.caregiverNameLabel.characters), + entry: self.$modifiedCaregiver.name) + + self.professionNavigationLink + + AppearanceRow(caregiver: self.$modifiedCaregiver) + AccentColorRow(caregiver: self.$modifiedCaregiver) + } + .frame(maxWidth: 500) + .navigationTitle(String(l10n.CaregiverSettingsView.navigationTitle.characters) + self.modifiedCaregiver.name) + .navigationBarTitleDisplayMode(.inline) + .toolbar { + ToolbarItem(placement: .topBarLeading) { + Button(String(l10n.CaregiverSettingsView.closeButtonLabel.characters)) { + self.rootOwnerViewModel.isCaregiverSettingsViewPresented = false + } + } + ToolbarItem(placement: .topBarTrailing) { + Button(String(l10n.CaregiverSettingsView.saveButtonLabel.characters)) { + // TODO: (@mathieu) - Add Firestore logic + self.rootOwnerViewModel.isCaregiverSettingsViewPresented = false + self.rootOwnerViewModel.currentCaregiver = self.modifiedCaregiver + } + } + } + } + .preferredColorScheme(self.styleManager.colorScheme) + } + + // MARK: Private + + @ObservedObject private var rootOwnerViewModel: RootOwnerViewModel = .shared + @ObservedObject private var styleManager: StyleManager = .shared + + private var avatarNavigationLink: some View { + NavigationLink { + AvatarPicker(avatar: self.$modifiedCaregiver.avatar) + } label: { + VStack(spacing: 15) { + AvatarPicker.ButtonLabel(image: self.modifiedCaregiver.avatar) + Text(l10n.CaregiverCreation.avatarChoiceButton) + // TODO: (@ui/ux) - Design System - replace with Leka font + .font(.headline) + } + } + } + + private var professionNavigationLink: some View { + VStack(alignment: .leading) { + HStack { + Text(l10n.CaregiverCreation.professionLabel) + // TODO: (@ui/ux) - Design System - replace with Leka font + .font(.body) + + Spacer() + + NavigationLink { + ProfessionPicker(caregiver: self.$modifiedCaregiver) + } label: { + Label(String(l10n.CaregiverCreation.professionAddButton.characters), systemImage: "plus") + } + } + + if !self.modifiedCaregiver.professions.isEmpty { + ForEach(self.modifiedCaregiver.professions, id: \.self) { profession in + ProfessionPicker.ProfessionTag(profession: profession, caregiver: self.$modifiedCaregiver) + } + } + } + } +} + +#Preview { + CaregiverSettingsView(modifiedCaregiver: Caregiver()) +} diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/CaregiverSettingsLabel.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/CaregiverSettingsLabel.swift new file mode 100644 index 0000000000..54b9531b84 --- /dev/null +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/CaregiverSettingsLabel.swift @@ -0,0 +1,133 @@ +// Leka - iOS Monorepo +// Copyright APF France handicap +// SPDX-License-Identifier: Apache-2.0 + +import DesignKit +import LocalizationKit +import RobotKit +import SwiftUI + +// MARK: - CaregiverSettingsLabel + +struct CaregiverSettingsLabel: View { + // MARK: Internal + + var body: some View { + VStack(alignment: .center, spacing: 10) { + if let caregiver = self.rootOwnerViewModel.currentCaregiver { + Button { + self.rootOwnerViewModel.isCaregiverSettingsViewPresented = true + } label: { + CaregiverProfileLabel(caregiver: caregiver) + } + + Button { + self.rootOwnerViewModel.isCaregiverPickerViewPresented = true + } label: { + Label(String(l10n.ChangeCaregiverProfile.buttonLabel.characters), systemImage: "person.2.circle") + } + .buttonStyle(.bordered) + } else { + Button { + self.rootOwnerViewModel.isCaregiverPickerViewPresented = true + } label: { + UnselectedProfileLabel() + } + } + } + .frame(maxWidth: .infinity) + } + + // MARK: Private + + @ObservedObject private var styleManager: StyleManager = .shared + @ObservedObject private var rootOwnerViewModel: RootOwnerViewModel = .shared +} + +// MARK: - CaregiverProfileLabel + +struct CaregiverProfileLabel: View { + // MARK: Internal + + let caregiver: Caregiver + + var body: some View { + VStack { + Image(self.caregiver.avatar, bundle: Bundle(for: DesignKitResources.self)) + .resizable() + .scaledToFit() + .frame(width: 80) + .clipShape(Circle()) + + Text(self.caregiver.name) + .foregroundStyle(self.styleManager.accentColor!) + .font(.headline) + .multilineTextAlignment(.center) + } + } + + // MARK: Private + + @ObservedObject private var styleManager: StyleManager = .shared +} + +// MARK: - UnselectedProfileLabel + +struct UnselectedProfileLabel: View { + // MARK: Internal + + var body: some View { + VStack { + Image(systemName: "person.crop.circle.badge.questionmark") + .resizable() + .scaledToFit() + .frame(width: 80) + .foregroundStyle(self.styleManager.accentColor!) + + Text(l10n.SelectCaregiverProfile.buttonLabel) + .foregroundStyle(self.styleManager.accentColor!) + .font(.headline) + .multilineTextAlignment(.center) + } + } + + // MARK: Private + + @ObservedObject private var styleManager: StyleManager = .shared +} + +// MARK: - l10n.ChangeCaregiverProfile + +// swiftlint:disable line_length + +extension l10n { + enum ChangeCaregiverProfile { + static let buttonLabel = LocalizedString("lekapp.sidebar.change_caregiver_profile.button_label", value: "Change profile", comment: "The button label of caregiver profile picker") + } + + enum SelectCaregiverProfile { + static let buttonLabel = LocalizedString("lekapp.sidebar.select_caregiver_profile.button_label", value: "Select profile", comment: "The button label of caregiver profile picker when no profile is selected") + } +} + +// swiftlint:enable line_length + +#Preview { + NavigationSplitView(sidebar: { + List { + CaregiverSettingsLabel() + + Button {} label: { + RobotConnectionLabel() + } + .listRowInsets(EdgeInsets(top: 0, leading: -8, bottom: -8, trailing: -8)) + + Section("Information") { + Label("What's new?", systemImage: "lightbulb.max") + Label("Resources", systemImage: "book.and.wrench") + } + } + }, detail: { + EmptyView() + }) +} diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/MainView.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/MainView.swift index acec775d28..15cb2d3410 100644 --- a/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/MainView.swift +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/MainView.swift @@ -23,7 +23,9 @@ struct MainView: View { var body: some View { NavigationSplitView { List(selection: self.$navigation.selectedCategory) { - if !self.rootOwnerViewModel.isCompanyConnected { + if self.rootOwnerViewModel.isCompanyConnected { + CaregiverSettingsLabel() + } else { NoAccountConnectedLabel() } @@ -108,9 +110,15 @@ struct MainView: View { .fullScreenCover(isPresented: self.$viewModel.isRobotConnectionPresented) { RobotConnectionView(viewModel: RobotConnectionViewModel()) } + .fullScreenCover(isPresented: self.$rootOwnerViewModel.isCaregiverPickerViewPresented) { + CaregiverPicker() + } .sheet(isPresented: self.$rootOwnerViewModel.isSettingsViewPresented) { SettingsView() } + .sheet(isPresented: self.$rootOwnerViewModel.isCaregiverSettingsViewPresented) { + CaregiverSettingsView(modifiedCaregiver: self.rootOwnerViewModel.currentCaregiver!) + } } } diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/RootOwnerViewModel.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/RootOwnerViewModel.swift index 5b5dc4ab6d..8dad9a9923 100644 --- a/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/RootOwnerViewModel.swift +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/RootOwnerViewModel.swift @@ -21,6 +21,8 @@ class RootOwnerViewModel: ObservableObject { @Published var isWelcomeViewPresented = true @Published var isSettingsViewPresented = false + @Published var isCaregiverSettingsViewPresented = false + @Published var isCaregiverPickerViewPresented = false @Published var showConfirmCredentialsChange: Bool = false @Published var showConfirmDisconnection: Bool = false diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/Profiles/CaregiverAvatarCell.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/Profiles/CaregiverAvatarCell.swift index b07e4a3bff..8b1fddeab3 100644 --- a/Apps/LekaApp/Sources/_NEWCodeBase/Views/Profiles/CaregiverAvatarCell.swift +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/Profiles/CaregiverAvatarCell.swift @@ -20,6 +20,7 @@ struct CaregiverAvatarCell: View { self.styleManager.colorScheme = self.caregiver.preferredColorScheme self.styleManager.accentColor = self.caregiver.preferredAccentColor self.rootOwnerViewModel.isWelcomeViewPresented = false + self.rootOwnerViewModel.isCaregiverPickerViewPresented = false } label: { VStack(spacing: 10) { Image(self.caregiver.avatar, bundle: Bundle(for: DesignKitResources.self)) diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/Profiles/CaregiverPicker.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/Profiles/CaregiverPicker.swift index 3f659dfa7b..a45ca47413 100644 --- a/Apps/LekaApp/Sources/_NEWCodeBase/Views/Profiles/CaregiverPicker.swift +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/Profiles/CaregiverPicker.swift @@ -12,23 +12,25 @@ struct CaregiverPicker: View { // MARK: Internal var body: some View { - VStack { - ScrollView(showsIndicators: false) { - LazyVGrid(columns: self.columns, spacing: 40) { - ForEach(self.rootOwnerViewModel.mockCaregiversSet) { caregiver in - CaregiverAvatarCell(caregiver: caregiver) - } + NavigationStack { + VStack { + ScrollView(showsIndicators: false) { + LazyVGrid(columns: self.columns, spacing: 40) { + ForEach(self.rootOwnerViewModel.mockCaregiversSet) { caregiver in + CaregiverAvatarCell(caregiver: caregiver) + } - // ? Last item is Add profile button - self.addCaregiverButton + // ? Last item is Add profile button + self.addCaregiverButton + } + .padding() } - .padding() } - } - .padding(.horizontal, 50) - .navigationTitle(String(l10n.CaregiverPicker.title.characters)) - .sheet(isPresented: self.$isCaregiverCreationPresented) { - CreateCaregiverView(isPresented: self.$isCaregiverCreationPresented) {} + .padding(.horizontal, 50) + .navigationTitle(String(l10n.CaregiverPicker.title.characters)) + .sheet(isPresented: self.$isCaregiverCreationPresented) { + CreateCaregiverView(isPresented: self.$isCaregiverCreationPresented) {} + } } }