chore: update opened team coll tab and toast added
This commit is contained in:
@@ -174,6 +174,7 @@
|
||||
"new": "New Collection",
|
||||
"order_changed": "Collection Order Updated",
|
||||
"properties":"Colection Properties",
|
||||
"properties_updated": "Collection Properties Updated",
|
||||
"renamed": "Collection renamed",
|
||||
"request_in_use": "Request in use",
|
||||
"save_as": "Save as",
|
||||
|
||||
@@ -2130,24 +2130,27 @@ const setCollectionProperties = (newCollection: {
|
||||
(err: GQLError<string>) => {
|
||||
toast.error(`${getErrorMessage(err)}`)
|
||||
},
|
||||
async () => {
|
||||
nextTick(() => {
|
||||
const { auth, headers } =
|
||||
teamCollectionAdapter.cascadeParentCollectionForHeaderAuth(path)
|
||||
|
||||
updateInheritedPropertiesForAffectedRequests(
|
||||
path,
|
||||
{
|
||||
auth,
|
||||
headers,
|
||||
},
|
||||
"rest",
|
||||
"team"
|
||||
)
|
||||
})
|
||||
() => {
|
||||
toast.success(t("collection.properties_updated"))
|
||||
}
|
||||
)
|
||||
)()
|
||||
|
||||
//This is a hack to update the inherited properties of the requests if there an tab opened
|
||||
// since it takes a little bit of time to update the collection tree
|
||||
setTimeout(() => {
|
||||
const { auth, headers } =
|
||||
teamCollectionAdapter.cascadeParentCollectionForHeaderAuth(path)
|
||||
updateInheritedPropertiesForAffectedRequests(
|
||||
path,
|
||||
{
|
||||
auth,
|
||||
headers,
|
||||
},
|
||||
"rest",
|
||||
"team"
|
||||
)
|
||||
}, 200)
|
||||
}
|
||||
|
||||
displayModalEditProperties(false)
|
||||
|
||||
Reference in New Issue
Block a user