Skip to content

Commit

Permalink
#452 - fix: fixed edit form
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilpiech97 committed Jul 23, 2024
1 parent f65ff3b commit eb166e6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
5 changes: 0 additions & 5 deletions app/Http/Resources/UserFormDataResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ public function toArray($request): array
"role" => $this->role,
"position" => $this->profile->position,
"employmentForm" => $this->profile->employment_form,
"employmentDate" => $this->profile->employment_date->toDateString(),
"birthday" => $this->profile->birthday->toDateString(),
"slackId" => $this->profile->slack_id,
"lastMedicalExamDate" => $this->profile->last_medical_exam_date?->toDateString(),
"nextMedicalExamDate" => $this->profile->next_medical_exam_date?->toDateString(),
"lastOhsTrainingDate" => $this->profile->last_ohs_training_date?->toDateString(),
"nextOhsTrainingDate" => $this->profile->next_ohs_training_date?->toDateString(),
];
}
}
22 changes: 0 additions & 22 deletions resources/js/Pages/Users/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,28 +253,6 @@ function editUser() {
</p>
</div>
</Listbox>
<div class="items-center py-4 sm:grid sm:grid-cols-3">
<label
for="employment_date"
class="block text-sm font-medium text-gray-700 sm:mt-px"
>
Data zatrudnienia
</label>
<div class="mt-1 sm:col-span-2 sm:mt-0">
<FlatPickr
id="employment_date"
v-model="form.employmentDate"
class="block w-full max-w-lg rounded-md shadow-sm sm:text-sm"
:class="{ 'border-red-300 text-red-900 focus:outline-none focus:ring-red-500 focus:border-red-500': form.errors.employmentDate, 'focus:ring-blumilk-500 focus:border-blumilk-500 sm:text-sm border-gray-300': !form.errors.employmentDate }"
/>
<p
v-if="form.errors.employmentDate"
class="mt-2 text-sm text-red-600"
>
{{ form.errors.employmentDate }}
</p>
</div>
</div>
<div class="items-center py-4 sm:grid sm:grid-cols-3">
<label
for="birthday"
Expand Down

0 comments on commit eb166e6

Please sign in to comment.