|
|
@@ -2554,8 +2554,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
props: ['initialnotes', 'authusername'],
|
|
|
data: function data() {
|
|
|
return {
|
|
|
- notes: this.initialnotes
|
|
|
+ notes: Object.values(this.initialnotes)
|
|
|
};
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ userChanged: function userChanged(index) {
|
|
|
+ if (index === 0) {
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ return this.notes[index].noteuser !== this.notes[index - 1].noteuser;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -49904,7 +49913,7 @@ var render = function() {
|
|
|
return _c(
|
|
|
"ul",
|
|
|
{ staticClass: "list-unstyled" },
|
|
|
- _vm._l(this.notes, function(note) {
|
|
|
+ _vm._l(this.notes, function(note, index) {
|
|
|
return _c(
|
|
|
"li",
|
|
|
{ key: note.noteid, staticClass: "row no-gutters mb-2" },
|
|
|
@@ -49993,45 +50002,52 @@ var render = function() {
|
|
|
]
|
|
|
),
|
|
|
_vm._v(" "),
|
|
|
- _c("div", { staticClass: "col-md-1 d-flex flex-column mx-md-3" }, [
|
|
|
- _c("div", { staticClass: "text-center p-0 m-0" }, [
|
|
|
- _vm._v(_vm._s(note.noteuser))
|
|
|
- ]),
|
|
|
- _vm._v(" "),
|
|
|
- _c(
|
|
|
- "div",
|
|
|
- { staticClass: "text-muted text-small text-center p-0 m-0" },
|
|
|
- [_vm._v(_vm._s(_vm.getHRDate(note.notetime)))]
|
|
|
- ),
|
|
|
- _vm._v(" "),
|
|
|
- _c(
|
|
|
- "div",
|
|
|
- { staticClass: "btn-group justify-content-center p-0 m-0" },
|
|
|
- [
|
|
|
- _vm.authusername === note.noteuser ||
|
|
|
- _vm.authusername === "admin"
|
|
|
- ? [
|
|
|
- _c(
|
|
|
- "button",
|
|
|
- {
|
|
|
- staticClass: "btn btn-sm btn-primary m-1",
|
|
|
- attrs: {
|
|
|
- "data-toggle": "modal",
|
|
|
- "data-target": "#note" + note.noteid + "editModal"
|
|
|
- }
|
|
|
- },
|
|
|
- [_c("i", { staticClass: "fas fa-fw fa-edit" })]
|
|
|
- ),
|
|
|
- _vm._v(" "),
|
|
|
- _vm._m(0, true),
|
|
|
- _vm._v(" "),
|
|
|
- _vm._m(1, true)
|
|
|
- ]
|
|
|
- : _vm._e()
|
|
|
- ],
|
|
|
- 2
|
|
|
- )
|
|
|
- ]),
|
|
|
+ _c(
|
|
|
+ "div",
|
|
|
+ {
|
|
|
+ staticClass: "col-md-1 d-flex flex-column mx-md-3",
|
|
|
+ class: { "order-last": _vm.userChanged(index) }
|
|
|
+ },
|
|
|
+ [
|
|
|
+ _c("div", { staticClass: "text-center p-0 m-0" }, [
|
|
|
+ _vm._v(_vm._s(note.noteuser))
|
|
|
+ ]),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c(
|
|
|
+ "div",
|
|
|
+ { staticClass: "text-muted text-small text-center p-0 m-0" },
|
|
|
+ [_vm._v(_vm._s(_vm.getHRDate(note.notetime)))]
|
|
|
+ ),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c(
|
|
|
+ "div",
|
|
|
+ { staticClass: "btn-group justify-content-center p-0 m-0" },
|
|
|
+ [
|
|
|
+ _vm.authusername === note.noteuser ||
|
|
|
+ _vm.authusername === "admin"
|
|
|
+ ? [
|
|
|
+ _c(
|
|
|
+ "button",
|
|
|
+ {
|
|
|
+ staticClass: "btn btn-sm btn-primary m-1",
|
|
|
+ attrs: {
|
|
|
+ "data-toggle": "modal",
|
|
|
+ "data-target": "#note" + note.noteid + "editModal"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ [_c("i", { staticClass: "fas fa-fw fa-edit" })]
|
|
|
+ ),
|
|
|
+ _vm._v(" "),
|
|
|
+ _vm._m(0, true),
|
|
|
+ _vm._v(" "),
|
|
|
+ _vm._m(1, true)
|
|
|
+ ]
|
|
|
+ : _vm._e()
|
|
|
+ ],
|
|
|
+ 2
|
|
|
+ )
|
|
|
+ ]
|
|
|
+ ),
|
|
|
_vm._v(" "),
|
|
|
_c("div", { staticClass: "col-md-10" }, [
|
|
|
_c("div", { staticClass: "card m-2" }, [
|