refactor: eliminate parentCollectionID field from RESTCollectionViewRequest type

Collection ID serves the purpose.
This commit is contained in:
jamesgeorge007
2024-02-24 17:48:09 +05:30
parent d70d5bdb16
commit c0978c3b20
4 changed files with 9 additions and 14 deletions

View File

@@ -256,8 +256,7 @@ const isReorderable = computed(() => {
const isSameParent = computed(() => {
return (
currentReorderingStatus.value.parentID ===
props.requestView.parentCollectionID
currentReorderingStatus.value.parentID === props.requestView.collectionID
)
})
@@ -277,7 +276,7 @@ const dragStart = ({ dataTransfer }: DragEvent) => {
changeCurrentReorderStatus({
type: "request",
id: props.requestView.requestID,
parentID: props.requestView.parentCollectionID,
parentID: props.requestView.collectionID,
})
}
}

View File

@@ -134,7 +134,7 @@
:save-request="saveRequest"
@drag-request="
dragRequest($event, {
parentCollectionIndexPath: node.data.value.parentCollectionID,
parentCollectionIndexPath: node.data.value.collectionID,
requestIndex: node.data.value.requestID,
})
"
@@ -146,13 +146,13 @@
@share-request="shareRequest"
@update-request-order="
updateRequestOrder($event, {
parentCollectionIndexPath: node.data.value.parentCollectionID,
parentCollectionIndexPath: node.data.value.collectionID,
requestIndex: node.data.value.requestID,
})
"
@update-last-request-order="
updateRequestOrder($event, {
parentCollectionIndexPath: node.data.value.parentCollectionID,
parentCollectionIndexPath: node.data.value.collectionID,
requestIndex: null,
})
"
@@ -240,7 +240,7 @@
:save-request="saveRequest"
@drag-request="
dragRequest($event, {
parentCollectionIndexPath: node.data.value.parentCollectionID,
parentCollectionIndexPath: node.data.value.collectionID,
requestIndex: node.data.value.requestID,
})
"
@@ -252,13 +252,13 @@
@share-request="shareRequest"
@update-request-order="
updateRequestOrder($event, {
parentCollectionIndexPath: node.data.value.parentCollectionID,
parentCollectionIndexPath: node.data.value.collectionID,
requestIndex: node.data.value.requestID,
})
"
@update-last-request-order="
updateRequestOrder($event, {
parentCollectionIndexPath: node.data.value.parentCollectionID,
parentCollectionIndexPath: node.data.value.collectionID,
requestIndex: null,
})
"