issue #6 creato modifica per progetto
This commit is contained in:
@@ -12,7 +12,7 @@ class AnagraficaController extends Controller
|
||||
{
|
||||
// GOOGLE CONTACTS PART
|
||||
|
||||
private $google_client;
|
||||
// private $google_client;
|
||||
|
||||
/* public function getToken()
|
||||
{
|
||||
@@ -45,7 +45,7 @@ class AnagraficaController extends Controller
|
||||
public function getToken()
|
||||
{
|
||||
$configJson =storage_path('app/google-calendar/service_key.json');
|
||||
//$configJson =storage_path('app/google-calendar/people.json');
|
||||
// $configJson =storage_path('app/google-calendar/people.json');
|
||||
// define an application name
|
||||
$applicationName = 'gestionale-di-famiglia';
|
||||
|
||||
@@ -59,9 +59,11 @@ class AnagraficaController extends Controller
|
||||
|
||||
$client->setScopes(
|
||||
[
|
||||
/*\Google\Service\Oauth2::USERINFO_PROFILE,
|
||||
\Google\Service\Oauth2::USERINFO_EMAIL,
|
||||
\Google\Service\Oauth2::OPENID,*/
|
||||
/*
|
||||
\Google\Service\Oauth2::USERINFO_PROFILE,
|
||||
\Google\Service\Oauth2::USERINFO_EMAIL,
|
||||
\Google\Service\Oauth2::OPENID,
|
||||
*/
|
||||
\Google\Service\PeopleService::CONTACTS // allows reading of google drive metadata
|
||||
]
|
||||
);
|
||||
|
||||
@@ -88,4 +88,28 @@ class ProgettiController extends Controller
|
||||
|
||||
}
|
||||
|
||||
public function modificaProgetto(Request $data)
|
||||
{
|
||||
// funzione di modifica del progetto (form inserimento modificato in js)
|
||||
Progetti::where('id', $data['id'])
|
||||
->update([
|
||||
'nome' => $data['nome'],
|
||||
'descrizione' => $data['descrizione'],
|
||||
//'data_creazione'=>$data['data_creazione'],
|
||||
'data_inizio'=>$data['data_inizio'],
|
||||
'data_fine'=>$data['data_fine'],
|
||||
'fk_user'=>$data['coordinatore'],
|
||||
'budget'=>$data['budget'],
|
||||
'stato'=>$data['stato'],
|
||||
'note' =>$data['note'],
|
||||
]);
|
||||
return redirect()->back();
|
||||
/* dd($data);*/
|
||||
}
|
||||
|
||||
public function getProgettobyId(Request $id)
|
||||
{
|
||||
return json_encode(Progetti::getProgettoById($id['id']));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user