Merge branch 'main' into #39-generate-timesheet
# Conflicts: # composer.lock # resources/lang/pl.json
This commit is contained in:
commit
0f5b9ecc0b
2
.env.ci
2
.env.ci
@ -19,5 +19,5 @@ CACHE_DRIVER=array
|
|||||||
QUEUE_CONNECTION=sync
|
QUEUE_CONNECTION=sync
|
||||||
SESSION_DRIVER=array
|
SESSION_DRIVER=array
|
||||||
SESSION_LIFETIME=120
|
SESSION_LIFETIME=120
|
||||||
FILESYSTEM_DRIVER=local
|
FILESYSTEM_DISK=local
|
||||||
MAIL_MAILER=array
|
MAIL_MAILER=array
|
||||||
|
@ -22,7 +22,7 @@ CACHE_DRIVER=array
|
|||||||
QUEUE_CONNECTION=sync
|
QUEUE_CONNECTION=sync
|
||||||
SESSION_DRIVER=file
|
SESSION_DRIVER=file
|
||||||
SESSION_LIFETIME=120
|
SESSION_LIFETIME=120
|
||||||
FILESYSTEM_DRIVER=local
|
FILESYSTEM_DISK=local
|
||||||
MAIL_MAILER=array
|
MAIL_MAILER=array
|
||||||
|
|
||||||
TELESCOPE_ENABLED=false
|
TELESCOPE_ENABLED=false
|
||||||
|
@ -35,7 +35,7 @@ CACHE_DRIVER=file
|
|||||||
QUEUE_CONNECTION=sync
|
QUEUE_CONNECTION=sync
|
||||||
SESSION_DRIVER=file
|
SESSION_DRIVER=file
|
||||||
SESSION_LIFETIME=120
|
SESSION_LIFETIME=120
|
||||||
FILESYSTEM_DRIVER=local
|
FILESYSTEM_DISK=local
|
||||||
|
|
||||||
MAILHOG_PORT=1025
|
MAILHOG_PORT=1025
|
||||||
MAILHOG_DASHBOARD_PORT=8025
|
MAILHOG_DASHBOARD_PORT=8025
|
||||||
|
@ -8,12 +8,14 @@ use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvi
|
|||||||
use Toby\Domain\Events\VacationRequestAcceptedByAdministrative;
|
use Toby\Domain\Events\VacationRequestAcceptedByAdministrative;
|
||||||
use Toby\Domain\Events\VacationRequestAcceptedByTechnical;
|
use Toby\Domain\Events\VacationRequestAcceptedByTechnical;
|
||||||
use Toby\Domain\Events\VacationRequestApproved;
|
use Toby\Domain\Events\VacationRequestApproved;
|
||||||
|
use Toby\Domain\Events\VacationRequestCancelled;
|
||||||
use Toby\Domain\Events\VacationRequestCreated;
|
use Toby\Domain\Events\VacationRequestCreated;
|
||||||
use Toby\Domain\Events\VacationRequestStateChanged;
|
use Toby\Domain\Events\VacationRequestStateChanged;
|
||||||
use Toby\Domain\Listeners\CreateVacationRequestActivity;
|
use Toby\Domain\Listeners\CreateVacationRequestActivity;
|
||||||
use Toby\Domain\Listeners\HandleAcceptedByAdministrativeVacationRequest;
|
use Toby\Domain\Listeners\HandleAcceptedByAdministrativeVacationRequest;
|
||||||
use Toby\Domain\Listeners\HandleAcceptedByTechnicalVacationRequest;
|
use Toby\Domain\Listeners\HandleAcceptedByTechnicalVacationRequest;
|
||||||
use Toby\Domain\Listeners\HandleApprovedVacationRequest;
|
use Toby\Domain\Listeners\HandleApprovedVacationRequest;
|
||||||
|
use Toby\Domain\Listeners\HandleCancelledVacationRequest;
|
||||||
use Toby\Domain\Listeners\HandleCreatedVacationRequest;
|
use Toby\Domain\Listeners\HandleCreatedVacationRequest;
|
||||||
|
|
||||||
class EventServiceProvider extends ServiceProvider
|
class EventServiceProvider extends ServiceProvider
|
||||||
@ -24,5 +26,6 @@ class EventServiceProvider extends ServiceProvider
|
|||||||
VacationRequestAcceptedByTechnical::class => [HandleAcceptedByTechnicalVacationRequest::class],
|
VacationRequestAcceptedByTechnical::class => [HandleAcceptedByTechnicalVacationRequest::class],
|
||||||
VacationRequestAcceptedByAdministrative::class => [HandleAcceptedByAdministrativeVacationRequest::class],
|
VacationRequestAcceptedByAdministrative::class => [HandleAcceptedByAdministrativeVacationRequest::class],
|
||||||
VacationRequestApproved::class => [HandleApprovedVacationRequest::class],
|
VacationRequestApproved::class => [HandleApprovedVacationRequest::class],
|
||||||
|
VacationRequestCancelled::class => [HandleCancelledVacationRequest::class],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ namespace Toby\Domain\Enums;
|
|||||||
enum VacationRequestState: string
|
enum VacationRequestState: string
|
||||||
{
|
{
|
||||||
case Created = "created";
|
case Created = "created";
|
||||||
case Canceled = "canceled";
|
case Cancelled = "cancelled";
|
||||||
case Rejected = "rejected";
|
case Rejected = "rejected";
|
||||||
case Approved = "approved";
|
case Approved = "approved";
|
||||||
case WaitingForTechnical = "waiting_for_technical";
|
case WaitingForTechnical = "waiting_for_technical";
|
||||||
@ -40,7 +40,7 @@ enum VacationRequestState: string
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
self::Rejected,
|
self::Rejected,
|
||||||
self::Canceled,
|
self::Cancelled,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
20
app/Domain/Events/VacationRequestCancelled.php
Normal file
20
app/Domain/Events/VacationRequestCancelled.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Toby\Domain\Events;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Events\Dispatchable;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Toby\Eloquent\Models\VacationRequest;
|
||||||
|
|
||||||
|
class VacationRequestCancelled
|
||||||
|
{
|
||||||
|
use Dispatchable;
|
||||||
|
use SerializesModels;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
public VacationRequest $vacationRequest,
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
}
|
@ -5,16 +5,10 @@ declare(strict_types=1);
|
|||||||
namespace Toby\Domain\Listeners;
|
namespace Toby\Domain\Listeners;
|
||||||
|
|
||||||
use Toby\Domain\Events\VacationRequestApproved;
|
use Toby\Domain\Events\VacationRequestApproved;
|
||||||
use Toby\Domain\VacationTypeConfigRetriever;
|
|
||||||
use Toby\Infrastructure\Jobs\SendVacationRequestDaysToGoogleCalendar;
|
use Toby\Infrastructure\Jobs\SendVacationRequestDaysToGoogleCalendar;
|
||||||
|
|
||||||
class HandleApprovedVacationRequest
|
class HandleApprovedVacationRequest
|
||||||
{
|
{
|
||||||
public function __construct(
|
|
||||||
protected VacationTypeConfigRetriever $configRetriever,
|
|
||||||
) {
|
|
||||||
}
|
|
||||||
|
|
||||||
public function handle(VacationRequestApproved $event): void
|
public function handle(VacationRequestApproved $event): void
|
||||||
{
|
{
|
||||||
SendVacationRequestDaysToGoogleCalendar::dispatch($event->vacationRequest);
|
SendVacationRequestDaysToGoogleCalendar::dispatch($event->vacationRequest);
|
||||||
|
16
app/Domain/Listeners/HandleCancelledVacationRequest.php
Normal file
16
app/Domain/Listeners/HandleCancelledVacationRequest.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Toby\Domain\Listeners;
|
||||||
|
|
||||||
|
use Toby\Domain\Events\VacationRequestCancelled;
|
||||||
|
use Toby\Infrastructure\Jobs\ClearVacationRequestDaysInGoogleCalendar;
|
||||||
|
|
||||||
|
class HandleCancelledVacationRequest
|
||||||
|
{
|
||||||
|
public function handle(VacationRequestCancelled $event): void
|
||||||
|
{
|
||||||
|
ClearVacationRequestDaysInGoogleCalendar::dispatch($event->vacationRequest);
|
||||||
|
}
|
||||||
|
}
|
@ -21,7 +21,6 @@ use Maatwebsite\Excel\Events\AfterSheet;
|
|||||||
use PhpOffice\PhpSpreadsheet\Shared\Date;
|
use PhpOffice\PhpSpreadsheet\Shared\Date;
|
||||||
use PhpOffice\PhpSpreadsheet\Style\Alignment;
|
use PhpOffice\PhpSpreadsheet\Style\Alignment;
|
||||||
use PhpOffice\PhpSpreadsheet\Style\Border;
|
use PhpOffice\PhpSpreadsheet\Style\Border;
|
||||||
use PhpOffice\PhpSpreadsheet\Style\Color;
|
|
||||||
use PhpOffice\PhpSpreadsheet\Style\Fill;
|
use PhpOffice\PhpSpreadsheet\Style\Fill;
|
||||||
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||||
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||||
|
@ -10,6 +10,7 @@ use Toby\Domain\Enums\VacationRequestState;
|
|||||||
use Toby\Domain\Events\VacationRequestAcceptedByAdministrative;
|
use Toby\Domain\Events\VacationRequestAcceptedByAdministrative;
|
||||||
use Toby\Domain\Events\VacationRequestAcceptedByTechnical;
|
use Toby\Domain\Events\VacationRequestAcceptedByTechnical;
|
||||||
use Toby\Domain\Events\VacationRequestApproved;
|
use Toby\Domain\Events\VacationRequestApproved;
|
||||||
|
use Toby\Domain\Events\VacationRequestCancelled;
|
||||||
use Toby\Domain\Events\VacationRequestCreated;
|
use Toby\Domain\Events\VacationRequestCreated;
|
||||||
use Toby\Eloquent\Models\VacationRequest;
|
use Toby\Eloquent\Models\VacationRequest;
|
||||||
|
|
||||||
@ -42,7 +43,9 @@ class VacationRequestStateManager
|
|||||||
|
|
||||||
public function cancel(VacationRequest $vacationRequest): void
|
public function cancel(VacationRequest $vacationRequest): void
|
||||||
{
|
{
|
||||||
$this->changeState($vacationRequest, VacationRequestState::Canceled);
|
$this->changeState($vacationRequest, VacationRequestState::Cancelled);
|
||||||
|
|
||||||
|
$this->dispatcher->dispatch(new VacationRequestCancelled($vacationRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function acceptAsTechnical(VacationRequest $vacationRequest): void
|
public function acceptAsTechnical(VacationRequest $vacationRequest): void
|
||||||
|
@ -116,7 +116,7 @@ class VacationRequestController extends Controller
|
|||||||
$stateManager->cancel($vacationRequest);
|
$stateManager->cancel($vacationRequest);
|
||||||
|
|
||||||
return redirect()->back()
|
return redirect()->back()
|
||||||
->with("success", __("Vacation request has been canceled."));
|
->with("success", __("Vacation request has been cancelled."));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function acceptAsTechnical(
|
public function acceptAsTechnical(
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Toby\Infrastructure\Jobs;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
|
use Spatie\GoogleCalendar\Event;
|
||||||
|
use Toby\Eloquent\Models\Vacation;
|
||||||
|
use Toby\Eloquent\Models\VacationRequest;
|
||||||
|
|
||||||
|
class ClearVacationRequestDaysInGoogleCalendar implements ShouldQueue
|
||||||
|
{
|
||||||
|
use Dispatchable;
|
||||||
|
use Queueable;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
protected VacationRequest $vacationRequest,
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public function handle(): void
|
||||||
|
{
|
||||||
|
$vacations = $this->vacationRequest->vacations()
|
||||||
|
->whereNotNull("event_id")
|
||||||
|
->get();
|
||||||
|
|
||||||
|
/** @var Vacation $vacation */
|
||||||
|
foreach ($vacations as $vacation) {
|
||||||
|
Event::find($vacation->event_id)->delete();
|
||||||
|
|
||||||
|
$vacation->update([
|
||||||
|
"event_id" => null,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -12,7 +12,7 @@
|
|||||||
"fruitcake/laravel-cors": "^2.0",
|
"fruitcake/laravel-cors": "^2.0",
|
||||||
"guzzlehttp/guzzle": "^7.0.1",
|
"guzzlehttp/guzzle": "^7.0.1",
|
||||||
"inertiajs/inertia-laravel": "^0.5.1",
|
"inertiajs/inertia-laravel": "^0.5.1",
|
||||||
"laravel/framework": "^8.75",
|
"laravel/framework": "^9.0",
|
||||||
"laravel/sanctum": "^2.14",
|
"laravel/sanctum": "^2.14",
|
||||||
"laravel/socialite": "^5.2",
|
"laravel/socialite": "^5.2",
|
||||||
"laravel/telescope": "^4.6",
|
"laravel/telescope": "^4.6",
|
||||||
@ -23,12 +23,11 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"blumilksoftware/codestyle": "^0.9.0",
|
"blumilksoftware/codestyle": "^0.9.0",
|
||||||
"enlightn/enlightn": "^1.22",
|
"spatie/laravel-ignition": "^1.0",
|
||||||
"facade/ignition": "^2.5",
|
|
||||||
"fakerphp/faker": "^1.9.1",
|
"fakerphp/faker": "^1.9.1",
|
||||||
"laravel/dusk": "^6.21",
|
"laravel/dusk": "^6.21",
|
||||||
"mockery/mockery": "^1.4.4",
|
"mockery/mockery": "^1.4.4",
|
||||||
"nunomaduro/collision": "^5.10",
|
"nunomaduro/collision": "^6.1",
|
||||||
"phpunit/phpunit": "^9.5.10"
|
"phpunit/phpunit": "^9.5.10"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
2990
composer.lock
generated
2990
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,68 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
return [
|
|
||||||
"analyzers" => ["*"],
|
|
||||||
"exclude_analyzers" => [],
|
|
||||||
"ci_mode_exclude_analyzers" => [],
|
|
||||||
"analyzer_paths" => [
|
|
||||||
"Enlightn\\Enlightn\\Analyzers" => base_path("vendor/enlightn/enlightn/src/Analyzers"),
|
|
||||||
"Enlightn\\EnlightnPro\\Analyzers" => base_path("vendor/enlightn/enlightnpro/src/Analyzers"),
|
|
||||||
],
|
|
||||||
"base_path" => [
|
|
||||||
app_path(),
|
|
||||||
database_path("migrations"),
|
|
||||||
database_path("seeders"),
|
|
||||||
],
|
|
||||||
"skip_env_specific" => env("ENLIGHTN_SKIP_ENVIRONMENT_SPECIFIC", false),
|
|
||||||
"guest_url" => null,
|
|
||||||
"dont_report" => [],
|
|
||||||
"ignore_errors" => [],
|
|
||||||
"license_whitelist" => [
|
|
||||||
"Apache-2.0",
|
|
||||||
"Apache2",
|
|
||||||
"BSD-2-Clause",
|
|
||||||
"BSD-3-Clause",
|
|
||||||
"LGPL-2.1-only",
|
|
||||||
"LGPL-2.1",
|
|
||||||
"LGPL-2.1-or-later",
|
|
||||||
"LGPL-3.0",
|
|
||||||
"LGPL-3.0-only",
|
|
||||||
"LGPL-3.0-or-later",
|
|
||||||
"MIT",
|
|
||||||
"ISC",
|
|
||||||
"CC0-1.0",
|
|
||||||
"Unlicense",
|
|
||||||
"WTFPL",
|
|
||||||
],
|
|
||||||
"credentials" => [
|
|
||||||
"username" => env("ENLIGHTN_USERNAME"),
|
|
||||||
"api_token" => env("ENLIGHTN_API_TOKEN"),
|
|
||||||
],
|
|
||||||
"github_repo" => env("ENLIGHTN_GITHUB_REPO"),
|
|
||||||
"compact_lines" => true,
|
|
||||||
"commercial_packages" => [
|
|
||||||
"enlightn/enlightnpro",
|
|
||||||
],
|
|
||||||
"allowed_permissions" => [
|
|
||||||
base_path() => "775",
|
|
||||||
app_path() => "775",
|
|
||||||
resource_path() => "775",
|
|
||||||
storage_path() => "775",
|
|
||||||
public_path() => "775",
|
|
||||||
config_path() => "775",
|
|
||||||
database_path() => "775",
|
|
||||||
base_path("routes") => "775",
|
|
||||||
app()->bootstrapPath() => "775",
|
|
||||||
app()->bootstrapPath("cache") => "775",
|
|
||||||
app()->bootstrapPath("app.php") => "664",
|
|
||||||
base_path("artisan") => "775",
|
|
||||||
public_path("index.php") => "664",
|
|
||||||
public_path("server.php") => "664",
|
|
||||||
],
|
|
||||||
"writable_directories" => [
|
|
||||||
storage_path(),
|
|
||||||
app()->bootstrapPath("cache"),
|
|
||||||
],
|
|
||||||
];
|
|
@ -3,7 +3,7 @@
|
|||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
"default" => env("FILESYSTEM_DRIVER", "local"),
|
"default" => env("FILESYSTEM_DISK", "local"),
|
||||||
"disks" => [
|
"disks" => [
|
||||||
"local" => [
|
"local" => [
|
||||||
"driver" => "local",
|
"driver" => "local",
|
||||||
|
@ -110,7 +110,7 @@ const statuses = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Anulowany',
|
text: 'Anulowany',
|
||||||
value: 'canceled',
|
value: 'cancelled',
|
||||||
outline: {
|
outline: {
|
||||||
icon: OutlineXIcon,
|
icon: OutlineXIcon,
|
||||||
foreground: 'text-white',
|
foreground: 'text-white',
|
||||||
|
@ -62,7 +62,9 @@
|
|||||||
as="template"
|
as="template"
|
||||||
:value="type"
|
:value="type"
|
||||||
>
|
>
|
||||||
<li :class="[active ? 'text-white bg-blumilk-600' : 'text-gray-900', 'cursor-default select-none relative py-2 pl-3 pr-9']">
|
<li
|
||||||
|
:class="[active ? 'text-white bg-blumilk-600' : 'text-gray-900', 'cursor-default select-none relative py-2 pl-3 pr-9']"
|
||||||
|
>
|
||||||
<span :class="[selected ? 'font-semibold' : 'font-normal', 'block truncate']">
|
<span :class="[selected ? 'font-semibold' : 'font-normal', 'block truncate']">
|
||||||
{{ type.label }}
|
{{ type.label }}
|
||||||
</span>
|
</span>
|
||||||
@ -137,7 +139,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="sm:grid sm:grid-cols-3 py-4 items-center">
|
<div class="sm:grid sm:grid-cols-3 py-4 items-center">
|
||||||
<span class="block text-sm font-medium text-gray-700 sm:mt-px">Liczba dni urlopu</span>
|
<span class="block text-sm font-medium text-gray-700 sm:mt-px">Liczba dni urlopu</span>
|
||||||
<div class="mt-1 sm:mt-0 sm:col-span-2 w-full max-w-lg bg-gray-50 border border-gray-300 rounded-md px-4 py-2 inline-flex items-center text-gray-500 sm:text-sm">
|
<div
|
||||||
|
class="mt-1 sm:mt-0 sm:col-span-2 w-full max-w-lg bg-gray-50 border border-gray-300 rounded-md px-4 py-2 inline-flex items-center text-gray-500 sm:text-sm"
|
||||||
|
>
|
||||||
{{ estimatedDays.length }}
|
{{ estimatedDays.length }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -179,11 +183,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {useForm} from '@inertiajs/inertia-vue3'
|
import {useForm, usePage} from '@inertiajs/inertia-vue3'
|
||||||
import FlatPickr from 'vue-flatpickr-component'
|
import FlatPickr from 'vue-flatpickr-component'
|
||||||
import {Listbox, ListboxButton, ListboxLabel, ListboxOption, ListboxOptions} from '@headlessui/vue'
|
import {Listbox, ListboxButton, ListboxLabel, ListboxOption, ListboxOptions} from '@headlessui/vue'
|
||||||
import {CheckIcon, SelectorIcon, XCircleIcon} from '@heroicons/vue/solid'
|
import {CheckIcon, SelectorIcon, XCircleIcon} from '@heroicons/vue/solid'
|
||||||
import {reactive, ref} from 'vue'
|
import {reactive, ref, computed} from 'vue'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -218,18 +222,22 @@ export default {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const estimatedDays = ref([])
|
const estimatedDays = ref([])
|
||||||
|
const minDate = computed(() => new Date(usePage().props.value.years.current, 0, 1))
|
||||||
|
const maxDate = computed(() => new Date(usePage().props.value.years.current, 11, 31))
|
||||||
|
|
||||||
const disableDates = [
|
const disableDates = [
|
||||||
date => (date.getDay() === 0 || date.getDay() === 6),
|
date => (date.getDay() === 0 || date.getDay() === 6),
|
||||||
]
|
]
|
||||||
|
|
||||||
const fromInputConfig = reactive({
|
const fromInputConfig = reactive({
|
||||||
maxDate: null,
|
minDate: minDate,
|
||||||
|
maxDate: maxDate,
|
||||||
disable: disableDates,
|
disable: disableDates,
|
||||||
})
|
})
|
||||||
|
|
||||||
const toInputConfig = reactive({
|
const toInputConfig = reactive({
|
||||||
minDate: null,
|
minDate: minDate,
|
||||||
|
maxDate: maxDate,
|
||||||
disable: disableDates,
|
disable: disableDates,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -250,13 +258,11 @@ export default {
|
|||||||
.post('/vacation-requests')
|
.post('/vacation-requests')
|
||||||
},
|
},
|
||||||
onFromChange(selectedDates, dateStr) {
|
onFromChange(selectedDates, dateStr) {
|
||||||
this.toInputConfig.minDate = dateStr
|
this.form.to = dateStr
|
||||||
|
|
||||||
this.refreshEstimatedDays(this.form.from, this.form.to)
|
this.refreshEstimatedDays(this.form.from, this.form.to)
|
||||||
},
|
},
|
||||||
onToChange(selectedDates, dateStr) {
|
onToChange() {
|
||||||
this.fromInputConfig.maxDate = dateStr
|
|
||||||
|
|
||||||
this.refreshEstimatedDays(this.form.from, this.form.to)
|
this.refreshEstimatedDays(this.form.from, this.form.to)
|
||||||
},
|
},
|
||||||
refreshEstimatedDays(from, to) {
|
refreshEstimatedDays(from, to) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"technical_approver": "Techniczny akceptujący",
|
"technical_approver": "Techniczny akceptujący",
|
||||||
"administrative_approver": "Administracyjny akceptujący",
|
"administrative_approver": "Administracyjny akceptujący",
|
||||||
"created": "Utworzony",
|
"created": "Utworzony",
|
||||||
"canceled": "Anulowany",
|
"cancelled": "Anulowany",
|
||||||
"rejected": "Odrzucony",
|
"rejected": "Odrzucony",
|
||||||
"approved": "Zatwierdzony",
|
"approved": "Zatwierdzony",
|
||||||
"waiting_for_technical": "Czeka na akceptację od technicznego",
|
"waiting_for_technical": "Czeka na akceptację od technicznego",
|
||||||
@ -43,7 +43,7 @@
|
|||||||
"Vacation request has been created.": "Wniosek urlopowy został utworzony.",
|
"Vacation request has been created.": "Wniosek urlopowy został utworzony.",
|
||||||
"Vacation request has been accepted.": "Wniosek urlopowy został zaakceptowany.",
|
"Vacation request has been accepted.": "Wniosek urlopowy został zaakceptowany.",
|
||||||
"Vacation request has been rejected.": "Wniosek urlopowy został odrzucony.",
|
"Vacation request has been rejected.": "Wniosek urlopowy został odrzucony.",
|
||||||
"Vacation request has been canceled.": "Wniosek urlopowy został anulowany.",
|
"Vacation request has been cancelled.": "Wniosek urlopowy został anulowany.",
|
||||||
"Sum:": "Suma:",
|
"Sum:": "Suma:",
|
||||||
"Date": "Data",
|
"Date": "Data",
|
||||||
"Day of week": "Dzień tygodnia",
|
"Day of week": "Dzień tygodnia",
|
||||||
|
@ -122,6 +122,6 @@ class HolidayTest extends FeatureTestCase
|
|||||||
->delete("/holidays/{$holiday->id}")
|
->delete("/holidays/{$holiday->id}")
|
||||||
->assertSessionHasNoErrors();
|
->assertSessionHasNoErrors();
|
||||||
|
|
||||||
$this->assertDeleted($holiday);
|
$this->assertModelMissing($holiday);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user