fix: indicate selected location on save request
This commit is contained in:
@@ -13,9 +13,9 @@
|
||||
<div slot="body" class="flex flex-col">
|
||||
<label for="selectLabel">{{ $t("token_req_name") }}</label>
|
||||
<input type="text" id="selectLabel" v-model="requestData.name" @keyup.enter="saveRequestAs" />
|
||||
<label for="selectLabel">Request path</label>
|
||||
<input readonly :value="path" />
|
||||
<collections
|
||||
<label for="selectLabel">Select location</label>
|
||||
<!-- <input readonly :value="path" /> -->
|
||||
<Collections
|
||||
@select-folder="changeRequestDetails($event)"
|
||||
@update-collection="collectionsType.type = $event"
|
||||
:saveRequest="true"
|
||||
@@ -188,7 +188,9 @@ export default {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
this.$toast.success("Requested added", {
|
||||
icon: "done",
|
||||
})
|
||||
this.hideModal()
|
||||
},
|
||||
hideModal() {
|
||||
|
||||
@@ -120,11 +120,19 @@
|
||||
collectionsType: collectionsType,
|
||||
folderId: $event.id,
|
||||
})
|
||||
if (collectionsType.type == 'my-collections') {
|
||||
if ($event.folderPath) {
|
||||
picked = $event.folderPath
|
||||
} else picked = index
|
||||
} else {
|
||||
picked = $event.id
|
||||
}
|
||||
"
|
||||
@unselect-collection="$emit('remove-collection', collection)"
|
||||
@expand-collection="expandCollection"
|
||||
@remove-collection="removeCollection"
|
||||
@remove-request="removeRequest"
|
||||
:picked="picked"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -178,6 +186,7 @@ export default {
|
||||
},
|
||||
teamCollectionAdapter: new TeamCollectionAdapter(null),
|
||||
teamCollectionsNew: [],
|
||||
picked: "",
|
||||
}
|
||||
},
|
||||
subscriptions() {
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
<button class="icon" @click="toggleShowChildren">
|
||||
<i class="material-icons" v-show="!showChildren && !isFiltered">arrow_right</i>
|
||||
<i class="material-icons" v-show="showChildren || isFiltered">arrow_drop_down</i>
|
||||
<i class="material-icons">folder</i>
|
||||
<i v-if="picked === collectionIndex" class="text-green-400 material-icons">check_circle</i>
|
||||
<i v-else class="material-icons">folder</i>
|
||||
<span>{{ collection.name }}</span>
|
||||
</button>
|
||||
<div>
|
||||
@@ -87,9 +88,11 @@
|
||||
name: folder.name + '/' + $event.name,
|
||||
id: $event.id,
|
||||
reqIdx: $event.reqIdx,
|
||||
folderPath: $event.folderPath,
|
||||
})
|
||||
"
|
||||
@remove-request="removeRequest"
|
||||
:picked="picked"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -157,6 +160,7 @@ export default {
|
||||
selected: Boolean,
|
||||
saveRequest: Boolean,
|
||||
collectionsType: Object,
|
||||
picked: { default: "", type: String },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
<button class="icon" @click="toggleShowChildren">
|
||||
<i class="material-icons" v-show="!showChildren && !isFiltered">arrow_right</i>
|
||||
<i class="material-icons" v-show="showChildren || isFiltered">arrow_drop_down</i>
|
||||
<i class="material-icons">folder_open</i>
|
||||
<i v-if="picked === folderPath" class="text-green-400 material-icons">check_circle</i>
|
||||
<i v-else class="material-icons">folder_open</i>
|
||||
<span>{{ folder.name ? folder.name : folder.title }}</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -75,6 +76,7 @@
|
||||
name: subFolder.name + '/' + $event.name,
|
||||
id: subFolder.id,
|
||||
reqIdx: $event.reqIdx,
|
||||
folderPath: $event.folderPath,
|
||||
})
|
||||
"
|
||||
@remove-request="removeRequest"
|
||||
@@ -147,6 +149,7 @@ export default {
|
||||
saveRequest: Boolean,
|
||||
isFiltered: Boolean,
|
||||
collectionsType: Object,
|
||||
picked: { default: "", type: String },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -173,7 +176,12 @@ export default {
|
||||
},
|
||||
toggleShowChildren() {
|
||||
if (this.$props.saveRequest)
|
||||
this.$emit("select-folder", { name: "", id: this.$props.folder.id, reqIdx: "" })
|
||||
this.$emit("select-folder", {
|
||||
name: "",
|
||||
id: this.$props.folder.id,
|
||||
reqIdx: "",
|
||||
folderPath: this.$props.folderPath,
|
||||
})
|
||||
this.showChildren = !this.showChildren
|
||||
},
|
||||
removeFolder() {
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
<button class="icon" @click="toggleShowChildren">
|
||||
<i class="material-icons" v-show="!showChildren && !isFiltered">arrow_right</i>
|
||||
<i class="material-icons" v-show="showChildren || isFiltered">arrow_drop_down</i>
|
||||
<i class="material-icons">folder</i>
|
||||
<i v-if="picked === collection.id" class="text-green-400 material-icons">check_circle</i>
|
||||
<i v-else class="material-icons">folder</i>
|
||||
<span>{{ collection.title }}</span>
|
||||
</button>
|
||||
<div>
|
||||
@@ -98,6 +99,7 @@
|
||||
"
|
||||
@expand-collection="expandCollection"
|
||||
@remove-request="removeRequest"
|
||||
:picked="picked"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -165,6 +167,7 @@ export default {
|
||||
selected: Boolean,
|
||||
saveRequest: Boolean,
|
||||
collectionsType: Object,
|
||||
picked: { default: "", type: String },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
<button class="icon" @click="toggleShowChildren">
|
||||
<i class="material-icons" v-show="!showChildren && !isFiltered">arrow_right</i>
|
||||
<i class="material-icons" v-show="showChildren || isFiltered">arrow_drop_down</i>
|
||||
<i class="material-icons">folder_open</i>
|
||||
<i v-if="picked === folder.id" class="text-green-400 material-icons">check_circle</i>
|
||||
<i v-else class="material-icons">folder_open</i>
|
||||
<span>{{ folder.name ? folder.name : folder.title }}</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -149,6 +150,7 @@ export default {
|
||||
saveRequest: Boolean,
|
||||
isFiltered: Boolean,
|
||||
collectionsType: Object,
|
||||
picked: { default: "", type: String },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -158,20 +160,7 @@ export default {
|
||||
cursor: "",
|
||||
}
|
||||
},
|
||||
subscriptions() {
|
||||
return {
|
||||
SYNC_COLLECTIONS: getSettingSubject("syncCollections"),
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
syncCollections() {
|
||||
if (fb.currentUser !== null && this.SYNC_COLLECTIONS) {
|
||||
fb.writeCollections(
|
||||
JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)),
|
||||
"collections"
|
||||
)
|
||||
}
|
||||
},
|
||||
toggleShowChildren() {
|
||||
if (this.$props.saveRequest)
|
||||
this.$emit("select-folder", { name: "", id: this.$props.folder.id, reqIdx: "" })
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="row-wrapper">
|
||||
<h3 class="title">{{ $t("edit_team") }}</h3>
|
||||
<div>
|
||||
<button class="icon" @click="ideModal">
|
||||
<button class="icon" @click="hideModal">
|
||||
<i class="material-icons">close</i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user