-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.kv
375 lines (364 loc) · 15.6 KB
/
main.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
#:kivy 2.0.0
#:include components.kv
##:kivymd 0.104.2
<Body>:
orientation: "vertical"
prenom: enreg_firstName_input
surnom: enreg_surname_input
nom: enreg_lastName_input
montantDette: detteMontant
MDToolbar:
id: title
title: "Groupement d'Interet Economique (GIE) Djiguiya".upper()
MDToolbar:
HeaderButton:
text: f"[b]ENREGISTRER[/b]"
on_press: root.showTitle()
on_press: sm.current = "enregistrement"
HeaderButton:
text: "[b]EMPLOYEES[/b]"
on_press: root.hideTitle()
on_press: sm.current = "employees"
on_press: searchId.text = "tous"
HeaderButton:
text: "[b]PAIEMENT[/b]"
on_press: root.hideTitle()
on_press: sm.current = "paiement"
on_press: idForPaiement.text = ""
on_press: year.text = ""
HeaderButton:
text: "[b]DETTE[/b]"
on_press: root.showTitle()
on_press: sm.current = "dette"
HeaderButton:
text: "[b]MISE EN JOUR[/b]"
on_press: root.hideTitle()
on_press: sm.current = "mise_en_jour"
ScreenManager:
id: sm
MDScreen:
name: "enregistrement"
MDBoxLayout:
orientation: "vertical"
padding: '19dp'
pos_hint: {'top': 0.9}
adaptive_height: True
InfosLabel:
text: "Veuillez entrer les informations neccéssaires."
EnregInput:
id: enreg_firstName_input
hint_text: "Prénom"
required: True
on_text: root.check_enreg_error()
EnregInput:
id: enreg_surname_input
hint_text: "Surnom"
on_text: root.check_enreg_error()
EnregInput:
id: enreg_lastName_input
hint_text: "Nom"
required: True
on_text: root.check_enreg_error()
InfosLabel:
id: enreg_lastName_infos
InfosLabel:
id: enreg_infos
text: "Status de l'enregistrement"
AnchorLayout:
anchor_x: 'center'
anchor_y: 'bottom'
padding: '19dp'
MDBoxLayout:
orientation: 'horizontal'
adaptive_width: True
spacing: '19dp'
MDFillRoundFlatIconButton:
text: "Enregistrer"
icon: 'check'
font_size: "24dp"
md_bg_color: app.theme_cls.primary_color
on_release: root.saveRecords()
MDFillRoundFlatIconButton:
text: 'Annuler'
icon: 'cancel'
font_size: "24dp"
md_bg_color: (1, 0, 0, 1)
on_release: root.cancelEnregistrement()
MDScreen:
name: "paiement"
MDBoxLayout:
orientation: "vertical"
MDToolbar:
id: pToolbar
title: "Entrer le numéro d'identifiant de la personne"
InputInToolbar:
id: idForPaiement
hint_text: "Identifiant..."
on_text: root.getUserInfosForPaiement(self.text)
InputInToolbar:
id: year
hint_text: "Annee..."
theme_text_color: "Primary"
on_text: root.getUserInfosForPaiement(idForPaiement.text)
MenuButton:
id: addYear
text: str()
font_size: "24dp"
MDBoxLayout:
orientation: "horizontal"
InfosLabel:
id: pUserName
font_style: "H4"
theme_text_color: "Primary"
#text_color: app.theme_cls.primary_color
PaiementRowMonth:
PaiementInput:
id: janvier
hint_text: "Janvier"
on_text: root.updatePaiement(idForPaiement.text, year.text, "JANVIER", self.text)
on_text: root.updateSomme(idForPaiement.text)
PaiementInput:
id: fevrier
hint_text: "Février"
on_text: root.updatePaiement(idForPaiement.text, year.text, "FEVRIER", self.text)
on_text: root.updateSomme(idForPaiement.text)
PaiementInput:
id: mars
hint_text: "Mars"
on_text: root.updatePaiement(idForPaiement.text, year.text, "MARS", self.text)
on_text: root.updateSomme(idForPaiement.text)
PaiementInput:
id: avril
hint_text: "Avril"
on_text: root.updatePaiement(idForPaiement.text, year.text, "AVRIL", self.text)
on_text: root.updateSomme(idForPaiement.text)
PaiementRowMonth:
PaiementInput:
id: mai
hint_text: "Mai"
on_text: root.updatePaiement(idForPaiement.text, year.text, "MAI", self.text)
on_text: root.updateSomme(idForPaiement.text)
PaiementInput:
id: juin
hint_text: "Juin"
on_text: root.updatePaiement(idForPaiement.text, year.text, "JUIN", self.text)
on_text: root.updateSomme(idForPaiement.text)
PaiementInput:
id: juillet
hint_text: "Juillet"
on_text: root.updatePaiement(idForPaiement.text, year.text, "JUILLET", self.text)
on_text: root.updateSomme(idForPaiement.text)
PaiementInput:
id: aout
hint_text: "Aout"
on_text: root.updatePaiement(idForPaiement.text, year.text, "AOUT", self.text)
on_text: root.updateSomme(idForPaiement.text)
PaiementRowMonth:
PaiementInput:
id: septembre
hint_text: "Septembre"
on_text: root.updatePaiement(idForPaiement.text, year.text, "SEPTEMBRE", self.text)
on_text: root.updateSomme(idForPaiement.text)
PaiementInput:
id: octobre
hint_text: "Octobre"
on_text: root.updatePaiement(idForPaiement.text, year.text, "OCTOBRE", self.text)
on_text: root.updateSomme(idForPaiement.text)
PaiementInput:
id: novembre
hint_text: "Novembre"
on_text: root.updatePaiement(idForPaiement.text, year.text, "NOVEMBRE", self.text)
on_text: root.updateSomme(idForPaiement.text)
PaiementInput:
id: decembre
hint_text: "Décembre"
on_text: root.updatePaiement(idForPaiement.text, year.text, "DECEMBRE", self.text)
on_text: root.updateSomme(idForPaiement.text)
MDBoxLayout:
orientation: "horizontal"
InfosLabel:
id: paiementInfos
InfosLabel:
id: paiementDetteInfos
InfosLabel:
id: paiementCaisseInfos
MDScreen:
name: "employees"
MDBoxLayout:
orientation: "vertical"
MDToolbar:
title: "La liste des employées"
InputInToolbar:
id: searchId
text: "Filtre"
hint_text: "Entrer un nom..."
font_size: self.height-19
on_text: root.showEmployeesList(self.text)
markup: True
UpdateGrid:
ScrollView:
do_scroll_x: False
do_scroll_y: True
adaptive_height: True
MDBoxLayout:
id: employees_list
orientation: "vertical"
adaptive_height: True
MDBoxLayout:
orientation: "horizontal"
size_hint: (1, 0.1)
spacing: '10dp'
MDIconButton:
id: prv
icon: "arrow-left"
on_press: root.preview()
md_bg_color: app.theme_cls.primary_color
MDBoxLayout:
orientation: 'horizontal'
ScrollView:
do_scroll_x: True
do_scroll_y: False
adaptive_width: True
MDBoxLayout:
id: page_range
orientation: "horizontal"
adaptive_width: True
MDIconButton:
id: svt
icon: "arrow-right"
on_press: root.next()
md_bg_color: app.theme_cls.primary_color
MDScreen:
name: "dette"
MDBoxLayout:
orientation: "vertical"
MDToolbar:
title: "Entrer le numéro d'identifiant de la personne"
InputInToolbar:
id: idForDette
on_text: root.getUserInfosForDette(self.text)
MDBoxLayout:
orientation: "vertical"
padding: '24dp'
adaptive_height: True
pos_hint: {'top': 0.5}
InfosLabel:
id: dUserName
theme_text_color: "Primary"
font_style: "H4"
UpdateInput:
id: detteMontant
hint_text: "Montant"
required: True
max_text_length: 6
icon_right: 'currency-usd'
icon_right_color: app.theme_cls.primary_color
InfosLabel:
id: detteInfos
markup: True
AnchorLayout:
anchor_x: 'center'
anchor_y: 'bottom'
padding: '19dp'
MDBoxLayout:
orientation: 'horizontal'
adaptive_width: True
spacing: '19dp'
MDFillRoundFlatIconButton:
text: "Accorder"
icon: 'check'
font_size: "24dp"
md_bg_color: app.theme_cls.primary_color
on_press: root.setDette(idForDette.text)
MDFillRoundFlatIconButton:
text: "Annuler"
icon: 'cancel'
font_size: "24dp"
md_bg_color: (1, 0, 0, 1)
on_press: root.clearDette()
MDScreen:
name: "mise_en_jour"
MDBoxLayout:
orientation: "vertical"
size_hint: (1, 1)
MDToolbar:
title: "Entrer le numéro d'identifiant de la personne"
InputInToolbar:
id: idToUpdate
on_text: root.getUserInfosForUpdate(self.text)
UpdateGrid:
UpdateInput:
id: updatePrenom
hint_text: "Prénom"
max_text_length: 13
UpdateInput:
id: UpdateDateSortir
hint_text: "Date de sortir"
UpdateGrid:
UpdateInput:
id: updateSurnom
hint_text: "Surnom"
max_text_length: 13
UpdateInput:
id: updatePrenomTuteur
hint_text: "Prénom du tuteur"
max_text_length: 13
UpdateGrid:
UpdateInput:
id: updateNom
hint_text: "Nom"
max_text_length: 13
UpdateInput:
id: updateNomTutuer
hint_text: "Nom du tuteur"
max_text_length: 13
UpdateGrid:
UpdateInput:
id: updateSalaire
hint_text: "Salaire"
icon_right: 'currency-eur'
icon_right_color: app.theme_cls.primary_color
max_text_length: 6
UpdateInput:
id: updateTuteurContact
hint_text: "Contact du tuteur"
icon_right: 'phone'
icon_right_color: app.theme_cls.primary_color
max_text_length: 13
UpdateGrid:
UpdateInput:
id: updateDateEntrer
hint_text: "Date d'entrer"
icon_right: 'calendar'
icon_right_color: app.theme_cls.primary_color
on_focus: root.show_date_picker()
UpdateInput:
id: updateAdressTuteur
hint_text: "Adresse du tuteur"
icon_right: 'google-maps'
icon_right_color: app.theme_cls.primary_color
max_text_length: 13
MDBoxLayout:
orientation: "vertical"
InfosLabel:
id: updateInfos
AnchorLayout:
anchor_x: 'center'
anchor_y: 'bottom'
padding: '19dp'
MDBoxLayout:
orientation: 'horizontal'
adaptive_width: True
spacing: '19dp'
MDFillRoundFlatIconButton:
text: "Mettre à jour"
icon: 'check'
font_size: "24dp"
md_bg_color: app.theme_cls.primary_color
on_release: root.setUpdate(idToUpdate.text)
MDFillRoundFlatIconButton:
text: "Annuler"
icon: 'cancel'
font_size: "24dp"
md_bg_color: (1, 0, 0, 1)
on_release: root.clearUpdateID()