|
|
@ -69,6 +69,8 @@ const meta = toRef(props, 'meta') |
|
|
|
|
|
|
|
|
|
|
|
const islastRow = toRef(props, 'lastRow') |
|
|
|
const islastRow = toRef(props, 'lastRow') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isFirstRow = toRef(props,'firstRow') |
|
|
|
|
|
|
|
|
|
|
|
const route = useRoute() |
|
|
|
const route = useRoute() |
|
|
|
|
|
|
|
|
|
|
|
const router = useRouter() |
|
|
|
const router = useRouter() |
|
|
@ -122,6 +124,7 @@ const { |
|
|
|
syncLTARRefs, |
|
|
|
syncLTARRefs, |
|
|
|
save: _save, |
|
|
|
save: _save, |
|
|
|
loadCommentsAndLogs, |
|
|
|
loadCommentsAndLogs, |
|
|
|
|
|
|
|
clearColumns, |
|
|
|
} = useProvideExpandedFormStore(meta, row) |
|
|
|
} = useProvideExpandedFormStore(meta, row) |
|
|
|
|
|
|
|
|
|
|
|
const duplicatingRowInProgress = ref(false) |
|
|
|
const duplicatingRowInProgress = ref(false) |
|
|
@ -189,15 +192,20 @@ const isPreventChangeModalOpen = ref(false) |
|
|
|
const isCloseModalOpen = ref(false) |
|
|
|
const isCloseModalOpen = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
const discardPreventModal = () => { |
|
|
|
const discardPreventModal = () => { |
|
|
|
|
|
|
|
// when user click on next or previous button |
|
|
|
if (isPreventChangeModalOpen.value) { |
|
|
|
if (isPreventChangeModalOpen.value) { |
|
|
|
emits('next') |
|
|
|
emits('next') |
|
|
|
|
|
|
|
if (_row.value?.rowMeta?.new) emits('cancel') |
|
|
|
isPreventChangeModalOpen.value = false |
|
|
|
isPreventChangeModalOpen.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// when user click on close button |
|
|
|
if (isCloseModalOpen.value) { |
|
|
|
if (isCloseModalOpen.value) { |
|
|
|
isCloseModalOpen.value = false |
|
|
|
isCloseModalOpen.value = false |
|
|
|
if (_row.value?.rowMeta?.new) emits('cancel') |
|
|
|
if (_row.value?.rowMeta?.new) emits('cancel') |
|
|
|
isExpanded.value = false |
|
|
|
isExpanded.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// clearing all new modifed change on close |
|
|
|
|
|
|
|
clearColumns() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const onNext = async () => { |
|
|
|
const onNext = async () => { |
|
|
@ -419,7 +427,7 @@ export default { |
|
|
|
<div class="flex gap-2"> |
|
|
|
<div class="flex gap-2"> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
v-if="props.showNextPrevIcons" |
|
|
|
v-if="props.showNextPrevIcons" |
|
|
|
:disabled="props.firstRow" |
|
|
|
:disabled="isFirstRow" |
|
|
|
type="secondary" |
|
|
|
type="secondary" |
|
|
|
class="nc-prev-arrow !w-10" |
|
|
|
class="nc-prev-arrow !w-10" |
|
|
|
@click="$emit('prev')" |
|
|
|
@click="$emit('prev')" |
|
|
|