Skip to content

Commit 892d0b5

Browse files
committed
fix the ui edit
1 parent ba615c3 commit 892d0b5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

resources/js/Pages/StyleGuide/Partials/Persona.vue

+7-4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ const showAddForm = () => {
2424
show_add_form.value = !show_add_form.value;
2525
}
2626
const showEditForm = (styleItem) => {
27+
console.log('showEditForm', styleItem);
28+
show_edit_form.value = false;
29+
persona.value = {};
2730
persona.value = styleItem;
2831
show_edit_form.value = true;
2932
}
@@ -69,7 +72,7 @@ const addStyle = () => {
6972
</template>
7073
<template #intro>
7174
<h2>Existing Personas </h2>
72-
<div>
75+
<div v-auto-animate>
7376
<div class="text-sm text-secondary" v-if="personas.length === 0">
7477
No Personas Yet! Start adding below.
7578
</div>
@@ -78,9 +81,9 @@ const addStyle = () => {
7881
Add Persona
7982
</PrimaryButton>
8083
</div>
81-
<div class="mt-10 w-full border border-secondary rounded-lg p-10">
84+
<div class="mt-10 w-full border border-secondary rounded-lg p-10" v-auto-animate>
8285
<div
83-
v-if="personas.length > 0"
86+
v-if="personas.length > 0 && show_edit_form === false"
8487
class="flex flex-wrap gap-4 mt-2 w-full justify-center items-center">
8588
<div v-for="styleItem in personas" :key="styleItem.id">
8689
<div class="flex
@@ -104,7 +107,7 @@ const addStyle = () => {
104107
<button
105108
class="btn btn-outline rounded-none"
106109
@click="hideEditForm()">
107-
Cancel
110+
Close
108111
</button>
109112
</PersonaItem>
110113
</div>

0 commit comments

Comments
 (0)