From 18ce4be52062f448e4ba00622bcda0b1a1551024 Mon Sep 17 00:00:00 2001
From: Kamil Piech
Date: Tue, 23 Jul 2024 10:08:05 +0200
Subject: [PATCH] #452 - bug fix (#472)
* #452 - fix: fixed edit form
* #452 - fix: create view fix
---
app/Http/Resources/UserFormDataResource.php | 5 -----
resources/js/Pages/Users/Create.vue | 23 ---------------------
resources/js/Pages/Users/Edit.vue | 22 --------------------
3 files changed, 50 deletions(-)
diff --git a/app/Http/Resources/UserFormDataResource.php b/app/Http/Resources/UserFormDataResource.php
index 6704791c..437ecd8e 100644
--- a/app/Http/Resources/UserFormDataResource.php
+++ b/app/Http/Resources/UserFormDataResource.php
@@ -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(),
];
}
}
diff --git a/resources/js/Pages/Users/Create.vue b/resources/js/Pages/Users/Create.vue
index aabce72f..f54cf19e 100644
--- a/resources/js/Pages/Users/Create.vue
+++ b/resources/js/Pages/Users/Create.vue
@@ -16,7 +16,6 @@ const form = useForm({
employmentForm: props.employmentForms[0],
role: props.roles[0],
position: null,
- employmentDate: null,
birthday: null,
slackId: null,
})
@@ -245,28 +244,6 @@ function createUser() {
-
-
-
-
-
- {{ form.errors.employmentDate }}
-
-
-
-
-
-
-
-
- {{ form.errors.employmentDate }}
-
-
-