Statistiques
| Branche: | Révision:

root / GES_PAC / View / CreateDayView.xaml @ 18f910c6

Historique | Voir | Annoter | Télécharger (5,102 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
             xmlns:tools="clr-namespace:GES_PAC.View.Tools"
6
             x:Class="GES_PAC.View.CreateDayView"
7
             x:DataType="vm:CreateDayViewModel">
8

    
9
    <Grid>
10
        <StackLayout BackgroundColor="White" Spacing="50">
11
            <tools:ConnectionIndicatorView />
12
            <ScrollView>
13

    
14
                <VerticalStackLayout Grid.Row="1" Spacing="30">
15

    
16
                    <Label Text="Informations de la journée"
17
                       FontSize="20"
18
                       FontAttributes="Bold"
19
                       HorizontalOptions="Center" />
20
                    <VerticalStackLayout Spacing="15" WidthRequest="300">
21

    
22
                        <!-- Lieu -->
23
                        <VerticalStackLayout>
24

    
25
                            <Label Text="Elevage" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
26

    
27
                            <Picker Grid.Column="0"
28
                                ItemsSource="{Binding Places}" 
29
                                SelectedItem="{Binding SelectedPlace}"
30
                                FontSize="16"
31
                                Title="Sélectionner un élevage"/>
32

    
33
                            <Label Text="Sélectionnez un lieu"
34
                                FontSize="12"
35
                                TextColor="Red"
36
                                IsVisible="{Binding PlaceError}"/>
37
                        </VerticalStackLayout>
38

    
39
                        <!-- Technicien -->
40
                        <VerticalStackLayout>
41
                            <Label Text="Technicien" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
42

    
43
                            <Picker Grid.Column="0"
44
                                ItemsSource="{Binding Persons}" 
45
                                SelectedItem="{Binding SelectedPerson}"
46
                                FontSize="16"
47
                                Title="Sélectionner un technicien"/>
48

    
49
                            <Label Text="Sélectionnez un technicien"
50
                                FontSize="12"
51
                                TextColor="Red"
52
                                IsVisible="{Binding PersonError}"/>
53
                        </VerticalStackLayout>
54

    
55
                        <!-- Espèce -->
56
                        <VerticalStackLayout>
57
                            <Label Text="Espèce" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
58
                            <Entry Text="{Binding Espece}" FontSize="16" TextColor="Black" Placeholder="Entrer l'espèce"/>
59
                            <Label Text="Min. 3 caractères"
60
                                FontSize="12"
61
                                TextColor="Red"
62
                                IsVisible="{Binding EspeceError}"/>
63
                        </VerticalStackLayout>
64

    
65
                        <!-- Régime alimentaire -->
66
                        <VerticalStackLayout>
67
                            <Label Text="Régime alimentaire" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
68
                            <Entry Text="{Binding Regime}" FontSize="16" TextColor="Black" Placeholder="Entrer le régime alimentaire"/>
69
                            <Label Text="Min. 3 caractères"
70
                                FontSize="12"
71
                                TextColor="Red"
72
                                IsVisible="{Binding RegimeError}"/>
73
                        </VerticalStackLayout>
74

    
75
                    </VerticalStackLayout>
76
                </VerticalStackLayout>
77
            </ScrollView>
78
            <StackLayout
79
                Margin="10"
80
                HorizontalOptions="CenterAndExpand"
81
                Orientation="Horizontal"
82
                VerticalOptions="FillAndExpand">
83

    
84
                <Button 
85
                    Text="Créer une journée"
86
                    Command="{Binding CreateDayCommand}"
87
                    Style="{StaticResource btnNormal}"
88
                    IsEnabled="{Binding IsFormValid}"
89
                    VerticalOptions="End"/>
90
            </StackLayout>
91
        </StackLayout>
92
        <Grid Grid.RowSpan="1" IsVisible="{Binding IsBusy}">
93
            <Border StrokeThickness="0"
94
                            Background="Black"
95
                            Opacity="0.5"
96
                            Padding="20"
97
                            WidthRequest="160"
98
                            HeightRequest="160"
99
                            HorizontalOptions="Center"
100
                            VerticalOptions="Center"
101
                            StrokeShape="RoundRectangle 20">
102

    
103
                <VerticalStackLayout HorizontalOptions="Center" VerticalOptions="Center">
104
                    <ActivityIndicator IsRunning="True" Color="White" />
105
                    <Label Text="Chargement..."
106
                            FontSize="14"
107
                            TextColor="white"
108
                            HorizontalOptions="Center"/>
109
                </VerticalStackLayout>
110
            </Border>
111
        </Grid>
112
    </Grid>
113

    
114
</ContentPage>