support custom fields for timesheets, customers, projects and activities (#871)
This commit is contained in:
@@ -21,6 +21,18 @@ use Pagerfanta\Pagerfanta;
|
||||
|
||||
class ActivityRepository extends AbstractRepository
|
||||
{
|
||||
/**
|
||||
* @param Activity $activity
|
||||
* @throws ORMException
|
||||
* @throws \Doctrine\ORM\OptimisticLockException
|
||||
*/
|
||||
public function saveActivity(Activity $activity)
|
||||
{
|
||||
$entityManager = $this->getEntityManager();
|
||||
$entityManager->persist($activity);
|
||||
$entityManager->flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @return null|Activity
|
||||
|
||||
@@ -22,6 +22,18 @@ use Pagerfanta\Pagerfanta;
|
||||
|
||||
class CustomerRepository extends AbstractRepository
|
||||
{
|
||||
/**
|
||||
* @param Customer $customer
|
||||
* @throws ORMException
|
||||
* @throws \Doctrine\ORM\OptimisticLockException
|
||||
*/
|
||||
public function saveCustomer(Customer $customer)
|
||||
{
|
||||
$entityManager = $this->getEntityManager();
|
||||
$entityManager->persist($customer);
|
||||
$entityManager->flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @return null|Customer
|
||||
|
||||
@@ -82,7 +82,6 @@ final class TimesheetIdLoader implements LoaderInterface
|
||||
->getQuery()
|
||||
->execute();
|
||||
|
||||
/*
|
||||
$qb = $em->createQueryBuilder();
|
||||
$qb->select('PARTIAL t.{id}', 'meta')
|
||||
->from(Timesheet::class, 't')
|
||||
@@ -90,6 +89,5 @@ final class TimesheetIdLoader implements LoaderInterface
|
||||
->andWhere($qb->expr()->in('t.id', $ids))
|
||||
->getQuery()
|
||||
->execute();
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,18 @@ use Pagerfanta\Pagerfanta;
|
||||
*/
|
||||
class ProjectRepository extends AbstractRepository
|
||||
{
|
||||
/**
|
||||
* @param Project $project
|
||||
* @throws ORMException
|
||||
* @throws \Doctrine\ORM\OptimisticLockException
|
||||
*/
|
||||
public function saveProject(Project $project)
|
||||
{
|
||||
$entityManager = $this->getEntityManager();
|
||||
$entityManager->persist($project);
|
||||
$entityManager->flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @return null|Project
|
||||
|
||||
Reference in New Issue
Block a user