From e3217641193b8c9685e5f513f4634b4f4c439e53 Mon Sep 17 00:00:00 2001 From: Oliver Hauff Date: Sun, 1 Aug 2021 17:24:15 +0200 Subject: [PATCH] Mini survey added. Minor fiexes. --- .../Properties/AndroidManifest.xml | 2 +- TINK/TINK.iOS/Info.plist | 4 +- TINK/TINK/TINK.projitems | 31 +++ TINK/TINK/View/Account/AccountPage.xaml.cs | 4 +- .../BikesAtStation/BikesAtStationPage.xaml.cs | 8 +- TINK/TINK/View/Contact/ContactPage.xaml | 9 +- TINK/TINK/View/FeedbackPopup.xaml.cs | 70 ++--- TINK/TINK/View/FindBike/FindBikePage.xaml.cs | 6 +- TINK/TINK/View/Login/LoginPage.xaml.cs | 7 +- TINK/TINK/View/MiniSurvey/MiniSurveyPage.xaml | 34 +++ .../View/MiniSurvey/MiniSurveyPage.xaml.cs | 95 +++++++ .../MiniSurvey/Question/CheckOneViewCell.xaml | 19 ++ .../Question/CheckOneViewCell.xaml.cs | 14 + .../MiniSurvey/Question/FreeTextViewCell.xaml | 20 ++ .../Question/FreeTextViewCell.xaml.cs | 15 ++ .../QuestionViewCellTemplateSelector.cs | 26 ++ TINK/TINK/View/MyBikes/MyBikesPage.xaml.cs | 6 +- TINK/TINK/View/ViewTypesTypeProvider.cs | 4 + TINKLib/Model/Connector/Command/Command.cs | 15 +- .../Connector/Command/CommandLoggedIn.cs | 14 +- TINKLib/Model/Connector/Command/ICommand.cs | 9 +- .../Model/Connector/Updater/UpdaterJSON.cs | 36 +++ TINKLib/Model/MiniSurvey/MiniSurveyModel.cs | 40 +++ TINKLib/Model/WhatsNew.cs | 4 + .../AppResources.Designer.cs | 48 +++- .../AppResources.de.resx | 21 +- .../MultilingualResources/AppResources.resx | 18 +- TINKLib/MultilingualResources/TINKLib.de.xlf | 30 ++- TINKLib/Repository/CopriCallsHttps.cs | 49 +++- TINKLib/Repository/CopriCallsMemory.cs | 9 +- TINKLib/Repository/CopriCallsMonkeyStore.cs | 6 + TINKLib/Repository/ICopriServer.cs | 5 + TINKLib/Repository/Request/IRequestBuilder.cs | 7 + TINKLib/Repository/Request/RequestBuilder.cs | 8 + .../Request/RequestBuilderLoggedIn.cs | 40 ++- TINKLib/Repository/Response/MiniSurvey.cs | 34 +++ .../ReservationCancelReturnResponse.cs | 5 + .../Services/CopriApi/CopriProviderHttps.cs | 7 + .../CopriApi/CopriProviderMonkeyStore.cs | 10 +- .../ViewModel/Account/AccountPageViewModel.cs | 8 +- .../Bikes/Bike/BC/RequestHandler/Base.cs | 4 +- .../Bikes/Bike/BC/RequestHandler/Booked.cs | 2 +- .../Bike/BC/RequestHandler/NotLoggedIn.cs | 2 +- .../ViewModel/Bikes/Bike/BikeViewModelBase.cs | 4 +- .../RequestHandler/BookedClosed.cs | 13 +- .../RequestHandler/BookedOpen.cs | 14 +- .../RequestHandler/NotLoggedIn.cs | 2 +- TINKLib/ViewModel/Bikes/BikesViewModel.cs | 8 +- .../BikesAtStationPageViewModel.cs | 2 +- .../ViewModel/Contact/ContactPageViewModel.cs | 8 +- .../Contact/SelectStationPageViewModel.cs | 2 +- .../BikeInfo/BikeInfoCarouselViewModel.cs | 2 +- TINKLib/ViewModel/Login/LoginPageViewModel.cs | 4 +- TINKLib/ViewModel/Map/MapPageViewModel.cs | 71 +++-- .../MiniSurvey/MiniSurveyViewModel.cs | 153 +++++++++++ .../MiniSurvey/Question/CheckOneViewModel.cs | 45 ++++ .../MiniSurvey/Question/FreeTextViewModel.cs | 32 +++ .../Question/IMiniSurveyQuestion.cs | 13 + .../Settings/SettingsPageViewModel.cs | 2 +- TINKLib/ViewTypes.cs | 3 +- .../Model/Connector/TestUpdaterJSON.cs | 255 ++++++++++++++++-- .../Model/MiniSurvey/TestMiniSurveyModel.cs | 20 ++ .../Model/MiniSurvey/TestQuestionModel.cs | 16 ++ .../Repository}/Request/TestRequestBuilder.cs | 2 +- .../Request/TestRequestBuilderLoggedIn.cs | 35 ++- .../Repository/Response/TestMiniSurvey.cs | 153 +++++++++++ .../Question/TestCheckOneViewModel.cs | 59 ++++ .../Question/TestFreeTextViewModel.cs | 54 ++++ .../RequestHandler/TestBookedClosed.cs | 11 +- .../RequestHandler/TestBookedOpen.cs | 11 +- .../Mocks/Connector/CopriCallsCacheMemory.cs | 6 + .../Mocks/Connector/ExceptionServer.cs | 6 + TestTINKLib/TestTINKLib.csproj | 2 - 73 files changed, 1628 insertions(+), 185 deletions(-) create mode 100644 TINK/TINK/View/MiniSurvey/MiniSurveyPage.xaml create mode 100644 TINK/TINK/View/MiniSurvey/MiniSurveyPage.xaml.cs create mode 100644 TINK/TINK/View/MiniSurvey/Question/CheckOneViewCell.xaml create mode 100644 TINK/TINK/View/MiniSurvey/Question/CheckOneViewCell.xaml.cs create mode 100644 TINK/TINK/View/MiniSurvey/Question/FreeTextViewCell.xaml create mode 100644 TINK/TINK/View/MiniSurvey/Question/FreeTextViewCell.xaml.cs create mode 100644 TINK/TINK/View/MiniSurvey/Question/QuestionViewCellTemplateSelector.cs create mode 100644 TINKLib/Model/MiniSurvey/MiniSurveyModel.cs create mode 100644 TINKLib/Repository/Response/MiniSurvey.cs create mode 100644 TINKLib/ViewModel/MiniSurvey/MiniSurveyViewModel.cs create mode 100644 TINKLib/ViewModel/MiniSurvey/Question/CheckOneViewModel.cs create mode 100644 TINKLib/ViewModel/MiniSurvey/Question/FreeTextViewModel.cs create mode 100644 TINKLib/ViewModel/MiniSurvey/Question/IMiniSurveyQuestion.cs create mode 100644 TestShareeLib/Model/MiniSurvey/TestMiniSurveyModel.cs create mode 100644 TestShareeLib/Model/MiniSurvey/TestQuestionModel.cs rename {TestTINKLib/Fixtures/ObjectTests/Connector => TestShareeLib/Repository}/Request/TestRequestBuilder.cs (97%) rename {TestTINKLib/Fixtures/ObjectTests/Connector => TestShareeLib/Repository}/Request/TestRequestBuilderLoggedIn.cs (71%) create mode 100644 TestShareeLib/Repository/Response/TestMiniSurvey.cs create mode 100644 TestShareeLib/ViewModel/MiniSurvey/Question/TestCheckOneViewModel.cs create mode 100644 TestShareeLib/ViewModel/MiniSurvey/Question/TestFreeTextViewModel.cs diff --git a/TINK/TINK.Android/Properties/AndroidManifest.xml b/TINK/TINK.Android/Properties/AndroidManifest.xml index 3681d0b..8b2af09 100644 --- a/TINK/TINK.Android/Properties/AndroidManifest.xml +++ b/TINK/TINK.Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + diff --git a/TINK/TINK.iOS/Info.plist b/TINK/TINK.iOS/Info.plist index b99f38b..2323370 100644 --- a/TINK/TINK.iOS/Info.plist +++ b/TINK/TINK.iOS/Info.plist @@ -49,8 +49,8 @@ CFBundleDisplayName sharee.bike CFBundleVersion - 242 + 243 CFBundleShortVersionString - 3.0.242 + 3.0.241 diff --git a/TINK/TINK/TINK.projitems b/TINK/TINK/TINK.projitems index 3c2cc43..2ce4c27 100644 --- a/TINK/TINK/TINK.projitems +++ b/TINK/TINK/TINK.projitems @@ -43,6 +43,19 @@ Code + + MiniSurveyPage.xaml + Code + + + CheckOneViewCell.xaml + Code + + + FreeTextViewCell.xaml + Code + + FlyoutHeader.xaml Code @@ -335,4 +348,22 @@ MSBuild:UpdateDesignTimeXaml + + + Designer + MSBuild:UpdateDesignTimeXaml + + + + + Designer + MSBuild:UpdateDesignTimeXaml + + + + + Designer + MSBuild:UpdateDesignTimeXaml + + \ No newline at end of file diff --git a/TINK/TINK/View/Account/AccountPage.xaml.cs b/TINK/TINK/View/Account/AccountPage.xaml.cs index e8d0813..7f96747 100644 --- a/TINK/TINK/View/Account/AccountPage.xaml.cs +++ b/TINK/TINK/View/Account/AccountPage.xaml.cs @@ -101,8 +101,8 @@ namespace TINK.View.Account /// Pushes a page onto the modal stack. /// Page to display. - public Task PushModalAsync(ViewTypes p_oTypeOfPage) - => throw new NotImplementedException(); + public Task PushModalAsync(ViewTypes typeOfPage) + => Navigation.PushModalAsync((Page)Activator.CreateInstance(typeOfPage.GetViewType())); /// Pops a page from the modal stack. public Task PopModalAsync() diff --git a/TINK/TINK/View/BikesAtStation/BikesAtStationPage.xaml.cs b/TINK/TINK/View/BikesAtStation/BikesAtStationPage.xaml.cs index 9c69296..6a21237 100644 --- a/TINK/TINK/View/BikesAtStation/BikesAtStationPage.xaml.cs +++ b/TINK/TINK/View/BikesAtStation/BikesAtStationPage.xaml.cs @@ -194,11 +194,9 @@ using TINK.View.MasterDetail; /// Pushes a page onto the modal stack. - /// Page to display. - public Task PushModalAsync(ViewTypes p_oTypeOfPage) - { - throw new NotSupportedException(); - } + /// Page to display. + public async Task PushModalAsync(ViewTypes typeOfPage) + => await Navigation.PushModalAsync((Page)Activator.CreateInstance(typeOfPage.GetViewType())); /// Pops a page from the modal stack. public Task PopModalAsync() diff --git a/TINK/TINK/View/Contact/ContactPage.xaml b/TINK/TINK/View/Contact/ContactPage.xaml index 7afe046..44c8594 100644 --- a/TINK/TINK/View/Contact/ContactPage.xaml +++ b/TINK/TINK/View/Contact/ContactPage.xaml @@ -17,6 +17,7 @@ IsVisible="{Binding Path=IsOperatorInfoAvaliable, Converter={StaticResource BoolInvert_Converter}}"> +