Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions apps/dav/lib/Controller/OutOfOfficeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ public function getOutOfOffice(string $userId): DataResponse {
* @param string $status Short text that is set as user status during the absence
* @param string $message Longer multiline message that is shown to others during the absence
* @param ?string $replacementUserId User id of the replacement user
* @param ?string $replacementUserDisplayName Display name of the replacement user
* @return DataResponse<Http::STATUS_OK, DAVOutOfOfficeData, array{}>|DataResponse<Http::STATUS_BAD_REQUEST, array{error: 'firstDay'|'statusLength'}, array{}>|DataResponse<Http::STATUS_UNAUTHORIZED, null, array{}>|DataResponse<Http::STATUS_NOT_FOUND, null, array{}>
*
* 200: Absence data
Expand All @@ -122,8 +121,6 @@ public function setOutOfOffice(
string $status,
string $message,
?string $replacementUserId,
?string $replacementUserDisplayName,

): DataResponse {
$user = $this->userSession?->getUser();
if ($user === null) {
Expand All @@ -133,6 +130,7 @@ public function setOutOfOffice(
return new DataResponse(['error' => 'statusLength'], Http::STATUS_BAD_REQUEST);
}

$replacementUser = null;
if ($replacementUserId !== null) {
$replacementUser = $this->userManager->get($replacementUserId);
if ($replacementUser === null) {
Expand All @@ -153,7 +151,7 @@ public function setOutOfOffice(
$status,
$message,
$replacementUserId,
$replacementUserDisplayName
$replacementUser?->getDisplayName()
);
$this->coordinator->clearCache($user->getUID());

Expand Down
5 changes: 0 additions & 5 deletions apps/dav/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -730,11 +730,6 @@
"type": "string",
"nullable": true,
"description": "User id of the replacement user"
},
"replacementUserDisplayName": {
"type": "string",
"nullable": true,
"description": "Display name of the replacement user"
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions apps/dav/src/components/AbsenceForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@
lastDay: formatDateAsYMD(this.lastDay),
status: this.status,
message: this.message,
replacementUserId: this.replacementUser?.user ?? null,
replacementUserDisplayName: this.replacementUser?.displayName ?? null,
replacementUserId: this.replacementUser?.user ?? null

Check warning on line 222 in apps/dav/src/components/AbsenceForm.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Missing trailing comma
})
showSuccess(this.$t('dav', 'Absence saved'))
} catch (error) {
Expand Down
4 changes: 2 additions & 2 deletions dist/dav-settings-personal-availability.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dav-settings-personal-availability.js.map

Large diffs are not rendered by default.

Loading