none
This commit is contained in:
@ -31,7 +31,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;DEV</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>0</WarningLevel>
|
||||
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
|
||||
|
@ -327,8 +327,8 @@ namespace BookAStar.Droid
|
||||
clientSecret: "blouh",
|
||||
scope: "profile",
|
||||
authorizeUrl: new Uri(Constants.AuthorizeUrl),
|
||||
redirectUrl: new Uri("http://dev.pschneider.fr/oauth/success"),
|
||||
accessTokenUrl: new Uri("http://dev.pschneider.fr/token"));
|
||||
redirectUrl: new Uri(Constants.RedirectUrl),
|
||||
accessTokenUrl: new Uri(Constants.AccessTokenUrl));
|
||||
Intent loginIntent = auth.GetUI(this);
|
||||
var accStore = AccountStore.Create(this);
|
||||
auth.Completed += (sender, eventArgs) =>
|
||||
|
@ -368,7 +368,7 @@ public class YaOAuth2Authenticator : WebRedirectAuthenticator
|
||||
var query = queryValues.FormEncode();
|
||||
|
||||
var req = WebRequest.Create(accessTokenUrl);
|
||||
// (req as HttpWebRequest).Accept = "application/json";
|
||||
(req as HttpWebRequest).Accept = "application/json";
|
||||
req.Method = "POST";
|
||||
var body = Encoding.UTF8.GetBytes(query);
|
||||
req.ContentLength = body.Length;
|
||||
|
@ -6,7 +6,7 @@
|
||||
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
|
||||
<receiver android:name="com.google.android.gms.gcm.GcmReceiver" android:exported="true" android:permission="com.google.android.c2dm.permission.SEND">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
|
||||
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
|
||||
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
|
||||
<category android:name="fr.pschneider.bas" />
|
||||
</intent-filter>
|
||||
@ -30,13 +30,12 @@
|
||||
<action android:name="android.service.chooser.ChooserTargetService" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service android:name="fr.pschneider.bas.AccountChooserService" >
|
||||
<intent-filter>
|
||||
<action android:name="android.accounts.AccountAuthenticator" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.accounts.AccountAuthenticator"
|
||||
android:resource="@xml/authenticator" />
|
||||
</service>
|
||||
<service android:name="fr.pschneider.bas.AccountChooserService">
|
||||
<intent-filter>
|
||||
<action android:name="android.accounts.AccountAuthenticator" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.accounts.AccountAuthenticator" android:resource="@xml/authenticator" />
|
||||
</service>
|
||||
</application>
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.WAVE_LOCK" />
|
||||
|
@ -216,15 +216,30 @@ namespace BookAStar
|
||||
// but use those from the AppState property
|
||||
accChooserPage = new AccountChooserPage();
|
||||
|
||||
var bookQueries = new BookQueriesViewModel();
|
||||
|
||||
var userprofile = new UserProfileViewModel();
|
||||
|
||||
bQueriesPage = new BookQueriesPage
|
||||
{
|
||||
Title = "Demandes",
|
||||
Icon = "icon.png",
|
||||
BindingContext = new BookQueriesViewModel()
|
||||
BindingContext = bookQueries
|
||||
};
|
||||
|
||||
homePage = new HomePage() {
|
||||
Title = "Accueil",
|
||||
Icon = "icon.png" };
|
||||
|
||||
homePage.BindingContext = new HomeViewModel {
|
||||
BookQueries = bookQueries,
|
||||
UserProfile = userprofile };
|
||||
|
||||
userProfilePage = new UserProfilePage {
|
||||
Title = "Profile utilisateur",
|
||||
Icon = "ic_corp_icon.png",
|
||||
BindingContext = userprofile
|
||||
};
|
||||
homePage = new HomePage() { Title = "Accueil", Icon = "icon.png" };
|
||||
userProfilePage = new UserProfilePage { Title = "Profile utilisateur", Icon = "ic_corp_icon.png",
|
||||
BindingContext = new UserProfileViewModel() };
|
||||
|
||||
chatPage = new ChatPage
|
||||
{
|
||||
@ -394,6 +409,8 @@ namespace BookAStar
|
||||
if (MainSettings.CurrentUser != null)
|
||||
{
|
||||
var token = MainSettings.CurrentUser.YavscTokens.AccessToken;
|
||||
if (chatHubConnection.Headers.ContainsKey("Authorization"))
|
||||
chatHubConnection.Headers.Remove("Authorization");
|
||||
chatHubConnection.Headers.Add("Authorization", $"Bearer {token}");
|
||||
}
|
||||
StartConnexion();
|
||||
|
@ -6,21 +6,26 @@ namespace BookAStar.Behaviors
|
||||
public class EditorMaxLengthValidator : Behavior<Editor>
|
||||
{
|
||||
public static readonly BindableProperty MaxLengthProperty =
|
||||
BindableProperty.Create("MaxLength", typeof(int), typeof(EditorMaxLengthValidator), 0);
|
||||
BindableProperty.Create("MaxLength", typeof(int), typeof(EditorMaxLengthValidator), int.MaxValue);
|
||||
|
||||
public static readonly BindableProperty MinLengthProperty =
|
||||
BindableProperty.Create("MinLength", typeof(int), typeof(EditorMaxLengthValidator), 0);
|
||||
|
||||
public static readonly BindableProperty IsValidProperty =
|
||||
BindableProperty.Create("IsValid", typeof(bool), typeof(EditorMaxLengthValidator), false);
|
||||
|
||||
public static readonly BindableProperty ErrorProperty =
|
||||
BindableProperty.Create("Error", typeof(string), typeof(EditorMaxLengthValidator), null);
|
||||
|
||||
public int MaxLength
|
||||
{
|
||||
get { return (int) GetValue(MaxLengthProperty); }
|
||||
set { SetValue(MaxLengthProperty, value); }
|
||||
}
|
||||
|
||||
public int MinLength
|
||||
{
|
||||
get { return (int)GetValue(MinLengthProperty); }
|
||||
get { return (int) GetValue(MinLengthProperty); }
|
||||
set { SetValue(MinLengthProperty, value); }
|
||||
}
|
||||
|
||||
@ -30,15 +35,16 @@ namespace BookAStar.Behaviors
|
||||
}
|
||||
|
||||
public bool IsValid {
|
||||
get { return (bool)GetValue(IsValidProperty); }
|
||||
get { return (bool) GetValue(IsValidProperty); }
|
||||
set { SetValue(IsValidProperty, value);
|
||||
}
|
||||
}
|
||||
|
||||
public string Error
|
||||
{
|
||||
get {
|
||||
return (string)GetValue(ErrorProperty);
|
||||
get
|
||||
{
|
||||
return (string) GetValue(ErrorProperty);
|
||||
}
|
||||
set
|
||||
{
|
||||
|
@ -22,7 +22,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;WDEV</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;DEV</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet />
|
||||
@ -65,9 +65,11 @@
|
||||
<Compile Include="Pages\ClientPages\SearchPage.xaml.cs">
|
||||
<DependentUpon>SearchPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewModels\HomeViewModel.cs" />
|
||||
<Compile Include="ViewModels\Messaging\ChatUserCollection.cs" />
|
||||
<Compile Include="ViewModels\Messaging\ChatUserInfo.cs" />
|
||||
<Compile Include="Model\Social\Chat\Connection.cs" />
|
||||
<Compile Include="ViewModels\Searching\SearchingAnArtistViewModel.cs" />
|
||||
<Compile Include="ViewModels\Validation\Error.cs" />
|
||||
<Compile Include="ViewModels\Validation\ModelState.cs" />
|
||||
<Compile Include="ViewModels\PageState.cs" />
|
||||
@ -311,6 +313,9 @@
|
||||
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net45+win8+wpa81\System.Net.Http.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Services">
|
||||
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Web.Services.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Xamarin.Forms.2.3.2.127\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
@ -16,7 +16,7 @@ namespace BookAStar
|
||||
public const string YavscHomeUrl = "http://dev.pschneider.fr";
|
||||
#else
|
||||
#if WDEV
|
||||
public const string YavscHomeUrl = "http://192.168.0.39:5000";
|
||||
public const string YavscHomeUrl = "http://192.168.0.29:5000";
|
||||
#else
|
||||
#if YAVSC
|
||||
public const string YavscHomeUrl = "https://yavsc.pschneider.fr";
|
||||
|
@ -11,6 +11,7 @@ namespace BookAStar.Data
|
||||
using Helpers;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
|
||||
public class RemoteEntity<V, K> : LocalEntity<V, K>, ICommand where K : IEquatable<K>
|
||||
{
|
||||
@ -95,7 +96,7 @@ namespace BookAStar.Data
|
||||
|
||||
protected Uri GetUri(K key)
|
||||
{
|
||||
return new Uri(ControllerUri.AbsoluteUri + "/" + key.ToString());
|
||||
return new Uri(ControllerUri.AbsoluteUri + "/" + HttpUtility.UrlEncode(key.ToString()));
|
||||
}
|
||||
|
||||
public virtual async Task<V> RemoteGet(K key)
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="BookAStar.Pages.HomePage"
|
||||
Style="{StaticResource PageStyle}">
|
||||
Style="{StaticResource PageStyle}"
|
||||
Title="Accueil">
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="Label">
|
||||
@ -13,5 +14,104 @@
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
<Label Text="Blah" VerticalOptions="Center" HorizontalOptions="Center" />
|
||||
</ContentPage>
|
||||
|
||||
<!-- La recherche d'un pro -->
|
||||
<TabbedPage.Children>
|
||||
<TabbedPage Title="{x:Static local:Strings.SearchForAPro}" >
|
||||
<TabbedPage.Children>
|
||||
<ContentPage Title="Les stars">
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Editor HorizontalOptions="FillAndExpand"/>
|
||||
<Button HorizontalOptions="End" />
|
||||
</StackLayout>
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Label Text="{x:Static local:Strings.GeographicalyNear}" />
|
||||
<Switch HorizontalOptions="End" IsToggled="{Binding ByLocation, Mode=TwoWay}" />
|
||||
|
||||
</StackLayout>
|
||||
|
||||
</ContentPage>
|
||||
<ContentPage Title="">
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Editor HorizontalOptions="FillAndExpand"/>
|
||||
<Button HorizontalOptions="End" />
|
||||
</StackLayout>
|
||||
</ContentPage>
|
||||
</TabbedPage.Children>
|
||||
</TabbedPage>
|
||||
|
||||
<!--
|
||||
les derniers sons/videos/articles postés
|
||||
<TabbedPage.Children>
|
||||
<ContentPage Title="Blogspot">
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Editor x:Name="search_blog_phrase" HorizontalOptions="FillAndExpand"/>
|
||||
<Button x:Name="btn_blog_update" HorizontalOptions="End" />
|
||||
</StackLayout>
|
||||
</ContentPage>
|
||||
</TabbedPage.Children>
|
||||
-->
|
||||
|
||||
<!--
|
||||
Les demandes devis en attente de réponse (pro)
|
||||
-->
|
||||
<ContentPage Title="Demandes de devis" BindingContext="{Binding BookQueries}"
|
||||
IsVisible="{BindingContext UserProfile.IsAPerformer}">
|
||||
<ListView x:Name="querylist"
|
||||
RefreshCommand="{Binding RefreshQueries}"
|
||||
IsPullToRefreshEnabled="True"
|
||||
ItemsSource="{Binding Queries}"
|
||||
ItemTapped="OnViewBookQueryDetail"
|
||||
HasUnevenRows="true"
|
||||
SeparatorVisibility="Default"
|
||||
SeparatorColor="Black">
|
||||
<ListView.ItemTemplate VerticalOptions="StartAndExpand" >
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
<ViewCell.View>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.Row="0" Grid.Column="0" Grid.RowSpan="4" Source="{Binding Avatar}" />
|
||||
<Label Grid.Row="0" Grid.Column="1" Text="{Binding Client.UserName}" Style="{StaticResource LabelStyle}"></Label>
|
||||
<Label Grid.Row="1" Grid.Column="1" Text="{Binding Data.Reason}"></Label>
|
||||
<Label Grid.Row="2" Grid.Column="1" LineBreakMode="WordWrap" Text="{Binding EventDate, StringFormat='{0:dddd d MMMM à HH:mm}'}" FontFamily="Italic"/>
|
||||
<Label Grid.Row="3" Grid.Column="1" LineBreakMode="WordWrap" Text="{Binding Location.Address}" />
|
||||
</Grid>
|
||||
</ViewCell.View>
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</ContentPage>
|
||||
|
||||
|
||||
<!-- Les signatures de contrat en souffreances (pro) -->
|
||||
<ContentPage Title="Contrats à signer" IsVisible="{BindingContext UserProfile.IsAPerformer}">
|
||||
</ContentPage>
|
||||
|
||||
<!-- Les annonces pro (pro) -->
|
||||
<ContentPage Title="Annonces pro" IsVisible="{BindingContext UserProfile.IsAPerformer}">
|
||||
<StackLayout Orientation="Horizontal" >
|
||||
<Editor x:Name="search_pub_pro_phrase" HorizontalOptions="FillAndExpand"/>
|
||||
<Button x:Name="btn_pro_pub" HorizontalOptions="End" />
|
||||
</StackLayout>
|
||||
</ContentPage>
|
||||
|
||||
<!-- les petites annonces des clients (pro) -->
|
||||
<ContentPage Title="Annonces client" Icon="" IsVisible="{BindingContext UserProfile.IsAPerformer}">
|
||||
<StackLayout Orientation="Horizontal" >
|
||||
<Editor x:Name="search_pub_cli_phrase" HorizontalOptions="FillAndExpand"/>
|
||||
<Button x:Name="btn_cli_pub" HorizontalOptions="End" />
|
||||
</StackLayout>
|
||||
</ContentPage>
|
||||
</TabbedPage.Children>
|
||||
|
||||
</TabbedPage>
|
@ -1,18 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace BookAStar.Pages
|
||||
{
|
||||
public partial class HomePage : ContentPage
|
||||
using Data;
|
||||
using ViewModels;
|
||||
using ViewModels.EstimateAndBilling;
|
||||
public partial class HomePage
|
||||
{
|
||||
public HomePage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public HomePage(HomeViewModel model)
|
||||
{
|
||||
BindingContext = model;
|
||||
}
|
||||
|
||||
public HomeViewModel Model {
|
||||
get {
|
||||
return (HomeViewModel) BindingContext;
|
||||
}
|
||||
set
|
||||
{
|
||||
BindingContext = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnBindingContextChanged()
|
||||
{
|
||||
base.OnBindingContextChanged();
|
||||
if (Model != null)
|
||||
{
|
||||
Model.BookQueries.RefreshQueries =
|
||||
new Command(() =>
|
||||
{
|
||||
DataManager.Instance.BookQueries.Execute(null);
|
||||
this.querylist.EndRefresh();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void OnViewBookQueryDetail(object sender, ItemTappedEventArgs e)
|
||||
{
|
||||
var item = e.Item as BookQueryViewModel;
|
||||
App.NavigationService.NavigateTo<BookQueryPage>(true, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@
|
||||
<StackLayout VisualElement.IsVisible="{Binding HaveAnUser}">
|
||||
<Button Text="{Binding PerformerStatus}" Clicked="OnViewPerformerStatus" />
|
||||
<Button Text="{Binding UserQueries}" Clicked="OnViewUserQueries"
|
||||
VisualElement.IsVisible="{Binding UserIsPro}"/>
|
||||
VisualElement.IsVisible="{Binding IsAPerformer}"/>
|
||||
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Label Text="Recevoir les notifications push" StyleClass="Header" />
|
||||
@ -51,7 +51,7 @@
|
||||
<Label Text="Utiliser ma position" StyleClass="Header" />
|
||||
<Switch HorizontalOptions="End" IsToggled="{Binding AllowUseMyPosition, Mode=TwoWay}"/>
|
||||
</StackLayout>
|
||||
<StackLayout VisualElement.IsVisible="{Binding UserIsPro}" >
|
||||
<StackLayout VisualElement.IsVisible="{Binding IsAPerformer}" >
|
||||
<Label Text="{x:Static local:Strings.Profprof}" Style="{StaticResource LabelStyle}"/>
|
||||
<views:RatingView Rating="{Binding Rating, Mode=TwoWay}" x:Name="ratingView" />
|
||||
<StackLayout Orientation="Horizontal" VerticalOptions="Start">
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
<StackLayout VisualElement.IsVisible="{Binding IsAPerformer}">
|
||||
<StackLayout Orientation="Horizontal" VerticalOptions="Start"
|
||||
VisualElement.IsVisible="{Binding UserIsPro}" >
|
||||
VisualElement.IsVisible="{Binding IsAPerformer}" >
|
||||
<Label Text="Ne recevoir de demande de devis que de la part de professionnels uniquement" />
|
||||
<Switch HorizontalOptions="End" IsToggled="{Binding AllowProBookingOnly, Mode=TwoWay}"/>
|
||||
</StackLayout>
|
||||
|
@ -32,7 +32,7 @@ namespace BookAStar
|
||||
|
||||
#region Setting Constants
|
||||
public static readonly string SettingsDefault = string.Empty;
|
||||
public static readonly string EntityDataSettingsPrefix = "Ed";
|
||||
public static readonly string EntityDataSettingsPrefix = Constants.YavscApiUrl;
|
||||
private const string userNameKey = "user_id";
|
||||
private const string PushNotificationsKey = "pushNotifs";
|
||||
private const string AllowGPSUsageKey = "allowGPSUsage";
|
||||
|
18
BookAStar/BookAStar/Strings.Designer.cs
generated
18
BookAStar/BookAStar/Strings.Designer.cs
generated
@ -169,6 +169,15 @@ namespace BookAStar {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recherche une chaîne localisée semblable à Géographiquement proche.
|
||||
/// </summary>
|
||||
public static string GeographicalyNear {
|
||||
get {
|
||||
return ResourceManager.GetString("GeographicalyNear", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recherche une chaîne localisée semblable à Valeur invalide.
|
||||
/// </summary>
|
||||
@ -250,6 +259,15 @@ namespace BookAStar {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recherche une chaîne localisée semblable à Rechercher un artiste.
|
||||
/// </summary>
|
||||
public static string SearchForAPro {
|
||||
get {
|
||||
return ResourceManager.GetString("SearchForAPro", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recherche une chaîne localisée semblable à Signer.
|
||||
/// </summary>
|
||||
|
@ -209,4 +209,10 @@
|
||||
<data name="DeclineQuery" xml:space="preserve">
|
||||
<value>Décliner cette proposition (envoyer un refus, et archiver la demande)</value>
|
||||
</data>
|
||||
<data name="GeographicalyNear" xml:space="preserve">
|
||||
<value>Géographiquement proche</value>
|
||||
</data>
|
||||
<data name="SearchForAPro" xml:space="preserve">
|
||||
<value>Rechercher un artiste</value>
|
||||
</data>
|
||||
</root>
|
14
BookAStar/BookAStar/ViewModels/HomeViewModel.cs
Normal file
14
BookAStar/BookAStar/ViewModels/HomeViewModel.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using XLabs.Forms.Mvvm;
|
||||
|
||||
namespace BookAStar.ViewModels
|
||||
{
|
||||
using EstimateAndBilling;
|
||||
using UserProfile;
|
||||
|
||||
public class HomeViewModel : ViewModel
|
||||
{
|
||||
public BookQueriesViewModel BookQueries { get; set; }
|
||||
public UserProfileViewModel UserProfile { get; set; }
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using XLabs.Forms.Mvvm;
|
||||
|
||||
namespace BookAStar.ViewModels.Searching
|
||||
{
|
||||
class SearchingAnArtistViewModel: ViewModel
|
||||
{
|
||||
}
|
||||
}
|
@ -16,20 +16,18 @@ namespace BookAStar.ViewModels.UserProfile
|
||||
|
||||
public class UserProfileViewModel : ViewModel
|
||||
{
|
||||
|
||||
public bool IsAPerformer
|
||||
{
|
||||
get
|
||||
{
|
||||
return User?.Roles.Contains("Performer") ?? false;
|
||||
}
|
||||
|
||||
get { return User?.Roles?.Contains("Performer") ?? false; }
|
||||
}
|
||||
|
||||
public string UserFilesLabel
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
int rating;
|
||||
// TODO implementation
|
||||
int rating ;
|
||||
public int Rating
|
||||
{
|
||||
get
|
||||
@ -42,47 +40,44 @@ namespace BookAStar.ViewModels.UserProfile
|
||||
}
|
||||
}
|
||||
|
||||
public string UserId
|
||||
{
|
||||
get
|
||||
{
|
||||
return User?.Id;
|
||||
}
|
||||
}
|
||||
|
||||
private bool allowUseMyPosition = MainSettings.AllowGPSUsage;
|
||||
public bool AllowUseMyPosition
|
||||
{
|
||||
get
|
||||
{
|
||||
return MainSettings.AllowGPSUsage;
|
||||
return allowUseMyPosition;
|
||||
}
|
||||
set
|
||||
{
|
||||
MainSettings.AllowGPSUsage = value;
|
||||
SetProperty<bool>(ref allowUseMyPosition, value);
|
||||
}
|
||||
}
|
||||
|
||||
private bool allowProBookingOnly = MainSettings.AllowProBookingOnly;
|
||||
public bool AllowProBookingOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return MainSettings.AllowProBookingOnly;
|
||||
return allowProBookingOnly;
|
||||
}
|
||||
set
|
||||
{
|
||||
MainSettings.AllowProBookingOnly = value;
|
||||
SetProperty<bool>(ref allowUseMyPosition, value);
|
||||
}
|
||||
}
|
||||
|
||||
bool receivePushNotifications = MainSettings.PushNotifications;
|
||||
public bool ReceivePushNotifications
|
||||
{
|
||||
get
|
||||
{
|
||||
return MainSettings.PushNotifications;
|
||||
return receivePushNotifications;
|
||||
}
|
||||
set
|
||||
{
|
||||
MainSettings.PushNotifications = value;
|
||||
SetProperty<bool>(ref receivePushNotifications, value);
|
||||
}
|
||||
}
|
||||
private long queryCount;
|
||||
@ -174,10 +169,6 @@ namespace BookAStar.ViewModels.UserProfile
|
||||
get { return User!=null; }
|
||||
}
|
||||
|
||||
public bool UserIsPro
|
||||
{
|
||||
get { return User?.Roles?.Contains("Performer") ?? false ; }
|
||||
}
|
||||
|
||||
private void UpdateUserMeta ()
|
||||
{
|
||||
@ -196,7 +187,7 @@ namespace BookAStar.ViewModels.UserProfile
|
||||
}
|
||||
else
|
||||
{
|
||||
newUserIsPro = UserIsPro;
|
||||
newUserIsPro = IsAPerformer;
|
||||
|
||||
newQueryCount = newUserIsPro ? DataManager.Instance.BookQueries.Count : 0;
|
||||
|
||||
@ -209,14 +200,21 @@ namespace BookAStar.ViewModels.UserProfile
|
||||
newAvatar = UserHelpers.Avatar(user.Avatar);
|
||||
}
|
||||
SetProperty<bool>(ref haveAnUser, newHaveAnUser, "HaveAnUser");
|
||||
SetProperty<bool>(ref userIsPro, newUserIsPro, "UserIsPro");
|
||||
SetProperty<string>(ref performerStatus, newStatusString, "PerformerStatus");
|
||||
SetProperty<string>(ref userQueries, newQueriesButtonText, "UserQueries");
|
||||
SetProperty<long>(ref queryCount, newQueryCount, "QueryCount");
|
||||
SetProperty<ImageSource>(ref avatar, newAvatar, "Avatar");
|
||||
|
||||
NotifyPropertyChanged("UserName");
|
||||
NotifyPropertyChanged("AllowProBookingOnly");
|
||||
NotifyPropertyChanged("AllowUseMyPosition");
|
||||
NotifyPropertyChanged("ReceivePushNotifications");
|
||||
NotifyPropertyChanged("AllowUseMyPosition");
|
||||
NotifyPropertyChanged("IsAPerformer");
|
||||
}
|
||||
|
||||
private void User_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
private void User_PropertyChanged(object sender,
|
||||
System.ComponentModel.PropertyChangedEventArgs e)
|
||||
{
|
||||
UpdateUserMeta();
|
||||
}
|
||||
|
@ -36,11 +36,15 @@ namespace Yavsc.Controllers
|
||||
if (cxs !=null)
|
||||
if (cxs.Count>0) {
|
||||
var user = cxs.First().Owner;
|
||||
|
||||
result.Add(new ChatUserInfo { UserName = user.UserName,
|
||||
UserId = user.Id, Avatar = user.Avatar, Connections = cxs,
|
||||
Roles = ( userManager.GetRolesAsync(user) ).Result.ToArray() });
|
||||
}
|
||||
if (user!=null ) {
|
||||
result.Add(new ChatUserInfo { UserName = user.UserName,
|
||||
UserId = user.Id, Avatar = user.Avatar, Connections = cxs,
|
||||
Roles = ( userManager.GetRolesAsync(user) ).Result.ToArray() });
|
||||
}
|
||||
else {
|
||||
result.Add(new ChatUserInfo { Connections = cxs });
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ namespace Yavsc.Models.Billing
|
||||
{
|
||||
public class ExceptionSIREN {
|
||||
|
||||
[Key]
|
||||
[Key,MinLength(9)]
|
||||
public string SIREN { get; set; }
|
||||
}
|
||||
}
|
@ -102,7 +102,7 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
}
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
@{ await Html.RenderPartialAsync("_PerformerPartial", Model) ; }
|
||||
|
@ -1,39 +0,0 @@
|
||||
@model Yavsc.Models.Billing.ExceptionSIREN
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>Edit</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form asp-action="Edit">
|
||||
<div class="form-horizontal">
|
||||
<h4>ExceptionSIREN</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
@Html.DisplayFor(model => model.SIREN) :
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-1 col-md-10">
|
||||
@Html.InputFor(model => model.SIREN)
|
||||
</div>
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -12,7 +12,6 @@
|
||||
<tr>
|
||||
<td>@item.SIREN</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.SIREN">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.SIREN">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.SIREN">Delete</a>
|
||||
</td>
|
||||
|
@ -146,5 +146,9 @@
|
||||
"prepublish": "gulp min",
|
||||
"postpublish": "echo \" . ./contrib/postPublish.sh # to push in prod.\""
|
||||
},
|
||||
"embed": "Views/**/*.cshtml"
|
||||
"embed": "Views/**/*.cshtml",
|
||||
"buildOptions": {
|
||||
"warningsAsErrors": false,
|
||||
"emitEntryPoint": true
|
||||
}
|
||||
}
|
@ -199,12 +199,12 @@
|
||||
"Zlib.Portable.Signed": "1.11.0"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net45/Google.Apis.dll": {},
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {}
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {},
|
||||
"lib/net45/Google.Apis.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net45/Google.Apis.dll": {},
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {}
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {},
|
||||
"lib/net45/Google.Apis.dll": {}
|
||||
}
|
||||
},
|
||||
"Google.Apis.Core/1.11.1": {
|
||||
@ -2823,7 +2823,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"DNX,Version=v4.5.1/debian.8-x86": {
|
||||
"DNX,Version=v4.5.1/win7-x86": {
|
||||
"Antlr/3.4.1.9004": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
@ -3020,12 +3020,12 @@
|
||||
"Zlib.Portable.Signed": "1.11.0"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net45/Google.Apis.dll": {},
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {}
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {},
|
||||
"lib/net45/Google.Apis.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net45/Google.Apis.dll": {},
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {}
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {},
|
||||
"lib/net45/Google.Apis.dll": {}
|
||||
}
|
||||
},
|
||||
"Google.Apis.Core/1.11.1": {
|
||||
@ -4125,6 +4125,9 @@
|
||||
},
|
||||
"runtime": {
|
||||
"lib/dnx451/Microsoft.AspNet.Server.Kestrel.dll": {}
|
||||
},
|
||||
"native": {
|
||||
"runtimes/win7-x86/native/libuv.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.AspNet.Server.WebListener/1.0.0-rc1-final": {
|
||||
@ -5644,7 +5647,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"DNX,Version=v4.5.1/debian.8-x64": {
|
||||
"DNX,Version=v4.5.1/win7-x64": {
|
||||
"Antlr/3.4.1.9004": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
@ -5841,12 +5844,12 @@
|
||||
"Zlib.Portable.Signed": "1.11.0"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net45/Google.Apis.dll": {},
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {}
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {},
|
||||
"lib/net45/Google.Apis.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net45/Google.Apis.dll": {},
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {}
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {},
|
||||
"lib/net45/Google.Apis.dll": {}
|
||||
}
|
||||
},
|
||||
"Google.Apis.Core/1.11.1": {
|
||||
@ -6946,6 +6949,9 @@
|
||||
},
|
||||
"runtime": {
|
||||
"lib/dnx451/Microsoft.AspNet.Server.Kestrel.dll": {}
|
||||
},
|
||||
"native": {
|
||||
"runtimes/win7-x64/native/libuv.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.AspNet.Server.WebListener/1.0.0-rc1-final": {
|
||||
@ -8735,7 +8741,7 @@
|
||||
},
|
||||
"MarkdownDeep-av.NET/1.5.4": {
|
||||
"type": "package",
|
||||
"sha512": "89nafNRqR3hqKU0rQzHb+BGpoxjImo7pfOQj8vNALB3MloBye0jqMv9eqpKP+QIDLtMS8gHf7uP1kAIkhsOg+Q==",
|
||||
"sha512": "vefP0tYO2IGOw0iuZt5mtTuu+IFaqjMaoo+GLk4nyhHibfYGFr4glG8JxvxIpHialgwtmeK4F+9HUiKnBXIhbA==",
|
||||
"files": [
|
||||
"lib/dnxcore50/MarkdownDeep.dll",
|
||||
"lib/MonoAndroid10/MarkdownDeep.dll",
|
||||
@ -10654,7 +10660,6 @@
|
||||
},
|
||||
"System.Diagnostics.DiagnosticSource/4.0.0-beta-23516": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "0uDR/UOmFCNPDCyHEPHhCrk6c1iRnDp00YqwSZ8Qf5aaaJjm4WXnf4Q9xZw4OoApsSiODSypDMdpQU24IxR16A==",
|
||||
"files": [
|
||||
"lib/dotnet5.2/System.Diagnostics.DiagnosticSource.dll",
|
||||
@ -10879,7 +10884,6 @@
|
||||
},
|
||||
"System.Numerics.Vectors/4.1.1-beta-23516": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "FCYCEjc3BXBTpVZTxMqf2m/sGYyDzLwICy5lNKgZzT8WfshJhsTGjJuETwsh1Cwi6bksw9YiTB6yeeWBBJDnTA==",
|
||||
"files": [
|
||||
"lib/dotnet5.4/System.Numerics.Vectors.dll",
|
||||
@ -10986,7 +10990,7 @@
|
||||
"System.Reflection.Metadata/1.1.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "a8VsRm/B0Ik1o5FumSMWmpwbG7cvIIajAYhzTTy9VB9XItByJDQHGZkQTIAdsvVJ6MI5O3uH/lb0izgQDlDIWA==",
|
||||
"sha512": "RLIE4sSt2zngMLuqM6YmxBH99mTumtT4DNZE4+msfEaInUP5iCLQT+BHPl+2cjSAP1pdALyAjLB8RtCB+WGGWQ==",
|
||||
"files": [
|
||||
"lib/dotnet5.2/System.Reflection.Metadata.dll",
|
||||
"lib/dotnet5.2/System.Reflection.Metadata.xml",
|
||||
|
Reference in New Issue
Block a user