Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
85b7cac
initial commit #655
oyeaussie Mar 6, 2025
c057ea4
update issue #655
oyeaussie Mar 6, 2025
b439bcb
update issue #655
oyeaussie Mar 6, 2025
bf63a5a
update issue #655
oyeaussie Mar 6, 2025
93e6d4c
fix issue #656
oyeaussie Mar 6, 2025
5d51118
minor bug fix with relation conditions issue #656
oyeaussie Mar 6, 2025
61854c8
update #655, add cancel button to module.
oyeaussie Mar 6, 2025
d13bca9
fix issue #657
oyeaussie Mar 6, 2025
b17a20c
initial commit, issue #658
oyeaussie Mar 7, 2025
fcb243d
fix issue #584 & #657
oyeaussie Mar 7, 2025
fdbdb10
fix issue #658
oyeaussie Mar 7, 2025
af637af
fix issue #198 and #659
oyeaussie Mar 7, 2025
d6f71ac
initial commit #660
oyeaussie Mar 8, 2025
ffcc332
fix auth after implementing fix for issue #657
oyeaussie Mar 9, 2025
db55396
update issue #660
oyeaussie Mar 9, 2025
ca14af4
cleanup #660
oyeaussie Mar 9, 2025
b117848
fix issue #661
oyeaussie Mar 9, 2025
050eb89
fix issue #664
oyeaussie Mar 11, 2025
039d9ac
fix issue #665
oyeaussie Mar 11, 2025
22d3f31
fix issue #665, added form to accounts.
oyeaussie Mar 11, 2025
f033017
fix issue #666
oyeaussie Mar 11, 2025
a4a4e4d
update issue #666
oyeaussie Mar 11, 2025
e52d8a5
fix issue #667. Also fixed some minor bugs with bundle not able to ge…
oyeaussie Mar 11, 2025
8dc87f5
update issue #666, added cookies set for setup
oyeaussie Mar 11, 2025
44155e4
update issue #666
oyeaussie Mar 11, 2025
68eefb5
update issue #666, domain name cannot be null
oyeaussie Mar 11, 2025
ba975ae
update issue #666, fix setup cookies.
oyeaussie Mar 11, 2025
2f0725b
fix issue #668. enabled preserve keys for numeric index.
oyeaussie Mar 12, 2025
346086c
fix issue #669
oyeaussie Mar 12, 2025
ee18cc6
fix issue #670
oyeaussie Mar 12, 2025
72b6cd2
update issue #332
oyeaussie Mar 12, 2025
61229cc
fix issue #671
oyeaussie Mar 13, 2025
d76c331
fix issue #672
oyeaussie Mar 14, 2025
7b71eab
fix issue #673, Now you can define value to be grabbed from hierarchy…
oyeaussie Mar 17, 2025
677fac3
fix issue #674
oyeaussie Mar 17, 2025
cf0603e
update issue #332
oyeaussie Mar 17, 2025
a84961e
fix issue #677
oyeaussie Mar 21, 2025
347ad1c
Initial commit #678
oyeaussie May 3, 2025
065fcc1
fix issue #443
oyeaussie May 4, 2025
d876758
fix issue #680
oyeaussie May 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 66 additions & 65 deletions apps/Core/Components/System/Filters/FiltersComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,82 +22,83 @@ public function initialize()
*/
public function viewAction()
{
if ($this->app['id'] == 1) {
$components = $this->modules->components->components;

foreach ($components as $key => $component) {
$components[$key]['name'] = $component['name'] . ' (' . $component['category'] . ')';
}

$this->view->components = $components;

if (isset($this->getData()['id'])) {
if ($this->getData()['id'] != 0) {
$filter = $this->filters->getById($this->getData()['id']);
if (isset($this->getData()['id'])) {
if ($this->getData()['id'] != 0) {
$filter = $this->filters->getById($this->getData()['id']);

if (!$filter) {
return $this->throwIdNotFound();
}

$this->view->filter = $filter;
if (!$filter) {
return $this->throwIdNotFound();
}

$this->view->pick('filters/view');

return;
$this->view->filter = $filter;
}

if ($this->request->isPost()) {
$replaceColumns =
[
'filter_type' => ['html' =>
[
'0' => 'System',
'1' => 'User',
'2' => 'User',
]
],
'is_default' => ['html' =>
[
'0' => 'No',
'1' => 'Yes'
]
],
'auto_generated' => ['html' =>
[
'0' => 'No',
'1' => 'Yes'
]
]
];
$this->view->pick('filters/view');

return;
} else {
if ($this->app['id'] == 1) {
$components = $this->modules->components->components;
} else {
$replaceColumns = null;
$components = $this->modules->components->getComponentsForAppType($this->app['app_type']);
}

$controlActions =
foreach ($components as $key => $component) {
$components[$key]['name'] = $component['name'] . ' (' . $component['category'] . ')';
}

$this->view->components = $components;
}

if ($this->request->isPost()) {
$replaceColumns =
[
'actionsToEnable' =>
[
'edit' => 'system/filters',
'remove' => 'system/filters/remove'
'filter_type' => ['html' =>
[
'0' => 'System',
'1' => 'User'
]
],
'is_default' => ['html' =>
[
'0' => 'No',
'1' => 'Yes'
]
],
'auto_generated' => ['html' =>
[
'0' => 'No',
'1' => 'Yes'
]
]
];

$this->generateDTContent(
$this->filters,
'system/filters/view',
null,
['name', 'filter_type', 'auto_generated', 'is_default'],
true,
['name', 'filter_type', 'auto_generated', 'is_default'],
$controlActions,
null,
$replaceColumns,
'name'
);

$this->view->pick('filters/list');
} else {
$replaceColumns = null;
}

$controlActions =
[
'actionsToEnable' =>
[
'edit' => 'system/filters',
'remove' => 'system/filters/remove'
]
];

$this->generateDTContent(
$this->filters,
'system/filters/view',
null,
['name', 'app_type', 'filter_type', 'auto_generated', 'is_default'],
true,
['name', 'app_type', 'filter_type', 'auto_generated', 'is_default'],
$controlActions,
null,
$replaceColumns,
'name'
);

$this->view->pick('filters/list');
}

/**
Expand All @@ -112,7 +113,7 @@ public function addAction()

$this->view->filters = $this->filters->packagesData->filters;
} else {
//Adding close in add as cloning requires add permission so both add and clone can be performed in same action.
//Adding clone in add as cloning requires add permission so both add and clone can be performed in same action.
if (isset($this->postData()['clone']) && $this->postData()['clone']) {
$this->filters->cloneFilter($this->postData());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ public function viewAction()
$this->view->apps = $this->accounts->packagesData->apps;

$this->view->roles = $this->accounts->packagesData->roles;

$this->view->countries = $this->basepackages->geoCountries->getAll()->geoCountries;

$this->view->timezones = $this->basepackages->geoTimezones->getAll()->geoTimezones;
}

$this->addResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ public function viewAction()

$this->view->canUse2fa = $this->profiles->packagesData->canUse2fa;

$this->view->countries = $this->basepackages->geoCountries->getAll()->geoCountries;

$this->view->timezones = $this->basepackages->geoTimezones->getAll()->geoTimezones;

$apis = $this->api->getApiInfo(false, true);
$passwordApis = [];
if ($apis && count($apis) > 0) {
Expand Down
29 changes: 28 additions & 1 deletion apps/Core/Components/System/Workers/Tasks/TasksComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ class TasksComponent extends BaseComponent

protected $tasks;

protected $calls;

protected $schedules;

public function initialize()
{
$this->tasks = $this->basepackages->workers->tasks;

$this->calls = $this->basepackages->workers->calls->calls;
}

/**
Expand All @@ -26,7 +30,29 @@ public function viewAction()
$this->schedules = $this->basepackages->workers->schedules->schedules;

if (isset($this->getData()['id'])) {
$calls = $this->tasks->getAllCalls();
$calls = [];

if ($this->calls && count($this->calls) > 0) {
foreach ($this->calls as $thisCalls) {
if (!$thisCalls['package']) {
continue;
}

if (!isset($calls[$thisCalls['id']])) {
$calls[$thisCalls['id']] = [];
}

$calls[$thisCalls['id']]['id'] = $thisCalls['id'];
$calls[$thisCalls['id']]['name'] = $thisCalls['display_name'] ?? $thisCalls['name'];
$calls[$thisCalls['id']]['description'] = $thisCalls['description'];
$calls[$thisCalls['id']]['package_id'] = $thisCalls['package_id'];
$calls[$thisCalls['id']]['package_name'] = $thisCalls['package']['display_name'] ?? $thisCalls['package']['name'];
}
}

$this->tasks->setFFRelations(true);

// $calls = $this->tasks->getAllCalls();

$this->view->calls = $calls;

Expand All @@ -45,6 +71,7 @@ public function viewAction()

$this->view->task = $task;
}

$this->view->pick('tasks/view');

return;
Expand Down
10 changes: 7 additions & 3 deletions apps/Core/Packages/Adminltetags/Tags/Buttons/ButtonGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ protected function buildButton()
if ($this->params['groupRadioButtonChecked'] === $button['value']) {
$hasButtonChecked = 'checked';
$hasButtonCheckedClasses = 'active focus';
if ($this->params['groupRadioButtonStyle'] === 'outline') {
if (isset($this->params['groupRadioButtonStyle']) &&
$this->params['groupRadioButtonStyle'] === 'outline'
) {
$hasButtonCheckedBgClass = '';
} else {
$hasButtonCheckedBgClass = 'bg-' . $button['type'];
Expand All @@ -157,7 +159,9 @@ protected function buildButton()
if (isset($button['checked']) && $button['checked'] === true) {
$hasButtonChecked = 'checked';
$hasButtonCheckedClasses = 'active focus';
if ($this->params['groupRadioButtonStyle'] === 'outline') {
if (isset($this->params['groupRadioButtonStyle']) &&
$this->params['groupRadioButtonStyle'] === 'outline'
) {
$hasButtonCheckedBgClass = '';
} else {
$hasButtonCheckedBgClass = 'bg-' . $button['type'];
Expand All @@ -169,7 +173,7 @@ protected function buildButton()
}
}

if (isset($buton['disabled']) && $buton['disabled'] === true) {
if (isset($button['disabled']) && $button['disabled'] === true) {
$hasButtonDisabled = 'disabled';
$hasButtonCursor = 'style=cursor:default;';
} else {
Expand Down
17 changes: 16 additions & 1 deletion apps/Core/Packages/Adminltetags/Tags/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,22 @@ protected function treeItem($key, $items, $itemIcon, $children = null)
$key = $itemValue[$this->fieldParams['fieldDataSelect' . $selectType . 'OptionsKey']];

if (count($this->fieldParams['fieldDataSelect' . $selectType . 'OptionsValue']) === 1) {
$value = $itemValue[$this->fieldParams['fieldDataSelect' . $selectType . 'OptionsValue'][0]];
if (str_contains($this->fieldParams['fieldDataSelect' . $selectType . 'OptionsValue'][0], '/')) {
$hierarchyOptionValue = explode('/', $this->fieldParams['fieldDataSelect' . $selectType . 'OptionsValue'][0]);

if (count($hierarchyOptionValue) === 1) {
$value = $itemValue[$hierarchyOptionValue[0]];
} else {
$itemValueArr = [];
$itemValueArr = $itemValue;
foreach ($hierarchyOptionValue as $optionsValueArr) {
$itemValueArr = $itemValueArr[$optionsValueArr];
}
$value = $itemValueArr;
}
} else {
$value = $itemValue[$this->fieldParams['fieldDataSelect' . $selectType . 'OptionsValue'][0]];
}
} else {
foreach ($this->fieldParams['fieldDataSelect' . $selectType . 'OptionsValue'] as $optionsValueKey) {
if (is_string($optionsValueKey)) {
Expand Down
17 changes: 11 additions & 6 deletions apps/Core/Packages/Adminltetags/Traits/DynamicTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public function generateDTContent(
int $componentId = null,
$resetCache = false,
$enableCache = true,
$packageData = []
$packageData = [],
$excludeColumns = []
) {
if (gettype($package) === 'string') {
$package = $this->usePackage($package);
Expand All @@ -43,9 +44,9 @@ public function generateDTContent(
$modelsColumnMap = $package->getModelsColumnMap($this->removeEscapeFromName($columnsForTable));

if (isset($modelsColumnMap['columns'])) {
$table['columns'] = $this->sortColumns($columnsForTable, $modelsColumnMap['columns']);
$table['columns'] = $this->sortColumns($columnsForTable, $modelsColumnMap['columns'], $excludeColumns);
} else {
$table['columns'] = $this->sortColumns($columnsForTable, $modelsColumnMap);
$table['columns'] = $this->sortColumns($columnsForTable, $modelsColumnMap, $excludeColumns);
}

if ($dtReplaceColumnsTitle && count($dtReplaceColumnsTitle) > 0) {
Expand Down Expand Up @@ -80,9 +81,9 @@ public function generateDTContent(
$modelsColumnMap = $package->getModelsColumnMap($this->removeEscapeFromName($columnsForFilter));

if (isset($modelsColumnMap['columns'])) {
$table['filterColumns'] = $this->sortColumns($columnsForFilter, $modelsColumnMap['columns']);
$table['filterColumns'] = $this->sortColumns($columnsForFilter, $modelsColumnMap['columns'], $excludeColumns);
} else {
$table['filterColumns'] = $this->sortColumns($columnsForFilter, $modelsColumnMap);
$table['filterColumns'] = $this->sortColumns($columnsForFilter, $modelsColumnMap, $excludeColumns);
}

foreach ($filtersArr as $key => $filter) {
Expand Down Expand Up @@ -281,7 +282,7 @@ protected function extractColumnsForTable($columnsForTable, $rows)
return $rows;
}

protected function sortColumns($columnsForTable, $dbColumns)
protected function sortColumns($columnsForTable, $dbColumns, $excludeColumns = [])
{
$columnsForTable = $this->removeEscapeFromName($columnsForTable);

Expand All @@ -290,6 +291,10 @@ protected function sortColumns($columnsForTable, $dbColumns)
$sortedColumns = array_merge(['id' => $dbColumns['id']]);

foreach ($columnsForTable as $key => $column) {
if (in_array($column, $excludeColumns)) {
continue;
}

if ($column !== 'id') {
if ($dbColumns[$column]) {
$sortedColumns[$column] = $dbColumns[$column];
Expand Down
11 changes: 9 additions & 2 deletions apps/Core/Packages/Devtools/Modules/DevtoolsModules.php
Original file line number Diff line number Diff line change
Expand Up @@ -647,19 +647,24 @@ public function validateFilesHash($module)
(isset($module['repo_details']['latestRelease']['name']) &&
$module['repo_details']['latestRelease']['name'] !== $module['version'])
) {
$module = $this->modules->manager->getModuleInfo(
$moduleSync = $this->modules->manager->getModuleInfo(
[
'module_type' => $module['module_type'],
'module_id' => $module['id'],
'sync' => true,
'getLatestRelease' => true
]
);

if ($moduleSync) {
$module = array_merge($module, $moduleSync);
}
}

$module['repoExists'] = true;

if (isset($module['repo_details']['latestRelease']['name'])) {
$module['latestRelease'] = [];
$module['latestRelease'] = $module['repo_details']['latestRelease']['name'];
} else {
$module['latestRelease'] = false;
Expand Down Expand Up @@ -3520,7 +3525,9 @@ public function generateModuleRepoUrl($data)
$this->validation->init()->add('api_id', PresenceOf::class, ["message" => "Please provide api id."]);
$this->validation->add('app_type', PresenceOf::class, ["message" => "Please provide app type."]);
$this->validation->add('module_type', PresenceOf::class, ["message" => "Please provide module type."]);
$this->validation->add('category', PresenceOf::class, ["message" => "Please provide module category."]);
if ($data['module_type'] !== 'bundles') {
$this->validation->add('category', PresenceOf::class, ["message" => "Please provide module category."]);
}

if (!$this->validateData($data)) {
return false;
Expand Down
Loading