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