feat: 07 => implement status toggle functionality in AgenciesDialog and MainPage components
This commit is contained in:
parent
f18d34b02d
commit
4994792597
3 changed files with 97 additions and 7 deletions
|
|
@ -199,16 +199,23 @@ watch(
|
|||
<ProfileBanner
|
||||
prefix="dialog"
|
||||
active
|
||||
use-toggle
|
||||
hide-fade
|
||||
hide-active
|
||||
:toggle-title="$t('status.title')"
|
||||
:icon="'ph-building-office'"
|
||||
:img="imageState.imageUrl || null"
|
||||
:title="data.name"
|
||||
:caption="data.code"
|
||||
:color="`hsla(var(--green-8-hsl)/1)`"
|
||||
:bg-color="`hsla(var(--green-8-hsl)/0.1)`"
|
||||
v-model:toggle-status="data.status"
|
||||
@view="viewImage"
|
||||
@edit="editImage"
|
||||
@update:toggle-status="
|
||||
() => {
|
||||
data.status = data.status === 'CREATED' ? 'INACTIVE' : 'CREATED';
|
||||
}
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
@ -317,9 +324,10 @@ watch(
|
|||
>
|
||||
<ProfileBanner
|
||||
:prefix="data.name"
|
||||
active
|
||||
hide-fade
|
||||
hide-active
|
||||
use-toggle
|
||||
:active="data.status !== 'INACTIVE'"
|
||||
:toggle-title="$t('status.title')"
|
||||
:icon="'ph-building-office'"
|
||||
:title="data.name"
|
||||
:caption="data.code"
|
||||
|
|
@ -330,8 +338,10 @@ watch(
|
|||
imageState.refreshImageState ? `?ts=${Date.now()}` : '',
|
||||
) || null
|
||||
"
|
||||
v-model:toggle-status="data.status"
|
||||
@view="viewImage"
|
||||
@edit="editImage"
|
||||
@update:toggle-status="$emit('changeStatus')"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
@ -354,7 +364,10 @@ watch(
|
|||
}"
|
||||
style="position: absolute; z-index: 999; top: 0; right: 0"
|
||||
>
|
||||
<div v-if="true" class="surface-1 row rounded">
|
||||
<div
|
||||
v-if="data.status !== 'INACTIVE'"
|
||||
class="surface-1 row rounded"
|
||||
>
|
||||
<UndoButton
|
||||
v-if="isEdit"
|
||||
id="btn-info-basic-undo"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue