mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
php validation added
This commit is contained in:
parent
fe4eaa92be
commit
e2d406b97b
@ -212,6 +212,8 @@ class AccompanyingPeriod implements
|
|||||||
*
|
*
|
||||||
* @ORM\Column(type="date")
|
* @ORM\Column(type="date")
|
||||||
* @Groups({"read", "write", "docgen:read"})
|
* @Groups({"read", "write", "docgen:read"})
|
||||||
|
* @Assert\LessThan(value= "today", groups={AccompanyingPeriod::STEP_CONFIRMED})
|
||||||
|
* @Assert\LessThan(propertyPath="closingDate", groups={AccompanyingPeriod::STEP_CONFIRMED})
|
||||||
*/
|
*/
|
||||||
private ?DateTime $openingDate = null;
|
private ?DateTime $openingDate = null;
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
updateStartDate(event) {
|
updateStartDate(event) {
|
||||||
const date = event.target.value;
|
const date = event.target.value;
|
||||||
console.log(date)
|
// console.log(date)
|
||||||
this.$store.dispatch('updateStartDate', date)
|
this.$store.dispatch('updateStartDate', date)
|
||||||
.catch(({name, violations}) => {
|
.catch(({name, violations}) => {
|
||||||
if (name === 'ValidationException' || name === 'AccessException') {
|
if (name === 'ValidationException' || name === 'AccessException') {
|
||||||
@ -37,11 +37,6 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// startDate() {
|
|
||||||
// const date = ISOToDatetime(this.$store.state.accompanyingCourse.openingDate.datetime)
|
|
||||||
// console.log(dateToISO(date))
|
|
||||||
// // return datetimeToISO(this.$store.state.accompanyingCourse.openingDate)
|
|
||||||
// }
|
|
||||||
...mapState({
|
...mapState({
|
||||||
startDate: state => dateToISO(ISOToDatetime(state.accompanyingCourse.openingDate.datetime))
|
startDate: state => dateToISO(ISOToDatetime(state.accompanyingCourse.openingDate.datetime))
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user