aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas "Cakeisalie5" Touhey <thomas@touhey.fr>2018-10-10 01:18:17 +0200
committerThomas "Cakeisalie5" Touhey <thomas@touhey.fr>2018-10-10 01:18:17 +0200
commit0ee8d13cd31de0b7c431a0d59013f0b70d57e2e5 (patch)
treeeb7cdfce449650a00fe83e3c1de743b4381e3f8f
parentf83b6eb91ef6f9be2a97fa9c59664fe98ad7a592 (diff)
Corrected event types.
-rwxr-xr-xsgdfi/_dbs/__init__.py1
-rwxr-xr-x[-rw-r--r--]sgdfi/_dbs/_event.py14
-rwxr-xr-x[-rw-r--r--]sgdfi/_decode.py0
-rwxr-xr-xsgdfi/_repr.py4
4 files changed, 10 insertions, 9 deletions
diff --git a/sgdfi/_dbs/__init__.py b/sgdfi/_dbs/__init__.py
index 10f4180..a4ff203 100755
--- a/sgdfi/_dbs/__init__.py
+++ b/sgdfi/_dbs/__init__.py
@@ -9,6 +9,7 @@ from ._ops import OperationType, OperationTypeData
from ._st import StructureType, StructureTypeData
from ._ststatus import StructureStatus, StructureStatusData
from ._funcs import Function, FunctionData, FunctionRawData
+from ._event import EventType, EventTypeData
from ._regime import AllocationsRegime
diff --git a/sgdfi/_dbs/_event.py b/sgdfi/_dbs/_event.py
index 74ae749..42bc5ee 100644..100755
--- a/sgdfi/_dbs/_event.py
+++ b/sgdfi/_dbs/_event.py
@@ -40,13 +40,13 @@ class EventType(_Enum):
# - Abbreviated type name for XLS exports.
_EventTypeData = {
- EventType.DAY = ("Sortie Journée", ""),
- EventType.HALF = ("Réunion Demi-Journée", "DemJour"),
- EventType.WEEKEND = ("Week-End", "WE"),
- EventType.WORK_MEETING = ("Réunion de travail", "RéuTrav"),
- EventType.YEAR_CAMP = ("Camp Année", ""),
- EventType.CAMP = ("Camp Eté", ""),
- EventType.EXTRAJOB = ("Extrajob", ""),
+ EventType.DAY: ("Sortie Journée", ""),
+ EventType.HALF: ("Réunion Demi-Journée", "DemJour"),
+ EventType.WEEKEND: ("Week-End", "WE"),
+ EventType.WORK_MEETING: ("Réunion de travail", "RéuTrav"),
+ EventType.YEAR_CAMP: ("Camp Année", ""),
+ EventType.CAMP: ("Camp Eté", ""),
+ EventType.EXTRAJOB: ("Extrajob", ""),
}
# Make the leads.
diff --git a/sgdfi/_decode.py b/sgdfi/_decode.py
index f63eb78..f63eb78 100644..100755
--- a/sgdfi/_decode.py
+++ b/sgdfi/_decode.py
diff --git a/sgdfi/_repr.py b/sgdfi/_repr.py
index ac48b3f..d91b331 100755
--- a/sgdfi/_repr.py
+++ b/sgdfi/_repr.py
@@ -17,7 +17,7 @@ from ._dbs import OperationType, OperationTypeData as _OperationTypeData, \
Function, FunctionRawData, FunctionData as _FunctionData, StructureType, \
StructureTypeData as _StructureTypeData, StructureStatus, \
StructureStatusData as _StructureStatusData, \
- AllocationsRegime
+ AllocationsRegime, EventTypeData as _EventTypeData
__all__ = ["IID", "Title", "Structure", "Adherent", "RallyRegistration",
"Camp", "Place", "Operation", "OperationType", "Function", "Event",
@@ -345,7 +345,7 @@ class Event(_Base):
""" An event. """
iid = _IIDProperty()
- # TODO: type d'évènement
+ type = _ValueProperty(cls = _EventTypeData)
start = _DateProperty()
end = _DateProperty()
# TODO: structure principale ayant proposé l'évènement.