mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-10-08 05:43:18 +01:00
Updated Laravel to v13
This commit is contained in:
committed by
Constantin Graf
parent
12cc3f27f8
commit
2dadf1ef02
@@ -7,7 +7,7 @@ namespace App\Http\Controllers\Api\V1;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Service\CurrencyService;
|
||||
use Brick\Money\Currency;
|
||||
use Brick\Money\ISOCurrencyProvider;
|
||||
use Brick\Money\IsoCurrencyProvider;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
class CurrencyController extends Controller
|
||||
@@ -29,7 +29,7 @@ class CurrencyController extends Controller
|
||||
'name' => $currency->getName(),
|
||||
'symbol' => $currencyService->getCurrencySymbol($currency->getCurrencyCode()),
|
||||
],
|
||||
ISOCurrencyProvider::getInstance()->getAvailableCurrencies()
|
||||
IsoCurrencyProvider::getInstance()->getAvailableCurrencies()
|
||||
));
|
||||
|
||||
return response()->json($currencies);
|
||||
|
||||
@@ -191,8 +191,9 @@ class TimeEntryController extends Controller
|
||||
$roundingMinutes = $canAccessPremiumFeatures ? $request->getRoundingMinutes() : null;
|
||||
if ($roundingType !== null && $roundingMinutes !== null) {
|
||||
$select = array_diff($select, ['start', 'end']);
|
||||
$select[] = DB::raw(app(TimeEntryService::class)->getStartSelectRawForRounding($roundingType, $roundingMinutes).' as start');
|
||||
$select[] = DB::raw(app(TimeEntryService::class)->getEndSelectRawForRounding($roundingType, $roundingMinutes).' as end');
|
||||
// These SQL fragments are generated from a rounding enum and validated minute count.
|
||||
$select[] = DB::raw(app(TimeEntryService::class)->getStartSelectRawForRounding($roundingType, $roundingMinutes).' as start'); // @phpstan-ignore argument.type
|
||||
$select[] = DB::raw(app(TimeEntryService::class)->getEndSelectRawForRounding($roundingType, $roundingMinutes).' as end'); // @phpstan-ignore argument.type
|
||||
}
|
||||
$timeEntriesQuery = TimeEntry::query()
|
||||
->whereBelongsTo($organization, 'organization')
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace App\Http\Controllers\Web;
|
||||
|
||||
use App\Models\Organization;
|
||||
use Brick\Money\Currency;
|
||||
use Brick\Money\ISOCurrencyProvider;
|
||||
use Brick\Money\IsoCurrencyProvider;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
@@ -53,7 +53,7 @@ class OrganizationController extends Controller
|
||||
],
|
||||
'currencies' => array_map(function (Currency $currency): string {
|
||||
return $currency->getName();
|
||||
}, ISOCurrencyProvider::getInstance()->getAvailableCurrencies()),
|
||||
}, IsoCurrencyProvider::getInstance()->getAvailableCurrencies()),
|
||||
'permissions' => [
|
||||
'canDeleteTeam' => $this->hasPermission($organization, 'organizations:delete'),
|
||||
'canUpdateTeam' => $this->hasPermission($organization, 'organizations:update'),
|
||||
|
||||
Reference in New Issue
Block a user