Bug : Affichage des demandes de conges
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
from django.db import models
|
||||
from django.utils import timezone
|
||||
from gestion_projet.models import Projet
|
||||
|
||||
|
||||
class Departement(models.Model):
|
||||
"""Modèle représentant un département de l'entreprise."""
|
||||
nom = models.CharField(max_length=100)
|
||||
@@ -12,13 +13,10 @@ class Departement(models.Model):
|
||||
|
||||
class Employe(models.Model):
|
||||
"""Modèle représentant un employé de l'entreprise."""
|
||||
FONCTION_LISTE = [
|
||||
FONCTION_LISTE = (
|
||||
('directeur', 'Directeur'),
|
||||
('assistant_direction', 'Assistante de direction'),
|
||||
<<<<<<< HEAD
|
||||
('assistant_technique_recherche', 'Assistant technique de recherche'),
|
||||
=======
|
||||
>>>>>>> c28b14f (clean: remove pycache from tracking)
|
||||
('comptable', 'Comptable'),
|
||||
('raf', 'RAF'),
|
||||
('data_manager', 'Data Manager'),
|
||||
@@ -27,7 +25,7 @@ class Employe(models.Model):
|
||||
('qualiticien', 'Qualiticien'),
|
||||
('technicien_surface', 'Technicien de surface'),
|
||||
('chauffeur', 'Chauffeur'),
|
||||
]
|
||||
)
|
||||
|
||||
user = models.OneToOneField(User, on_delete=models.CASCADE)
|
||||
matricule = models.CharField(max_length=10, unique=True, null=True, blank=True)
|
||||
@@ -55,20 +53,21 @@ class Employe(models.Model):
|
||||
|
||||
class Contrat(models.Model):
|
||||
"""Modèle représentant un contrat de travail d'un employé."""
|
||||
TYPE_CONTRAT = [
|
||||
TYPE_CONTRAT = (
|
||||
('contrat_duree_determinee', 'Contrat à Durée Déterminée'),
|
||||
('contrat_duree_indeterminee', 'Contrat à Durée Indéterminée'),
|
||||
('contrat_prestation', 'Contrat de Prestation de Service'),
|
||||
('contrat_stage', 'Contrat de Stage'),
|
||||
('convention_bourse_entretien', 'Convention de bourse d\'entretien'),
|
||||
]
|
||||
)
|
||||
|
||||
STATUT_CONTRAT = [
|
||||
STATUT_CONTRAT = (
|
||||
('actif', 'Actif'),
|
||||
('termine', 'Terminé'),
|
||||
('suspendu', 'Suspendu'),
|
||||
('rupture_contrat', 'Rupture de Contrat'),
|
||||
]
|
||||
)
|
||||
|
||||
employe = models.ForeignKey(Employe, on_delete=models.CASCADE)
|
||||
numero_contrat = models.CharField(max_length=100, unique=True)
|
||||
type_contrat = models.CharField(
|
||||
@@ -92,7 +91,7 @@ class Contrat(models.Model):
|
||||
|
||||
class Affectation(models.Model):
|
||||
"""Modèle représentant l'affectation d'un employé à un projet avec un rôle spécifique."""
|
||||
ROLE_CHOICES = [
|
||||
ROLE_CHOICES = (
|
||||
('chef_projet', 'Chef de projet'),
|
||||
('doctorant','Doctorant'),
|
||||
('mastorant','Mastorant'),
|
||||
@@ -101,7 +100,7 @@ class Affectation(models.Model):
|
||||
('laborantin','Laborantin'),
|
||||
('medecin','Médecin'),
|
||||
('autre','Autre'),
|
||||
]
|
||||
)
|
||||
|
||||
employe = models.ForeignKey(Employe, on_delete=models.CASCADE)
|
||||
projet = models.ForeignKey(Projet, on_delete=models.CASCADE)
|
||||
|
||||
Reference in New Issue
Block a user