Skip to content

Commit 18ce4be

Browse files
authored
#452 - bug fix (#472)
* #452 - fix: fixed edit form * #452 - fix: create view fix
1 parent f65ff3b commit 18ce4be

File tree

3 files changed

+0
-50
lines changed

3 files changed

+0
-50
lines changed

app/Http/Resources/UserFormDataResource.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,8 @@ public function toArray($request): array
2020
"role" => $this->role,
2121
"position" => $this->profile->position,
2222
"employmentForm" => $this->profile->employment_form,
23-
"employmentDate" => $this->profile->employment_date->toDateString(),
2423
"birthday" => $this->profile->birthday->toDateString(),
2524
"slackId" => $this->profile->slack_id,
26-
"lastMedicalExamDate" => $this->profile->last_medical_exam_date?->toDateString(),
27-
"nextMedicalExamDate" => $this->profile->next_medical_exam_date?->toDateString(),
28-
"lastOhsTrainingDate" => $this->profile->last_ohs_training_date?->toDateString(),
29-
"nextOhsTrainingDate" => $this->profile->next_ohs_training_date?->toDateString(),
3025
];
3126
}
3227
}

resources/js/Pages/Users/Create.vue

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const form = useForm({
1616
employmentForm: props.employmentForms[0],
1717
role: props.roles[0],
1818
position: null,
19-
employmentDate: null,
2019
birthday: null,
2120
slackId: null,
2221
})
@@ -245,28 +244,6 @@ function createUser() {
245244
</p>
246245
</div>
247246
</Listbox>
248-
<div class="items-center py-4 sm:grid sm:grid-cols-3">
249-
<label
250-
for="employment_date"
251-
class="block text-sm font-medium text-gray-700 sm:mt-px"
252-
>
253-
Data zatrudnienia
254-
</label>
255-
<div class="mt-1 sm:col-span-2 sm:mt-0">
256-
<FlatPickr
257-
id="employment_date"
258-
v-model="form.employmentDate"
259-
class="block w-full max-w-lg rounded-md shadow-sm sm:text-sm"
260-
: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 }"
261-
/>
262-
<p
263-
v-if="form.errors.employmentDate"
264-
class="mt-2 text-sm text-red-600"
265-
>
266-
{{ form.errors.employmentDate }}
267-
</p>
268-
</div>
269-
</div>
270247
<div class="items-center py-4 sm:grid sm:grid-cols-3">
271248
<label
272249
for="slackId"

resources/js/Pages/Users/Edit.vue

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -253,28 +253,6 @@ function editUser() {
253253
</p>
254254
</div>
255255
</Listbox>
256-
<div class="items-center py-4 sm:grid sm:grid-cols-3">
257-
<label
258-
for="employment_date"
259-
class="block text-sm font-medium text-gray-700 sm:mt-px"
260-
>
261-
Data zatrudnienia
262-
</label>
263-
<div class="mt-1 sm:col-span-2 sm:mt-0">
264-
<FlatPickr
265-
id="employment_date"
266-
v-model="form.employmentDate"
267-
class="block w-full max-w-lg rounded-md shadow-sm sm:text-sm"
268-
: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 }"
269-
/>
270-
<p
271-
v-if="form.errors.employmentDate"
272-
class="mt-2 text-sm text-red-600"
273-
>
274-
{{ form.errors.employmentDate }}
275-
</p>
276-
</div>
277-
</div>
278256
<div class="items-center py-4 sm:grid sm:grid-cols-3">
279257
<label
280258
for="birthday"

0 commit comments

Comments
 (0)