Compare commits
2 Commits
#152-dashb
...
main
Author | SHA1 | Date | |
---|---|---|---|
643f546142 | |||
995c0b6696 |
@ -31,6 +31,7 @@ class Resume extends Model
|
||||
"technologies" => AsCollection::class,
|
||||
"projects" => AsCollection::class,
|
||||
];
|
||||
protected $perPage = 50;
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
|
@ -46,6 +46,7 @@ class User extends Authenticatable implements NotifiableInterface
|
||||
protected $with = [
|
||||
"profile",
|
||||
];
|
||||
protected $perPage = 50;
|
||||
|
||||
public function profile(): HasOne
|
||||
{
|
||||
|
@ -49,6 +49,7 @@ class VacationRequest extends Model
|
||||
"to" => "date",
|
||||
"event_ids" => AsCollection::class,
|
||||
];
|
||||
protected $perPage = 50;
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
|
@ -297,8 +297,8 @@
|
||||
<button
|
||||
type="submit"
|
||||
class="inline-flex justify-center py-2 px-4 text-sm font-medium text-white bg-blumilk-600 rounded-md border border-transparent focus:outline-none focus:ring-2 focus:ring-blumilk-500 focus:ring-offset-2 shadow-sm"
|
||||
:class="[form.processing || !form.isDirty ? 'disabled:opacity-60' : 'hover:bg-blumilk-700']"
|
||||
:disabled="form.processing || !form.isDirty"
|
||||
:class="[form.processing || !isDirty ? 'disabled:opacity-60' : 'hover:bg-blumilk-700']"
|
||||
:disabled="form.processing || !isDirty"
|
||||
>
|
||||
Zapisz
|
||||
</button>
|
||||
@ -359,6 +359,13 @@ const form = useForm({
|
||||
flowSkipped: false,
|
||||
})
|
||||
|
||||
let isDirty = ref(false)
|
||||
|
||||
watch(form, formData => {
|
||||
const { from, to } = formData.data()
|
||||
isDirty.value = formData.isDirty || from !== null || to !== null
|
||||
}, { immediate: true, deep: true })
|
||||
|
||||
refreshEstimatedDays(form.from, form.to)
|
||||
|
||||
const estimatedDays = ref([])
|
||||
|
@ -73,10 +73,10 @@ class UserTest extends FeatureTestCase
|
||||
|
||||
public function testUserListIsPaginated(): void
|
||||
{
|
||||
User::factory()->count(15)->create();
|
||||
User::factory()->count(50)->create();
|
||||
$admin = User::factory()->admin()->create();
|
||||
|
||||
$this->assertDatabaseCount("users", 16);
|
||||
$this->assertDatabaseCount("users", 51);
|
||||
|
||||
$this->actingAs($admin)
|
||||
->get("/users?page=2")
|
||||
|
Loading…
x
Reference in New Issue
Block a user