recent activities via API (#761)

This commit is contained in:
Kevin Papst
2019-05-07 22:24:28 +02:00
committed by GitHub
parent 98f386dad6
commit b1855447b8
40 changed files with 376 additions and 258 deletions

View File

@@ -2,21 +2,22 @@ nelmio_api_doc:
models:
use_jms: true
names:
- { alias: CustomerEditForm, type: App\Form\CustomerEditForm, groups: [Default, Entity, Customer] }
- { alias: CustomerEntity, type: App\Entity\Customer, groups: [Default, Entity, Customer] }
- { alias: CustomerCollection, type: App\Entity\Customer, groups: [Default, Collection, Customer] }
- { alias: ProjectEditForm, type: App\Form\ProjectEditForm, groups: [Default, Entity, Project] }
- { alias: ProjectEntity, type: App\Entity\Project, groups: [Default, Entity, Project] }
- { alias: ProjectCollection, type: App\Entity\Project, groups: [Default, Collection, Project] }
- { alias: ActivityEditForm, type: App\Form\ActivityEditForm, groups: [Default, Entity, Activity] }
- { alias: ActivityEntity, type: App\Entity\Activity, groups: [Default, Entity, Activity] }
- { alias: ActivityCollection, type: App\Entity\Activity, groups: [Default, Collection, Activity] }
- { alias: TimesheetEditForm, type: App\Form\TimesheetEditForm, groups: [Default, Entity, Timesheet] }
- { alias: TimesheetEntity, type: App\Entity\Timesheet, groups: [Default, Entity, Timesheet] }
- { alias: TimesheetCollection, type: App\Entity\Timesheet, groups: [Default, Collection, Timesheet] }
- { alias: UserEntity, type: App\Entity\User, groups: [Default, Entity, User] }
- { alias: UserCollection, type: App\Entity\User, groups: [Default, Collection, User] }
- { alias: I18nConfig, type: App\API\Model\I18n, groups: [Default] }
- { alias: CustomerEditForm, type: App\Form\CustomerEditForm, groups: [Default, Entity, Customer] }
- { alias: CustomerEntity, type: App\Entity\Customer, groups: [Default, Entity, Customer] }
- { alias: CustomerCollection, type: App\Entity\Customer, groups: [Default, Collection, Customer] }
- { alias: ProjectEditForm, type: App\Form\ProjectEditForm, groups: [Default, Entity, Project] }
- { alias: ProjectEntity, type: App\Entity\Project, groups: [Default, Entity, Project] }
- { alias: ProjectCollection, type: App\Entity\Project, groups: [Default, Collection, Project] }
- { alias: ActivityEditForm, type: App\Form\ActivityEditForm, groups: [Default, Entity, Activity] }
- { alias: ActivityEntity, type: App\Entity\Activity, groups: [Default, Entity, Activity] }
- { alias: ActivityCollection, type: App\Entity\Activity, groups: [Default, Collection, Activity] }
- { alias: TimesheetEditForm, type: App\Form\TimesheetEditForm, groups: [Default, Entity, Timesheet] }
- { alias: TimesheetEntity, type: App\Entity\Timesheet, groups: [Default, Entity, Timesheet] }
- { alias: TimesheetCollection, type: App\Entity\Timesheet, groups: [Default, Collection, Timesheet] }
- { alias: TimesheetSubCollection, type: App\Entity\Timesheet, groups: [Default, Subresource, Timesheet] }
- { alias: UserEntity, type: App\Entity\User, groups: [Default, Entity, User] }
- { alias: UserCollection, type: App\Entity\User, groups: [Default, Collection, User] }
- { alias: I18nConfig, type: App\API\Model\I18n, groups: [Default] }
areas:
path_patterns:
- ^/api(?!/doc)

View File

@@ -1,11 +1,3 @@
app.test.activity_recent:
path: /{_locale}/activities/recent
controller: App\Controller\NavbarController::recentActivitiesAction
requirements:
_locale: '%app_locales%'
defaults:
_locale: '%locale%'
app.test.sidebar_settings:
path: /{_locale}/sidebar/settings
controller: App\Controller\SidebarController::settingsAction

View File

@@ -16,10 +16,10 @@ App\Entity\Activity:
groups: [Default]
fixedRate:
include: true
groups: [Default]
groups: [Activity]
hourlyRate:
include: true
groups: [Default]
groups: [Activity]
project:
include: false
exclude: true

View File

@@ -4,10 +4,8 @@ App\Entity\Customer:
properties:
id:
include: true
groups: [Default]
name:
include: true
groups: [Default]
number:
include: true
groups: [Entity]
@@ -16,7 +14,6 @@ App\Entity\Customer:
groups: [Entity]
visible:
include: true
groups: [Default]
company:
include: true
groups: [Entity]
@@ -52,10 +49,10 @@ App\Entity\Customer:
groups: [Entity]
fixedRate:
include: true
groups: [Default]
groups: [Customer]
hourlyRate:
include: true
groups: [Default]
groups: [Customer]
color:
include: true
groups: [Entity]

View File

@@ -4,16 +4,13 @@ App\Entity\Project:
properties:
id:
include: true
groups: [Default]
name:
include: true
groups: [Default]
comment:
include: true
groups: [Entity]
visible:
include: true
groups: [Default]
budget:
include: true
groups: [Entity]
@@ -22,14 +19,12 @@ App\Entity\Project:
groups: [Entity]
fixedRate:
include: true
groups: [Default]
groups: [Project]
hourlyRate:
include: true
groups: [Default]
groups: [Project]
customer:
include: false
exclude: true
groups: [Default]
groups: [Subresource]
color:
include: true
groups: [Entity]
@@ -38,4 +33,4 @@ App\Entity\Project:
serialized_name: customer
exp: "object.getCustomer() === null ? null : object.getCustomer().getId()"
type: integer
groups: [Default]
groups: [Entity, Collection]

View File

@@ -4,20 +4,16 @@ App\Entity\Timesheet:
properties:
id:
include: true
groups: [Default]
begin:
exclude: true
end:
exclude: true
duration:
include: true
groups: [Default]
description:
include: true
groups: [Default]
rate:
include: true
groups: [Default]
fixedRate:
include: true
groups: [Entity]
@@ -28,9 +24,9 @@ App\Entity\Timesheet:
include: true
groups: [Entity]
activity:
exclude: true
groups: [Subresource]
project:
exclude: true
groups: [Subresource]
user:
exclude: true
virtual_properties:
@@ -38,24 +34,21 @@ App\Entity\Timesheet:
serialized_name: begin
exp: "object.getBegin() === null ? null : object.getBegin()"
type: DateTime
groups: [Default]
getEnd:
serialized_name: end
exp: "object.getEnd() === null ? null : object.getEnd()"
type: DateTime
groups: [Default]
getActivity:
serialized_name: activity
exp: "object.getActivity() === null ? null : object.getActivity().getId()"
type: integer
groups: [Default]
groups: [Entity, Collection]
getProject:
serialized_name: project
exp: "object.getProject() === null ? null : object.getProject().getId()"
type: integer
groups: [Default]
groups: [Entity, Collection]
getUser:
serialized_name: user
exp: "object.getUser().getId()"
type: integer
groups: [Default]