Follow-up from Vue store page
-
The StoreGateway::getMyStore
function is used inStoreTransactions::getMyStoreTeam
, but it is too complex and fetches data that is not needed. This might be the case in other locations too. We should replace it and introduce a DTO for the function's response. ( !2458 (comment 1462791874)) -
Replace rest controller to php 8 annotations -
The /stores/{storeId}/permissions
endpoint calls a lot of functions in StorePermissions. There is a lot of redundancy in those functions. For example, most of them call the gateway'sgetUserTeamStatus
orgetRegionFunctionGroupId
. This will add 20+ database queries and a lot more load on the server, given that the store page is one of the most used. We need to find a way to make this more efficient. -
create missing tests for rest api -
pagination for StoreWall -
prevent the removal from the store if a pickup is still occupied -
remove all vanilla javascript modals and replace it to bootstrap -
The title of the pickup section in the store information modal (lowest section in tab "Abholungen") is visible even if I'm not allowed to see the pickups, for example if I'm on the standby list. -
The API response from /store/{id}/permissions returns user properties (isVerified, isAmbassador, ...) and permissions (mayReadWall, mayDoPickups, ...) which makes the permission handling in the frontend complicated. It would be simpler to only return user properties and calculate all the permissions in the frontend. For a given store, the frontend would probably only need: isVerified, isAmbassador (ambassador of the region), isJumper, isManager (manager of this store), isCoordinator (admin of the store coordination group, if it exists). That way we would calculate the full permission matrix in one place instead of partially in the backend and partially in the frontend.
Edited by Alex