1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-02 08:56:48 +01:00

Fix aggiunta filtri modulo in Viste

This commit is contained in:
valentina 2024-08-27 11:08:11 +02:00
parent e26ded65b0
commit 87cbcab687
2 changed files with 10 additions and 16 deletions

View File

@ -106,6 +106,7 @@ switch (filter('op')) {
if (check_query($query)) {
$array = [
'name' => post('name')[$c],
'idgruppo' => post('gruppo')[$c],
'idmodule' => $id_record,
'clause' => $query,
@ -114,22 +115,15 @@ switch (filter('op')) {
if (!empty(post('id')[$c]) && !empty($query)) {
$id = post('id')[$c];
$clause = Clause::find($id);
$clause->idgruppo = post('gruppo')[$c];
$clause->idmodulo = $id_record;
$clause->clause = $query;
$clause->position = !empty(post('position')[$c]) ? 'HVN' : 'WHR';
$clause->setTranslation('title', post('name')[$c]);
$clause->save();
$dbo->update('zz_group_module', $array, ['id' => $id]);
$dbo->update('zz_group_module_lang', ['title' => $array['name']], ['id_record' => $id, 'id_lang' => Models\Locale::getDefault()->id]);
} elseif (!empty($query)) {
$clause = Clause::build();
$id_record = $dbo->lastInsertedID();
$clause->idgruppo = post('gruppo')[$c];
$clause->idmodulo = $id_record;
$clause->clause = $query;
$clause->position = !empty(post('position')[$c]) ? 'HVN' : 'WHR';
$clause->setTranslation('title', post('name')[$c]);
$clause->save();
$dbo->insert('zz_group_module', $array);
$dbo->insert('zz_group_module_lang', ['id_record' => $dbo->lastInsertedID(), 'id_lang' => Models\Locale::getDefault()->id, 'title' => $array['name']]);
$id = $dbo->lastInsertedID();
}
} else {
$rs = false;

View File

@ -42,7 +42,7 @@ if (!empty($additionals)) {
]).'
</h3>
<div class="card-tools pull-right">
<button type="button" class="btn btn-tool" data-widget="collapse">
<button type="button" class="btn btn-tool" data-card-widget="collapse">
<i class="fa fa-plus"></i>
</button>
</div>';