File tree Expand file tree Collapse file tree 3 files changed +44
-1
lines changed
Expand file tree Collapse file tree 3 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 22import { Link } from " @inertiajs/vue3"
33import BaseButton from " @/Components/BaseButton.vue"
44import BaseButtons from " @/Components/BaseButtons.vue"
5+ import BaseIcon from ' @/Components/BaseIcon.vue'
56import {
67 mdiSquareEditOutline ,
78 mdiTrashCan ,
@@ -30,7 +31,17 @@ const props = defineProps({
3031<template >
3132 <tr :key =" item.id" >
3233 <td data-label =" Name" >
33- <div :style =" { 'margin-left': level*20 + 'px' }" >{{ item.name }}</div >
34+ <div :style =" { 'margin-left': level*20 + 'px' }" >
35+ <BaseIcon
36+ v-if =" item.icon"
37+ :path =" item.icon"
38+ class =" flex-none"
39+ :class =" activeInactiveStyle"
40+ w =" w-16"
41+ :size =" 18"
42+ />
43+ {{ item.name }}
44+ </div >
3445 </td >
3546 <td data-label =" Description" >
3647 {{ item.description }}
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ const form = useForm({
3737 enabled: true ,
3838 parent_id: ' ' ,
3939 weight: ' ' ,
40+ icon: ' ' ,
4041 roles: []
4142})
4243
@@ -152,6 +153,21 @@ const form = useForm({
152153 </div >
153154 </FormControl >
154155 </FormField >
156+ <FormField
157+ label =" Icon"
158+ :class =" { 'text-red-400': form.errors.icon }"
159+ >
160+ <FormControl
161+ v-model =" form.icon"
162+ type =" text"
163+ placeholder =" Enter Icon Path"
164+ :error =" form.errors.icon"
165+ >
166+ <div class =" text-red-400 text-sm" v-if =" form.errors.icon" >
167+ {{ form.errors.icon }}
168+ </div >
169+ </FormControl >
170+ </FormField >
155171
156172 <BaseDivider />
157173
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ const form = useForm({
4747 enabled: props .item .enabled ,
4848 parent_id: props .item .parent_id ,
4949 weight: props .item .weight ,
50+ icon: props .item .icon ,
5051 roles: props .itemHasRoles
5152})
5253 </script >
@@ -161,6 +162,21 @@ const form = useForm({
161162 </div >
162163 </FormControl >
163164 </FormField >
165+ <FormField
166+ label =" Icon"
167+ :class =" { 'text-red-400': form.errors.icon }"
168+ >
169+ <FormControl
170+ v-model =" form.icon"
171+ type =" text"
172+ placeholder =" Enter Icon Path"
173+ :error =" form.errors.icon"
174+ >
175+ <div class =" text-red-400 text-sm" v-if =" form.errors.icon" >
176+ {{ form.errors.icon }}
177+ </div >
178+ </FormControl >
179+ </FormField >
164180
165181 <BaseDivider />
166182
You can’t perform that action at this time.
0 commit comments