mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 16:22:16 +01:00
Compare commits
1 Commits
feature/po
...
feature/gi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c87645bcb2 |
7
.github/workflows/phpunit.yml
vendored
7
.github/workflows/phpunit.yml
vendored
@@ -6,13 +6,10 @@ jobs:
|
|||||||
phpunit:
|
phpunit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
postgres_version: [ 15, 16, 17 ]
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
pgsql_test:
|
pgsql_test:
|
||||||
image: postgres:${{ matrix.postgres_version }}
|
image: postgres:15
|
||||||
env:
|
env:
|
||||||
PGPASSWORD: 'root'
|
PGPASSWORD: 'root'
|
||||||
POSTGRES_DB: 'laravel'
|
POSTGRES_DB: 'laravel'
|
||||||
@@ -68,7 +65,7 @@ jobs:
|
|||||||
run: php artisan test --stop-on-failure --coverage-text --coverage-clover=coverage.xml
|
run: php artisan test --stop-on-failure --coverage-text --coverage-clover=coverage.xml
|
||||||
|
|
||||||
- name: "Upload coverage reports to Codecov"
|
- name: "Upload coverage reports to Codecov"
|
||||||
uses: codecov/codecov-action@v5.4.3
|
uses: codecov/codecov-action@v5.4.2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
slug: solidtime-io/solidtime
|
slug: solidtime-io/solidtime
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ import {
|
|||||||
PopoverTrigger,
|
PopoverTrigger,
|
||||||
} from '@/Components/ui/popover';
|
} from '@/Components/ui/popover';
|
||||||
import { RangeCalendar } from '@/Components/ui/range-calendar';
|
import { RangeCalendar } from '@/Components/ui/range-calendar';
|
||||||
import { CalendarDate } from '@internationalized/date';
|
import {
|
||||||
|
CalendarDate,
|
||||||
|
getLocalTimeZone,
|
||||||
|
} from '@internationalized/date';
|
||||||
import { CalendarIcon } from 'lucide-vue-next';
|
import { CalendarIcon } from 'lucide-vue-next';
|
||||||
import { computed, ref, inject, type ComputedRef, watch } from 'vue';
|
import { computed, ref, inject, type ComputedRef, watch } from 'vue';
|
||||||
import { twMerge } from 'tailwind-merge';
|
import { twMerge } from 'tailwind-merge';
|
||||||
@@ -13,9 +16,8 @@ import {
|
|||||||
getDayJsInstance,
|
getDayJsInstance,
|
||||||
getLocalizedDayJs,
|
getLocalizedDayJs,
|
||||||
} from '@/packages/ui/src/utils/time';
|
} from '@/packages/ui/src/utils/time';
|
||||||
|
import { formatDateLocalized } from '@/packages/ui/src/utils/time';
|
||||||
import { type Organization } from '@/packages/api/src';
|
import { type Organization } from '@/packages/api/src';
|
||||||
import { getUserTimezone } from '@/packages/ui/src/utils/settings';
|
|
||||||
import { formatDate } from '@/packages/ui/src/utils/time';
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
start: string;
|
start: string;
|
||||||
@@ -57,13 +59,12 @@ const modelValue = computed<CalendarDateRange>({
|
|||||||
}),
|
}),
|
||||||
set: (newValue) => {
|
set: (newValue) => {
|
||||||
if (newValue.start) {
|
if (newValue.start) {
|
||||||
console.log(newValue.start);
|
const date = newValue.start.toDate(getLocalTimeZone());
|
||||||
const date = newValue.start.toDate(getUserTimezone());
|
emit('update:start', getDayJsInstance()(date).format('YYYY-MM-DD'));
|
||||||
emit('update:start', getLocalizedDayJs(date.toString()).format());
|
|
||||||
}
|
}
|
||||||
if (newValue.end) {
|
if (newValue.end) {
|
||||||
const date = newValue.end.toDate(getUserTimezone());
|
const date = newValue.end.toDate(getLocalTimeZone());
|
||||||
emit('update:end', getLocalizedDayJs(date.toString()).format());
|
emit('update:end', getDayJsInstance()(date).format('YYYY-MM-DD'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -218,27 +219,12 @@ watch(open, (value) => {
|
|||||||
<CalendarIcon class="mr-2 h-4 w-4" />
|
<CalendarIcon class="mr-2 h-4 w-4" />
|
||||||
<template v-if="modelValue.start">
|
<template v-if="modelValue.start">
|
||||||
<template v-if="modelValue.end">
|
<template v-if="modelValue.end">
|
||||||
{{
|
{{ formatDateLocalized(modelValue.start.toString(), organization?.date_format) }}
|
||||||
formatDate(
|
|
||||||
modelValue.start.toString(),
|
|
||||||
organization?.date_format
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
-
|
-
|
||||||
{{
|
{{ formatDateLocalized(modelValue.end.toString(), organization?.date_format) }}
|
||||||
formatDate(
|
|
||||||
modelValue.end.toString(),
|
|
||||||
organization?.date_format
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{
|
{{ formatDateLocalized(modelValue.start.toString(), organization?.date_format) }}
|
||||||
formatDate(
|
|
||||||
modelValue.start.toString(),
|
|
||||||
organization?.date_format
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template v-else> Pick a date </template>
|
<template v-else> Pick a date </template>
|
||||||
|
|||||||
Reference in New Issue
Block a user