Compare commits

..

1 Commits

12 changed files with 619 additions and 717 deletions

View File

@@ -14,7 +14,7 @@ class ActiveUserOverview extends BaseWidget
{
protected static ?int $sort = 1;
protected ?string $heading = 'A Registrations';
protected static ?string $heading = 'A Registrations';
protected function getCards(): array
{

View File

@@ -45,34 +45,18 @@ class HealthCheckController extends Controller
$dbTimezone = DB::select('show timezone;');
$response = [
'ip_address' => $ipAddress,
'url' => $request->url(),
'path' => $request->path(),
'hostname' => $hostname,
'timestamp' => Carbon::now()->timestamp,
'date_time_utc' => Carbon::now('UTC')->toDateTimeString(),
'date_time_app' => Carbon::now()->toDateTimeString(),
'timezone' => $dbTimezone[0]->TimeZone,
'secure' => $secure,
'is_trusted_proxy' => $isTrustedProxy,
];
if (app()->hasDebugModeEnabled()) {
$response['app_debug'] = true;
$response['app_url'] = config('app.url');
$response['app_env'] = app()->environment();
$response['app_timezone'] = config('app.timezone');
$response['app_force_https'] = config('app.force_https');
$response['trusted_proxies'] = config('trustedproxy.proxies');
$headers = $request->headers->all();
if (isset($headers['cookie'])) {
$headers['cookie'] = '***';
}
$response['headers'] = $headers;
}
return response()
->json($response);
->json([
'ip_address' => $ipAddress,
'url' => $request->url(),
'path' => $request->path(),
'hostname' => $hostname,
'timestamp' => Carbon::now()->timestamp,
'date_time_utc' => Carbon::now('UTC')->toDateTimeString(),
'date_time_app' => Carbon::now()->toDateTimeString(),
'timezone' => $dbTimezone[0]->TimeZone,
'secure' => $secure,
'is_trusted_proxy' => $isTrustedProxy,
]);
}
}

View File

@@ -7,11 +7,11 @@
"require": {
"php": "8.3.*",
"ext-zip": "*",
"brick/money": "^0.10.0",
"datomatic/laravel-enum-helper": "^2.0.0",
"brick/money": "^0.9.0",
"datomatic/laravel-enum-helper": "^1.1",
"dedoc/scramble": "dev-main",
"filament/filament": "^3.2",
"flowframe/laravel-trend": "^0.3.0",
"flowframe/laravel-trend": "^0.2.0",
"gotenberg/gotenberg-php": "^2.8",
"guzzlehttp/guzzle": "^7.2",
"inertiajs/inertia-laravel": "^1.0",

1185
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -65,7 +65,7 @@ return [
'asset_url' => env('ASSET_URL'),
'force_https' => (bool) env('APP_FORCE_HTTPS', false),
'force_https' => env('APP_FORCE_HTTPS', false),
/*
|--------------------------------------------------------------------------

View File

@@ -57,38 +57,6 @@ test('test that starting and stopping a timer with a description works', async (
await assertThatTimerIsStopped(page);
});
test('test that starting the time entry starts the live timer and that it keeps running after reload', async ({
page,
}) => {
await goToDashboard(page);
await Promise.all([
newTimeEntryResponse(page),
startOrStopTimerWithButton(page),
]);
await assertThatTimerHasStarted(page);
await page.waitForTimeout(500);
const beforeTimerValue = await page
.getByTestId('time_entry_time')
.inputValue();
await page.waitForTimeout(2000);
const afterWaitTimeValue = await page
.getByTestId('time_entry_time')
.inputValue();
expect(afterWaitTimeValue).not.toEqual(beforeTimerValue);
await page.reload();
await page.waitForTimeout(500);
const afterReloadTimerValue = await page
.getByTestId('time_entry_time')
.inputValue();
await page.waitForTimeout(2000);
const afterReloadAfterWaitTimerValue = await page
.getByTestId('time_entry_time')
.inputValue();
expect(afterReloadTimerValue).not.toEqual(afterReloadAfterWaitTimerValue);
});
test('test that starting and updating the description while running works', async ({
page,
}) => {

View File

@@ -125,6 +125,8 @@ function deleteSelected() {
:createClient="createClient"
:createTag="createTag"
:createTimeEntry="createTimeEntry"
:currency="getOrganizationCurrencyString()"
:canCreateProject="canCreateProjects()"
:projects
:tasks
:tags

View File

@@ -1,12 +1,12 @@
{
"name": "@solidtime/ui",
"version": "0.0.10",
"version": "0.0.11",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@solidtime/ui",
"version": "0.0.9",
"version": "0.0.11",
"license": "AGPL-3.0",
"devDependencies": {
"@types/node": "^22.4.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@solidtime/ui",
"version": "0.0.10",
"version": "0.0.11",
"description": "Package containing the solidtime ui components",
"main": "./dist/solidtime-ui-lib.umd.cjs",
"module": "./dist/solidtime-ui-lib.js",

View File

@@ -19,8 +19,6 @@ import type {
CreateTimeEntryBody,
} from '@/packages/api/src';
import TimePicker from '@/packages/ui/src/Input/TimePicker.vue';
import { getOrganizationCurrencyString } from '@/utils/money';
import { canCreateProjects } from '@/utils/permissions';
import TagDropdown from '@/packages/ui/src/Tag/TagDropdown.vue';
import { Badge } from '@/packages/ui/src';
import BillableIcon from '@/packages/ui/src/Icons/BillableIcon.vue';
@@ -46,6 +44,8 @@ const props = defineProps<{
projects: Project[];
tasks: Task[];
clients: Client[];
currency: string;
canCreateProject: boolean;
}>();
const description = ref<HTMLInputElement | null>(null);
@@ -137,8 +137,8 @@ type BillableOption = {
:clients
:createProject
:createClient
:canCreateProject="canCreateProjects()"
:currency="getOrganizationCurrencyString()"
:canCreateProject
:currency
size="xlarge"
class="bg-input-background"
:projects="projects"

View File

@@ -66,12 +66,6 @@ export const useCurrentTimeEntryStore = defineStore('currentTimeEntry', () => {
if (timeEntriesResponse?.data) {
if (timeEntriesResponse.data) {
currentTimeEntry.value = timeEntriesResponse.data;
if (
currentTimeEntry.value.start !== '' &&
currentTimeEntry.value.end === null
) {
startLiveTimer();
}
} else {
currentTimeEntry.value = { ...emptyTimeEntry };
}

View File

@@ -33,57 +33,20 @@ class HealthCheckEndpointTest extends EndpointTestAbstract
public function test_debug_endpoint_returns_ok(): void
{
// Arrange
config(['app.debug' => false]);
// Act
$response = $this->get('health-check/debug');
// Assert
$response->assertSuccessful();
$response->assertExactJsonStructure([
'date_time_app',
'date_time_utc',
'hostname',
$response->assertJsonStructure([
'ip_address',
'is_trusted_proxy',
'path',
'secure',
'timestamp',
'timezone',
'url',
]);
config(['app.debug' => true]);
}
public function test_debug_endpoint_returns_more_information_if_debug_mode_is_enabled(): void
{
// Arrange
config(['app.debug' => true]);
// Act
$response = $this->get('health-check/debug');
// Assert
$response->assertSuccessful();
$response->assertExactJsonStructure([
'app_debug',
'app_env',
'app_force_https',
'app_timezone',
'app_url',
'date_time_app',
'date_time_utc',
'headers',
'hostname',
'ip_address',
'is_trusted_proxy',
'path',
'secure',
'timestamp',
'date_time_utc',
'date_time_app',
'timezone',
'trusted_proxies',
'url',
'secure',
'is_trusted_proxy',
]);
}
}