refactor(division): improve employee name formatting and navigation
- Simplify employee name construction using array filtering - Replace dropdown-action-ud with dropdown-action-dud component - Update division detail navigation to use route navigation - Clean up code formatting and remove unnecessary whitespace
This commit is contained in:
@@ -13,7 +13,7 @@ import { toast } from '~/components/pub/ui/toast'
|
||||
// Types
|
||||
import { ActionEvents, type HeaderPrep } from '~/components/pub/my-ui/data/types'
|
||||
import { DivisionSchema, type DivisionFormData } from '~/schemas/division.schema'
|
||||
import type { Division } from "~/models/division"
|
||||
import type { Division } from '~/models/division'
|
||||
import type { TreeItem } from '~/models/_base'
|
||||
|
||||
// Handlers
|
||||
@@ -104,9 +104,13 @@ const getCurrentDivisionDetail = async (id: number | string) => {
|
||||
watch([recId, recAction], () => {
|
||||
switch (recAction.value) {
|
||||
case ActionEvents.showDetail:
|
||||
getCurrentDivisionDetail(recId.value)
|
||||
title.value = 'Detail Divisi'
|
||||
isReadonly.value = true
|
||||
navigateTo({
|
||||
name: 'org-src-division-id',
|
||||
params: {
|
||||
id: Number(recId.value),
|
||||
},
|
||||
})
|
||||
|
||||
break
|
||||
case ActionEvents.showEdit:
|
||||
getCurrentDivisionDetail(recId.value)
|
||||
|
||||
Reference in New Issue
Block a user