mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
vue_activity location: add NewLocation fields, submit activity form with hidden field (+)
This commit is contained in:
@@ -461,6 +461,7 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface,
|
||||
'methods' => [
|
||||
Request::METHOD_GET => true,
|
||||
Request::METHOD_HEAD => true,
|
||||
Request::METHOD_POST => true,
|
||||
]
|
||||
],
|
||||
|
||||
|
@@ -9,10 +9,14 @@ use Chill\MainBundle\Validation\Constraint\PhonenumberConstraint;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
|
||||
/**
|
||||
* @ORM\Table(name="chill_main_location")
|
||||
* @ORM\Entity(repositoryClass=LocationRepository::class)
|
||||
* @DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "location"=Location::class
|
||||
* })
|
||||
*/
|
||||
class Location implements TrackCreationInterface, TrackUpdateInterface
|
||||
{
|
||||
|
@@ -5,10 +5,14 @@ namespace Chill\MainBundle\Entity;
|
||||
use Chill\MainBundle\Repository\LocationTypeRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
|
||||
/**
|
||||
* @ORM\Table(name="chill_main_location_type")
|
||||
* @ORM\Entity(repositoryClass=LocationTypeRepository::class)
|
||||
* @DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "location-type"=LocationType::class
|
||||
* })
|
||||
*/
|
||||
class LocationType
|
||||
{
|
||||
|
@@ -548,6 +548,48 @@ paths:
|
||||
description: "ok"
|
||||
401:
|
||||
description: "Unauthorized"
|
||||
post:
|
||||
tags:
|
||||
- location
|
||||
summary: create a new location
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
phonenumber1:
|
||||
type: string
|
||||
phonenumber2:
|
||||
type: string
|
||||
email:
|
||||
type: string
|
||||
address:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
locationtype:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
responses:
|
||||
401:
|
||||
description: "Unauthorized"
|
||||
404:
|
||||
description: "Not found"
|
||||
200:
|
||||
description: "OK"
|
||||
422:
|
||||
description: "Unprocessable entity (validation errors)"
|
||||
400:
|
||||
description: "transition cannot be applyed"
|
||||
|
||||
/1.0/main/location-type.json:
|
||||
get:
|
||||
|
Reference in New Issue
Block a user