Add endpoint to get sales_person for current user

This commit is contained in:
Simon Goller 2024-06-12 12:04:41 +02:00
parent 42ebce15e8
commit bd887cfd7b
12 changed files with 108 additions and 5 deletions

View file

@ -33,7 +33,7 @@ pub trait BookingDao {
) -> Result<Option<BookingEntity>, DaoError>;
async fn find_by_week(
&self,
calendar_week: i32,
calendar_week: u8,
year: u32,
) -> Result<Arc<[BookingEntity]>, DaoError>;
async fn create(&self, entity: &BookingEntity, process: &str) -> Result<(), DaoError>;

View file

@ -31,4 +31,8 @@ pub trait SalesPersonDao {
process: &str,
) -> Result<(), DaoError>;
async fn discard_assigned_user(&self, sales_person_id: Uuid) -> Result<(), DaoError>;
async fn find_sales_person_by_user_id(
&self,
user_id: &str,
) -> Result<Option<SalesPersonEntity>, DaoError>;
}