Skip to content

Commit

Permalink
Changes to allow for a single form per tile (#160)
Browse files Browse the repository at this point in the history
* Changes to allow for a single form per tile

* move section types to prep for conflict

* PR feedback

* pr feedback

* purge tab

* purge more tabs
  • Loading branch information
aarongundel committed Jan 3, 2025
1 parent b430b06 commit fa5dc08
Show file tree
Hide file tree
Showing 14 changed files with 175 additions and 339 deletions.
165 changes: 0 additions & 165 deletions arches_lingo/src/arches_lingo/components/generic/LabelViewer.vue

This file was deleted.

155 changes: 79 additions & 76 deletions arches_lingo/src/arches_lingo/components/generic/MetaStringViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,85 +48,88 @@ function confirmDelete(tileId: string) {
:pt="{ root: { style: { fontFamily: 'sans-serif' } } }"
:group="metaStringText.name"
></ConfirmDialog>
<DataTable
v-model:expanded-rows="expandedRows"
:value="props.metaStrings"
>
<Column
expander
style="width: 3rem"
/>
<Column
:header="props.metaStringText.name"
sortable
<div v-if="props.metaStrings?.length">
<DataTable
v-model:expanded-rows="expandedRows"
:value="props.metaStrings"
>
<template #body="slotProps">
<slot
name="name"
:row-data="slotProps.data"
></slot>
</template>
</Column>
<Column
:header="props.metaStringText.type"
sortable
>
<template #body="slotProps">
<slot
name="type"
:row-data="slotProps.data"
></slot>
</template>
</Column>
<Column
:header="props.metaStringText.language"
sortable
>
<template #body="slotProps">
<slot
name="language"
:row-data="slotProps.data"
></slot>
</template>
</Column>
<Column>
<template #body="slotProps">
<div class="controls">
<Button
icon="pi pi-file-edit"
:aria-label="$gettext('edit')"
@click="
() =>
emits(
'editString',
(slotProps.data as MetaString).tileid,
)
"
/>
<Button
icon="pi pi-trash"
:aria-label="$gettext('delete')"
severity="danger"
outlined
@click="
() =>
confirmDelete(
(slotProps.data as MetaString).tileid,
)
"
/>
<Column
expander
style="width: 3rem"
/>
<Column
:header="props.metaStringText.name"
sortable
>
<template #body="slotProps">
<slot
name="name"
:row-data="slotProps.data"
></slot>
</template>
</Column>
<Column
:header="props.metaStringText.type"
sortable
>
<template #body="slotProps">
<slot
name="type"
:row-data="slotProps.data"
></slot>
</template>
</Column>
<Column
:header="props.metaStringText.language"
sortable
>
<template #body="slotProps">
<slot
name="language"
:row-data="slotProps.data"
></slot>
</template>
</Column>
<Column>
<template #body="slotProps">
<div class="controls">
<Button
icon="pi pi-file-edit"
:aria-label="$gettext('edit')"
@click="
() =>
emits(
'editString',
(slotProps.data as MetaString).tileid,
)
"
/>
<Button
icon="pi pi-trash"
:aria-label="$gettext('delete')"
severity="danger"
outlined
@click="
() =>
confirmDelete(
(slotProps.data as MetaString).tileid,
)
"
/>
</div>
</template>
</Column>
<template #expansion="slotProps">
<div class="drawer">
<slot
name="drawer"
:row-data="slotProps.data"
></slot>
</div>
</template>
</Column>
<template #expansion="slotProps">
<div class="drawer">
<slot
name="drawer"
:row-data="slotProps.data"
></slot>
</div>
</template>
</DataTable>
</DataTable>
</div>
<div v-else>{{ props.metaStringText.noRecords }}</div>
</template>
<style scoped>
.controls {
Expand Down
Loading

0 comments on commit fa5dc08

Please sign in to comment.