Skip to content

Commit

Permalink
fix the ui edit
Browse files Browse the repository at this point in the history
  • Loading branch information
alnutile committed Jun 13, 2024
1 parent ba615c3 commit 892d0b5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions resources/js/Pages/StyleGuide/Partials/Persona.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ const showAddForm = () => {
show_add_form.value = !show_add_form.value;
}
const showEditForm = (styleItem) => {
console.log('showEditForm', styleItem);
show_edit_form.value = false;
persona.value = {};
persona.value = styleItem;
show_edit_form.value = true;
}
Expand Down Expand Up @@ -69,7 +72,7 @@ const addStyle = () => {
</template>
<template #intro>
<h2>Existing Personas </h2>
<div>
<div v-auto-animate>
<div class="text-sm text-secondary" v-if="personas.length === 0">
No Personas Yet! Start adding below.
</div>
Expand All @@ -78,9 +81,9 @@ const addStyle = () => {
Add Persona
</PrimaryButton>
</div>
<div class="mt-10 w-full border border-secondary rounded-lg p-10">
<div class="mt-10 w-full border border-secondary rounded-lg p-10" v-auto-animate>
<div
v-if="personas.length > 0"
v-if="personas.length > 0 && show_edit_form === false"
class="flex flex-wrap gap-4 mt-2 w-full justify-center items-center">
<div v-for="styleItem in personas" :key="styleItem.id">
<div class="flex
Expand All @@ -104,7 +107,7 @@ const addStyle = () => {
<button
class="btn btn-outline rounded-none"
@click="hideEditForm()">
Cancel
Close
</button>
</PersonaItem>
</div>
Expand Down

0 comments on commit 892d0b5

Please sign in to comment.