mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 13:41:23 +00:00
* fix dropdown action Estimate Dashboard and fix translating full Dasboard page * Update app.php * fix locale in app.php config * Wizard install with translation, customer portal with translation, and fixing hardcoding strings to get translation * fixes asked to review * fixes pint --------- Co-authored-by: Max <contact@agencetwogether.fr> Co-authored-by: Darko Gjorgjijoski <5760249+gdarko@users.noreply.github.com>
58 lines
1.5 KiB
PHP
58 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\V1\Installation;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\Setting;
|
|
use App\Space\InstallUtils;
|
|
use Illuminate\Http\Request;
|
|
|
|
class OnboardingWizardController extends Controller
|
|
{
|
|
/**
|
|
* Handle the incoming request.
|
|
*
|
|
* @return \Illuminate\Http\JsonResponse
|
|
*/
|
|
public function getStep(Request $request)
|
|
{
|
|
if (! InstallUtils::dbMarkerExists()) {
|
|
return response()->json([
|
|
'profile_complete' => 0,
|
|
'profile_language' => 'en',
|
|
]);
|
|
}
|
|
|
|
return response()->json([
|
|
'profile_complete' => Setting::getSetting('profile_complete'),
|
|
'profile_language' => Setting::getSetting('profile_language'),
|
|
]);
|
|
}
|
|
|
|
public function updateStep(Request $request)
|
|
{
|
|
$setting = Setting::getSetting('profile_complete');
|
|
|
|
if ($setting === 'COMPLETED') {
|
|
return response()->json([
|
|
'profile_complete' => $setting,
|
|
]);
|
|
}
|
|
|
|
Setting::setSetting('profile_complete', $request->profile_complete);
|
|
|
|
return response()->json([
|
|
'profile_complete' => Setting::getSetting('profile_complete'),
|
|
]);
|
|
}
|
|
|
|
public function saveLanguage(Request $request)
|
|
{
|
|
Setting::setSetting('profile_language', $request->profile_language);
|
|
|
|
return response()->json([
|
|
'profile_language' => Setting::getSetting('profile_language'),
|
|
]);
|
|
}
|
|
}
|