Add checks for booking and fix database timestamps
This commit is contained in:
parent
bc8a534353
commit
e3ec694876
7 changed files with 73 additions and 7 deletions
|
|
@ -170,6 +170,16 @@ where
|
|||
booking.slot_id,
|
||||
));
|
||||
}
|
||||
if self
|
||||
.booking_dao
|
||||
.find_by_booking_data(
|
||||
booking.sales_person_id,
|
||||
booking.slot_id,
|
||||
booking.calendar_week,
|
||||
booking.year,
|
||||
).await?.is_some() {
|
||||
validation.push(ValidationFailureItem::Duplicate);
|
||||
}
|
||||
|
||||
if !validation.is_empty() {
|
||||
return Err(ServiceError::ValidationError(validation.into()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue