mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
deal with opening/closing the files
This commit is contained in:
@@ -44,6 +44,9 @@ CL\Chill\PersonBundle\Entity\Person:
|
||||
type: text
|
||||
email:
|
||||
type: text
|
||||
proxyHistoryOpenState:
|
||||
type: boolean
|
||||
name: proxy_open
|
||||
manyToOne:
|
||||
countryOfBirth:
|
||||
targetEntity: CL\Chill\MainBundle\Entity\Country
|
||||
@@ -53,4 +56,9 @@ CL\Chill\PersonBundle\Entity\Person:
|
||||
targetEntity: CL\Chill\MainBundle\Entity\Country
|
||||
inversedBy: nationals
|
||||
nullable: true
|
||||
oneToMany:
|
||||
history:
|
||||
targetEntity: PersonHistoryFile
|
||||
mappedBy: person
|
||||
cascade: [persist, remove, merge, detach]
|
||||
lifecycleCallbacks: { }
|
||||
|
25
Resources/config/doctrine/PersonHistoryFile.orm.yml
Normal file
25
Resources/config/doctrine/PersonHistoryFile.orm.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
CL\Chill\PersonBundle\Entity\PersonHistoryFile:
|
||||
type: entity
|
||||
table: person_history_file
|
||||
id:
|
||||
id:
|
||||
type: integer
|
||||
id: true
|
||||
generator: { strategy: AUTO }
|
||||
fields:
|
||||
date_opening:
|
||||
type: date
|
||||
date_closing:
|
||||
type: date
|
||||
default: null
|
||||
nullable: true
|
||||
motive:
|
||||
type: string
|
||||
length: 200
|
||||
memo:
|
||||
type: text
|
||||
manyToOne:
|
||||
person:
|
||||
targetEntity: Person
|
||||
inversedBy: history
|
||||
cascade: [refresh]
|
@@ -19,16 +19,28 @@ chill_person_general_update:
|
||||
|
||||
chill_person_search:
|
||||
pattern: /search
|
||||
defaults: { _controller: CLChillPersonBundle:Person:search }
|
||||
|
||||
chill_person_view_history:
|
||||
pattern: /view/{id}/history
|
||||
defaults: {_controller: CLChillPersonBundle:Person:history }
|
||||
defaults: { _controller: CLChillPersonBundle:Person:search }
|
||||
|
||||
chill_person_history_list:
|
||||
pattern: /{id}/history
|
||||
defaults: { _controller: CLChillPersonBundle:History:list }
|
||||
options:
|
||||
menu: person
|
||||
order: 100
|
||||
label: menu.person.history
|
||||
|
||||
|
||||
chill_person_history_update:
|
||||
pattern: /{id}/history/{historyId}/update
|
||||
defaults: { _controller: CLChillPersonBundle:History:update }
|
||||
|
||||
chill_person_history_close:
|
||||
pattern: /{id}/history/close
|
||||
defaults: { _controller: CLChillPersonBundle:History:close }
|
||||
|
||||
chill_person_history_open:
|
||||
pattern: /{id}/history/open
|
||||
defaults: { _controller: CLChillPersonBundle:History:open }
|
||||
|
||||
#sample
|
||||
chill_appointment_list:
|
||||
pattern: /view/{id}/appointment/list
|
||||
@@ -84,4 +96,4 @@ chill_docs:
|
||||
options:
|
||||
menu: person
|
||||
order: 800
|
||||
label: "Documents"
|
||||
label: "Documents"
|
||||
|
57
Resources/config/validation.yml
Normal file
57
Resources/config/validation.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
CL\Chill\PersonBundle\Entity\Person:
|
||||
properties:
|
||||
belgian_national_number:
|
||||
- NotBlank:
|
||||
groups: [general]
|
||||
- CL\BelgianNationalNumberBundle\Validator\Constraint\BelgianNationalNumber:
|
||||
groups: [general]
|
||||
name:
|
||||
- NotBlank:
|
||||
groups: [general]
|
||||
- Length:
|
||||
min: 2
|
||||
max: 255
|
||||
minMessage: validation.Person.constraint.name_min
|
||||
maxMessage: validation.Person.constraint.name_max
|
||||
groups: [general]
|
||||
|
||||
surname:
|
||||
- NotBlank:
|
||||
groups: [general]
|
||||
- Length:
|
||||
min: 2
|
||||
max: 255
|
||||
minMessage: validation.Person.constraint.name_min
|
||||
maxMessage: validation.Person.constraint.name_max
|
||||
groups: [general]
|
||||
dateOfBirth:
|
||||
- Date:
|
||||
groups: [general]
|
||||
nbOfChild:
|
||||
- Range:
|
||||
min: 0
|
||||
max: 20
|
||||
minMessage: validation.Person.constraint.nbOfChild_min
|
||||
maxMessage: validation.Person.constraint.nbOfChild_max
|
||||
invalidMessage: validation.Person.constraint.nbOfChild_invalid
|
||||
groups: [general]
|
||||
history:
|
||||
- Valid:
|
||||
traverse: true
|
||||
constraints:
|
||||
- Callback:
|
||||
methods: [isHistoryValid]
|
||||
groups: [history_consistent]
|
||||
|
||||
|
||||
|
||||
CL\Chill\PersonBundle\Entity\PersonHistoryFile:
|
||||
properties:
|
||||
date_opening:
|
||||
- Date: ~
|
||||
- NotNull: ~
|
||||
date_closing:
|
||||
- Date: ~
|
||||
constraints:
|
||||
- Callback:
|
||||
methods: [isDateConsistent]
|
Reference in New Issue
Block a user