mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-03 08:10:28 +00:00
slimdown locations page
This commit is contained in:
parent
a7f63da37a
commit
77101121be
1 changed files with 45 additions and 35 deletions
|
@ -125,6 +125,7 @@
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<!-- Update Dialog -->
|
||||||
<BaseModal v-model="updateModal">
|
<BaseModal v-model="updateModal">
|
||||||
<template #title> Update Location </template>
|
<template #title> Update Location </template>
|
||||||
<form v-if="location" @submit.prevent="update">
|
<form v-if="location" @submit.prevent="update">
|
||||||
|
@ -136,47 +137,56 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</BaseModal>
|
</BaseModal>
|
||||||
<BaseContainer class="space-y-10 mb-16">
|
|
||||||
<BaseCard>
|
|
||||||
<template #title>
|
|
||||||
<BaseSectionHeader>
|
|
||||||
<Icon name="mdi-map-marker" class="mr-2 -mt-1 text-base-content" />
|
|
||||||
<span class="text-base-content">
|
|
||||||
{{ location ? location.name : "" }}
|
|
||||||
</span>
|
|
||||||
<div v-if="location && location.parent" class="text-sm breadcrumbs pb-0">
|
|
||||||
<ul class="text-base-content/70">
|
|
||||||
<li>
|
|
||||||
<NuxtLink :to="`/location/${location.parent.id}`"> {{ location.parent.name }}</NuxtLink>
|
|
||||||
</li>
|
|
||||||
<li>{{ location.name }}</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</BaseSectionHeader>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #title-actions>
|
<BaseContainer v-if="location" class="space-y-6 mb-16">
|
||||||
<div class="flex flex-wrap mt-2 gap-2">
|
<section>
|
||||||
<div class="form-control max-w-[160px]">
|
<BaseSectionHeader v-if="location">
|
||||||
<label class="label cursor-pointer">
|
<Icon name="mdi-package-variant" class="mr-2 -mt-1 text-base-content" />
|
||||||
<input v-model="preferences.showDetails" type="checkbox" class="toggle toggle-primary" />
|
<span class="text-base-content">
|
||||||
<span class="label-text ml-2"> Detailed View </span>
|
{{ location ? location.name : "" }}
|
||||||
</label>
|
</span>
|
||||||
</div>
|
|
||||||
|
<div v-if="location?.parent" class="text-sm breadcrumbs pb-0">
|
||||||
|
<ul class="text-base-content/70">
|
||||||
|
<li>
|
||||||
|
<NuxtLink :to="`/location/${location.parent.id}`"> {{ location.parent.name }}</NuxtLink>
|
||||||
|
</li>
|
||||||
|
<li>{{ location.name }}</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<template #description>
|
||||||
|
<Markdown class="text-lg" :source="location.description"> </Markdown>
|
||||||
|
</template>
|
||||||
|
</BaseSectionHeader>
|
||||||
|
|
||||||
|
<div class="flex gap-3 flex-wrap mb-6 text-sm italic">
|
||||||
|
<div>
|
||||||
|
Created
|
||||||
|
<DateTime :date="location?.createdAt" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<Icon name="mdi-circle-small" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Last Updated
|
||||||
|
<DateTime :date="location?.updatedAt" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-wrap items-center justify-between mb-6 mt-3">
|
||||||
|
<div class="btn-group">
|
||||||
|
<PageQRCode class="dropdown-right" />
|
||||||
<BaseButton class="ml-auto" size="sm" @click="openUpdate">
|
<BaseButton class="ml-auto" size="sm" @click="openUpdate">
|
||||||
<Icon class="mr-1" name="mdi-pencil" />
|
<Icon class="mr-1" name="mdi-pencil" />
|
||||||
Edit
|
Edit
|
||||||
</BaseButton>
|
</BaseButton>
|
||||||
<BaseButton size="sm" @click="confirmDelete">
|
|
||||||
<Icon class="mr-1" name="mdi-delete" />
|
|
||||||
Delete
|
|
||||||
</BaseButton>
|
|
||||||
<PageQRCode />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
<BaseButton class="btn btn-sm" @click="confirmDelete()">
|
||||||
|
<Icon name="mdi-delete" class="mr-2" />
|
||||||
<DetailsSection :details="details" />
|
Delete
|
||||||
</BaseCard>
|
</BaseButton>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<template v-if="location && location.items.length > 0">
|
<template v-if="location && location.items.length > 0">
|
||||||
<ItemViewSelectable :items="location.items" />
|
<ItemViewSelectable :items="location.items" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue