|
|
@@ -1994,6 +1994,68 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
+/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/Dashboard.vue?vue&type=script&lang=js&":
|
|
|
+/*!***************************************************************************************************************************************************************!*\
|
|
|
+ !*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/views/Dashboard.vue?vue&type=script&lang=js& ***!
|
|
|
+ \***************************************************************************************************************************************************************/
|
|
|
+/*! exports provided: default */
|
|
|
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+__webpack_require__.r(__webpack_exports__);
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+/* harmony default export */ __webpack_exports__["default"] = ({
|
|
|
+ data: function data() {
|
|
|
+ return {
|
|
|
+ workOrders: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted: function mounted() {
|
|
|
+ var _this = this;
|
|
|
+
|
|
|
+ var token = localStorage.getItem('jwt');
|
|
|
+ var user = localStorage.getItem('user');
|
|
|
+ axios.defaults.headers.common['Content-Type'] = 'application/json';
|
|
|
+ axios.defaults.headers.common['Authorization'] = 'Bearer ' + token;
|
|
|
+ axios.get('api/users/' + user + '/workorders').then(function (response) {
|
|
|
+ _this.workOrders = response.data;
|
|
|
+ })["catch"](function (error) {
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ beforeRouteEnter: function beforeRouteEnter(to, from, next) {
|
|
|
+ if (!localStorage.getItem('jwt')) {
|
|
|
+ return next('login');
|
|
|
+ }
|
|
|
+
|
|
|
+ next();
|
|
|
+ }
|
|
|
+});
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+
|
|
|
/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/Login.vue?vue&type=script&lang=js&":
|
|
|
/*!***********************************************************************************************************************************************************!*\
|
|
|
!*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/views/Login.vue?vue&type=script&lang=js& ***!
|
|
|
@@ -2064,7 +2126,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
localStorage.setItem('jwt', response.data.success.token);
|
|
|
|
|
|
if (localStorage.getItem('jwt') != null) {
|
|
|
- _this.$router.go('/');
|
|
|
+ _this.$router.go('/dashboard');
|
|
|
}
|
|
|
})["catch"](function (error) {
|
|
|
console.error(error);
|
|
|
@@ -49034,7 +49096,37 @@ var render = function() {
|
|
|
attrs: { id: "navbarSupportedContent" }
|
|
|
},
|
|
|
[
|
|
|
- _vm._m(1),
|
|
|
+ _c("ul", { staticClass: "navbar-nav mr-auto text-center" }, [
|
|
|
+ _vm._m(1),
|
|
|
+ _vm._v(" "),
|
|
|
+ _vm._m(2),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c(
|
|
|
+ "li",
|
|
|
+ { staticClass: "nav-item" },
|
|
|
+ [
|
|
|
+ _c(
|
|
|
+ "router-link",
|
|
|
+ {
|
|
|
+ staticClass: "nav-link",
|
|
|
+ attrs: { to: { name: "dashboard" } }
|
|
|
+ },
|
|
|
+ [
|
|
|
+ _c("i", { staticClass: "fas fa-tachometer-alt" }),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c(
|
|
|
+ "span",
|
|
|
+ { staticClass: "d-none d-sm-block d-md-inline" },
|
|
|
+ [_vm._v("Dashboard")]
|
|
|
+ )
|
|
|
+ ]
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ 1
|
|
|
+ ),
|
|
|
+ _vm._v(" "),
|
|
|
+ _vm._m(3)
|
|
|
+ ]),
|
|
|
_vm._v(" "),
|
|
|
_c(
|
|
|
"ul",
|
|
|
@@ -49105,44 +49197,40 @@ var staticRenderFns = [
|
|
|
var _vm = this
|
|
|
var _h = _vm.$createElement
|
|
|
var _c = _vm._self._c || _h
|
|
|
- return _c("ul", { staticClass: "navbar-nav mr-auto text-center" }, [
|
|
|
- _c("li", { staticClass: "nav-item" }, [
|
|
|
- _c("a", { staticClass: "nav-link", attrs: { href: "#" } }, [
|
|
|
- _c("i", { staticClass: "fas fa-sign-in-alt" }),
|
|
|
- _vm._v(" "),
|
|
|
- _c("span", { staticClass: "d-none d-sm-block d-md-inline" }, [
|
|
|
- _vm._v("Check-In")
|
|
|
- ])
|
|
|
- ])
|
|
|
- ]),
|
|
|
- _vm._v(" "),
|
|
|
- _c("li", { staticClass: "nav-item" }, [
|
|
|
- _c("a", { staticClass: "nav-link", attrs: { href: "#" } }, [
|
|
|
- _c("i", { staticClass: "fas fa-sign-out-alt" }),
|
|
|
- _vm._v(" "),
|
|
|
- _c("span", { staticClass: "d-none d-sm-block d-md-inline" }, [
|
|
|
- _vm._v("Check-Out")
|
|
|
- ])
|
|
|
+ return _c("li", { staticClass: "nav-item" }, [
|
|
|
+ _c("a", { staticClass: "nav-link", attrs: { href: "#" } }, [
|
|
|
+ _c("i", { staticClass: "fas fa-sign-in-alt" }),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c("span", { staticClass: "d-none d-sm-block d-md-inline" }, [
|
|
|
+ _vm._v("Check-In")
|
|
|
])
|
|
|
- ]),
|
|
|
- _vm._v(" "),
|
|
|
- _c("li", { staticClass: "nav-item" }, [
|
|
|
- _c("a", { staticClass: "nav-link", attrs: { href: "#" } }, [
|
|
|
- _c("i", { staticClass: "fas fa-tachometer-alt" }),
|
|
|
- _vm._v(" "),
|
|
|
- _c("span", { staticClass: "d-none d-sm-block d-md-inline" }, [
|
|
|
- _vm._v("Dashboard")
|
|
|
- ])
|
|
|
+ ])
|
|
|
+ ])
|
|
|
+ },
|
|
|
+ function() {
|
|
|
+ var _vm = this
|
|
|
+ var _h = _vm.$createElement
|
|
|
+ var _c = _vm._self._c || _h
|
|
|
+ return _c("li", { staticClass: "nav-item" }, [
|
|
|
+ _c("a", { staticClass: "nav-link", attrs: { href: "#" } }, [
|
|
|
+ _c("i", { staticClass: "fas fa-sign-out-alt" }),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c("span", { staticClass: "d-none d-sm-block d-md-inline" }, [
|
|
|
+ _vm._v("Check-Out")
|
|
|
])
|
|
|
- ]),
|
|
|
- _vm._v(" "),
|
|
|
- _c("li", { staticClass: "nav-item" }, [
|
|
|
- _c("a", { staticClass: "nav-link", attrs: { href: "#" } }, [
|
|
|
- _c("i", { staticClass: "fas fa-chart-bar" }),
|
|
|
- _vm._v(" "),
|
|
|
- _c("span", { staticClass: "d-none d-sm-block d-md-inline" }, [
|
|
|
- _vm._v("Reports")
|
|
|
- ])
|
|
|
+ ])
|
|
|
+ ])
|
|
|
+ },
|
|
|
+ function() {
|
|
|
+ var _vm = this
|
|
|
+ var _h = _vm.$createElement
|
|
|
+ var _c = _vm._self._c || _h
|
|
|
+ return _c("li", { staticClass: "nav-item" }, [
|
|
|
+ _c("a", { staticClass: "nav-link", attrs: { href: "#" } }, [
|
|
|
+ _c("i", { staticClass: "fas fa-chart-bar" }),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c("span", { staticClass: "d-none d-sm-block d-md-inline" }, [
|
|
|
+ _vm._v("Reports")
|
|
|
])
|
|
|
])
|
|
|
])
|
|
|
@@ -49152,6 +49240,67 @@ render._withStripped = true
|
|
|
|
|
|
|
|
|
|
|
|
+/***/ }),
|
|
|
+
|
|
|
+/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/Dashboard.vue?vue&type=template&id=1f79daf6&":
|
|
|
+/*!*******************************************************************************************************************************************************************************************************!*\
|
|
|
+ !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/views/Dashboard.vue?vue&type=template&id=1f79daf6& ***!
|
|
|
+ \*******************************************************************************************************************************************************************************************************/
|
|
|
+/*! exports provided: render, staticRenderFns */
|
|
|
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+__webpack_require__.r(__webpack_exports__);
|
|
|
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
|
|
|
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
|
|
|
+var render = function() {
|
|
|
+ var _vm = this
|
|
|
+ var _h = _vm.$createElement
|
|
|
+ var _c = _vm._self._c || _h
|
|
|
+ return _c("div", { staticClass: "container" }, [
|
|
|
+ _c("div", { staticClass: "row justify-content-center" }, [
|
|
|
+ _c(
|
|
|
+ "div",
|
|
|
+ { staticClass: "col-md-12" },
|
|
|
+ _vm._l(_vm.workOrders, function(workOrder, index) {
|
|
|
+ return _c("div", { key: workOrder.woid, staticClass: "col-md-4" }, [
|
|
|
+ _c("div", { staticClass: "card" }, [
|
|
|
+ _c("div", { staticClass: "card-header" }, [
|
|
|
+ _c("h4", { staticClass: "card-title" }, [
|
|
|
+ _vm._v(_vm._s(workOrder.woid))
|
|
|
+ ])
|
|
|
+ ]),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c("div", { staticClass: "card-body card-body-dark" }, [
|
|
|
+ _c("div", [
|
|
|
+ _vm._v(
|
|
|
+ "\n " +
|
|
|
+ _vm._s(workOrder.probdesc) +
|
|
|
+ "\n "
|
|
|
+ )
|
|
|
+ ]),
|
|
|
+ _vm._v(" "),
|
|
|
+ _c("div", [
|
|
|
+ _vm._v(
|
|
|
+ "\n " +
|
|
|
+ _vm._s(workOrder.suggested) +
|
|
|
+ "\n "
|
|
|
+ )
|
|
|
+ ])
|
|
|
+ ])
|
|
|
+ ])
|
|
|
+ ])
|
|
|
+ }),
|
|
|
+ 0
|
|
|
+ )
|
|
|
+ ])
|
|
|
+ ])
|
|
|
+}
|
|
|
+var staticRenderFns = []
|
|
|
+render._withStripped = true
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/Login.vue?vue&type=template&id=12f5395a&":
|
|
|
@@ -64429,8 +64578,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var vue_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue-router */ "./node_modules/vue-router/dist/vue-router.esm.js");
|
|
|
/* harmony import */ var _views_App__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./views/App */ "./resources/js/views/App.vue");
|
|
|
-/* harmony import */ var _views_Login__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./views/Login */ "./resources/js/views/Login.vue");
|
|
|
-/* harmony import */ var _views_Welcome__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./views/Welcome */ "./resources/js/views/Welcome.vue");
|
|
|
+/* harmony import */ var _views_Dashboard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./views/Dashboard */ "./resources/js/views/Dashboard.vue");
|
|
|
+/* harmony import */ var _views_Login__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./views/Login */ "./resources/js/views/Login.vue");
|
|
|
+/* harmony import */ var _views_Welcome__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./views/Welcome */ "./resources/js/views/Welcome.vue");
|
|
|
/**
|
|
|
* First we will load all of this project's JavaScript dependencies which
|
|
|
* includes Vue and other libraries. It is a great starting point when
|
|
|
@@ -64445,7 +64595,8 @@ __webpack_require__(/*! ./notify.min.js */ "./resources/js/notify.min.js");
|
|
|
|
|
|
|
|
|
vue__WEBPACK_IMPORTED_MODULE_0___default.a.use(vue_router__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
|
|
- // import WorkOrder from './views/WorkOrder'
|
|
|
+
|
|
|
+ //import WorkOrder from './views/WorkOrder'
|
|
|
|
|
|
|
|
|
|
|
|
@@ -64454,14 +64605,18 @@ var router = new vue_router__WEBPACK_IMPORTED_MODULE_1__["default"]({
|
|
|
routes: [{
|
|
|
path: '/',
|
|
|
name: 'home',
|
|
|
- component: _views_Welcome__WEBPACK_IMPORTED_MODULE_4__["default"]
|
|
|
+ component: _views_Welcome__WEBPACK_IMPORTED_MODULE_5__["default"]
|
|
|
}, {
|
|
|
path: '/login',
|
|
|
name: 'login',
|
|
|
- component: _views_Login__WEBPACK_IMPORTED_MODULE_3__["default"]
|
|
|
+ component: _views_Login__WEBPACK_IMPORTED_MODULE_4__["default"]
|
|
|
+ }, {
|
|
|
+ path: '/dashboard',
|
|
|
+ name: 'dashboard',
|
|
|
+ component: _views_Dashboard__WEBPACK_IMPORTED_MODULE_3__["default"]
|
|
|
}
|
|
|
/* {
|
|
|
- path: '/workorders',
|
|
|
+ path: '/workorders/:id',
|
|
|
name: 'workorders',
|
|
|
component: WorkOrder,
|
|
|
} */
|
|
|
@@ -64929,6 +65084,76 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
|
|
|
|
|
|
|
+/***/ }),
|
|
|
+
|
|
|
+/***/ "./resources/js/views/Dashboard.vue":
|
|
|
+/*!******************************************!*\
|
|
|
+ !*** ./resources/js/views/Dashboard.vue ***!
|
|
|
+ \******************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+__webpack_require__.r(__webpack_exports__);
|
|
|
+/* harmony import */ var _Dashboard_vue_vue_type_template_id_1f79daf6___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Dashboard.vue?vue&type=template&id=1f79daf6& */ "./resources/js/views/Dashboard.vue?vue&type=template&id=1f79daf6&");
|
|
|
+/* harmony import */ var _Dashboard_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Dashboard.vue?vue&type=script&lang=js& */ "./resources/js/views/Dashboard.vue?vue&type=script&lang=js&");
|
|
|
+/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Dashboard_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Dashboard_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
|
|
+/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/* normalize component */
|
|
|
+
|
|
|
+var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
|
|
|
+ _Dashboard_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
|
+ _Dashboard_vue_vue_type_template_id_1f79daf6___WEBPACK_IMPORTED_MODULE_0__["render"],
|
|
|
+ _Dashboard_vue_vue_type_template_id_1f79daf6___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
|
|
|
+ false,
|
|
|
+ null,
|
|
|
+ null,
|
|
|
+ null
|
|
|
+
|
|
|
+)
|
|
|
+
|
|
|
+/* hot reload */
|
|
|
+if (false) { var api; }
|
|
|
+component.options.__file = "resources/js/views/Dashboard.vue"
|
|
|
+/* harmony default export */ __webpack_exports__["default"] = (component.exports);
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+
|
|
|
+/***/ "./resources/js/views/Dashboard.vue?vue&type=script&lang=js&":
|
|
|
+/*!*******************************************************************!*\
|
|
|
+ !*** ./resources/js/views/Dashboard.vue?vue&type=script&lang=js& ***!
|
|
|
+ \*******************************************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+__webpack_require__.r(__webpack_exports__);
|
|
|
+/* harmony import */ var _node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Dashboard_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib??ref--4-0!../../../node_modules/vue-loader/lib??vue-loader-options!./Dashboard.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/Dashboard.vue?vue&type=script&lang=js&");
|
|
|
+/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Dashboard_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]);
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+
|
|
|
+/***/ "./resources/js/views/Dashboard.vue?vue&type=template&id=1f79daf6&":
|
|
|
+/*!*************************************************************************!*\
|
|
|
+ !*** ./resources/js/views/Dashboard.vue?vue&type=template&id=1f79daf6& ***!
|
|
|
+ \*************************************************************************/
|
|
|
+/*! exports provided: render, staticRenderFns */
|
|
|
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+__webpack_require__.r(__webpack_exports__);
|
|
|
+/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Dashboard_vue_vue_type_template_id_1f79daf6___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/vue-loader/lib??vue-loader-options!./Dashboard.vue?vue&type=template&id=1f79daf6& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/Dashboard.vue?vue&type=template&id=1f79daf6&");
|
|
|
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Dashboard_vue_vue_type_template_id_1f79daf6___WEBPACK_IMPORTED_MODULE_0__["render"]; });
|
|
|
+
|
|
|
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Dashboard_vue_vue_type_template_id_1f79daf6___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "./resources/js/views/Login.vue":
|