mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-01-16 09:21:52 +01:00
Fix classe per salvataggio vista
This commit is contained in:
parent
62d372df0a
commit
b72dce21dc
@ -113,7 +113,6 @@
|
|||||||
"Modules\\Partitario\\": ["modules/partitario/custom/src/", "modules/partitario/src/"],
|
"Modules\\Partitario\\": ["modules/partitario/custom/src/", "modules/partitario/src/"],
|
||||||
"Modules\\StatoEmail\\": ["modules/stato_email/custom/src/", "modules/stato_email/src/"],
|
"Modules\\StatoEmail\\": ["modules/stato_email/custom/src/", "modules/stato_email/src/"],
|
||||||
"Modules\\FileAdapters\\": ["modules/adattatori_archiviazione/custom/src/", "modules/adattatori_archiviazione/src/"],
|
"Modules\\FileAdapters\\": ["modules/adattatori_archiviazione/custom/src/", "modules/adattatori_archiviazione/src/"],
|
||||||
"Modules\\ModuleFields\\": ["modules/viste/custom/src/", "modules/viste/src/"],
|
|
||||||
"Plugins\\ExportFE\\": ["plugins/exportFE/custom/src/", "plugins/exportFE/src/"],
|
"Plugins\\ExportFE\\": ["plugins/exportFE/custom/src/", "plugins/exportFE/src/"],
|
||||||
"Plugins\\ImportFE\\": ["plugins/importFE/custom/src/", "plugins/importFE/src/"],
|
"Plugins\\ImportFE\\": ["plugins/importFE/custom/src/", "plugins/importFE/src/"],
|
||||||
"Plugins\\ReceiptFE\\": ["plugins/receiptFE/custom/src/", "plugins/receiptFE/src/"],
|
"Plugins\\ReceiptFE\\": ["plugins/receiptFE/custom/src/", "plugins/receiptFE/src/"],
|
||||||
|
@ -21,7 +21,7 @@ include_once __DIR__.'/../../core.php';
|
|||||||
|
|
||||||
use Models\Clause;
|
use Models\Clause;
|
||||||
use Models\Module;
|
use Models\Module;
|
||||||
use Modules\ModuleFields\ModuleField;
|
use Models\View;
|
||||||
|
|
||||||
switch (filter('op')) {
|
switch (filter('op')) {
|
||||||
case 'update':
|
case 'update':
|
||||||
@ -76,7 +76,7 @@ switch (filter('op')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Aggiornamento traduzione nome campo
|
// Aggiornamento traduzione nome campo
|
||||||
$vista = ModuleField::find($id);
|
$vista = View::find($id);
|
||||||
$vista->setTranslation('name', $name);
|
$vista->setTranslation('name', $name);
|
||||||
|
|
||||||
// Aggiornamento dei permessi relativi
|
// Aggiornamento dei permessi relativi
|
||||||
@ -156,7 +156,11 @@ switch (filter('op')) {
|
|||||||
case 'test':
|
case 'test':
|
||||||
$module_query = Util\Query::getQuery(Module::find($id_record));
|
$module_query = Util\Query::getQuery(Module::find($id_record));
|
||||||
|
|
||||||
$dbo->fetchArray($module_query.' LIMIT 1');
|
try{
|
||||||
|
$dbo->fetchArray($module_query.' LIMIT 1');
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
flash()->error(tr('Impossibile eseguire la query!'));
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -39,8 +39,7 @@ foreach ($fields as $key => $field) {
|
|||||||
<div class="box collapsed-box box-'.($field->visible ? 'success' : 'danger').'">
|
<div class="box collapsed-box box-'.($field->visible ? 'success' : 'danger').'">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title">'.
|
<h3 class="box-title">'.
|
||||||
$field->getTranslation('name').' <small class="text-muted">'.(new \Carbon\Carbon($field->created_at))->diffForHumans().'</small>
|
$field->getTranslation('name').' <small class="text-muted tip" title="'.(new \Carbon\Carbon($field->updated_at))->format('d/m/Y H:i').'">'.(new \Carbon\Carbon($field->updated_at))->diffForHumans().'</small>
|
||||||
|
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="box-tools pull-right">
|
<div class="box-tools pull-right">
|
||||||
|
@ -1,52 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
|
|
||||||
* Copyright (C) DevCode s.r.l.
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Modules\ModuleFields;
|
|
||||||
|
|
||||||
use Models\Module;
|
|
||||||
use Common\SimpleModelTrait;
|
|
||||||
use Traits\RecordTrait;
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
class ModuleField extends Model
|
|
||||||
{
|
|
||||||
use SimpleModelTrait;
|
|
||||||
use RecordTrait;
|
|
||||||
|
|
||||||
protected $table = 'zz_views';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The attributes that aren't mass assignable.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $guarded = [];
|
|
||||||
|
|
||||||
protected $translatable = ['name'];
|
|
||||||
|
|
||||||
public function getModuleAttribute()
|
|
||||||
{
|
|
||||||
return 'Viste';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function module()
|
|
||||||
{
|
|
||||||
return $this->belongsTo(Module::class, 'id_module');
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user