root / GES_PAC / View / CreateDayView.xaml @ 65ad7e66
Historique | Voir | Annoter | Télécharger (4,975 ko)
1 |
<?xml version="1.0" encoding="utf-8" ?>
|
---|---|
2 |
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" |
3 |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
4 |
xmlns:vm="clr-namespace:GES_PAC.ViewModel" |
5 |
x:Class="GES_PAC.View.CreateDayView" |
6 |
x:DataType="vm:CreateDayViewModel"> |
7 |
|
8 |
<Grid Padding="20" RowDefinitions="Auto, *"> |
9 |
|
10 |
<Button Text="Retour" |
11 |
BackgroundColor="DarkRed" |
12 |
TextColor="White" |
13 |
CornerRadius="10" |
14 |
Padding="10" |
15 |
FontSize="14" |
16 |
HorizontalOptions="Start" |
17 |
VerticalOptions="Start" |
18 |
Command="{Binding ReturnCommand}"/> |
19 |
|
20 |
<VerticalStackLayout Grid.Row="1" Spacing="20" |
21 |
VerticalOptions="CenterAndExpand" |
22 |
HorizontalOptions="Center"> |
23 |
|
24 |
<Label Text="Informations de la journée" |
25 |
FontSize="20" |
26 |
FontAttributes="Bold" |
27 |
HorizontalOptions="Center" /> |
28 |
<VerticalStackLayout Spacing="15" WidthRequest="300"> |
29 |
<!-- Lieu -->
|
30 |
<VerticalStackLayout>
|
31 |
|
32 |
<Label Text="Elevage" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
33 |
|
34 |
<Grid ColumnDefinitions="*, Auto" Padding="5"> |
35 |
<Picker Grid.Column="0" |
36 |
ItemsSource="{Binding Places}" |
37 |
SelectedItem="{Binding SelectedPlace}" |
38 |
FontSize="16" |
39 |
Title="Sélectionner un élevage"/> |
40 |
|
41 |
<Button Grid.Column="1" |
42 |
Text="+" |
43 |
Command="{Binding AddPlaceCommand}" |
44 |
BackgroundColor="Gray" |
45 |
TextColor="White" |
46 |
CornerRadius="5" |
47 |
Margin="10,0,0,0"/> |
48 |
</Grid>
|
49 |
|
50 |
<Label Text="Sélectionnez un lieu" |
51 |
FontSize="12" |
52 |
TextColor="Red" |
53 |
IsVisible="{Binding PlaceError}"/> |
54 |
</VerticalStackLayout>
|
55 |
|
56 |
<!-- Technicien -->
|
57 |
<VerticalStackLayout>
|
58 |
<Label Text="Technicien" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
59 |
|
60 |
<Grid ColumnDefinitions="*, Auto" Padding="5"> |
61 |
<Picker Grid.Column="0" |
62 |
ItemsSource="{Binding Persons}" |
63 |
SelectedItem="{Binding SelectedPerson}" |
64 |
FontSize="16" |
65 |
Title="Sélectionner un technicien"/> |
66 |
|
67 |
<Button Grid.Column="1" |
68 |
Text="+" |
69 |
Command="{Binding AddPersonCommand}" |
70 |
BackgroundColor="Gray" |
71 |
TextColor="White" |
72 |
CornerRadius="5" |
73 |
Margin="10,0,0,0"/> |
74 |
</Grid>
|
75 |
<Label Text="Sélectionnez un technicien" |
76 |
FontSize="12" |
77 |
TextColor="Red" |
78 |
IsVisible="{Binding PersonError}"/> |
79 |
</VerticalStackLayout>
|
80 |
|
81 |
|
82 |
<!-- Espèce -->
|
83 |
<VerticalStackLayout>
|
84 |
<Label Text="Espèce" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
85 |
<Entry Text="{Binding Espece}" FontSize="16" TextColor="Black" Placeholder="Entrer l'espèce"/> |
86 |
<Label Text="Min. 3 caractères" |
87 |
FontSize="12" |
88 |
TextColor="Red" |
89 |
IsVisible="{Binding EspeceError}"/> |
90 |
</VerticalStackLayout>
|
91 |
|
92 |
<!-- Régime alimentaire -->
|
93 |
<VerticalStackLayout>
|
94 |
<Label Text="Régime alimentaire" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
95 |
<Entry Text="{Binding Regime}" FontSize="16" TextColor="Black" Placeholder="Entrer le régime alimentaire"/> |
96 |
<Label Text="Min. 3 caractères" |
97 |
FontSize="12" |
98 |
TextColor="Red" |
99 |
IsVisible="{Binding RegimeError}"/> |
100 |
</VerticalStackLayout>
|
101 |
|
102 |
</VerticalStackLayout>
|
103 |
|
104 |
<Button Text="Enregistrer" |
105 |
BackgroundColor="Green" |
106 |
TextColor="White" |
107 |
CornerRadius="10" |
108 |
Padding="15" |
109 |
FontSize="16" |
110 |
HorizontalOptions="Center" |
111 |
WidthRequest="180" |
112 |
IsEnabled="{Binding IsFormValid}" |
113 |
Command="{Binding CreateDayCommand}"/> |
114 |
|
115 |
</VerticalStackLayout>
|
116 |
|
117 |
</Grid>
|
118 |
|
119 |
</ContentPage>
|