ok for form to add entry for equipment not listed, next save entry and equipment in db
This commit is contained in:
parent
5b47a9d0ba
commit
cd22b2a759
17 changed files with 178 additions and 25 deletions
|
|
@ -6,13 +6,10 @@ use Garradin\DB;
|
|||
|
||||
class Category
|
||||
{
|
||||
protected $id;
|
||||
protected $name;
|
||||
|
||||
protected $_types = [
|
||||
'id' => 'int',
|
||||
'name' => 'string',
|
||||
];
|
||||
protected $columns_order = array(
|
||||
'id',
|
||||
'name',
|
||||
);
|
||||
|
||||
public function add($data = [])
|
||||
{
|
||||
|
|
|
|||
30
src/lib/Entry.php
Normal file
30
src/lib/Entry.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace Garradin\Plugin\Materiels;
|
||||
|
||||
use Garradin\DB;
|
||||
|
||||
class Entry
|
||||
{
|
||||
protected $columns_order = array(
|
||||
'id',
|
||||
'kind',
|
||||
'number_of_equipments',
|
||||
'equipment_id',
|
||||
'date_of_entry',
|
||||
);
|
||||
|
||||
public function listKinds()
|
||||
{
|
||||
return array(
|
||||
'Achat',
|
||||
'Don',
|
||||
'Récupération',
|
||||
);
|
||||
}
|
||||
|
||||
public function listEquipmentIds()
|
||||
{
|
||||
// return $this->kinds;
|
||||
}
|
||||
}
|
||||
16
src/lib/Equipment.php
Normal file
16
src/lib/Equipment.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace Garradin\Plugin\Materiels;
|
||||
|
||||
use Garradin\DB;
|
||||
|
||||
class Equipment
|
||||
{
|
||||
protected $columns_order = array(
|
||||
'id',
|
||||
'category_id',
|
||||
'localisation_id',
|
||||
'number_of_equipments',
|
||||
'designation'
|
||||
);
|
||||
}
|
||||
|
|
@ -6,13 +6,10 @@ use Garradin\DB;
|
|||
|
||||
class Location
|
||||
{
|
||||
protected $id;
|
||||
protected $name;
|
||||
|
||||
protected $_types = [
|
||||
'id' => 'int',
|
||||
'name' => 'string',
|
||||
];
|
||||
protected $columns_order = array(
|
||||
'id',
|
||||
'name',
|
||||
);
|
||||
|
||||
public function add($data = [])
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue