TEST
PMCORE-3358:The Update Order is Lost in the Sorting options of the table lists PMCORE_3.7.0 build Translation CR
This commit is contained in:
@@ -1,7 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<i v-if="props.sortable" :class="icon"></i>
|
<div>
|
||||||
|
<i v-if="props.sortable" :class="icon"></i>
|
||||||
|
<b-button
|
||||||
|
class="btn-clear-sort"
|
||||||
|
variant="primary"
|
||||||
|
@click="clear"
|
||||||
|
size="sm"
|
||||||
|
v-if="this.props.sortStatus.sorted"
|
||||||
|
>
|
||||||
|
{{ $t('ID_CLEAR') }}
|
||||||
|
</b-button>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { Event } from "vue-tables-2";
|
||||||
export default {
|
export default {
|
||||||
name: "VtSortControl",
|
name: "VtSortControl",
|
||||||
props: ["props"],
|
props: ["props"],
|
||||||
@@ -15,5 +27,15 @@ export default {
|
|||||||
: "fas fa-sort-amount-down";
|
: "fas fa-sort-amount-down";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* Send the event to reset the sort
|
||||||
|
*/
|
||||||
|
clear (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
Event.$emit("clearSortEvent");
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -678,6 +678,7 @@ export default {
|
|||||||
id: that.data.customListId
|
id: that.data.customListId
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Event.$on('clearSortEvent', this.clearSort);
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
columns: function(val) {
|
columns: function(val) {
|
||||||
@@ -1238,6 +1239,21 @@ export default {
|
|||||||
return dataEllipsisMap[page];
|
return dataEllipsisMap[page];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Reset the sort in the table
|
||||||
|
*/
|
||||||
|
clearSort() {
|
||||||
|
if (this.$refs['vueTable']) {
|
||||||
|
this.$refs['vueTable'].setOrder(false)
|
||||||
|
this.$emit("updateSettings", {
|
||||||
|
data: [],
|
||||||
|
key: "orderBy",
|
||||||
|
page: that.data.pageParent,
|
||||||
|
type: "custom",
|
||||||
|
id: that.data.customListId
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -352,6 +352,7 @@ export default {
|
|||||||
id: this.id
|
id: this.id
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Event.$on('clearSortEvent', this.clearSort);
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
columns: function (val) {
|
columns: function (val) {
|
||||||
@@ -687,6 +688,21 @@ export default {
|
|||||||
onPostNotes() {
|
onPostNotes() {
|
||||||
this.$refs["vueTable"].getData();
|
this.$refs["vueTable"].getData();
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Reset the sort in the table
|
||||||
|
*/
|
||||||
|
clearSort() {
|
||||||
|
if (this.$refs['vueTable']) {
|
||||||
|
this.$refs['vueTable'].setOrder(false);
|
||||||
|
this.$emit("updateSettings", {
|
||||||
|
data: [],
|
||||||
|
key: "orderBy",
|
||||||
|
page: "draft",
|
||||||
|
type: "normal",
|
||||||
|
id: this.id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -387,6 +387,7 @@ export default {
|
|||||||
id: this.id
|
id: this.id
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Event.$on('clearSortEvent', this.clearSort);
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
columns: function (val) {
|
columns: function (val) {
|
||||||
@@ -789,6 +790,21 @@ export default {
|
|||||||
onPostNotes() {
|
onPostNotes() {
|
||||||
this.$refs["vueTable"].getData();
|
this.$refs["vueTable"].getData();
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Reset the sort in the table
|
||||||
|
*/
|
||||||
|
clearSort() {
|
||||||
|
if (this.$refs['vueTable']) {
|
||||||
|
this.$refs['vueTable'].setOrder(false);
|
||||||
|
this.$emit("updateSettings", {
|
||||||
|
data: [],
|
||||||
|
key: "orderBy",
|
||||||
|
page: "inbox",
|
||||||
|
type: "normal",
|
||||||
|
id: this.id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -220,6 +220,7 @@ export default {
|
|||||||
PAUSED: this.$i18n.t("ID_PAUSED"),
|
PAUSED: this.$i18n.t("ID_PAUSED"),
|
||||||
UNASSIGNED: this.$i18n.t("ID_UNASSIGNED"),
|
UNASSIGNED: this.$i18n.t("ID_UNASSIGNED"),
|
||||||
},
|
},
|
||||||
|
clearSortState: this.settings && this.settings.orderBy && this.settings.orderBy.column,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -241,6 +242,7 @@ export default {
|
|||||||
id: this.id
|
id: this.id
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Event.$on('clearSortEvent', this.clearSort);
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
columns: function (val) {
|
columns: function (val) {
|
||||||
@@ -713,6 +715,21 @@ export default {
|
|||||||
countDownChanged(dismissCountDown) {
|
countDownChanged(dismissCountDown) {
|
||||||
this.dataAlert.dismissCountDown = dismissCountDown;
|
this.dataAlert.dismissCountDown = dismissCountDown;
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Reset the sort in the table
|
||||||
|
*/
|
||||||
|
clearSort() {
|
||||||
|
if (this.$refs['vueTable']) {
|
||||||
|
this.$refs['vueTable'].setOrder(false)
|
||||||
|
this.$emit("updateSettings", {
|
||||||
|
data: [],
|
||||||
|
key: "orderBy",
|
||||||
|
page: "MyCases",
|
||||||
|
type: "normal",
|
||||||
|
id: this.id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -723,4 +740,9 @@ export default {
|
|||||||
padding-left: 50px;
|
padding-left: 50px;
|
||||||
padding-right: 50px;
|
padding-right: 50px;
|
||||||
}
|
}
|
||||||
|
/*.btn-clear-sort {
|
||||||
|
position: fixed;
|
||||||
|
margin-top: 16px;
|
||||||
|
margin-left: -11px;
|
||||||
|
}*/
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -386,6 +386,7 @@ export default {
|
|||||||
id: this.id
|
id: this.id
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Event.$on('clearSortEvent', this.clearSort);
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
columns: function (val) {
|
columns: function (val) {
|
||||||
@@ -772,6 +773,21 @@ export default {
|
|||||||
onPostNotes() {
|
onPostNotes() {
|
||||||
this.$refs["vueTable"].getData();
|
this.$refs["vueTable"].getData();
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Reset the sort in the table
|
||||||
|
*/
|
||||||
|
clearSort() {
|
||||||
|
if (this.$refs['vueTable']) {
|
||||||
|
this.$refs['vueTable'].setOrder(false);
|
||||||
|
this.$emit("updateSettings", {
|
||||||
|
data: [],
|
||||||
|
key: "orderBy",
|
||||||
|
page: "paused",
|
||||||
|
type: "normal",
|
||||||
|
id: this.id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -377,6 +377,7 @@ export default {
|
|||||||
id: this.id
|
id: this.id
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Event.$on('clearSortEvent', this.clearSort);
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
columns: function (val) {
|
columns: function (val) {
|
||||||
@@ -741,6 +742,21 @@ export default {
|
|||||||
onPostNotes() {
|
onPostNotes() {
|
||||||
this.$refs["vueTable"].getData();
|
this.$refs["vueTable"].getData();
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Reset the sort in the table
|
||||||
|
*/
|
||||||
|
clearSort() {
|
||||||
|
if (this.$refs['vueTable']) {
|
||||||
|
this.$refs['vueTable'].setOrder(false);
|
||||||
|
this.$emit("updateSettings", {
|
||||||
|
data: [],
|
||||||
|
key: "orderBy",
|
||||||
|
page: "unassigned",
|
||||||
|
type: "normal",
|
||||||
|
id: this.id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user