added begin, end and export filter for API timesheets (#639)

This commit is contained in:
Kevin Papst
2019-03-14 03:34:54 +01:00
committed by GitHub
parent 2e6f3ed864
commit bde791fa55
28 changed files with 993 additions and 86 deletions

View File

@@ -18,8 +18,8 @@ return [
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true],
KevinPapst\AdminLTEBundle\AdminLTEBundle::class => ['all' => true],
JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true],
FOS\UserBundle\FOSUserBundle::class => ['all' => true],
FOS\RestBundle\FOSRestBundle::class => ['all' => true],
Nelmio\ApiDocBundle\NelmioApiDocBundle::class => ['all' => true],
JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true],
];

View File

@@ -1,7 +1,4 @@
jms_serializer:
handlers:
datetime:
default_format: "Y-m-d H:i"
visitors:
xml:
format_output: '%kernel.debug%'

View File

@@ -8,6 +8,7 @@ nelmio_api_doc:
- { alias: TimesheetEditForm, type: App\Form\TimesheetEditForm, groups: [Default, Entity, Timesheet] }
- { alias: TimesheetEntity, type: App\Entity\Timesheet, groups: [Default, Entity, Timesheet] }
- { alias: UserEntity, type: App\Entity\User, groups: [Default, Entity, User] }
- { alias: I18nConfig, type: App\API\Model\I18n, groups: [Default] }
areas:
path_patterns:
- ^/api(?!/doc)
@@ -16,7 +17,7 @@ nelmio_api_doc:
schemes: [http, https]
info:
title: Kimai 2 - API Docs
description: REST API description for the Kimai 2 time-tracking software. Do not rely on the example values/models, they are currently generated wrong. Please fetch the request and response structure from the API itself.
description: REST API for the Kimai 2 time-tracking software. It's rather limited by now. If you need other methods, please let me know at GitHub!
version: 0.2
# parameters:
# hostname:

View File

@@ -0,0 +1,32 @@
App\API\Model\I18n:
exclusion_policy: All
custom_accessor_order: [formDateTime, formDate, dateTime, date, time, duration, is24hours]
properties:
formDateTime:
include: true
type: string
groups: [Default]
formDate:
include: true
type: string
groups: [Default]
dateTime:
include: true
type: string
groups: [Default]
time:
include: true
type: string
groups: [Default]
date:
include: true
type: string
groups: [Default]
duration:
include: true
type: string
groups: [Default]
is24hours:
include: true
type: boolean
groups: [Default]

View File

@@ -8,6 +8,7 @@ FOS\UserBundle\Model\User:
include: true
groups: [Entity]
roles:
type: array<string>
include: true
groups: [Entity]
email:

View File

@@ -20,7 +20,7 @@ services:
# this creates a service per class whose id is the fully-qualified class name
App\:
resource: '../src/*'
exclude: '../src/{Entity,Migrations,Tests}'
exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php,Constants.php}'
# controllers are imported separately to make sure services can be injected
# as action arguments even if you don't extend any base controller class
@@ -55,7 +55,7 @@ services:
arguments:
$defaults: "%kimai.defaults%"
App\Utils\LocaleSettings:
App\Configuration\LanguageFormattings:
arguments:
$languageSettings: "%kimai.languages%"