fix: update permissions structure for secretary API interactions

This commit is contained in:
hamed
2026-06-15 11:25:14 +03:30
parent 4bf381ac94
commit 5f5b0fa548
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -198,7 +198,7 @@ export default function MySecretariesPage() {
const updatePermsMutation = useMutation({
mutationFn: ({ uuid, permissions }: { uuid: string; permissions: SecretaryPermissions }) =>
api.patch(`/api/v1/secretary/${uuid}`, { permissions }),
api.patch(`/api/v1/secretary/${uuid}`, { permissions: { version: 1, resources: permissions } }),
onSuccess: () => {
toast.success('دسترسی‌ها بروزرسانی شد');
setEditTarget(null);
+1 -1
View File
@@ -121,7 +121,7 @@ class DoctorSecretary
'owner_type' => $this->ownerType,
'clinic_uuid' => $this->clinic?->getUuid(),
'is_active' => $this->active,
'permissions' => $this->getPermissions(),
'permissions' => $this->getPermissions()['resources'] ?? $this->getPermissions(),
'created_at' => $this->createdAt,
];
}