diff --git a/app/Actions/SysAdmin/User/UI/EditUser.php b/app/Actions/SysAdmin/User/UI/EditUser.php index 87b606a94..e3bc2c0a8 100644 --- a/app/Actions/SysAdmin/User/UI/EditUser.php +++ b/app/Actions/SysAdmin/User/UI/EditUser.php @@ -97,7 +97,7 @@ class_basename(Warehouse::class) => Organisation::all()->map(function (Organisat $jobPositionsOrganisationsData = []; foreach ($this->group->organisations as $organisation) { $jobPositionsOrganisationData = GetJobPositionsOrganisationData::run($user, $organisation); - $jobPositionsOrganisationsData[] = $jobPositionsOrganisationData; + $jobPositionsOrganisationsData[$organisation->slug] = $jobPositionsOrganisationData; } $permissionsGroupData = GetPermissionGroupData::run($user, $this->group); diff --git a/app/Models/SysAdmin/User.php b/app/Models/SysAdmin/User.php index ce84c7e0e..116292d99 100644 --- a/app/Models/SysAdmin/User.php +++ b/app/Models/SysAdmin/User.php @@ -278,7 +278,7 @@ public function timeSeries(): HasMany public function jobPositions(): BelongsToMany { return $this->belongsToMany(JobPosition::class, 'user_has_pseudo_job_positions') - ->using(UserHasPseudoJobPositions::class)->withTimestamps(); + ->using(UserHasPseudoJobPositions::class)->withPivot(['scopes'])->withTimestamps(); } diff --git a/resources/js/Components/Forms/Fields/EmployeePosition.vue b/resources/js/Components/Forms/Fields/EmployeePosition.vue index 76bfa3a57..b08e8bf41 100644 --- a/resources/js/Components/Forms/Fields/EmployeePosition.vue +++ b/resources/js/Components/Forms/Fields/EmployeePosition.vue @@ -1,5 +1,5 @@