-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature/projects #39
Merged
Merged
feature/projects #39
Changes from 62 commits
Commits
Show all changes
84 commits
Select commit
Hold shift + click to select a range
7c695c9
model adjustments
jeppekroghitk 7e66cc6
entity adjustments
jeppekroghitk 68b4ae7
repository adjustments
jeppekroghitk 104dc52
Adjusting billigservice naming
jeppekroghitk d999f4e
Adjusted code to fit Leantime data
jeppekroghitk f860074
added client crud
jeppekroghitk c107211
Styled new client twig
jeppekroghitk ba1761c
Styled client index twig
jeppekroghitk 6774e61
Added Client to menu
jeppekroghitk 47fb9f7
Edit view as content
jeppekroghitk da2a6c9
Cleaned up client form
jeppekroghitk 5ece69b
added account crud
jeppekroghitk b1147ef
added account controller
jeppekroghitk ebddae0
Reverted naming to original
jeppekroghitk 0e1168f
Added new models, collection models and reverted some renaming
jeppekroghitk abcbce5
Reverted milestoneRepository to versionRepository
jeppekroghitk 6171816
Reverted epic renaming
jeppekroghitk 5f88aa6
Implemented new methods, reverted some naming
jeppekroghitk 081ba11
Sync leantime projects, issues, worklogs
jeppekroghitk da3b5ba
Added default value to model construct
jeppekroghitk 3bd903b
includes
jeppekroghitk 4921441
Fixed token reference
jeppekroghitk 12a47f2
Undid model changes in construct
jeppekroghitk 9986a87
undid model construct changes
jeppekroghitk 6b5aa3e
Reverted defining values directly in constructor
jeppekroghitk 25797fd
coding standards
jeppekroghitk 520e397
coding standards
jeppekroghitk fbb8bbb
Removed excess accountType
jeppekroghitk 8331722
Account crud styling
jeppekroghitk ffec7bd
adding pricelist entity
jeppekroghitk 3d99b48
adding pricelist entity crud
jeppekroghitk 3f85de6
added pricelist navigation
jeppekroghitk 0f7126d
method renaming, coding standards
jeppekroghitk d71d6f3
readding pricelist crud with updated entity
jeppekroghitk 6e31c3f
coding standards
jeppekroghitk 0b0143c
further coding standards
jeppekroghitk f66afc4
Branch alignment and coding standards
jeppekroghitk e4bc2f0
Aligned billigservice with develop
jeppekroghitk 934a009
Removing create project
jeppekroghitk 169d71e
Rewritten some methods to return objects
jeppekroghitk f5e3af6
Fixed broken endpoint calls + alignment
jeppekroghitk db3f82d
coding standards
jeppekroghitk b008bae
updated changelog
jeppekroghitk e41505f
Generated migration
jeppekroghitk fb5a2c9
removed faulty migration
jeppekroghitk d7f1da9
#182: Added migrations file
tuj ffb349a
Remove readded unused functions
jeppekroghitk 3a54df0
minor corrections
jeppekroghitk 977c0f5
alignment
jeppekroghitk 36468e7
pricelist extends AbstractBaseEntity - removed id
jeppekroghitk e2e972a
Price list created + updated fields migration
jeppekroghitk 98419ee
added translations for client, account, pricelist
jeppekroghitk 4fb1994
typo fixes
jeppekroghitk a5e3a4f
coding standards
jeppekroghitk 5da8291
Added missing translation
jeppekroghitk 94c77d2
Fixed issue sync issue
jeppekroghitk 4c411a4
Fitted customer and accounts twig to fit synced data
jeppekroghitk f2ed1c8
translation yaml formatting
jeppekroghitk 80fa10e
coding standards
jeppekroghitk 675055b
coding standards
jeppekroghitk 61e4279
fixed displaying client type in table view
jeppekroghitk 750c012
Merge branch 'develop' into feature/projects
jeppekroghitk 41f6302
Removed projecttrackerid and source fiels for edit and creation
jeppekroghitk 325c887
removed projecttrackerid from edit and creation
jeppekroghitk 2433b0a
Removed unused function and outcommented code
jeppekroghitk 9de737a
Streamlining edit forms
jeppekroghitk 51cde69
Merge branch 'develop' into feature/projects
jeppekroghitk f3b0da7
Merge branch 'feature/projects' of github.com:itk-dev/economics into …
tuj 83074c2
#182: Removed PriceList. Adjusted home and navigation
tuj c939a99
#182: Aligned account templates with other templates
tuj 493a9c9
#182: Aligned client templates
tuj 9001633
#182: Cleaned up account form
tuj e2dd995
#182: Fixed client form
tuj 68069c1
#182: Added null case to choice
tuj 9951781
#182: Changed class
tuj 596464b
Merge pull request #63 from itk-dev/feature/projects-adjustments
tuj 1680336
#182: Added filter to issues to compensate for broken Leantime API
tuj 44cae63
#182: Added filter to issues and worklogs from leantime
tuj 1baad93
#182: Added option to disable a data provider
tuj 0447974
#182: Added username as worklog.worker
tuj 025e210
#182: Applied coding standards
tuj 6e4fb3b
#182: Added required searchCriteria to getProjectIssuesPaged
tuj f0be9a1
Merge pull request #64 from itk-dev/feature/projects-sync-adjustments
tuj 3d13aa5
#182: Removed unused code
tuj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
final class Version20240111113558 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return ''; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->addSql('CREATE TABLE price_list (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, price DOUBLE PRECISION DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->addSql('DROP TABLE price_list'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
final class Version20240112121236 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return ''; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->addSql('ALTER TABLE price_list ADD created_by VARCHAR(255) DEFAULT NULL, ADD updated_by VARCHAR(255) DEFAULT NULL, ADD created_at DATETIME NOT NULL, ADD updated_at DATETIME NOT NULL'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->addSql('ALTER TABLE price_list DROP created_by, DROP updated_by, DROP created_at, DROP updated_at'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?php | ||
|
||
namespace App\Controller; | ||
|
||
use App\Entity\Account; | ||
use App\Form\AccountType; | ||
use App\Repository\AccountRepository; | ||
use Doctrine\ORM\EntityManagerInterface; | ||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Component\Routing\Annotation\Route; | ||
|
||
#[Route('/admin/account')] | ||
class AccountController extends AbstractController | ||
{ | ||
#[Route('/', name: 'app_account_index', methods: ['GET'])] | ||
public function index(AccountRepository $accountRepository): Response | ||
{ | ||
return $this->render('account/index.html.twig', [ | ||
'accounts' => $accountRepository->findAll(), | ||
]); | ||
} | ||
|
||
#[Route('/new', name: 'app_account_new', methods: ['GET', 'POST'])] | ||
public function new(Request $request, EntityManagerInterface $entityManager): Response | ||
{ | ||
$account = new Account(); | ||
$form = $this->createForm(AccountType::class, $account); | ||
$form->handleRequest($request); | ||
|
||
if ($form->isSubmitted() && $form->isValid()) { | ||
$entityManager->persist($account); | ||
$entityManager->flush(); | ||
|
||
return $this->redirectToRoute('app_account_index', [], Response::HTTP_SEE_OTHER); | ||
} | ||
|
||
return $this->render('account/new.html.twig', [ | ||
'account' => $account, | ||
'form' => $form, | ||
]); | ||
} | ||
|
||
#[Route('/{id}', name: 'app_account_show', methods: ['GET'])] | ||
public function show(Account $account): Response | ||
{ | ||
return $this->render('account/show.html.twig', [ | ||
'account' => $account, | ||
]); | ||
} | ||
|
||
#[Route('/{id}/edit', name: 'app_account_edit', methods: ['GET', 'POST'])] | ||
public function edit(Request $request, Account $account, EntityManagerInterface $entityManager): Response | ||
{ | ||
$form = $this->createForm(AccountType::class, $account); | ||
$form->handleRequest($request); | ||
|
||
if ($form->isSubmitted() && $form->isValid()) { | ||
$entityManager->flush(); | ||
|
||
return $this->redirectToRoute('app_account_index', [], Response::HTTP_SEE_OTHER); | ||
} | ||
|
||
return $this->render('account/edit.html.twig', [ | ||
'account' => $account, | ||
'form' => $form, | ||
]); | ||
} | ||
|
||
#[Route('/{id}', name: 'app_account_delete', methods: ['POST'])] | ||
public function delete(Request $request, Account $account, EntityManagerInterface $entityManager): Response | ||
{ | ||
$token = $request->request->get('_token'); | ||
if (is_string($token) && $this->isCsrfTokenValid('delete'.$account->getId(), $token)) { | ||
$entityManager->remove($account); | ||
$entityManager->flush(); | ||
} | ||
|
||
return $this->redirectToRoute('app_account_index', [], Response::HTTP_SEE_OTHER); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?php | ||
|
||
namespace App\Controller; | ||
|
||
use App\Entity\Client; | ||
use App\Form\ClientType; | ||
use App\Repository\ClientRepository; | ||
use Doctrine\ORM\EntityManagerInterface; | ||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Component\Routing\Annotation\Route; | ||
|
||
#[Route('/admin/client')] | ||
class ClientController extends AbstractController | ||
{ | ||
#[Route('/', name: 'app_client_index', methods: ['GET'])] | ||
public function index(ClientRepository $clientRepository): Response | ||
{ | ||
return $this->render('client/index.html.twig', [ | ||
'clients' => $clientRepository->findAll(), | ||
]); | ||
} | ||
|
||
#[Route('/new', name: 'app_client_new', methods: ['GET', 'POST'])] | ||
public function new(Request $request, EntityManagerInterface $entityManager): Response | ||
{ | ||
$client = new Client(); | ||
$form = $this->createForm(ClientType::class, $client); | ||
$form->handleRequest($request); | ||
|
||
if ($form->isSubmitted() && $form->isValid()) { | ||
$entityManager->persist($client); | ||
$entityManager->flush(); | ||
|
||
return $this->redirectToRoute('app_client_index', [], Response::HTTP_SEE_OTHER); | ||
} | ||
|
||
return $this->render('client/new.html.twig', [ | ||
'client' => $client, | ||
'form' => $form, | ||
]); | ||
} | ||
|
||
#[Route('/{id}', name: 'app_client_show', methods: ['GET'])] | ||
public function show(Client $client): Response | ||
{ | ||
return $this->render('client/show.html.twig', [ | ||
'client' => $client, | ||
]); | ||
} | ||
|
||
#[Route('/{id}/edit', name: 'app_client_edit', methods: ['GET', 'POST'])] | ||
public function edit(Request $request, Client $client, EntityManagerInterface $entityManager): Response | ||
{ | ||
$form = $this->createForm(ClientType::class, $client); | ||
$form->handleRequest($request); | ||
|
||
if ($form->isSubmitted() && $form->isValid()) { | ||
$entityManager->flush(); | ||
|
||
return $this->redirectToRoute('app_client_index', [], Response::HTTP_SEE_OTHER); | ||
} | ||
|
||
return $this->render('client/edit.html.twig', [ | ||
'client' => $client, | ||
'form' => $form, | ||
]); | ||
} | ||
|
||
#[Route('/{id}', name: 'app_client_delete', methods: ['POST'])] | ||
public function delete(Request $request, Client $client, EntityManagerInterface $entityManager): Response | ||
{ | ||
$token = $request->request->get('_token'); | ||
if (is_string($token) && $this->isCsrfTokenValid('delete'.$client->getId(), $token)) { | ||
$entityManager->remove($client); | ||
$entityManager->flush(); | ||
} | ||
|
||
return $this->redirectToRoute('app_client_index', [], Response::HTTP_SEE_OTHER); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?php | ||
|
||
namespace App\Controller; | ||
|
||
use App\Entity\PriceList; | ||
use App\Form\PriceListType; | ||
use App\Repository\PriceListRepository; | ||
use Doctrine\ORM\EntityManagerInterface; | ||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Component\Routing\Annotation\Route; | ||
|
||
#[Route('/admin/price-list')] | ||
class PriceListController extends AbstractController | ||
{ | ||
#[Route('/', name: 'app_price_list_index', methods: ['GET'])] | ||
public function index(PriceListRepository $priceListRepository): Response | ||
{ | ||
return $this->render('price_list/index.html.twig', [ | ||
'price_lists' => $priceListRepository->findAll(), | ||
]); | ||
} | ||
|
||
#[Route('/new', name: 'app_price_list_new', methods: ['GET', 'POST'])] | ||
public function new(Request $request, EntityManagerInterface $entityManager): Response | ||
{ | ||
$priceList = new PriceList(); | ||
$form = $this->createForm(PriceListType::class, $priceList); | ||
$form->handleRequest($request); | ||
|
||
if ($form->isSubmitted() && $form->isValid()) { | ||
$entityManager->persist($priceList); | ||
$entityManager->flush(); | ||
|
||
return $this->redirectToRoute('app_price_list_index', [], Response::HTTP_SEE_OTHER); | ||
} | ||
|
||
return $this->render('price_list/new.html.twig', [ | ||
'price_list' => $priceList, | ||
'form' => $form, | ||
]); | ||
} | ||
|
||
#[Route('/{id}', name: 'app_price_list_show', methods: ['GET'])] | ||
public function show(PriceList $priceList): Response | ||
{ | ||
return $this->render('price_list/show.html.twig', [ | ||
'price_list' => $priceList, | ||
]); | ||
} | ||
|
||
#[Route('/{id}/edit', name: 'app_price_list_edit', methods: ['GET', 'POST'])] | ||
public function edit(Request $request, PriceList $priceList, EntityManagerInterface $entityManager): Response | ||
{ | ||
$form = $this->createForm(PriceListType::class, $priceList); | ||
$form->handleRequest($request); | ||
|
||
if ($form->isSubmitted() && $form->isValid()) { | ||
$entityManager->flush(); | ||
|
||
return $this->redirectToRoute('app_price_list_index', [], Response::HTTP_SEE_OTHER); | ||
} | ||
|
||
return $this->render('price_list/edit.html.twig', [ | ||
'price_list' => $priceList, | ||
'form' => $form, | ||
]); | ||
} | ||
|
||
#[Route('/{id}', name: 'app_price_list_delete', methods: ['POST'])] | ||
public function delete(Request $request, PriceList $priceList, EntityManagerInterface $entityManager): Response | ||
{ | ||
$token = $request->request->get('_token'); | ||
if (is_string($token) && $this->isCsrfTokenValid('delete'.$priceList->getId(), $token)) { | ||
$entityManager->remove($priceList); | ||
$entityManager->flush(); | ||
} | ||
|
||
return $this->redirectToRoute('app_price_list_index', [], Response::HTTP_SEE_OTHER); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace App\Entity; | ||
|
||
use App\Repository\PriceListRepository; | ||
use Doctrine\ORM\Mapping as ORM; | ||
|
||
#[ORM\Entity(repositoryClass: PriceListRepository::class)] | ||
class PriceList extends AbstractBaseEntity | ||
{ | ||
#[ORM\Column(length: 255)] | ||
private ?string $name = null; | ||
|
||
#[ORM\Column(nullable: true)] | ||
private ?float $price = null; | ||
|
||
public function getName(): ?string | ||
{ | ||
return $this->name; | ||
} | ||
|
||
public function setName(string $name): self | ||
{ | ||
$this->name = $name; | ||
|
||
return $this; | ||
} | ||
|
||
public function getPrice(): ?float | ||
{ | ||
return $this->price; | ||
} | ||
|
||
public function setPrice(?float $price): self | ||
{ | ||
$this->price = $price; | ||
|
||
return $this; | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of the PriceList? It is not used anywhere else in the system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Atm. it does not have any purpose in the system and should be removed.