Skip to content

Commit

Permalink
Merge pull request #2746 from Kuchenpirat/manage-data-improve-delete-…
Browse files Browse the repository at this point in the history
…prompt

feat: Manage data - Improve delete prompt
  • Loading branch information
boc-the-git authored Nov 24, 2023
2 parents 1444404 + 9fd6130 commit 2ff0b60
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 11 deletions.
3 changes: 2 additions & 1 deletion frontend/pages/group/data/categories.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@
>
<v-card-text>
{{ $t("general.confirm-delete-generic") }}
<p v-if="deleteTarget" class="mt-4 ml-4">{{ deleteTarget.name }}</p>
</v-card-text>
</BaseDialog>

<!-- Recipe Data Table -->
<!-- Data Table -->
<BaseCardSectionTitle :icon="$globals.icons.categories" section :title="$tc('data-pages.categories.category-data')"> </BaseCardSectionTitle>
<CrudTable
:table-config="tableConfig"
Expand Down
4 changes: 3 additions & 1 deletion frontend/pages/group/data/foods.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,11 @@
>
<v-card-text>
{{ $t("general.confirm-delete-generic") }}
<p v-if="deleteTarget" class="mt-4 ml-4">{{ deleteTarget.name }}</p>
</v-card-text>
</BaseDialog>

<!-- Recipe Data Table -->
<!-- Data Table -->
<BaseCardSectionTitle :icon="$globals.icons.foods" section :title="$tc('data-pages.foods.food-data')"> </BaseCardSectionTitle>
<CrudTable
:table-config="tableConfig"
Expand Down Expand Up @@ -394,6 +395,7 @@ export default defineComponent({
deleteEventHandler,
deleteDialog,
deleteFood,
deleteTarget,
// Alias Manager
aliasManagerDialog,
aliasManagerEventHandler,
Expand Down
17 changes: 12 additions & 5 deletions frontend/pages/group/data/labels.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
>
<v-card-text>
{{ $t("general.confirm-delete-generic") }}
<MultiPurposeLabel v-if="deleteTarget" class="mt-4 ml-4" :label="deleteTarget" />
</v-card-text>
</BaseDialog>

Expand Down Expand Up @@ -79,7 +80,7 @@
</v-card-text>
</BaseDialog>

<!-- Recipe Data Table -->
<!-- Data Table -->
<BaseCardSectionTitle :icon="$globals.icons.tags" section :title="$tc('data-pages.labels.labels')"> </BaseCardSectionTitle>
<CrudTable
:table-config="tableConfig"
Expand Down Expand Up @@ -228,13 +229,19 @@ export default defineComponent({
labels: labelStore.labels,
validators,
deleteEventHandler,
deleteLabel,
// create
createLabel,
createLabelData: labelData.data,
// edit
editLabel,
editEventHandler,
editSaveLabel,
createLabel,
createLabelData: labelData.data,
// delete
deleteEventHandler,
deleteLabel,
deleteTarget,
// Seed
seedDatabase,
Expand Down
2 changes: 1 addition & 1 deletion frontend/pages/group/data/recipes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
</section>

<section class="mt-10">
<!-- Downloads Data Table -->
<!-- Data Table -->
<BaseCardSectionTitle :icon="$globals.icons.database" section :title="$tc('data-pages.recipes.data-exports')">
{{ $t('data-pages.recipes.data-exports-description') }}
</BaseCardSectionTitle>
Expand Down
3 changes: 2 additions & 1 deletion frontend/pages/group/data/tags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@
>
<v-card-text>
{{ $t("general.confirm-delete-generic") }}
<p v-if="deleteTarget" class="mt-4 ml-4">{{ deleteTarget.name }}</p>
</v-card-text>
</BaseDialog>

<!-- Recipe Data Table -->
<!-- Data Table -->
<BaseCardSectionTitle :icon="$globals.icons.tags" section :title="$tc('data-pages.tags.tag-data')"> </BaseCardSectionTitle>
<CrudTable
:table-config="tableConfig"
Expand Down
3 changes: 2 additions & 1 deletion frontend/pages/group/data/tools.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@
>
<v-card-text>
{{ $t("general.confirm-delete-generic") }}
<p v-if="deleteTarget" class="mt-4 ml-4">{{ deleteTarget.name }}</p>
</v-card-text>
</BaseDialog>

<!-- Tool Data Table -->
<!-- Data Table -->
<BaseCardSectionTitle :icon="$globals.icons.potSteam" section :title="$tc('data-pages.tools.tool-data')"> </BaseCardSectionTitle>
<CrudTable
:table-config="tableConfig"
Expand Down
4 changes: 3 additions & 1 deletion frontend/pages/group/data/units.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
>
<v-card-text>
{{ $t("general.confirm-delete-generic") }}
<p v-if="deleteTarget" class="mt-4 ml-4">{{ deleteTarget.name }}</p>
</v-card-text>
</BaseDialog>

Expand Down Expand Up @@ -165,7 +166,7 @@
</v-card-text>
</BaseDialog>

<!-- Recipe Data Table -->
<!-- Data Table -->
<BaseCardSectionTitle :icon="$globals.icons.units" section :title="$tc('data-pages.units.unit-data')"> </BaseCardSectionTitle>
<CrudTable
:table-config="tableConfig"
Expand Down Expand Up @@ -421,6 +422,7 @@ export default defineComponent({
deleteEventHandler,
deleteDialog,
deleteUnit,
deleteTarget,
// Alias Manager
aliasManagerDialog,
aliasManagerEventHandler,
Expand Down

0 comments on commit 2ff0b60

Please sign in to comment.