Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Lesrooster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Onboarding
AlekSIS-App-Lesrooster
Commits
7ef753e0
Commit
7ef753e0
authored
1 year ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Create generic menu to copy data from a different validity range
parent
e61e01ae
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2
Resolve "Frontend for Models"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/lesrooster/frontend/components/validity_range/CopyFromRangeMenu.vue
+71
-0
71 additions, 0 deletions
.../frontend/components/validity_range/CopyFromRangeMenu.vue
aleksis/apps/lesrooster/frontend/messages/en.json
+3
-1
3 additions, 1 deletion
aleksis/apps/lesrooster/frontend/messages/en.json
with
74 additions
and
1 deletion
aleksis/apps/lesrooster/frontend/components/validity_range/CopyFromRangeMenu.vue
0 → 100644
+
71
−
0
View file @
7ef753e0
<
script
>
import
{
defineComponent
}
from
'
vue
'
import
ConfirmDialog
from
"
aleksis.core/components/generic/dialogs/ConfirmDialog.vue
"
;
import
PrimaryActionButton
from
"
aleksis.core/components/generic/buttons/PrimaryActionButton.vue
"
;
export
default
defineComponent
({
name
:
"
CopyFromRangeMenu
"
,
components
:
{
ConfirmDialog
,
PrimaryActionButton
},
computed
:
{
ranges
()
{
return
[];
// FIXME: Get ranges from backend
},
},
data
()
{
return
{
dialog
:
false
,
rangeToCopyFrom
:
null
,
}
},
methods
:
{
openConfirmationDialog
(
range
)
{
this
.
rangeToCopyFrom
=
range
;
this
.
dialog
=
true
;
console
.
log
(
"
Opening dialog
"
);
console
.
log
(
!!
this
.
dialog
);
},
confirm
()
{
console
.
log
(
"
Confirmed
"
);
this
.
$emit
(
"
confirm
"
,
this
.
rangeToCopyFrom
);
this
.
dialog
=
false
;
},
cancel
()
{
console
.
log
(
"
Cancelled
"
);
this
.
dialog
=
false
;
this
.
rangeToCopyFrom
=
null
;
},
},
})
</
script
>
<
template
>
<div>
<v-menu
offset-y
>
<template
#activator
="
{ attrs, on }">
<slot
name=
"activator"
:attrs=
"attrs"
:on=
"on"
>
<primary-action-button
i18n-key=
"actions.copy_last_configuration"
icon=
"mdi-content-copy"
/>
</slot>
</
template
>
<v-list
dense
>
<v-list-item
v-for=
"range in ranges"
@
click=
"openConfirmationDialog(range)"
>
<v-list-item-title>
{{ range }}
</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
<confirm-dialog
v-model=
"dialog"
@
confirm=
"confirm"
@
cancel=
"cancel"
>
<
template
#title
>
{{
$t
(
'
actions.confirm_copy_last_configuration
'
)
}}
</
template
>
<
template
#text
>
{{
$t
(
'
actions.confirm_copy_last_configuration_message
'
)
}}
</
template
>
</confirm-dialog>
</div>
</template>
<
style
scoped
>
</
style
>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
aleksis/apps/lesrooster/frontend/messages/en.json
+
3
−
1
View file @
7ef753e0
...
@@ -93,6 +93,8 @@
...
@@ -93,6 +93,8 @@
"actions"
:
{
"actions"
:
{
"copy_to_day"
:
"Copy to another day"
,
"copy_to_day"
:
"Copy to another day"
,
"search_courses"
:
"Search Courses"
,
"search_courses"
:
"Search Courses"
,
"copy_last_configuration"
:
"Copy from different range"
"copy_last_configuration"
:
"Copy from different range"
,
"confirm_copy_last_configuration"
:
"Do you really want to copy another configuration to this range?"
,
"confirm_copy_last_configuration_message"
:
"This will overwrite all existing data in this range. This action cannot be undone."
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment