This commit is contained in:
2020-07-07 17:24:37 +00:00
parent 4586f18d6d
commit 5f179ec926
3 changed files with 78 additions and 31 deletions

View File

@@ -25,6 +25,8 @@ todo: ability to mass tag items from list CLIENT UI
- ACROSS MULTIPLE TYPES?
tricky, maybe only from main lists
todo: make grid selection list sticky?
todo: notification
it's time, this is a big deal and it's tied to infrastructure shit so qualifies as an early thing to be done
add CLIENT long polling notification route check

View File

@@ -1,12 +1,79 @@
<template>
<v-expansion-panel>
<v-expansion-panel-header>MASS TAG</v-expansion-panel-header>
<v-expansion-panel-content>content here</v-expansion-panel-content>
<v-expansion-panel v-if="available()">
<v-expansion-panel-header>{{ $ay.t("Tags") }}</v-expansion-panel-header>
<v-expansion-panel-content>
<v-radio-group v-model="action">
<v-radio label="Add" value="Add"></v-radio>
<v-radio label="Remove" value="Remove"></v-radio>
<v-radio label="Replace" value="Replace"></v-radio>
</v-radio-group>
<v-row>
<v-col cols="12">
<v-text-field
:value="tag"
:label="$ay.t('Find')"
required
@input="normalizeTag"
></v-text-field>
</v-col>
<v-col cols="12" v-if="action == 'Replace'">
<v-text-field
:value="replace"
:label="$ay.t('Replace')"
@input="normalizeReplace"
required
></v-text-field>
</v-col>
</v-row>
<v-btn color="blue darken-1" text @click="doAction()">{{
$ay.t("OK")
}}</v-btn>
</v-expansion-panel-content>
</v-expansion-panel>
</template>
<script>
export default {
data: () => ({}),
data: () => ({
action: "Add",
tag: null,
replace: null
}),
methods: {
available() {
return true;
},
doAction() {},
normalize(value) {
if (!value) {
return null;
}
//Must be lowercase per rules
//This may be naive when we get international cust omers but for now supporting utf-8 and it appears it's safe to do this with unicode
value = value.toLowerCase();
//No spaces in tags, replace with dashes
value = value.split(" ").join("-");
//Remove multiple dash sequences
value = value.replace(/-+/g, "-");
//Ensure doesn't start or end with a dash
value = value.replace(/^\-+-\-+$/g, "");
// inObj = inObj.Trim("-");
//No longer than 255 characters
// inObj = StringUtil.MaxLength(inObj, 255);
return value;
},
normalizeTag(value) {
value = this.normalize(value);
this.tag = value;
},
normalizeReplace(value) {
value = this.normalize(value);
this.replace = value;
}
},
props: {
ayaType: {
type: Number,

View File

@@ -12,26 +12,11 @@
>{{ $ay.t("SelectedItems") }}
{{ selectedItems.length }}</v-card-subtitle
>
<!-- <v-divider></v-divider> -->
<v-card-text>
<v-expansion-panels focusable>
<v-expansion-panel v-for="(item, i) in 5" :key="i">
<v-expansion-panel-header
>Plugin / utility name here</v-expansion-panel-header
>
<v-expansion-panel-content>
Plugin utility component here, it will decide if it's visible or
not in a way that doesn't take up dom space (v-if I guess in an
expansion panel?) Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
</v-expansion-panel-content>
</v-expansion-panel>
<ExtensionTags :ayaType="ayaType" :selectedItems="selectedItems" />
</v-expansion-panels>
</v-card-text>
<!-- <v-divider></v-divider> -->
<v-card-actions>
<v-btn text @click="close()" color="primary">{{
$ay.t("Close")
@@ -41,7 +26,11 @@
</v-dialog>
</template>
<script>
import ExtensionTags from "./extension-tags-control.vue";
export default {
components: {
ExtensionTags
},
data: () => ({
isVisible: false,
resolve: null,
@@ -58,17 +47,6 @@ export default {
},
methods: {
open() {
// //get report list from server
// //for now we'll fake it
// let fakeReportList = [];
// for (let i = 0; i < 25; i++) {
// fakeReportList.push({
// name: "Fake report with the number " + i,
// id: i
// });
// }
// this.reportList = fakeReportList;
this.isVisible = true;
return new Promise((resolve, reject) => {
this.resolve = resolve;