feat: add employee under employer (#35)
* refactor: btn add in table * refactor: Emits addEmployee * fix: visa can is null * refactor: update data * fix: number not update --------- Co-authored-by: Thanaphon Frappet <thanaphon@frappet.com>
This commit is contained in:
parent
a9c9467643
commit
05c1c07384
5 changed files with 61 additions and 20 deletions
|
|
@ -7,6 +7,8 @@ import PersonCard from 'components/shared/PersonCard.vue';
|
|||
import KebabAction from '../shared/KebabAction.vue';
|
||||
import useOptionStore from 'stores/options';
|
||||
|
||||
import { AddButton } from 'components/button';
|
||||
|
||||
const optionStore = useOptionStore();
|
||||
const pageSize = defineModel<number>('pageSize', { default: 30 });
|
||||
const currentPage = defineModel<number>('currentPage', { default: 1 });
|
||||
|
|
@ -18,6 +20,7 @@ const prop = withDefaults(
|
|||
columnsEmployee: any[];
|
||||
fieldSelected?: string[];
|
||||
inTable?: boolean;
|
||||
addButton?: boolean;
|
||||
}>(),
|
||||
{
|
||||
gridView: false,
|
||||
|
|
@ -37,6 +40,7 @@ const prop = withDefaults(
|
|||
);
|
||||
|
||||
defineEmits<{
|
||||
(e: 'add'): void;
|
||||
(e: 'view', data: any): void;
|
||||
(e: 'edit', data: any): void;
|
||||
(e: 'delete', data: any): void;
|
||||
|
|
@ -68,7 +72,9 @@ defineEmits<{
|
|||
<span v-if="col.label === 'nameEmployee'">
|
||||
{{ $t('fullname') }}
|
||||
</span>
|
||||
|
||||
<span v-if="col.label === '' && !!addButton">
|
||||
<AddButton icon-only @click.stop="() => $emit('add')" />
|
||||
</span>
|
||||
<span v-if="col.label !== ''">
|
||||
{{ $t(col.label) }}
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue