|
5 | 5 | import { useLocationStore } from "~~/stores/locations"; |
6 | 6 | import MdiLoading from "~icons/mdi/loading"; |
7 | 7 | import MdiPackageVariant from "~icons/mdi/package-variant"; |
| 8 | + import MdiPlus from "~icons/mdi/plus"; |
8 | 9 | import MdiPencil from "~icons/mdi/pencil"; |
9 | 10 | import MdiDelete from "~icons/mdi/delete"; |
10 | 11 | import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog"; |
|
97 | 98 | openDialog(DialogID.UpdateLocation); |
98 | 99 | } |
99 | 100 |
|
| 101 | + function openCreateItem() { |
| 102 | + openDialog(DialogID.CreateItem); |
| 103 | + } |
| 104 | +
|
100 | 105 | async function update() { |
101 | 106 | updating.value = true; |
102 | 107 | updateData.parentId = parent.value?.id || null; |
|
217 | 222 | </div> |
218 | 223 | </div> |
219 | 224 | </div> |
220 | | - <div class="ml-auto mt-2 flex flex-wrap items-center justify-between gap-3"> |
| 225 | + <div class="ml-auto mt-2 flex flex-wrap items-center justify-between gap-2"> |
221 | 226 | <LabelMaker :id="location.id" type="location" /> |
222 | | - <Button @click="openUpdate"> |
| 227 | + <Button @click="openCreateItem" class="w-9 md:w-auto"> |
| 228 | + <MdiPlus name="mdi-plus" /> |
| 229 | + <span class="hidden md:inline"> |
| 230 | + {{ $t("components.item.create_modal.title") }} |
| 231 | + </span> |
| 232 | + </Button> |
| 233 | + <Button @click="openUpdate" class="w-9 md:w-auto"> |
223 | 234 | <MdiPencil name="mdi-pencil" /> |
224 | | - {{ $t("global.edit") }} |
| 235 | + <span class="hidden md:inline"> |
| 236 | + {{ $t("global.edit") }} |
| 237 | + </span> |
225 | 238 | </Button> |
226 | | - <Button variant="destructive" @click="confirmDelete()"> |
| 239 | + <Button variant="destructive" @click="confirmDelete()" class="w-9 md:w-auto"> |
227 | 240 | <MdiDelete name="mdi-delete" /> |
228 | | - {{ $t("global.delete") }} |
| 241 | + <span class="hidden md:inline"> |
| 242 | + {{ $t("global.delete") }} |
| 243 | + </span> |
229 | 244 | </Button> |
230 | 245 | </div> |
231 | 246 | </div> |
|
0 commit comments