Skip to content

Commit

Permalink
Continue rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ddurieux committed Dec 31, 2024
1 parent 5e3e2cd commit 8a21054
Show file tree
Hide file tree
Showing 86 changed files with 1,163 additions and 559 deletions.
2 changes: 1 addition & 1 deletion public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
$lang = new \App\Translation();
$translator = $lang->loadLanguage();
$apiversion = 'v1';
$basePath = "/gsit96";
$basePath = "/";
$phpunit = false;

// manage the basepath dynamically
Expand Down
4 changes: 0 additions & 4 deletions src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ public function __construct()
$GLOBALS['entity_id'] = $arguments['decoded']['entity_id'];
$GLOBALS['entity_treepath'] = $arguments['decoded']['entity_treepath'];
$GLOBALS['entity_recursive'] = $arguments['decoded']['entity_recursive'];
// Load permissions
// $GLOBALS['permissions'] = \App\v1\Controllers\Config\Role::generatePermission(
// $arguments['decoded']['role_id']
// );
},
"error" => function ($response, $arguments)
{
Expand Down
19 changes: 19 additions & 0 deletions src/Events/RuleCreating.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

declare(strict_types=1);

namespace App\Events;

final class RuleCreating
{
public function __construct(public $model)
{
// $test =& $model;
// new \App\Events\EntityCreating($test);

// $model = $test;
$className = get_class($model);
$spl = explode('\\', $className);
$model->sub_type = 'Rule' . $spl[array_key_last($spl)];
}
}
1 change: 0 additions & 1 deletion src/Models/Appliance.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\Models;

use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Relations\MorphToMany;
use Illuminate\Database\Eloquent\Relations\MorphMany;
Expand Down
1 change: 1 addition & 0 deletions src/Models/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ public function getDropdownValues($filter = null)
/**
* Get definition fields of model
* @param $bypassRights boolean Set true is not want manage rights (only on some features like notifications)
* @param $usein string=search|form|notification|rule Force to get only definition for this part of the app
*/
public function getDefinitions($bypassRights = false, $usein = null)
{
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Applianceitem.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Applianceitemrelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Calendarsegment.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Cartridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Certificateitem.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ChangeItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ChangeProblem.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ChangeTicket.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Changecost.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Changevalidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Clusteritem.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Computeritem.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Consumable.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ContractItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Documentitem.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Infocom.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDevicebattery.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDevicecase.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDevicecontrol.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDevicedrive.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDevicefirmware.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDevicegeneric.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDevicegraphiccard.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDeviceharddrive.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDevicememory.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDevicemotherboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDevicenetworkcard.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDevicepci.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDevicepowersupply.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDeviceprocessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDevicesensor.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemDevicesoundcard.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemEnclosure.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemProblem.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemSoftwarelicence.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemSoftwareversion.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ItemTicket.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Itilproject.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Networkalias.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Ola.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ProblemTicket.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/Problemcost.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
1 change: 0 additions & 1 deletion src/Models/Definitions/ProfileUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static function getDefinition()
'title' => $translator->translate('ID'),
'type' => 'input',
'name' => 'id',
'displaygroup' => 'main',
'display' => false,
],
];
Expand Down
Loading

0 comments on commit 8a21054

Please sign in to comment.