[WEB-3088] fix: home edits (#6357)
* fix: added delete sticky confirmation modal * fix: prevented quick links reordering * fix: quick links css * fix: minor css * fix: empty states * Filter quick_tutorial and new_at_plane * fix: stickies search backend change * fix: stickies editor enhanced * fix: sticky delete function --------- Co-authored-by: gakshita <akshitagoyal1516@gmail.com>
This commit is contained in:
parent
5d8f66ae22
commit
d96ab2e7af
17 changed files with 303 additions and 173 deletions
|
|
@ -31,7 +31,11 @@ class WorkspacePreferenceViewSet(BaseAPIView):
|
|||
|
||||
create_preference_keys = []
|
||||
|
||||
keys = [key for key, _ in WorkspaceHomePreference.HomeWidgetKeys.choices]
|
||||
keys = [
|
||||
key
|
||||
for key, _ in WorkspaceHomePreference.HomeWidgetKeys.choices
|
||||
if key not in ["quick_tutorial", "new_at_plane"]
|
||||
]
|
||||
|
||||
sort_order_counter = 1
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,18 @@ class WorkspaceStickyViewSet(BaseViewSet):
|
|||
allowed_roles=[ROLE.ADMIN, ROLE.MEMBER, ROLE.GUEST], level="WORKSPACE"
|
||||
)
|
||||
def list(self, request, slug):
|
||||
query = request.query_params.get("query", False)
|
||||
stickies = self.get_queryset()
|
||||
if query:
|
||||
stickies = stickies.filter(name__icontains=query)
|
||||
|
||||
return self.paginate(
|
||||
request=request,
|
||||
queryset=(self.get_queryset()),
|
||||
queryset=(stickies),
|
||||
on_results=lambda stickies: StickySerializer(stickies, many=True).data,
|
||||
default_per_page=20,
|
||||
)
|
||||
|
||||
|
||||
@allow_permission(allowed_roles=[], creator=True, model=Sticky, level="WORKSPACE")
|
||||
def partial_update(self, request, *args, **kwargs):
|
||||
return super().partial_update(request, *args, **kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue