Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
netvs-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scc-net
netvs
netvs-core
Compare revisions
407a3973bcdf6002a0d3f653791738a2bc5a6087 to b85dcf728a50384938eb113a1994627243e9a287
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
scc-net/netvs/netvs-core
Select target project
No results found
b85dcf728a50384938eb113a1994627243e9a287
Select Git revision
Branches
806-contentmanager
DHCPVS
devel
feature/db-editor-array
feature/dualstack-entries
flatly_design
hub_permissions
iptools-own-bcd
lab
new_interface_tokens
nextvs
nextvs-feature/icons
nextvs-feature/ta-sidebar-language
prod
set-dependency-scanning-config-1
v4-mapped-v6
vue3
vue3_v2
18 results
Swap
Target
scc-net/netvs/netvs-core
Select target project
scc-net/netvs/netvs-core
1 result
407a3973bcdf6002a0d3f653791738a2bc5a6087
Select Git revision
Branches
806-contentmanager
DHCPVS
devel
feature/db-editor-array
feature/dualstack-entries
flatly_design
hub_permissions
iptools-own-bcd
lab
new_interface_tokens
nextvs
nextvs-feature/icons
nextvs-feature/ta-sidebar-language
prod
set-dependency-scanning-config-1
v4-mapped-v6
vue3
vue3_v2
18 results
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
FIX: corrected logic & improved css
· aacbd55a
Nazik Abdyldabekova
authored
3 weeks ago
aacbd55a
ADD: position switcher-button
· b85dcf72
Nazik Abdyldabekova
authored
3 weeks ago
b85dcf72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/TransactionSidebar.vue
+8
-4
8 additions, 4 deletions
src/components/TransactionSidebar.vue
src/components/ui/drag-and-drop/DragAndDropItem.vue
+49
-12
49 additions, 12 deletions
src/components/ui/drag-and-drop/DragAndDropItem.vue
with
57 additions
and
16 deletions
src/components/TransactionSidebar.vue
View file @
b85dcf72
...
...
@@ -41,7 +41,7 @@ function clearList() {
<SidebarInset>
<slot
/>
</SidebarInset>
<Sidebar
collapsible=
"offcanvas"
side=
"right"
style=
"--sidebar-width: 2
6
rem;"
>
<Sidebar
collapsible=
"offcanvas"
side=
"right"
style=
"--sidebar-width: 2
4
rem;"
>
<SidebarHeader
mt-1
text-center
>
Planned Actions
</SidebarHeader>
...
...
@@ -55,10 +55,10 @@ function clearList() {
</SidebarGroup>
<SidebarSeparator
/>
<SidebarGroup
class=
"m-b-2 m-t-2 flex flex-row justify-center"
>
<Button
variant=
"outline"
w=
"1/
8
"
rounded-bl-lg
rounded-br-none
rounded-tl-lg
rounded-tr-none
>
<Button
variant=
"outline"
w=
"1/
7
"
rounded-bl-lg
rounded-br-none
rounded-tl-lg
rounded-tr-none
>
<IconTooling
/>
</Button>
<Button
variant=
"outline"
w=
"1/
8
"
rounded-bl-none
rounded-br-lg
rounded-tl-none
rounded-tr-lg
>
<Button
variant=
"outline"
w=
"1/
7
"
rounded-bl-none
rounded-br-lg
rounded-tl-none
rounded-tr-lg
>
<IconTooling
/>
</Button>
</SidebarGroup>
...
...
@@ -89,7 +89,11 @@ function clearList() {
<SidebarSeparator
/>
<SidebarGroup>
<DragAndDrop
:length=
"actions.length"
:emptyListPhrase=
"emptyListPhrase"
>
<DragAndDropItem
v-for=
"action in actions"
:key=
"action.id"
:item=
"action"
:items=
"actions"
/>
<DragAndDropItem
v-for=
"action in actions"
:key=
"action.id"
:item=
"action"
:items=
"actions"
>
<div
class=
""
>
<h1>
{{
action
.
title
}}
</h1>
</div>
</DragAndDropItem>
</DragAndDrop>
</SidebarGroup>
</SidebarContent>
...
...
This diff is collapsed.
Click to expand it.
src/components/ui/drag-and-drop/DragAndDropItem.vue
View file @
b85dcf72
...
...
@@ -32,24 +32,61 @@ const onDrop = (evt: DragEvent, anotherItem: Item) => {
console
.
error
(
"
Item not found!
"
)
return
}
const
oldPosition
=
item
.
position
const
newPosition
=
anotherItem
.
position
item
.
position
=
newPosition
anotherItem
.
position
=
oldPosition
props
.
items
.
sort
((
a
,
b
)
=>
a
.
position
-
b
.
position
)
switchPositions
(
item
,
anotherItem
)
}
}
const
switchPositions
=
(
item
:
Item
,
anotherItem
:
Item
)
=>
{
const
oldPosition
=
item
.
position
const
newPosition
=
anotherItem
.
position
item
.
position
=
newPosition
anotherItem
.
position
=
oldPosition
props
.
items
.
sort
((
a
,
b
)
=>
a
.
position
-
b
.
position
)
}
enum
Direction
{
Up
,
Down
}
const
onClick
=
(
direction
:
Direction
)
=>
{
if
(
direction
==
Direction
.
Up
)
{
const
previousItem
=
props
.
items
.
find
((
item
)
=>
item
.
position
==
props
.
item
.
position
-
1
)
if
(
previousItem
)
{
switchPositions
(
props
.
item
,
previousItem
)
}
}
else
{
const
nextItem
=
props
.
items
.
find
((
item
)
=>
item
.
position
==
props
.
item
.
position
+
1
)
if
(
nextItem
)
{
switchPositions
(
props
.
item
,
nextItem
)
}
}
}
</
script
>
<
template
>
<div
@
drop=
"onDrop($event, props.item)"
@
dragover.prevent
@
dragenter.prevent
draggable=
"true"
@
dragstart=
"startDrag($event, props.item)"
w-86
h-40
m-t-2
m-b-2
rounded-0.5rem
flex
flex-col
items-center
p-4
border-1.5
border-black-500
bg-background
>
<div
class=
"w-100% flex flex-row justify-between"
>
<div
class=
" w-60% flex flex-row justify-between items-center"
>
<h1>
{{
props
.
item
.
title
}}
</h1>
<div
@
drop=
"onDrop($event, props.item)"
@
dragover.prevent
@
dragenter.prevent
draggable=
"true"
@
dragstart=
"startDrag($event, props.item)"
class=
"flex flex-row w-95% m-t-2 m-b-2 rounded-0.5rem border-1.5 border-black-500 bg-background"
>
<div
class=
"flex flex-col items-center justify-between p-b-3 bg-background invert w-15% h-100% rounded-tl-0.5rem rounded-bl-0.5rem"
>
<h1>
{{
props
.
item
.
position
+
1
}}
</h1>
<div
class=
"flex flex-col"
>
<IconTooling
@
click=
"onClick(Direction.Up)"
/>
<IconTooling
@
click=
"onClick(Direction.Down)"
/>
</div>
<div>
<IconTooling></IconTooling>
</div>
<div
class=
"w-100% flex flex-col justify-between m-4"
>
<slot/>
<div
class=
"flex flex-row w-100%"
>
<Button
variant=
"outline"
class=
"w-50% rounded-tr-none rounded-br-none bg-background"
>
Delete
<IconTooling/>
</Button>
<Button
variant=
"outline"
class=
"w-50% rounded-tl-none rounded-bl-none bg-background"
>
Edit
<IconTooling/>
</Button>
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.