Compare commits
No commits in common. "4f9378899ba673d32b5bd92c636b9674dc50fce3" and "b3df3f0b475d76e32fe8b5572978a16be80e9e3f" have entirely different histories.
4f9378899b
...
b3df3f0b47
@ -18,7 +18,7 @@ class CategorieController extends Controller
|
|||||||
|
|
||||||
public static function insCategorie(Request $request)
|
public static function insCategorie(Request $request)
|
||||||
{
|
{
|
||||||
Categorie::inserisci($request);
|
Categorie::inserisci($request['cat_name']);
|
||||||
return view('conti.categorie.list',['categorie'=>Categorie::list()]);
|
return view('conti.categorie.list',['categorie'=>Categorie::list()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ class CategorieController extends Controller
|
|||||||
|
|
||||||
public function updatePostCategorie(Request $request)
|
public function updatePostCategorie(Request $request)
|
||||||
{
|
{
|
||||||
Categorie::updateNameById($request);
|
Categorie::updateNameById($request['id'],$request['cat_name']);
|
||||||
return redirect(route('categorie'));
|
return redirect(route('categorie'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,6 +123,20 @@ class MovimentiController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*public function updateMovimenti(Request $request)
|
||||||
|
{
|
||||||
|
$id=$request['id'];
|
||||||
|
$mov=Movimenti::getMovimentoById($id);
|
||||||
|
$categorie=Categorie::list();
|
||||||
|
$tags=tag::getList();
|
||||||
|
return view('conti.movimenti.update',
|
||||||
|
[
|
||||||
|
'categorie'=> $categorie,
|
||||||
|
'movimenti'=> $mov,
|
||||||
|
'tags'=>$tags,
|
||||||
|
]);
|
||||||
|
}*/
|
||||||
|
|
||||||
public function updatePostMovimenti(Request $request)
|
public function updatePostMovimenti(Request $request)
|
||||||
{
|
{
|
||||||
Movimenti::updateMovimenti($request);
|
Movimenti::updateMovimenti($request);
|
||||||
|
@ -22,44 +22,22 @@ class Categorie extends Model
|
|||||||
|
|
||||||
public static function listSpesa()
|
public static function listSpesa()
|
||||||
{
|
{
|
||||||
return DB::table('categories')->where('cat_uscita','=',1)->orderBy('cat_name')->get();
|
return DB::table('categories')->where('cat_uscita','=',1)->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function listEntrata()
|
public static function listEntrata()
|
||||||
{
|
{
|
||||||
return DB::table('categories')->where('cat_entrata','=',1)->orderBy('cat_name')->get();
|
return DB::table('categories')->where('cat_entrata','=',1)->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function inserisci($request){
|
public static function inserisci($name){
|
||||||
if ($request['cat_entrata']==='on')
|
return DB::table('categories')->insert(['cat_name'=> $name]);
|
||||||
{
|
|
||||||
$entrata=1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$entrata=0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($request['cat_uscita']==='on')
|
|
||||||
{
|
|
||||||
$uscita=1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$uscita=0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return DB::table('categories')->insert([
|
|
||||||
'cat_name'=> $request['cat_name'],
|
|
||||||
'cat_entrata'=>$entrata,
|
|
||||||
'cat_uscita'=>$uscita
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function deleteById($id){
|
public static function deleteById($id){
|
||||||
DB::table('categories')
|
DB::table('categories')
|
||||||
->where('id','=', $id)
|
->where('id','=', $id)
|
||||||
->delete();
|
->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getById($id) {
|
public static function getById($id) {
|
||||||
@ -68,31 +46,11 @@ class Categorie extends Model
|
|||||||
->get();
|
->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function updateNameById($request) {
|
public static function updateNameById($id,$name) {
|
||||||
if ($request['cat_entrata']==='on')
|
|
||||||
{
|
|
||||||
$entrata=1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$entrata=0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($request['cat_uscita']==='on')
|
|
||||||
{
|
|
||||||
$uscita=1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$uscita=0;
|
|
||||||
}
|
|
||||||
|
|
||||||
DB::table('categories')
|
DB::table('categories')
|
||||||
->where('id','=', $request['id'])
|
->where('id','=', $id)
|
||||||
->update([
|
->update([
|
||||||
'cat_name' => $request['cat_name'],
|
'cat_name' => $name,
|
||||||
'cat_entrata' => $entrata,
|
|
||||||
'cat_uscita'=>$uscita,
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,6 @@ use Rap2hpoutre\FastExcel\FastExcel;
|
|||||||
class Movimenti extends Model
|
class Movimenti extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
protected $dates = ['mov_data'];
|
|
||||||
protected $casts = [ 'mov_data'=>'datetime'];
|
|
||||||
|
|
||||||
public static function getList() {
|
public static function getList() {
|
||||||
return DB::table('movimentis')
|
return DB::table('movimentis')
|
||||||
@ -181,8 +179,7 @@ class Movimenti extends Model
|
|||||||
if($line['DARE']<>'')
|
if($line['DARE']<>'')
|
||||||
{
|
{
|
||||||
$dati=[
|
$dati=[
|
||||||
'mov_data'=>self::dateFormat(0,$line['VALUTA']), // date_format(date_create($movimento->mov_data),'d/m/Y'
|
'mov_data'=>self::dateFormat(0,$line['VALUTA']),
|
||||||
// 'mov_data'=>date_format(date_create($line['VALUTA']),'Y-m-d'),
|
|
||||||
'mov_fk_categoria'=>1,
|
'mov_fk_categoria'=>1,
|
||||||
'mov_descrizione'=>$line['DESCRIZIONE OPERAZIONE'],
|
'mov_descrizione'=>$line['DESCRIZIONE OPERAZIONE'],
|
||||||
'mov_importo'=>'-'.trim(str_replace(',','.',(str_replace('.','',$line['DARE'])))),
|
'mov_importo'=>'-'.trim(str_replace(',','.',(str_replace('.','',$line['DARE'])))),
|
||||||
@ -194,7 +191,6 @@ class Movimenti extends Model
|
|||||||
{
|
{
|
||||||
$dati=[
|
$dati=[
|
||||||
'mov_data'=>self::dateFormat(0,$line['VALUTA']),
|
'mov_data'=>self::dateFormat(0,$line['VALUTA']),
|
||||||
//'mov_data'=>date_format(date_create($line['VALUTA']),'Y-m-d'),
|
|
||||||
'mov_fk_categoria'=>1,
|
'mov_fk_categoria'=>1,
|
||||||
'mov_descrizione'=>$line['DESCRIZIONE OPERAZIONE'],
|
'mov_descrizione'=>$line['DESCRIZIONE OPERAZIONE'],
|
||||||
'mov_importo'=>trim(str_replace(',','.',(str_replace('.','',$line['AVERE'])))),
|
'mov_importo'=>trim(str_replace(',','.',(str_replace('.','',$line['AVERE'])))),
|
||||||
@ -220,11 +216,11 @@ class Movimenti extends Model
|
|||||||
|
|
||||||
if($type)
|
if($type)
|
||||||
{
|
{
|
||||||
// $string=$string->format('Y-m-d');
|
$string=$string->format('Y-m-d');
|
||||||
list($year,$month,$day) = explode('-',$string);
|
list($year,$month,$day) = explode('-',$string);
|
||||||
return $day.'/'.$month.'/'.$year;
|
return $day.'/'.$month.'/'.$year;
|
||||||
} else {
|
} else {
|
||||||
// $string=$string->format('d/m/Y');
|
$string=$string->format('d/m/Y');
|
||||||
list($day,$month,$year) =explode('/',$string);
|
list($day,$month,$year) =explode('/',$string);
|
||||||
return $year.'-'.$month.'-'.$day;
|
return $year.'-'.$month.'-'.$day;
|
||||||
}
|
}
|
||||||
|
@ -16,23 +16,13 @@ class CategorieSeeder extends Seeder
|
|||||||
{
|
{
|
||||||
// Inserisce le categorie necessarie
|
// Inserisce le categorie necessarie
|
||||||
DB::table('categories')->insert(
|
DB::table('categories')->insert(
|
||||||
[
|
['cat_name'=>'Automobili']
|
||||||
'cat_name'=>'Automobili',
|
|
||||||
'cat_uscita'=>1,
|
|
||||||
'cat_entrata'=>0,
|
|
||||||
]
|
|
||||||
);
|
);
|
||||||
DB::table('categories')->insert(
|
DB::table('categories')->insert(
|
||||||
[
|
['cat_name'=>'Stipendio']
|
||||||
'cat_name'=>'Stipendio',
|
|
||||||
'cat_uscita'=>0,
|
|
||||||
'cat_entrata'=>1]
|
|
||||||
);
|
);
|
||||||
DB::table('categories')->insert(
|
DB::table('categories')->insert(
|
||||||
[
|
['cat_name'=>'Utenze']
|
||||||
'cat_name'=>'Utenze',
|
|
||||||
'cat_uscita'=>1,
|
|
||||||
'cat_entrata'=>0]
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,84 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace Database\Seeders;
|
|
||||||
|
|
||||||
use App\Models\User;
|
|
||||||
use Illuminate\Database\Seeder;
|
|
||||||
use Illuminate\Support\Facades\Hash;
|
|
||||||
use Spatie\Permission\Models\Permission;
|
|
||||||
use Spatie\Permission\Models\Role;
|
|
||||||
use Spatie\Permission\PermissionRegistrar;
|
|
||||||
|
|
||||||
class OnlySeeder extends Seeder
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Run the database seeds.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function run()
|
|
||||||
{
|
|
||||||
// Role Creation
|
|
||||||
$role_admin = Role::create([
|
|
||||||
'name' => 'admin'
|
|
||||||
]);
|
|
||||||
$role_user = Role::create([
|
|
||||||
'name' => 'user'
|
|
||||||
]);
|
|
||||||
$role_guest = Role::create([
|
|
||||||
'name' => 'guest'
|
|
||||||
]);
|
|
||||||
|
|
||||||
// Permission Creation
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'conti'
|
|
||||||
]);
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'consumi'
|
|
||||||
]);
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'automobili'
|
|
||||||
]);
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'contatti'
|
|
||||||
]);
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'affitti'
|
|
||||||
]);
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'progetti'
|
|
||||||
]);
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'amministrazione'
|
|
||||||
]);
|
|
||||||
|
|
||||||
// Assegnazione permessi al ruolo user
|
|
||||||
$role_user->givePermissionTo('affitti');
|
|
||||||
$role_user->givePermissionTo('automobili');
|
|
||||||
$role_user->givePermissionTo('contatti');
|
|
||||||
$role_user->givePermissionTo('consumi');
|
|
||||||
$role_user->givePermissionTo('conti');
|
|
||||||
$role_user->givePermissionTo('progetti');
|
|
||||||
// Assegnazione permessi al ruolo guest
|
|
||||||
$role_guest->givePermissionTo('affitti');
|
|
||||||
// Il ruolo admin ha già tutti i permessi da middleware
|
|
||||||
|
|
||||||
$admin = User::create([
|
|
||||||
'name'=>'Amministratore',
|
|
||||||
'email'=>'admin@localhost.local',
|
|
||||||
'password'=>Hash::make('admin'),
|
|
||||||
])->assignRole('admin');
|
|
||||||
|
|
||||||
$user = User::create([
|
|
||||||
'name'=>'Utente',
|
|
||||||
'email'=>'user@localhost.local',
|
|
||||||
'password'=>Hash::make('user'),
|
|
||||||
])->assignRole('user');
|
|
||||||
|
|
||||||
$guest = User::create([
|
|
||||||
'name'=>'Guest',
|
|
||||||
'email'=>'guest@localhost.local',
|
|
||||||
'password'=>Hash::make('guest'),
|
|
||||||
])->assignRole('guest');
|
|
||||||
}
|
|
||||||
}
|
|
21
public/js/app/conti_categorie.js
vendored
21
public/js/app/conti_categorie.js
vendored
@ -13,38 +13,19 @@ $(document).ready(function() {
|
|||||||
responsive: true
|
responsive: true
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click','.open_modal',function(){
|
$(document).on('click','.open_modal',function(){
|
||||||
var url = "/admin/categorie/modify";
|
var url = "/admin/categorie/modify";
|
||||||
var riga_id= $(this).val();
|
var riga_id= $(this).val();
|
||||||
$.getJSON(url + '/' + riga_id, function (data) {
|
$.getJSON(url + '/' + riga_id, function (data) {
|
||||||
//success data
|
//success data
|
||||||
$('#cat_entrata').prop('checked', false);
|
|
||||||
$('#cat_uscita').prop('checked', false);
|
|
||||||
|
|
||||||
|
|
||||||
console.log(data[0]);
|
console.log(data[0]);
|
||||||
console.log(data[0].cat_name);
|
console.log(data[0].cat_name);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (data[0].cat_uscita === 1)
|
|
||||||
{
|
|
||||||
// $('.myCheckbox').prop('checked', true);
|
|
||||||
$('#cat_uscita').prop('checked', true);
|
|
||||||
}
|
|
||||||
if (data[0].cat_entrata ===1)
|
|
||||||
{
|
|
||||||
$('#cat_entrata').prop('checked', true);
|
|
||||||
}
|
|
||||||
$('#H_cat_id').val(data[0].id);
|
|
||||||
$('#H_cat_cat_name').val(data[0].cat_name);
|
$('#H_cat_cat_name').val(data[0].cat_name);
|
||||||
|
$('#H_cat_id').val(data[0].id);
|
||||||
$('#myModal').modal('show');
|
$('#myModal').modal('show');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click','.open_modal_new',function(){
|
$(document).on('click','.open_modal_new',function(){
|
||||||
console.log('richiesto apertura form');
|
|
||||||
$('#myModal_new').modal('show');
|
$('#myModal_new').modal('show');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
72
public/js/app/movimenti.js
vendored
72
public/js/app/movimenti.js
vendored
@ -24,32 +24,24 @@ var strDate = d.getFullYear() + '-' +
|
|||||||
$(document).on('click', '.open_modal_spesa', function() {
|
$(document).on('click', '.open_modal_spesa', function() {
|
||||||
console.log(strDate);
|
console.log(strDate);
|
||||||
$("#categoria").empty();
|
$("#categoria").empty();
|
||||||
$("#tags").empty();
|
|
||||||
$('#form').find('input[type="text"], textarea, input[type="number"],input[type="date"],option').val("");
|
$('#form').find('input[type="text"], textarea, input[type="number"],input[type="date"],option').val("");
|
||||||
$('#form').find('input[type="date"]').val(strDate);
|
$('#form').find('input[type="date"]').val(strDate);
|
||||||
$('#myModal').modal('show');
|
$('#myModal').modal('show');
|
||||||
$('.modal-title').text(' Nuovo movimento in uscita');
|
$('.modal-title').text(' Nuovo movimento in uscita');
|
||||||
$('#form').attr('action', '/admin/movimenti/spesa');
|
$('#form').attr('action', '/admin/movimenti/spesa');
|
||||||
$.getJSON("/admin/service/catlistSpesa", {}, function(cats) {
|
$.getJSON("/admin/service/catlistSpesa", {}, function(data) {
|
||||||
$.each(cats, function(i, cat) {
|
$.each(data, function(i, item) {
|
||||||
$("select[name='mov_fk_categoria']").append(
|
$("select[name='mov_fk_categoria']").append(
|
||||||
new Option(cat.cat_name, cat.id)
|
new Option(item.cat_name, item.id)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
$.getJSON("/admin/service/taglist", {}, function(tags) {
|
|
||||||
$.each(tags, function(i, tag) {
|
|
||||||
$("select[name='mov_fk_tags']").append(
|
|
||||||
new Option(tag.tag_name, tag.id)
|
|
||||||
)
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '.open_modal_entrata', function() {
|
$(document).on('click', '.open_modal_entrata', function() {
|
||||||
console.log(strDate);
|
console.log(strDate);
|
||||||
$("#categoria").empty();
|
$("#categoria").empty();
|
||||||
$("#tags").empty();
|
|
||||||
$('#form').find('input[type="text"], textarea, input[type="number"],option').val("");
|
$('#form').find('input[type="text"], textarea, input[type="number"],option').val("");
|
||||||
$('#form').find('input[type="date"]').val(strDate);
|
$('#form').find('input[type="date"]').val(strDate);
|
||||||
$('#myModal').modal('show');
|
$('#myModal').modal('show');
|
||||||
@ -63,64 +55,48 @@ $(document).on('click', '.open_modal_entrata', function() {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
$.getJSON("/admin/service/taglist", {}, function(data) {
|
|
||||||
$.each(data, function(i, item) {
|
|
||||||
$("select[name='mov_fk_tags']").append(
|
|
||||||
new Option(item.tag_name, item.id)
|
|
||||||
)
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '.open_modal_modifica', function() {
|
$(document).on('click', '.open_modal_modifica', function() {
|
||||||
var url = "/admin/movimenti/modify";
|
var url = "/admin/movimenti/modify";
|
||||||
var riga_id = $(this).val();
|
var riga_id = $(this).val();
|
||||||
$("#categoria").empty();
|
$("#categoria").empty();
|
||||||
$("#tags").empty();
|
|
||||||
$.getJSON(url + '/' + riga_id, function(data) {
|
$.getJSON(url + '/' + riga_id, function(data) {
|
||||||
// success data
|
// success data
|
||||||
console.log(data[0]);
|
console.log(data[0]);
|
||||||
$.getJSON("/admin/service/taglist", {}, function(tags) {
|
|
||||||
$.each(tags, function(i, tag) {
|
|
||||||
$("select[name='mov_fk_tags']").append(
|
|
||||||
new Option(tag.tag_name, tag.id)
|
|
||||||
)
|
|
||||||
$('#tags')
|
|
||||||
.find('option:contains(' + data[0].tag_name + ')')
|
|
||||||
.prop('selected', true)
|
|
||||||
.trigger('change');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$.getJSON("/admin/service/catlist", {}, function(cats) {
|
|
||||||
$.each(cats, function(i, cat) {
|
|
||||||
$("select[name='mov_fk_categoria']").append(
|
|
||||||
new Option(cat.cat_name, cat.id)
|
|
||||||
)
|
|
||||||
$('#categoria')
|
|
||||||
.find('option:contains(' + data[0].cat_name + ')')
|
|
||||||
.prop('selected', true)
|
|
||||||
.trigger('change');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
$('.modal-title').text('Modifica movimento');
|
$('.modal-title').text('Modifica movimento');
|
||||||
$('#data').val(data[0].mov_data);
|
$('#data').val(data[0].mov_data);
|
||||||
$('#descrizione').val(data[0].mov_descrizione);
|
$('#descrizione').val(data[0].mov_descrizione);
|
||||||
$('#importo').val(data[0].mov_importo);
|
$('#importo').val(data[0].mov_importo);
|
||||||
|
$('#tags')
|
||||||
|
.find('option:contains(' + data[0].tag_name + ')')
|
||||||
|
.prop('selected', true)
|
||||||
|
.trigger('change');
|
||||||
|
$('#categoria')
|
||||||
|
.find('option:contains(' + data[0].cat_name + ')')
|
||||||
|
.prop('selected', true)
|
||||||
|
.trigger('change');
|
||||||
$('#myModal').modal('show');
|
$('#myModal').modal('show');
|
||||||
// $('.panel-heading').text('Modifica movimento');
|
// $('.panel-heading').text('Modifica movimento');
|
||||||
$('#form').attr('action', '/admin/movimenti/modify');
|
$('#form').attr('action', '/admin/movimenti/modify');
|
||||||
$('#form').append('<input type="hidden" name="id" value="' + riga_id + '">');
|
$('#form').append('<input type="hidden" name="id" value="' + riga_id + '">');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$.getJSON("/admin/service/catlist", {}, function(data) {
|
||||||
|
$.each(data, function(i, item) {
|
||||||
|
$("select[name='mov_fk_categoria']").append(
|
||||||
|
new Option(item.cat_name, item.id)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
/*$.getJSON("/admin/service/taglist", {}, function(data) {
|
$.getJSON("/admin/service/taglist", {}, function(data) {
|
||||||
$.each(data, function(i, item) {
|
$.each(data, function(i, item) {
|
||||||
$("select[name='mov_fk_tags']").append(
|
$("select[name='mov_fk_tags']").append(
|
||||||
new Option(item.tag_name, item.id)
|
new Option(item.tag_name, item.id)
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
});*/
|
});
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Categoria</th>
|
<th>Categoria</th>
|
||||||
<th>Classificazione</th>
|
|
||||||
<th>Azione</th>
|
<th>Azione</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -31,14 +30,6 @@
|
|||||||
<td><a
|
<td><a
|
||||||
href="movimenti/report/movimentibycat?cat={{ $categoria->id }}">{{
|
href="movimenti/report/movimentibycat?cat={{ $categoria->id }}">{{
|
||||||
$categoria->cat_name; }}</a></td>
|
$categoria->cat_name; }}</a></td>
|
||||||
<td>
|
|
||||||
@if($categoria->cat_entrata == 1)
|
|
||||||
Entrata ,
|
|
||||||
@endif
|
|
||||||
@if($categoria->cat_uscita == 1)
|
|
||||||
Uscita
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
<button class="btn btn-warning btn-detail open_modal"
|
<button class="btn btn-warning btn-detail open_modal"
|
||||||
value="{{$categoria->id}}">Edit</button> <a
|
value="{{$categoria->id}}">Edit</button> <a
|
||||||
@ -56,54 +47,38 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<!-- MODAL MODIFICA -->
|
<!-- MODAL MODIFICA -->
|
||||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
|
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
|
||||||
aria-labelledby="myModalLabel" aria-hidden="true">
|
aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<form action="/admin/categorie/modify" method="POST">
|
<div class="modal-content">
|
||||||
<div class="modal-content">
|
<div class="modal-header">
|
||||||
<div class="modal-header">
|
<h4 class="modal-title">Modifica Categoria</h4>
|
||||||
<h4 class="modal-title">Modifica Categoria</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-8">
|
|
||||||
|
|
||||||
@csrf
|
|
||||||
<label for="H_cat_cat_name" class="form-label">Categoria</label>
|
|
||||||
<input type="text" class="form-control" id="H_cat_cat_name" size="50" name="cat_name">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="form-check form-switch">
|
|
||||||
<input class="form-check-input" type="checkbox" role="switch" id="cat_entrata" name="cat_entrata" >
|
|
||||||
<label class="form-check-label" for="cat_entrata">Entrata</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="form-check form-switch">
|
|
||||||
<input class="form-check-input" type="checkbox" role="switch" id="cat_uscita" name="cat_uscita">
|
|
||||||
<label class="form-check-label" for="cat_uscita">Uscita</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<input type="hidden" name="id" id="H_cat_id">
|
|
||||||
<button type="submit" class="btn btn-primary">Modifica</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<form action="/admin/categorie/modify" method="POST">
|
||||||
|
@csrf <label for="H_cat_cat_name" class="form-label">Categoria</label>
|
||||||
|
<input type="text" class="form-control" id="H_cat_cat_name"
|
||||||
|
size="50" name="cat_name" value="" size="50">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<input type="hidden" name="id" id="H_cat_id">
|
||||||
|
<button type="submit" class="btn btn-primary">Modifica</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- FINE MODAL MODIFICA -->
|
</div>
|
||||||
<!-- MODAL INSERIMENTO -->
|
<!-- FINE MODAL MODIFICA -->
|
||||||
<div class="modal fade" id="myModal_new" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
<!-- MODAL INSERIMENTO -->
|
||||||
|
<div class="modal fade" id="myModal_new" tabindex="-1" role="dialog"
|
||||||
|
aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -114,26 +89,11 @@
|
|||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<!-- FORM INSERIMENTO NUOVA CATEGORIA -->
|
<!-- FORM INSERIMENTO NUOVA CATEGORIA -->
|
||||||
<form action="" method="POST">
|
<form action="" method="POST">
|
||||||
@csrf
|
@csrf <label for="categoria" class="form-label">Categoria</label>
|
||||||
<label for="categoria" class="form-label">Categoria</label>
|
|
||||||
<input type="text" class="form-control" id="categoria"
|
<input type="text" class="form-control" id="categoria"
|
||||||
name="cat_name" size="50">
|
name="cat_name" size="50">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="form-check form-switch">
|
|
||||||
<input class="form-check-input" type="checkbox" role="switch" id="cat_entrata" name="cat_entrata" >
|
|
||||||
<label class="form-check-label" for="cat_entrata">Entrata</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="form-check form-switch">
|
|
||||||
<input class="form-check-input" type="checkbox" role="switch" id="cat_uscita" name="cat_uscita">
|
|
||||||
<label class="form-check-label" for="cat_uscita">Uscita</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
@ -143,9 +103,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- FINE MODAL INSERIMENTO -->
|
<!-- FINE MODAL INSERIMENTO -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- /.col-lg-12 -->
|
<!-- /.col-lg-12 -->
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
@foreach( $movimenti as $movimento )
|
@foreach( $movimenti as $movimento )
|
||||||
<tr>
|
<tr>
|
||||||
<!-- <td>{{ date_format(date_create($movimento->mov_data),'d/m/Y'); }}</td>-->
|
<!-- <td>{{ date_format(date_create($movimento->mov_data),'d/m/Y'); }}</td>-->
|
||||||
<td>{{ $movimento->mov_data}}</td>
|
<td>{{$movimento->mov_data}}</td>
|
||||||
<td>{{ $movimento->cat_name; }}</td>
|
<td>{{ $movimento->cat_name; }}</td>
|
||||||
<td>{{ $movimento->mov_descrizione; }}</td>
|
<td>{{ $movimento->mov_descrizione; }}</td>
|
||||||
<td>€ {{ $movimento->mov_importo; }}</td>
|
<td>€ {{ $movimento->mov_importo; }}</td>
|
||||||
|
@ -123,7 +123,6 @@ Route::group(['middleware'=>['permission:amministrazione']], function(){
|
|||||||
Route::post('users/new',[Utenti::class,'createUser']);
|
Route::post('users/new',[Utenti::class,'createUser']);
|
||||||
Route::get('users/roles',[Utenti::class,'listRoles']);
|
Route::get('users/roles',[Utenti::class,'listRoles']);
|
||||||
Route::get('users/delete/{id}',[Utenti::class,'deleteUser']);
|
Route::get('users/delete/{id}',[Utenti::class,'deleteUser']);
|
||||||
//});
|
|
||||||
Route::get('users/givepermission',[Utenti::class,'givePermissionToUser']);
|
Route::get('users/givepermission',[Utenti::class,'givePermissionToUser']);
|
||||||
Route::post('users/givepermission',[Utenti::class,'assignPermission']);
|
Route::post('users/givepermission',[Utenti::class,'assignPermission']);
|
||||||
Route::get('users/giverole',[Utenti::class,'giveRoleToUser']);
|
Route::get('users/giverole',[Utenti::class,'giveRoleToUser']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user