Skip to content

Commit

Permalink
Merge pull request #357 from JohnVillalovos/jlvillal/missing_attributes
Browse files Browse the repository at this point in the history
fix(api): add some missing attributes to save of Resource
  • Loading branch information
effgarces authored Jun 1, 2024
2 parents a27ce5b + 69a7db4 commit d93d728
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
8 changes: 7 additions & 1 deletion Domain/BookableResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,10 @@ public function __construct(
$scheduleId = null,
$adminGroupId = null,
$minNoticeUpdate = null,
$minNoticeDelete = null
$minNoticeDelete = null,
$bufferTime = null,
$groupIds = null,
$resourceTypeId = null,
) {
$this->SetResourceId($resourceId);
$this->SetName($name);
Expand All @@ -602,6 +605,9 @@ public function __construct(
$this->SetMaxNotice($maxNotice);
$this->SetScheduleId($scheduleId);
$this->SetAdminGroupId($adminGroupId);
$this->SetBufferTime($bufferTime);
$this->SetResourceGroupIds($groupIds ?? []);
$this->SetResourceTypeId($resourceTypeId);
}

/**
Expand Down
13 changes: 9 additions & 4 deletions WebServices/Controllers/ResourceSaveController.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,15 @@ private function BuildResource($request, $resourceId)
$request->requiresApproval,
$request->allowMultiday,
$request->maxParticipants,
$request->minNotice,
$request->maxNotice,
$request->description,
$request->scheduleId
minNoticeAdd: $request->minNoticeAdd,
maxNotice: $request->maxNotice,
description: $request->description,
scheduleId: $request->scheduleId,
minNoticeDelete: $request->minNoticeDelete,
minNoticeUpdate: $request->minNoticeUpdate,
bufferTime: $request->bufferTime,
groupIds: $request->groupIds,
resourceTypeId: $request->typeId,
);
$resource->SetSortOrder($request->sortOrder);

Expand Down

0 comments on commit d93d728

Please sign in to comment.