diff --git a/app/Http/Controllers/ImportController.php b/app/Http/Controllers/ImportController.php index 6264a67..689a872 100644 --- a/app/Http/Controllers/ImportController.php +++ b/app/Http/Controllers/ImportController.php @@ -184,7 +184,7 @@ public function store(Request $request) } // Kick off processing of an import - simple synchronous step for now - public function process(Import $import, Request $request, ImportServiceV2 $processor) + public function process(Import $import, Request $request, ImportProcessor $processor) { $import->update(['status' => 'validating', 'started_at' => now()]); diff --git a/app/Services/Import/Handlers/AddressHandler.php b/app/Services/Import/Handlers/AddressHandler.php index 44c8734..bd2ba29 100644 --- a/app/Services/Import/Handlers/AddressHandler.php +++ b/app/Services/Import/Handlers/AddressHandler.php @@ -103,7 +103,7 @@ public function process(Import $import, array $mapped, array $raw, array $contex $payload = $this->buildPayloadForAddress($address); $payload['person_id'] = $personId; - $addressEntity = new \App\Models\Person\PersonAddress; + $addressEntity = new PersonAddress; $addressEntity->fill($payload); $addressEntity->save(); @@ -129,7 +129,7 @@ public function process(Import $import, array $mapped, array $raw, array $contex protected function resolveAddress(string $address, int $personId): mixed { - return \App\Models\Person\PersonAddress::where('person_id', $personId) + return PersonAddress::where('person_id', $personId) ->where('address', $address) ->first(); } diff --git a/resources/js/Components/PersonInfo/PersonInfoGrid.vue b/resources/js/Components/PersonInfo/PersonInfoGrid.vue index d9b17f3..b5ca32a 100644 --- a/resources/js/Components/PersonInfo/PersonInfoGrid.vue +++ b/resources/js/Components/PersonInfo/PersonInfoGrid.vue @@ -384,6 +384,7 @@ const switchToTab = (tab) => { import { UserEditIcon } from "@/Utilities/Icons"; import { Button } from "../ui/button"; +import { fmtDateDMY } from "@/Utilities/functions"; const props = defineProps({ person: Object, + isClientCase: { type: Boolean, default: false }, edit: { type: Boolean, default: true }, personEdit: { type: Boolean, default: true }, }); -const emit = defineEmits(['edit']); +const emit = defineEmits(["edit"]); const getMainAddress = (adresses) => { const addr = adresses.filter((a) => a.type.id === 1)[0] ?? ""; @@ -30,7 +32,7 @@ const getMainPhone = (phones) => { }; const handleEdit = () => { - emit('edit'); + emit("edit"); }; @@ -44,51 +46,126 @@ const handleEdit = () => { > Uredi - +
-
-

Nu.

+
+

+ Primer ref. +

{{ person.nu }}

-
-

Name.

+
+

Naziv

{{ person.full_name }}

-
-

Tax NU.

+
+

+ Davčna +

{{ person.tax_number }}

-
-

Social security NU.

+
+

Emšo

{{ person.social_security_number }}

-
-
-

Address

+
+
+

+ Naslov +

{{ getMainAddress(person.addresses) }}

-
-

Phone

+
+

+ Telefon +

{{ getMainPhone(person.phones) }}

-
-

Description

+
+

+ Dat. rojstva +

+

+ {{ fmtDateDMY(person.birthday) }} +

+
+
+ +
+
+

+ Naslov +

+

+ {{ getMainAddress(person.addresses) }} +

+
+
+

+ Telefon +

+

+ {{ getMainPhone(person.phones) }} +

+
+
+
+
+

+ Delodajalec +

+

+ {{ person.employer }} +

+
+ +
+

Opis

{{ person.description }}

- diff --git a/resources/js/Components/PersonInfo/PersonUpdateForm.vue b/resources/js/Components/PersonInfo/PersonUpdateForm.vue index 40119ee..da0dce3 100644 --- a/resources/js/Components/PersonInfo/PersonUpdateForm.vue +++ b/resources/js/Components/PersonInfo/PersonUpdateForm.vue @@ -1,182 +1,205 @@