Skip to content

Commit

Permalink
Merge pull request #4967 from ecamp/revert-4500-feature/edit-schedule…
Browse files Browse the repository at this point in the history
…-entries-on-activity

Revert "feat: Edit schedule entries from activity view"
  • Loading branch information
BacLuc committed Apr 14, 2024
2 parents 55be38b + 5d1bf66 commit 60a925e
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 96 deletions.
1 change: 0 additions & 1 deletion common/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@
"endDate": "Enddatum",
"endDatetime": "Endzeit",
"nr": "Nr.",
"start": "Start",
"time": "Zeitpunkt",
"startDate": "Startdatum",
"startDatetime": "Startzeit"
Expand Down
16 changes: 1 addition & 15 deletions frontend/src/components/activity/ScheduleEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Displays a single scheduleEntry
<template v-else>
<!-- Header -->
<v-row dense class="activity-header">
<v-col class="col col-sm-6 col-12 px-0 pt-0 d-flex flex-wrap gap-x-4">
<v-col class="col col-sm-6 col-12 px-0 pt-0">
<table>
<thead>
<tr>
Expand Down Expand Up @@ -201,16 +201,6 @@ Displays a single scheduleEntry
</tr>
</tbody>
</table>
<DialogActivityEdit
v-if="activity && isContributor"
:schedule-entry="scheduleEntry()"
hide-header-fields
@activityUpdated="activity.$reload()"
>
<template #activator="{ on }">
<ButtonEdit text small class="v-btn--has-bg" v-on="on" />
</template>
</DialogActivityEdit>
</v-col>
<v-col class="col col-sm-6 col-12 px-0">
<api-form :entity="activity" name="activity">
Expand Down Expand Up @@ -274,16 +264,12 @@ import DialogEntityDelete from '@/components/dialog/DialogEntityDelete.vue'
import TogglePaperSize from '@/components/activity/TogglePaperSize.vue'
import ApiForm from '@/components/form/api/ApiForm.vue'
import ApiSelect from '@/components/form/api/ApiSelect.vue'
import ButtonEdit from '@/components/buttons/ButtonEdit.vue'
import DialogActivityEdit from '@/components/activity/dialog/DialogActivityEdit.vue'
export default {
name: 'ScheduleEntry',
components: {
ApiForm,
ApiSelect,
DialogActivityEdit,
ButtonEdit,
TogglePaperSize,
DialogEntityDelete,
ContentCard,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/generic/DetailPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import DialogBottomSheet from '@/components/dialog/DialogBottomSheet.vue'
import DialogUiBase from '@/components/dialog/DialogUiBase.vue'
export default {
name: 'DetailPane',
name: 'DetailEdit',
components: { DialogBottomSheet, DialogForm },
extends: DialogUiBase,
}
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/program/DialogActivityCreate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<script>
import DialogForm from '@/components/dialog/DialogForm.vue'
import DialogBase from '@/components/dialog/DialogBase.vue'
import DialogActivityForm from '@/components/activity/dialog/DialogActivityForm.vue'
import DialogActivityForm from './DialogActivityForm.vue'
import CopyActivityInfoDialog from '@/components/activity/CopyActivityInfoDialog.vue'
import PopoverPrompt from '@/components/prompt/PopoverPrompt.vue'
import { uniqueId } from 'lodash'
Expand All @@ -125,6 +125,9 @@ export default {
extends: DialogBase,
props: {
scheduleEntry: { type: Object, required: true },
// currently visible period
period: { type: Function, required: true },
},
data() {
return {
Expand All @@ -142,9 +145,6 @@ export default {
camp() {
return this.period().camp()
},
period() {
return this.scheduleEntry.period
},
clipboardAccessDenied() {
return (
this.clipboardPermission === 'unaccessable' ||
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<template>
<dialog-form
v-model="showDialog"
:title="$tc('components.activity.dialog.dialogActivityEdit.title')"
:loading="loading"
:error="error"
icon="mdi-calendar-plus"
Expand All @@ -15,31 +14,30 @@
<slot name="activator" v-bind="scope" />
</template>
<template #moreActions>
<slot name="moreActions" />
<v-btn
v-if="!scheduleEntry.tmpEvent"
color="primary"
:to="scheduleEntryRoute(scheduleEntry)"
>
{{ $tc('global.button.open') }}
</v-btn>
</template>
<DialogActivityForm
:activity="entityData"
:period="scheduleEntry.period"
:hide-location="hideHeaderFields"
/>
<dialog-activity-form :activity="entityData" :period="scheduleEntry.period" />
</dialog-form>
</template>

<script>
import DialogForm from '@/components/dialog/DialogForm.vue'
import DialogBase from '@/components/dialog/DialogBase.vue'
import DialogActivityForm from './DialogActivityForm.vue'
import { scheduleEntryRoute } from '@/router.js'
export default {
name: 'DialogActivityEdit',
components: { DialogForm, DialogActivityForm },
extends: DialogBase,
props: {
scheduleEntry: { type: Object, required: true },
hideHeaderFields: {
type: Boolean,
default: false,
},
},
data() {
return {
Expand All @@ -48,12 +46,12 @@ export default {
}
},
computed: {
activity() {
return this.scheduleEntry.activity()
},
scheduleEntries() {
return this.activity.scheduleEntries()
},
activity() {
return this.scheduleEntry.activity()
},
},
watch: {
showDialog: async function (showDialog) {
Expand Down Expand Up @@ -114,9 +112,6 @@ export default {
// patch activity entity
const activityPayload = { ...this.entityData }
if (this.hideHeaderFields) {
delete activityPayload.location
}
delete activityPayload.scheduleEntries
promises.push(this.api.patch(this.entityUri, activityPayload))
Expand All @@ -132,6 +127,7 @@ export default {
this.close()
this.$emit('activityUpdated', data)
},
scheduleEntryRoute,
},
}
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</template>
</e-select>

<e-text-field v-if="!hideLocation" v-model="localActivity.location" path="location" />
<e-text-field v-model="localActivity.location" path="location" />

<FormScheduleEntryList
v-if="activity.scheduleEntries"
Expand Down Expand Up @@ -73,10 +73,6 @@ export default {
type: Boolean,
default: false,
},
hideLocation: {
type: Boolean,
default: false,
},
},
data() {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<v-row no-gutters>
<v-col class="header mb-3">
<legend class="pa-2 float-left">
{{ $tc('components.activity.dialog.formScheduleEntryList.name') }}
{{ $tc('components.program.formScheduleEntryList.name') }}
</legend>

<button-add
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/components/program/ScheduleEntries.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
:reload-entries="reloadScheduleEntries"
:on="eventHandlers"
/>
<DialogActivityCreate
<dialog-activity-create
ref="dialogActivityCreate"
:period="period"
:schedule-entry="newScheduleEntry"
@activityCreated="afterCreateActivity($event)"
/>
Expand All @@ -31,7 +32,7 @@
</template>

<script>
import DialogActivityCreate from '@/components/program/DialogActivityCreate.vue'
import DialogActivityCreate from './DialogActivityCreate.vue'
export default {
name: 'ScheduleEntries',
Expand Down
7 changes: 1 addition & 6 deletions frontend/src/components/program/picasso/PicassoEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@
<v-icon x-small color="white">mdi-pencil</v-icon>
</v-btn>
</template>
<template #moreActions>
<v-btn color="primary" :to="scheduleEntryRoute">
{{ $tc('global.button.open') }}
</v-btn>
</template>
</DialogActivityEdit>

<h4 class="e-picasso-entry__title">
Expand Down Expand Up @@ -134,7 +129,7 @@
</template>
<script>
import { ref, toRefs, computed } from 'vue'
import DialogActivityEdit from '@/components/activity/dialog/DialogActivityEdit.vue'
import DialogActivityEdit from '../DialogActivityEdit.vue'
import campCollaborationDisplayName from '@/common/helpers/campCollaborationDisplayName.js'
import { timestampToUtcString } from './dateHelperVCalendar.js'
import { dateHelperUTCFormatted } from '@/mixins/dateHelperUTCFormatted.js'
Expand Down
15 changes: 7 additions & 8 deletions frontend/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@
"granted": "Du kannst nun kopierte Aktivitäten einfügen.",
"title": "Aktivität kopieren & einfügen"
},
"dialog": {
"dialogActivityEdit": {
"title": "Aktivität bearbeiten"
},
"formScheduleEntryList": {
"name": "Geplante Termine"
}
},
"menuCardlessContentNode": {
"deletingDisabled": "Muss leer sein zum Löschen"
},
Expand Down Expand Up @@ -389,6 +381,13 @@
"copySourceInfo": "Hier kannst du die URL einer Aktivität einfügen, um dessen Inhalte zu kopieren.",
"pasteActivity": "Kopierte Aktivität einfügen"
},
"formScheduleEntryItem": {
"end": "Ende",
"start": "Start"
},
"formScheduleEntryList": {
"name": "Geplante Termine"
},
"periodSwitcher": {
"title": "Lagerabschnitt wählen"
},
Expand Down
15 changes: 7 additions & 8 deletions frontend/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@
"granted": "You can now paste copied activities.",
"title": "Copy & paste activity"
},
"dialog": {
"dialogActivityEdit": {
"title": "Edit activity"
},
"formScheduleEntryList": {
"name": "Scheduled"
}
},
"menuCardlessContentNode": {
"deletingDisabled": "Must be empty to delete"
},
Expand Down Expand Up @@ -389,6 +381,13 @@
"copySourceInfo": "Here you can paste the URL of an activity to copy its contents.",
"pasteActivity": "paste activity"
},
"formScheduleEntryItem": {
"end": "End",
"start": "Start"
},
"formScheduleEntryList": {
"name": "Scheduled"
},
"periodSwitcher": {
"title": "Choose period"
},
Expand Down
8 changes: 0 additions & 8 deletions frontend/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@
"granted": "Vous pouvez maintenant coller les activités copiées.",
"title": "Copier et coller une activité"
},
"dialog": {
"dialogActivityEdit": {
"title": "Modifier l'activité"
},
"formScheduleEntryList": {
"name": "Dates planifiées"
}
},
"menuCardlessContentNode": {
"deletingDisabled": "Doit être vide pour être supprimé"
},
Expand Down
15 changes: 7 additions & 8 deletions frontend/src/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@
}
}
},
"dialog": {
"dialogActivityEdit": {
"title": "Modificare l'actività"
},
"formScheduleEntryList": {
"name": "Programmato"
}
},
"menuCardlessContentNode": {
"deletingDisabled": "Deve essere vuoto per essere eliminato"
},
Expand Down Expand Up @@ -355,6 +347,13 @@
}
},
"program": {
"formScheduleEntryItem": {
"end": "Fine",
"start": "Inizio"
},
"formScheduleEntryList": {
"name": "Programmato"
},
"periodSwitcher": {
"title": "Scegli il periodo"
},
Expand Down
15 changes: 7 additions & 8 deletions frontend/src/locales/rm.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@
"title": "Propi stizzar?"
}
},
"dialog": {
"dialogActivityEdit": {
"title": "Modifitgar l'activitad"
},
"formScheduleEntryList": {
"name": "Termins planisads"
}
},
"menuCardlessContentNode": {
"deletingDisabled": "Sto esser vid per stizzar"
},
Expand Down Expand Up @@ -320,6 +312,13 @@
}
},
"program": {
"formScheduleEntryItem": {
"end": "Fin",
"start": "Entschatta"
},
"formScheduleEntryList": {
"name": "Termins planisads"
},
"periodSwitcher": {
"title": "Tscherner ina part dal champ"
},
Expand Down
4 changes: 0 additions & 4 deletions frontend/src/scss/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,6 @@ body {
gap: 16px;
}

.gap-x-4 {
column-gap: 16px;
}

.relative {
position: relative;
}
Expand Down

0 comments on commit 60a925e

Please sign in to comment.