|
|
@@ -2063,6 +2063,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
//
|
|
|
//
|
|
|
//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
|
props: ['credential'],
|
|
|
data: function data() {
|
|
|
@@ -2076,6 +2097,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
Echo.channel('credentials').listen('CredentialUpdated', function (e) {
|
|
|
_this.data = JSON.parse(e.data);
|
|
|
});
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ rndStr: function rndStr(len) {
|
|
|
+ var text = "";
|
|
|
+ var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%";
|
|
|
+
|
|
|
+ for (var i = 0; i < len; i++) {
|
|
|
+ text += chars.charAt(Math.floor(Math.random() * chars.length));
|
|
|
+ }
|
|
|
+
|
|
|
+ return text;
|
|
|
+ },
|
|
|
+ getRandomPassword: function getRandomPassword() {
|
|
|
+ this.data.credpass = this.rndStr(16);
|
|
|
+ },
|
|
|
+ updateCredential: function updateCredential() {
|
|
|
+ axios.put('/api/credentials/' + this.data.credid, this.data).then(function (response) {})["catch"](function (error) {
|
|
|
+ console.error(error);
|
|
|
+ });
|
|
|
+ $('#credential' + this.data.credid + 'editModal').modal('hide');
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -2192,7 +2234,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
data: function data() {
|
|
|
return {
|
|
|
data: JSON.parse(this.workOrder),
|
|
|
- storeName: null,
|
|
|
storeList: null
|
|
|
};
|
|
|
},
|
|
|
@@ -2201,28 +2242,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
|
Echo.channel('work-orders').listen('WorkOrderUpdated', function (e) {
|
|
|
_this.data = JSON.parse(e.data);
|
|
|
- _this.storeName = _this.getStoreName();
|
|
|
});
|
|
|
axios.get('/api/stores').then(function (response) {
|
|
|
- _this.storeList = response.data;
|
|
|
+ _this.storeList = new Map();
|
|
|
+ response.data.map(function (val) {
|
|
|
+ _this.storeList.set(val.storeid, val);
|
|
|
+ });
|
|
|
})["catch"](function (error) {
|
|
|
console.error(error);
|
|
|
});
|
|
|
- this.storeList = this.getStoreName();
|
|
|
},
|
|
|
methods: {
|
|
|
updateWorkOrder: function updateWorkOrder() {
|
|
|
axios.put('/api/workorders/' + this.data.woid, this.data).then(function (response) {})["catch"](function (error) {});
|
|
|
$('#workordereditModal').modal('hide');
|
|
|
- },
|
|
|
- getStoreName: function getStoreName() {
|
|
|
- var _this2 = this;
|
|
|
-
|
|
|
- axios.get('/api/stores/' + this.data.storeid).then(function (response) {
|
|
|
- _this2.storeName = response.data.storesname;
|
|
|
- })["catch"](function (error) {
|
|
|
- console.error(error);
|
|
|
- });
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -48821,6 +48854,133 @@ var render = function() {
|
|
|
"div",
|
|
|
{ staticClass: "bg-lightgray m-1 p-2 border rounded container-fluid" },
|
|
|
[
|
|
|
+ _c(
|
|
|
+ "modal",
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ id: "credential" + this.data.credid + "editModal",
|
|
|
+ tabindex: "-1",
|
|
|
+ role: "dialog",
|
|
|
+ "aria-labelledby":
|
|
|
+ "credential" + this.data.credid + "editModalLabel"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ [
|
|
|
+ _c(
|
|
|
+ "h5",
|
|
|
+ {
|
|
|
+ staticClass: "modal-title",
|
|
|
+ attrs: { slot: "header", id: "credentialeditModalLabel" },
|
|
|
+ slot: "header"
|
|
|
+ },
|
|
|
+ [_vm._v("\r\n Edit Credential\r\n ")]
|
|
|
+ ),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c("div", { attrs: { slot: "body" }, slot: "body" }, [
|
|
|
+ _c("div", { staticClass: "form-group" }, [
|
|
|
+ _c("label", { attrs: { for: "username" } }, [_vm._v("Username")]),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c("input", {
|
|
|
+ directives: [
|
|
|
+ {
|
|
|
+ name: "model",
|
|
|
+ rawName: "v-model",
|
|
|
+ value: this.data.creduser,
|
|
|
+ expression: "this.data.creduser"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ staticClass: "form-control credential",
|
|
|
+ attrs: {
|
|
|
+ type: "text",
|
|
|
+ name: "username" + this.data.credid,
|
|
|
+ id: "username" + this.data.credid
|
|
|
+ },
|
|
|
+ domProps: { value: this.data.creduser },
|
|
|
+ on: {
|
|
|
+ input: function($event) {
|
|
|
+ if ($event.target.composing) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ _vm.$set(this.data, "creduser", $event.target.value)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ ]),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c("div", { staticClass: "form-group" }, [
|
|
|
+ _c("label", { attrs: { for: "password" } }, [_vm._v("Password")]),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c("input", {
|
|
|
+ directives: [
|
|
|
+ {
|
|
|
+ name: "model",
|
|
|
+ rawName: "v-model",
|
|
|
+ value: this.data.credpass,
|
|
|
+ expression: "this.data.credpass"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ staticClass: "form-control credential",
|
|
|
+ attrs: {
|
|
|
+ type: "text",
|
|
|
+ name: "password" + this.data.credid,
|
|
|
+ id: "password" + this.data.credid
|
|
|
+ },
|
|
|
+ domProps: { value: this.data.credpass },
|
|
|
+ on: {
|
|
|
+ input: function($event) {
|
|
|
+ if ($event.target.composing) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ _vm.$set(this.data, "credpass", $event.target.value)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c(
|
|
|
+ "button",
|
|
|
+ {
|
|
|
+ staticClass: "btn btn-secondary",
|
|
|
+ attrs: { type: "button" },
|
|
|
+ on: {
|
|
|
+ click: function($event) {
|
|
|
+ return _vm.getRandomPassword()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ [_vm._v("Generate Random")]
|
|
|
+ )
|
|
|
+ ]),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c("div", { staticClass: "form-group" })
|
|
|
+ ]),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c("div", { attrs: { slot: "footer" }, slot: "footer" }, [
|
|
|
+ _c(
|
|
|
+ "button",
|
|
|
+ {
|
|
|
+ staticClass: "btn btn-secondary",
|
|
|
+ attrs: { type: "button", "data-dismiss": "modal" }
|
|
|
+ },
|
|
|
+ [_vm._v("Close")]
|
|
|
+ ),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c(
|
|
|
+ "button",
|
|
|
+ {
|
|
|
+ staticClass: "btn btn-primary",
|
|
|
+ attrs: { type: "button" },
|
|
|
+ on: {
|
|
|
+ click: function($event) {
|
|
|
+ return _vm.updateCredential()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ [_vm._v("Save")]
|
|
|
+ )
|
|
|
+ ])
|
|
|
+ ]
|
|
|
+ ),
|
|
|
+ _vm._v(" "),
|
|
|
_c("div", { staticClass: "row no-gutters" }, [
|
|
|
_c("div", { staticClass: "h5 col-3 text-left" }, [
|
|
|
_vm._v(_vm._s(this.data.creddesc))
|
|
|
@@ -48886,9 +49046,32 @@ var render = function() {
|
|
|
])
|
|
|
]),
|
|
|
_vm._v(" "),
|
|
|
- _vm._m(2)
|
|
|
+ _c(
|
|
|
+ "div",
|
|
|
+ {
|
|
|
+ staticClass: "btn-group col-lg-2 align-self-end w-25 w-lg-auto",
|
|
|
+ attrs: { role: "group", "aria-label": "Edit and Delete" }
|
|
|
+ },
|
|
|
+ [
|
|
|
+ _c(
|
|
|
+ "button",
|
|
|
+ {
|
|
|
+ staticClass: "btn btn-sm btn-secondary p-lg-1",
|
|
|
+ attrs: {
|
|
|
+ type: "button",
|
|
|
+ "data-toggle": "modal",
|
|
|
+ "data-target": "#credential" + this.data.credid + "editModal"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ [_c("i", { staticClass: "fas fa-fw fa-edit" })]
|
|
|
+ ),
|
|
|
+ _vm._v(" "),
|
|
|
+ _vm._m(2)
|
|
|
+ ]
|
|
|
+ )
|
|
|
])
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ 1
|
|
|
)
|
|
|
}
|
|
|
var staticRenderFns = [
|
|
|
@@ -48913,30 +49096,12 @@ var staticRenderFns = [
|
|
|
var _h = _vm.$createElement
|
|
|
var _c = _vm._self._c || _h
|
|
|
return _c(
|
|
|
- "div",
|
|
|
+ "button",
|
|
|
{
|
|
|
- staticClass: "btn-group col-lg-2 align-self-end w-25 w-lg-auto",
|
|
|
- attrs: { role: "group", "aria-label": "Edit and Delete" }
|
|
|
+ staticClass: "btn btn-sm btn-danger p-lg-1",
|
|
|
+ attrs: { type: "button" }
|
|
|
},
|
|
|
- [
|
|
|
- _c(
|
|
|
- "button",
|
|
|
- {
|
|
|
- staticClass: "btn btn-sm btn-secondary p-lg-1",
|
|
|
- attrs: { type: "button" }
|
|
|
- },
|
|
|
- [_c("i", { staticClass: "fas fa-fw fa-edit" })]
|
|
|
- ),
|
|
|
- _vm._v(" "),
|
|
|
- _c(
|
|
|
- "button",
|
|
|
- {
|
|
|
- staticClass: "btn btn-sm btn-danger p-lg-1",
|
|
|
- attrs: { type: "button" }
|
|
|
- },
|
|
|
- [_c("i", { staticClass: "fas fa-fw fa-trash-alt" })]
|
|
|
- )
|
|
|
- ]
|
|
|
+ [_c("i", { staticClass: "fas fa-fw fa-trash-alt" })]
|
|
|
)
|
|
|
}
|
|
|
]
|
|
|
@@ -49208,54 +49373,59 @@ var render = function() {
|
|
|
_c("div", { staticClass: "form-group" }, [
|
|
|
_c("label", { attrs: { for: "storelist" } }, [_vm._v("Store")]),
|
|
|
_vm._v(" "),
|
|
|
- _c(
|
|
|
- "select",
|
|
|
- {
|
|
|
- directives: [
|
|
|
+ _vm.storeList
|
|
|
+ ? _c(
|
|
|
+ "select",
|
|
|
{
|
|
|
- name: "model",
|
|
|
- rawName: "v-model",
|
|
|
- value: _vm.data.storeid,
|
|
|
- expression: "data.storeid"
|
|
|
- }
|
|
|
- ],
|
|
|
- staticClass: "form-control",
|
|
|
- attrs: { name: "storelist", id: "storelist" },
|
|
|
- on: {
|
|
|
- change: function($event) {
|
|
|
- var $$selectedVal = Array.prototype.filter
|
|
|
- .call($event.target.options, function(o) {
|
|
|
- return o.selected
|
|
|
- })
|
|
|
- .map(function(o) {
|
|
|
- var val = "_value" in o ? o._value : o.value
|
|
|
- return val
|
|
|
- })
|
|
|
- _vm.$set(
|
|
|
- _vm.data,
|
|
|
- "storeid",
|
|
|
- $event.target.multiple
|
|
|
- ? $$selectedVal
|
|
|
- : $$selectedVal[0]
|
|
|
- )
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- _vm._l(_vm.storeList, function(store) {
|
|
|
- return _c(
|
|
|
- "option",
|
|
|
- { key: store.storeid, domProps: { value: store.storeid } },
|
|
|
- [
|
|
|
- _vm._v(
|
|
|
- "\n " +
|
|
|
- _vm._s(store.storesname) +
|
|
|
- "\n "
|
|
|
+ directives: [
|
|
|
+ {
|
|
|
+ name: "model",
|
|
|
+ rawName: "v-model",
|
|
|
+ value: _vm.data.storeid,
|
|
|
+ expression: "data.storeid"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ staticClass: "form-control",
|
|
|
+ attrs: { name: "storelist", id: "storelist" },
|
|
|
+ on: {
|
|
|
+ change: function($event) {
|
|
|
+ var $$selectedVal = Array.prototype.filter
|
|
|
+ .call($event.target.options, function(o) {
|
|
|
+ return o.selected
|
|
|
+ })
|
|
|
+ .map(function(o) {
|
|
|
+ var val = "_value" in o ? o._value : o.value
|
|
|
+ return val
|
|
|
+ })
|
|
|
+ _vm.$set(
|
|
|
+ _vm.data,
|
|
|
+ "storeid",
|
|
|
+ $event.target.multiple
|
|
|
+ ? $$selectedVal
|
|
|
+ : $$selectedVal[0]
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ _vm._l(_vm.storeList.values(), function(store) {
|
|
|
+ return _c(
|
|
|
+ "option",
|
|
|
+ {
|
|
|
+ key: store.storeid,
|
|
|
+ domProps: { value: store.storeid }
|
|
|
+ },
|
|
|
+ [
|
|
|
+ _vm._v(
|
|
|
+ "\n " +
|
|
|
+ _vm._s(store.storesname) +
|
|
|
+ "\n "
|
|
|
+ )
|
|
|
+ ]
|
|
|
)
|
|
|
- ]
|
|
|
+ }),
|
|
|
+ 0
|
|
|
)
|
|
|
- }),
|
|
|
- 0
|
|
|
- )
|
|
|
+ : _vm._e()
|
|
|
])
|
|
|
]),
|
|
|
_vm._v(" "),
|
|
|
@@ -49307,7 +49477,11 @@ var render = function() {
|
|
|
_c("p", [
|
|
|
_c("i", { staticClass: "fas fa-fw fa-building" }),
|
|
|
_vm._v(" "),
|
|
|
- _c("span", [_vm._v(_vm._s(_vm.storeName))])
|
|
|
+ this.storeList
|
|
|
+ ? _c("span", [
|
|
|
+ _vm._v(_vm._s(this.storeList.get(this.data.storeid).storesname))
|
|
|
+ ])
|
|
|
+ : _vm._e()
|
|
|
]),
|
|
|
_vm._v(" "),
|
|
|
_c("p", [
|