Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Database Management System Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bouchaira Neirouz
Database Management System Project
Commits
87f93a41
Commit
87f93a41
authored
6 months ago
by
Bouchaira Neirouz
Browse files
Options
Downloads
Patches
Plain Diff
interface
parent
9e457e94
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
code_interface/streamlit_app.py
+6
-6
6 additions, 6 deletions
code_interface/streamlit_app.py
donnees/company.db
+0
-0
0 additions, 0 deletions
donnees/company.db
with
6 additions
and
6 deletions
code_interface/streamlit_app.py
+
6
−
6
View file @
87f93a41
...
@@ -3,14 +3,14 @@ from datetime import date
...
@@ -3,14 +3,14 @@ from datetime import date
import
sqlite3
import
sqlite3
import
pandas
as
pd
import
pandas
as
pd
import
numpy
as
np
# Add this line to import numpy
import
numpy
as
np
# Add this line to import numpy
st
.
title
(
"
Page de gestion des employés
"
)
st
.
write
(
"
Bienvenue!😃
"
)
# Initialize session state for page if not already set
if
'
page
'
not
in
st
.
session_state
:
if
'
page
'
not
in
st
.
session_state
:
st
.
session_state
.
page
=
None
st
.
session_state
.
page
=
None
tab1
,
tab2
,
tab3
,
tab4
=
st
.
tabs
([
"
Suivi des employés
"
,
"
Employés avec 3 ans d
'
anciénneté
"
,
"
Création d
'
un compte employé
"
,
"
Bonus
"
])
tab1
,
tab2
,
tab3
,
tab4
=
st
.
tabs
([
"
Suivi des employés
"
,
"
Employés avec 3 ans d
'
anciénneté
"
,
"
Création d
'
un compte employé
"
,
"
Bonus
"
])
with
tab1
:
with
tab1
:
st
.
title
(
"
Suivi Employés
"
)
st
.
header
(
"
Suivi Employés
"
)
popover
=
st
.
popover
(
"
Filtre employés à afficher
"
)
popover
=
st
.
popover
(
"
Filtre employés à afficher
"
)
total
=
popover
.
checkbox
(
"
Salaires des employés par semaine
"
,
True
)
total
=
popover
.
checkbox
(
"
Salaires des employés par semaine
"
,
True
)
dimin
=
popover
.
checkbox
(
"
Salaires des employés ayant eu une diminution par semaine
"
,
True
)
dimin
=
popover
.
checkbox
(
"
Salaires des employés ayant eu une diminution par semaine
"
,
True
)
...
@@ -41,10 +41,10 @@ with tab2:
...
@@ -41,10 +41,10 @@ with tab2:
today
=
datetime
.
today
()
today
=
datetime
.
today
()
df
[
'
DATE_DEBUT
'
]
=
pd
.
to_datetime
(
df
[
'
DATE_DEBUT
'
])
df
[
'
DATE_DEBUT
'
]
=
pd
.
to_datetime
(
df
[
'
DATE_DEBUT
'
])
if
on
:
if
on
:
st
.
header
(
"
Liste des employés avec 3 ans d
'
anciénneté
(question 2)
"
)
st
.
header
(
"
Liste des employés avec 3 ans d
'
anciénneté
"
)
df
=
df
[(
today
-
df
[
'
DATE_DEBUT
'
]).
dt
.
days
>
3
*
365
]
df
=
df
[(
today
-
df
[
'
DATE_DEBUT
'
]).
dt
.
days
>
3
*
365
]
df
.
columns
=
[
'
Numéro employé
'
,
'
Nom
'
,
'
Prénom
'
,
'
Type du contrat
'
,
'
Date de début
'
]
df
.
columns
=
[
'
Numéro employé
'
,
'
Nom
'
,
'
Prénom
'
,
'
Type du contrat
'
,
'
Date de début
'
]
st
.
write
(
"
Liste des employés journaliers
"
)
st
.
write
(
"
Liste des employés journaliers
(question 2)
"
)
st
.
dataframe
(
df
[
df
[
'
Type du contrat
'
]
==
1
])
st
.
dataframe
(
df
[
df
[
'
Type du contrat
'
]
==
1
])
st
.
write
(
"
Liste des employés par production
"
)
st
.
write
(
"
Liste des employés par production
"
)
st
.
dataframe
(
df
[
df
[
'
Type du contrat
'
]
==
2
])
st
.
dataframe
(
df
[
df
[
'
Type du contrat
'
]
==
2
])
...
@@ -60,7 +60,7 @@ with tab2:
...
@@ -60,7 +60,7 @@ with tab2:
with
tab3
:
with
tab3
:
st
.
title
(
"
Création de compte employé
"
)
st
.
header
(
"
Création de compte employé
"
)
conn
=
sqlite3
.
connect
(
r
'
C:\Users\neiro\Documents\+\GitHub\sgbd-usine\donnees\company.db
'
)
conn
=
sqlite3
.
connect
(
r
'
C:\Users\neiro\Documents\+\GitHub\sgbd-usine\donnees\company.db
'
)
cursor
=
conn
.
cursor
()
cursor
=
conn
.
cursor
()
cursor
.
execute
(
"
SELECT MAX(NUMERO_EMPLOYE) FROM EMPLOYE
"
)
cursor
.
execute
(
"
SELECT MAX(NUMERO_EMPLOYE) FROM EMPLOYE
"
)
...
...
This diff is collapsed.
Click to expand it.
donnees/company.db
+
0
−
0
View file @
87f93a41
No preview for this file type
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment