-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dam user detail and edit - implement Asset Licence Groups
- Loading branch information
volar
committed
Apr 12, 2024
1 parent
3330aca
commit cd99aee
Showing
11 changed files
with
173 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
src/views/coreDam/assetLicenceGroup/components/DamAssetLicenceGroupRemoteAutocomplete.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<script lang="ts" setup> | ||
import { computed } from 'vue' | ||
import { AFormRemoteAutocomplete, cloneDeep, type IntegerId, type ValueObjectOption } from '@anzusystems/common-admin' | ||
import type { AxiosInstance } from 'axios' | ||
import { useAssetLicenceGroupSelectActions } from '@/views/coreDam/assetLicenceGroup/composables/assetLicenceGroupActions' | ||
import { useAssetLicenceGroupFilter } from '@/model/coreDam/filter/AssetLicenceGroupFilter' | ||
const props = withDefaults( | ||
defineProps<{ | ||
modelValue: IntegerId | null | IntegerId[] | any | ||
client: () => AxiosInstance | ||
label?: string | undefined | ||
required?: boolean | undefined | ||
multiple?: boolean | ||
clearable?: boolean | ||
dataCy?: string | ||
hideDetails?: boolean | ||
disableInitFetch?: boolean | ||
}>(), | ||
{ | ||
label: undefined, | ||
required: undefined, | ||
multiple: false, | ||
clearable: false, | ||
dataCy: '', | ||
hideDetails: undefined, | ||
disableInitFetch: false, | ||
} | ||
) | ||
const emit = defineEmits<{ | ||
(e: 'update:modelValue', data: IntegerId | null | IntegerId[] | any): void | ||
}>() | ||
const modelValueComputed = computed({ | ||
get() { | ||
return props.modelValue | ||
}, | ||
set(newValue: IntegerId | null | IntegerId[] | any) { | ||
emit('update:modelValue', cloneDeep<IntegerId | null | IntegerId[] | any>(newValue)) | ||
}, | ||
}) | ||
const selected = defineModel<ValueObjectOption<IntegerId>[]>('selected', { required: false, default: () => [] }) | ||
// eslint-disable-next-line vue/no-setup-props-reactivity-loss | ||
const { fetchItems, fetchItemsByIds } = useAssetLicenceGroupSelectActions(props.client) | ||
const innerFilter = useAssetLicenceGroupFilter() | ||
</script> | ||
|
||
<template> | ||
<AFormRemoteAutocomplete | ||
v-model="modelValueComputed" | ||
v-model:selected="selected" | ||
:required="required" | ||
:label="label" | ||
:fetch-items="fetchItems" | ||
:fetch-items-by-ids="fetchItemsByIds" | ||
:inner-filter="innerFilter" | ||
:multiple="multiple" | ||
:clearable="clearable" | ||
filter-by-field="name" | ||
:data-cy="dataCy" | ||
:hide-details="hideDetails" | ||
:disable-init-fetch="disableInitFetch" | ||
/> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters