|
|
@@ -2387,6 +2387,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
//
|
|
|
//
|
|
|
//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
|
props: ['credential', 'descriptions'],
|
|
|
data: function data() {
|
|
|
@@ -2398,7 +2410,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
mounted: function mounted() {
|
|
|
var _this = this;
|
|
|
|
|
|
- Echo.channel('credentials').listen('CredentialUpdated', function (e) {
|
|
|
+ console.log('credential.' + this.data.credid);
|
|
|
+ Echo.channel('credential.' + this.data.credid).listen('CredentialUpdated', function (e) {
|
|
|
// This part could potentially use a refactor.
|
|
|
// Probably needs a credential list component to listen for this
|
|
|
// even and update the corresponding credential. Currently every
|
|
|
@@ -2410,12 +2423,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
// There would still be multiples of those on the group credentials page, but an
|
|
|
// order of magnitude less of those than of individual credentials.
|
|
|
// It also may not be a big deal performance wise to do it like this, not sure.
|
|
|
- var eData = JSON.parse(e.data);
|
|
|
-
|
|
|
- if (_this.data.credid === eData.credid) {
|
|
|
- _this.data = eData;
|
|
|
- }
|
|
|
+ _this.data = e.credential;
|
|
|
});
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ deleteCredential: function deleteCredential() {
|
|
|
+ var _this2 = this;
|
|
|
+
|
|
|
+ axios["delete"]('/api/credentials/' + this.data.credid, this.data).then(function (response) {
|
|
|
+ $('#credential' + _this2.data.credid + 'deleteModal').modal('hide');
|
|
|
+ })["catch"](function (error) {
|
|
|
+ console.error(error);
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -49562,6 +49582,59 @@ var render = function() {
|
|
|
}
|
|
|
}),
|
|
|
_vm._v(" "),
|
|
|
+ _c(
|
|
|
+ "modal",
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ id: "credential" + this.data.credid + "deleteModal",
|
|
|
+ tabindex: "-1"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ [
|
|
|
+ _c(
|
|
|
+ "h5",
|
|
|
+ {
|
|
|
+ staticClass: "modal-title",
|
|
|
+ attrs: {
|
|
|
+ slot: "header",
|
|
|
+ id: "credential" + this.data.credid + "deleteModalLabel"
|
|
|
+ },
|
|
|
+ slot: "header"
|
|
|
+ },
|
|
|
+ [_vm._v("\r\n Delete Credential\r\n ")]
|
|
|
+ ),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c("div", { attrs: { slot: "body" }, slot: "body" }, [
|
|
|
+ _vm._v("\r\n Are you sure?\r\n ")
|
|
|
+ ]),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c("div", { attrs: { slot: "footer" }, slot: "footer" }, [
|
|
|
+ _c(
|
|
|
+ "button",
|
|
|
+ {
|
|
|
+ staticClass: "btn btn-secondary",
|
|
|
+ attrs: { type: "button", "data-dismiss": "modal" }
|
|
|
+ },
|
|
|
+ [_vm._v("Cancel")]
|
|
|
+ ),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c(
|
|
|
+ "button",
|
|
|
+ {
|
|
|
+ staticClass: "btn btn-danger",
|
|
|
+ attrs: { type: "button" },
|
|
|
+ on: {
|
|
|
+ click: function($event) {
|
|
|
+ return _vm.deleteCredential()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ [_vm._v("Confirm")]
|
|
|
+ )
|
|
|
+ ])
|
|
|
+ ]
|
|
|
+ ),
|
|
|
+ _vm._v(" "),
|
|
|
_c("div", { staticClass: "row no-gutters" }, [
|
|
|
_c("div", { staticClass: "h5 col-3 text-left" }, [
|
|
|
_vm._v(_vm._s(this.data.creddesc))
|
|
|
@@ -49647,7 +49720,19 @@ var render = function() {
|
|
|
[_c("i", { staticClass: "fas fa-fw fa-edit" })]
|
|
|
),
|
|
|
_vm._v(" "),
|
|
|
- _vm._m(2)
|
|
|
+ _c(
|
|
|
+ "button",
|
|
|
+ {
|
|
|
+ staticClass: "btn btn-sm btn-danger p-lg-1",
|
|
|
+ attrs: {
|
|
|
+ type: "button",
|
|
|
+ "data-toggle": "modal",
|
|
|
+ "data-target":
|
|
|
+ "#credential" + this.data.credid + "deleteModal"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ [_c("i", { staticClass: "fas fa-fw fa-trash-alt" })]
|
|
|
+ )
|
|
|
]
|
|
|
)
|
|
|
])
|
|
|
@@ -49671,19 +49756,6 @@ var staticRenderFns = [
|
|
|
return _c("label", { attrs: { for: "password" } }, [
|
|
|
_c("i", { staticClass: "fas fa-fw fa-key" })
|
|
|
])
|
|
|
- },
|
|
|
- function() {
|
|
|
- var _vm = this
|
|
|
- var _h = _vm.$createElement
|
|
|
- var _c = _vm._self._c || _h
|
|
|
- return _c(
|
|
|
- "button",
|
|
|
- {
|
|
|
- staticClass: "btn btn-sm btn-danger p-lg-1",
|
|
|
- attrs: { type: "button" }
|
|
|
- },
|
|
|
- [_c("i", { staticClass: "fas fa-fw fa-trash-alt" })]
|
|
|
- )
|
|
|
}
|
|
|
]
|
|
|
render._withStripped = true
|
|
|
@@ -62529,6 +62601,7 @@ window.Pusher = __webpack_require__(/*! pusher-js */ "./node_modules/pusher-js/d
|
|
|
window.Echo = new laravel_echo__WEBPACK_IMPORTED_MODULE_0__["default"]({
|
|
|
broadcaster: 'pusher',
|
|
|
key: "upccrt",
|
|
|
+ authEndpoint: '/broadcasting/auth',
|
|
|
wsHost: window.location.hostname,
|
|
|
wsPort: 6001,
|
|
|
disableStats: true
|